9 assert solver.unknowns == 5
10 assert solver.number_of_auxiliary_variables == 0
15 names = {term.name
for term
in solver.pde_terms}
16 assert names == {
"flux",
"volumetricSource",
"maxEigenvalue",
"initPointWisely"}
17 assert not solver.requires_user_class
21 with pytest.raises(ValueError):
27 def _source_implementation(self):
28 return "tarch::memset(S, 0, 5 * sizeof(double));"
30 names = {term.name
for term
in WithSource(
"Euler").pde_terms}
31 assert "volumetricSource" in names
36 solver.add_auxiliary_variables(
40 "CCZ4Fields", dict(exagrype.api.FOCCZ4Solver.Unknowns)
42 solver.add_auxiliary_variables(ccz4_fields)
43 terms = {term.name: term.implementation
for term
in solver.pde_terms}
44 for name
in [
"flux",
"volumetricSource",
"maxEigenvalue"]:
45 assert f
"{ccz4_fields.argument_name}," in terms[name]
46 assert "spacetime" not in terms[name]
51 unknowns = dict(exagrype.api.FOCCZ4Solver.Unknowns)
53 with pytest.raises(ValueError):
59 solver.add_auxiliary_variables(
62 with pytest.raises(ValueError):
63 solver.generate_solver_realisation(
None,
None,
None,
None,
None,
None)
71 solver.add_auxiliary_variables(
73 "CCZ4Fields", dict(exagrype.api.FOCCZ4Solver.Unknowns)
76 assert solver.generate_solver_realisation(
None,
None,
None,
None,
None,
None) ==
"ok"
Compressible Euler equations of an ideal gas.
A set of auxiliary variables of a solver.
Abstract base class for all ExaHyPE 2 solvers.
This file is part of the ExaGRyPE project.
test_two_sets_with_the_ccz4_size_are_ambiguous()
test_solver_registers_pde_terms()
test_solver_with_the_ccz4_fields_passes_the_check(monkeypatch)
test_flux_source_and_eigenvalue_see_the_ccz4_fields()
test_gamma_has_to_exceed_one()
test_hooks_extend_the_solver()
test_solver_has_five_named_unknowns()
test_solver_without_the_ccz4_fields_cannot_be_generated()