zoomy_core.symsolver.backend_cxx#
The C++ backend of the symbolic solvers, shared by foam and AMReX: it prints a solver
template as the host program Solver.H. Both runtimes include
RUNTIME_HEADER (rt_common.H), and a driver combines with a strategy by
inheritance, driver first.
Module Contents#
Classes#
The settings of a hyperbolic solver on a C++ runtime and the printing of its host
program ( |
|
The Chorin projection template ( |
Functions#
The initial state |
|
Write the |
Data#
API#
- zoomy_core.symsolver.backend_cxx.RUNTIME_HEADER#
‘with_name(…)’
- class zoomy_core.symsolver.backend_cxx.CxxBackend(**kwargs)#
Bases:
zoomy_core.symsolver.settings.HyperbolicSettingsThe settings of a hyperbolic solver on a C++ runtime and the printing of its host program (
_print); the driver subclasses implementbuildandrun.Initialization
- couple#
‘Dict(…)’
- subcycling#
‘Boolean(…)’
- gmres_restart#
‘Integer(…)’
- abstract build(nsm, dimension)#
Print the host program (
self.source), write the build tree and compile (cached); returns the binary.
- abstract run(mesh, model, Q0, workdir)#
March
Q0totime_end(write the case intoworkdir, launch, read back); returns(time, Q)and keeps the snapshots inself.snapshots.Args
Q0: initial state in the mesh’s order.model: the SystemModel or NSM (see_prepare).
- class zoomy_core.symsolver.backend_cxx.CxxChorinBackend(**kwargs)#
Bases:
zoomy_core.symsolver.backend_cxx.CxxBackend,zoomy_core.symsolver.settings.ChorinSettingsThe Chorin projection template (
ChorinTemplate) on a C++ runtime;runtakes(pred, press, corr), the predictor and the pressure and corrector systems of the model’s split.References
Chorin 1968, https://doi.org/10.1090/S0025-5718-1968-0242392-2
Initialization
- zoomy_core.symsolver.backend_cxx.initial_state(mesh, model)#
The initial state
Q0(n_state, n_inner_cells) ofmodelonmeshfor a C++ backend’srun: the model’s initial conditions at the cell centres (zero without).Args
model: a SystemModel or NSM, or the Chorin triple(pred, press, corr).
- zoomy_core.symsolver.backend_cxx.write_snapshots(path, mesh, model, snapshots)#
Write the
snapshots[(time, Q)]of a C++ backend run (solver.snapshots) as a zoomy HDF5 store atpath(mesh, state names, oneiteration_kper snapshot); returnspath.