embedded3 S2-2a/S2-3: moving bodies on the device (phased tables, host rebuild per step, impose kernel; gate test), the per-span cut wall route, the flag-wake driver and its geometry pre-flight
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
Documentation / Build API Documentation (push) Failing after 4s
CI / Build CPU-Only (Explicit) (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 5s
CI / Format Check (push) Failing after 13s
CI / Clippy Check (push) Failing after 45s
CI / Build (ubuntu-latest) (push) Failing after 2m1s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m35s
CI / Test (macos-latest) (push) Blocked by required conditions
CI / Test (ubuntu-latest) (push) Blocked by required conditions
CI / Python Bindings (maturin) (macos-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
CI / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / WASM Build + Size Check (push) Blocked by required conditions
CI / Distributed Training Tests (push) Blocked by required conditions
CI / CI Success (push) Blocked by required conditions
Documentation / Build API Documentation (push) Failing after 4s
CI / Build CPU-Only (Explicit) (push) Failing after 5s
Documentation / Build User Guide (push) Successful in 5s
CI / Format Check (push) Failing after 13s
CI / Clippy Check (push) Failing after 45s
CI / Build (ubuntu-latest) (push) Failing after 2m1s
Performance Benchmarks / Run Benchmarks (push) Successful in 2m35s
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
2c94ae0bb1
commit
aa096465a6
@@ -472,6 +472,22 @@ impl Mask {
|
||||
Some([p[0] + s[0], p[1] + s[1], p[2] + s[2]])
|
||||
}
|
||||
|
||||
/// The cut-cell load route restricted to the cells (and faces) of the
|
||||
/// planes `k0..k1`, divided by the slab's thickness: the load per unit
|
||||
/// span on a body's mid-section.
|
||||
pub fn cut_wall_force_per_span(
|
||||
&self,
|
||||
body: &Body,
|
||||
f: &Field,
|
||||
mu: f64,
|
||||
t: f64,
|
||||
(k0, k1): (usize, usize),
|
||||
) -> Option<[f64; 3]> {
|
||||
let (p, s) = self.cut_wall_force_parts_in(body, f, mu, t, Some((k0, k1)))?;
|
||||
let lz = (k1 - k0) as f64 * self.grid.dz;
|
||||
Some([(p[0] + s[0]) / lz, (p[1] + s[1]) / lz, (p[2] + s[2]) / lz])
|
||||
}
|
||||
|
||||
/// The cut-cell load route split into its pressure and shear parts.
|
||||
pub fn cut_wall_force_parts(
|
||||
&self,
|
||||
@@ -479,14 +495,27 @@ impl Mask {
|
||||
f: &Field,
|
||||
mu: f64,
|
||||
t: f64,
|
||||
) -> Option<([f64; 3], [f64; 3])> {
|
||||
self.cut_wall_force_parts_in(body, f, mu, t, None)
|
||||
}
|
||||
|
||||
fn cut_wall_force_parts_in(
|
||||
&self,
|
||||
body: &Body,
|
||||
f: &Field,
|
||||
mu: f64,
|
||||
t: f64,
|
||||
planes: Option<(usize, usize)>,
|
||||
) -> Option<([f64; 3], [f64; 3])> {
|
||||
let cut = self.cut.as_ref()?;
|
||||
let g = self.grid;
|
||||
let (nx, ny, nz) = (g.nx, g.ny, g.nz);
|
||||
let (k0, k1) = planes.unwrap_or((0, nz));
|
||||
let mut pressure = [0.0; 3];
|
||||
let mut force = [0.0; 3];
|
||||
for (idx, w) in cut.wall.iter().enumerate() {
|
||||
if self.cell_fluid[idx] {
|
||||
let k = g.kji(idx).0;
|
||||
if self.cell_fluid[idx] && k >= k0 && k < k1 {
|
||||
for c in 0..3 {
|
||||
pressure[c] += f.p[idx] * w[c];
|
||||
}
|
||||
@@ -497,9 +526,9 @@ impl Mask {
|
||||
let w_range = if self.periodic_z { 0..nz } else { 1..nz };
|
||||
for c in 0..3 {
|
||||
let (ir, jr, kr) = match c {
|
||||
0 => (1..nx, 0..ny, 0..nz),
|
||||
1 => (0..nx, 1..ny, 0..nz),
|
||||
_ => (0..nx, 0..ny, w_range.clone()),
|
||||
0 => (1..nx, 0..ny, k0..k1),
|
||||
1 => (0..nx, 1..ny, k0..k1),
|
||||
_ => (0..nx, 0..ny, w_range.start.max(k0)..w_range.end.min(k1)),
|
||||
};
|
||||
for k in kr {
|
||||
for j in jr.clone() {
|
||||
|
||||
Reference in New Issue
Block a user