embedded3: operator export profile at ny 62 (poisson_operator 0.03 s, export_hierarchy 1.44 s); export and poisson_operator public for profiling
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 / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
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
Performance Benchmarks / Run Benchmarks (push) Failing after 4s
CI / Format Check (push) Failing after 4s
CI / Build CPU-Only (Explicit) (push) Failing after 3s
Documentation / Build User Guide (push) Successful in 4s
Documentation / Build API Documentation (push) Failing after 19s
CI / Clippy Check (push) Failing after 33s
CI / Build (ubuntu-latest) (push) Failing after 1m21s
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 / Python Bindings (maturin) (ubuntu-latest) (push) Blocked by required conditions
CI / Build (macos-latest) (push) Waiting to run
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
Performance Benchmarks / Run Benchmarks (push) Failing after 4s
CI / Format Check (push) Failing after 4s
CI / Build CPU-Only (Explicit) (push) Failing after 3s
Documentation / Build User Guide (push) Successful in 4s
Documentation / Build API Documentation (push) Failing after 19s
CI / Clippy Check (push) Failing after 33s
CI / Build (ubuntu-latest) (push) Failing after 1m21s
Co-Authored-By: Claude Fable 5.1 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
aca77fe1ac
commit
11d856b3d4
@@ -197,3 +197,55 @@ fn narrow_band_is_bit_identical_and_fast() {
|
||||
);
|
||||
assert!(vol_same);
|
||||
}
|
||||
|
||||
/// The per-step operator cost at ny 62 (host side of the device CG's
|
||||
/// rebuild: the problem, the fine level, the components, the hierarchy
|
||||
/// export) — S2-2b-ii's target.
|
||||
#[test]
|
||||
#[ignore = "profile: the operator export at ny 62 (seconds)"]
|
||||
fn operator_export_profile_at_ny_62() {
|
||||
use rtx_cfd::solvers::incompressible::embedded3::poisson::export::export_hierarchy;
|
||||
use rtx_cfd::solvers::incompressible::embedded3::{
|
||||
Field, Fluid, Parameters, Solver, WallScheme,
|
||||
};
|
||||
use rtx_cfd::solvers::incompressible::{ConvectionScheme, MultigridParameters};
|
||||
let ny = 62;
|
||||
let h = H / ny as f64;
|
||||
let nx = (2.5 / h).round() as usize;
|
||||
let g = Grid::cubic(nx, ny, ny, h);
|
||||
let cyl = |x: f64, y: f64| ((x - 0.2_f64).powi(2) + (y - 0.2_f64).powi(2)).sqrt() - 0.05;
|
||||
let body = Body::from_sdf(move |x, y, z, _t| cyl(x, y).min(flag_3d(x, y, z, 0.3, h)));
|
||||
let mut solver = Solver::new(
|
||||
Fluid {
|
||||
density: 1000.0,
|
||||
viscosity: 1.0,
|
||||
reference_velocity: 1.0,
|
||||
reference_length: 0.1,
|
||||
},
|
||||
Parameters {
|
||||
wall_scheme: WallScheme::CutCell,
|
||||
convection_scheme: ConvectionScheme::TvdVanAlbada,
|
||||
boundaries: Boundaries {
|
||||
x1: Side::PressureOutlet,
|
||||
..Boundaries::default()
|
||||
},
|
||||
..Parameters::default()
|
||||
},
|
||||
);
|
||||
solver.set_body(body);
|
||||
let mut f = Field::new(g);
|
||||
let t0 = std::time::Instant::now();
|
||||
solver.initialize(&mut f);
|
||||
let t_init = t0.elapsed().as_secs_f64();
|
||||
let t1 = std::time::Instant::now();
|
||||
let problem = solver.poisson_operator(g, 1e-3);
|
||||
let t_op = t1.elapsed().as_secs_f64();
|
||||
let t2 = std::time::Instant::now();
|
||||
let levels = export_hierarchy(&problem, &MultigridParameters::default());
|
||||
let t_exp = t2.elapsed().as_secs_f64();
|
||||
println!(
|
||||
" ny 62 operator: initialize (mask + impose) {t_init:.2} s, poisson_operator {t_op:.2} s, export_hierarchy {t_exp:.2} s ({} levels, {} links)",
|
||||
levels.len(),
|
||||
problem.links.len()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user