forked from 1b-agent/fieldcraft-upstream
solve.fluid: backend "cpu" (the default) or "gpu"
The CPU stays the default, so every existing result and fixture is bit-identical; "gpu" steps on the device FIELDCRAFT_GPU picks through the registered backend, and is an error when the build has none. The desktop app and the CLI (hence the MCP server) register fieldcraft-lbm-gpu at start; the summary names what stepped. Hostile values are errors. Part of #529.
This commit is contained in:
1 parent
b123f31d47
commit
48cc80bef5
8 files changed
+26
-2
No files matched your search
@@ -55,6 +55,8 @@ pub struct FluidStats {
|
||||
pub mach: f64,
|
||||
/// Fluid cells times steps.
|
||||
pub cell_updates: u64,
|
||||
/// What stepped the flow: `cpu`, or `gpu: <adapter>`.
|
||||
pub backend: String,
|
||||
}
|
||||
|
||||
/// The result of a fluid step.
|
||||
@@ -209,6 +211,7 @@ pub fn run(setup: &Setup, flow: &mut dyn Backend, limits: &Limits) -> Result<Flu
|
||||
lattice_velocity: setup.lattice_velocity,
|
||||
mach: setup.mach,
|
||||
cell_updates: (flow.fluid_cells() as u64).saturating_mul(total),
|
||||
backend: flow.name(),
|
||||
},
|
||||
warnings,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user