zoomy_core.symsolver.numpy_backend.solver#
Driver of the NumPy backend: prints the solver template (hyperbolic, Chorin) of a
NumericalSystemModel with PyPrinter and runs it against numpy_backend.runtime, serially;
the default backend (no JAX, no compiler). Mirrors zoomy_jax.symsolver.solver without AD,
GPU, MPI and preCICE.
Module Contents#
Classes#
Finite-volume solver in NumPy: prints |
|
The Chorin projection solver in NumPy ( |
API#
- class zoomy_core.symsolver.numpy_backend.solver.SymbolicHyperbolicSolverNumpy(**kwargs)#
Bases:
zoomy_core.symsolver.settings.HyperbolicSettingsFinite-volume solver in NumPy: prints
HyperbolicTemplatefor a NumericalSystemModel and runs it serially. Usesetup(mesh, model), thenrun(Q, Qaux).Initialization
- on_write#
‘Callable(…)’
- output#
‘String(…)’
- comm#
‘Parameter(…)’
- setup(mesh, model)#
Lift
modelto an NSM if needed, then build the solver onmesh.Args
mesh: a mesh, or the path of a mesh filemodel: SystemModel or NumericalSystemModel
Returns
initial
(Q, Qaux)
- initial_aux(Q, Qaux, parameters=None)#
The aux of the initial state: the pointwise formula plus the derivative aux with the BC ghosts and the boundary closure.
- property parameters#
The kernels’ parameter vector.
- run(Q, Qaux, parameters=None, time0=None)#
March from
time0(defaulttime_start; a restart: the saved state) totime_end; returns(time, Q, Qaux).
- class zoomy_core.symsolver.numpy_backend.solver.SymbolicChorinSolverNumpy(**kwargs)#
Bases:
zoomy_core.symsolver.numpy_backend.solver.SymbolicHyperbolicSolverNumpy,zoomy_core.symsolver.settings.ChorinSettingsThe Chorin projection solver in NumPy (
ChorinTemplate):setup(mesh, pred, press, corr)takes the predictor NSM on the full state and the pressure and corrector systems.References
Chorin 1968, https://doi.org/10.1090/S0025-5718-1968-0242392-2
Initialization
- pressure_linear_solver#
‘OptionParam(…)’
- pressure_amg_rebuild#
‘Integer(…)’
- pressure_amg_growth#
‘Number(…)’
- setup(mesh, pred, press, corr)#
Check the split, build the pressure and corrector kernels and the linear-solver settings, then
_setup; returns the initial(Q, Qaux).