Peano
Loading...
Searching...
No Matches
test_exagrype_ccz4_solver Namespace Reference

Functions

 test_solver_has_58_named_unknowns ()
 _call (solver, term)
 C++ which calls the kernel of term.
 test_solver_registers_ccz4_pde_terms ()
 The non-conservative product is missing until the solver is realised (test_realisation_registers_the_ncp_which_fits_the_numerical_scheme).
 test_solver_has_no_initial_condition_of_its_own ()
 test_initial_condition_is_added_from_outside ()
 test_parameters_override_defaults ()
 test_unknown_parameter_is_rejected ()
 test_removed_parameters_are_rejected (key)
 test_switches_are_integers ()
 test_switches_reject_anything_but_zero_and_one (value)
 test_kernel_calls_pass_the_parameters_of_the_kernel_signature (solver_class, term)
 The CCZ4 parameters of a kernel call match the kernel's declaration.
 test_constraint_enforcement_is_opt_in ()
 _central_differences (solver)
 _dissipation (solver)
 _lopsided (solver, advected_quantities=None, advection_velocity=None)
 FD4 with lopsided advection, by default of the quantities the solver asks for.
 _finite_volumes (solver)
 test_ncp_adds_advection_iff_the_scheme_does_not (solver_class, parameters, scheme_factory, advection)
 The non-conservative product adds the advection terms if and only if the Finite Differences do not (src/exagrype/ccz4/adrs/0003-the-solver-picks-who-adds-the-advection.md).
 test_ncp_adds_advection_rejects_lopsided_advection_of_other_quantities (solver_class)
 A scheme which advects other quantities than those the kernels leave out would add some advection terms twice or miss some.
 test_ncp_adds_advection_rejects_unknown_schemes ()
 _constexpr_list (code, name)
 test_central_advection_adds_what_the_lopsided_advection_would_add (solver_class, parameters)
 The advection which the non-conservative product appends covers exactly the quantities and the velocity which the lopsided advection of the scheme gets, i.e.
 _realise (solver, tmp_path)
 Realise a first-order solver with gauge wave initial data on the unit cube.
 _solver_with (scheme_factory)
 _non_conservative_products (solver)
 test_realisation_registers_the_ncp_which_fits_the_numerical_scheme (scheme_factory, advection, tmp_path)
 The solver is created before its numerical scheme, so it can pick the non-conservative product only when it is realised.
 test_realising_twice_replaces_the_ncp_of_the_first_realisation (tmp_path)
 A project can be generated several times.
 test_realisation_rejects_an_ncp_added_by_somebody_else (stateless, tmp_path)
 The solver would replace it silently, and it might add advection terms the scheme adds as well, or miss them (src/exagrype/ccz4/adrs/0003-the-solver-picks-who-adds-the-advection.md).

Variables

 KERNELS_HEADER = kernels_header.read()
 Kernel = exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.RightHandSideKernel

Function Documentation

◆ _call()

test_exagrype_ccz4_solver._call ( solver,
term )
protected

C++ which calls the kernel of term.

The solver registers its non-conservative product only when it is realised, so the call of the kernel is taken from the hook which writes it.

Definition at line 32 of file test_exagrype_ccz4_solver.py.

Referenced by test_kernel_calls_pass_the_parameters_of_the_kernel_signature(), and test_solver_registers_ccz4_pde_terms().

Here is the caller graph for this function:

◆ _central_differences()

test_exagrype_ccz4_solver._central_differences ( solver)
protected

Definition at line 175 of file test_exagrype_ccz4_solver.py.

◆ _constexpr_list()

test_exagrype_ccz4_solver._constexpr_list ( code,
name )
protected

Definition at line 265 of file test_exagrype_ccz4_solver.py.

◆ _dissipation()

test_exagrype_ccz4_solver._dissipation ( solver)
protected

Definition at line 179 of file test_exagrype_ccz4_solver.py.

◆ _finite_volumes()

test_exagrype_ccz4_solver._finite_volumes ( solver)
protected

Definition at line 199 of file test_exagrype_ccz4_solver.py.

◆ _lopsided()

test_exagrype_ccz4_solver._lopsided ( solver,
advected_quantities = None,
advection_velocity = None )
protected

FD4 with lopsided advection, by default of the quantities the solver asks for.

Definition at line 183 of file test_exagrype_ccz4_solver.py.

◆ _non_conservative_products()

test_exagrype_ccz4_solver._non_conservative_products ( solver)
protected

Definition at line 366 of file test_exagrype_ccz4_solver.py.

◆ _realise()

test_exagrype_ccz4_solver._realise ( solver,
tmp_path )
protected

Realise a first-order solver with gauge wave initial data on the unit cube.

Definition at line 339 of file test_exagrype_ccz4_solver.py.

◆ _solver_with()

test_exagrype_ccz4_solver._solver_with ( scheme_factory)
protected

Definition at line 356 of file test_exagrype_ccz4_solver.py.

◆ test_central_advection_adds_what_the_lopsided_advection_would_add()

test_exagrype_ccz4_solver.test_central_advection_adds_what_the_lopsided_advection_would_add ( solver_class,
parameters )

The advection which the non-conservative product appends covers exactly the quantities and the velocity which the lopsided advection of the scheme gets, i.e.

either way the same terms are added. Both read them from advected_quantities() and ADVECTION_VELOCITY, the one definition of the advection terms. The call passes the arguments of exahype2.fd.addCentralAdvection() in the order of its declaration.

Definition at line 281 of file test_exagrype_ccz4_solver.py.

◆ test_constraint_enforcement_is_opt_in()

test_exagrype_ccz4_solver.test_constraint_enforcement_is_opt_in ( )

Definition at line 160 of file test_exagrype_ccz4_solver.py.

◆ test_initial_condition_is_added_from_outside()

test_exagrype_ccz4_solver.test_initial_condition_is_added_from_outside ( )

Definition at line 74 of file test_exagrype_ccz4_solver.py.

References exagrype.api.initialvalues.flat(), and exagrype.api.initialvalues.gauge_wave().

Here is the call graph for this function:

◆ test_kernel_calls_pass_the_parameters_of_the_kernel_signature()

test_exagrype_ccz4_solver.test_kernel_calls_pass_the_parameters_of_the_kernel_signature ( solver_class,
term )

The CCZ4 parameters of a kernel call match the kernel's declaration.

The parameters are doubles and integers, i.e. the compiler does not notice if a call passes them in the wrong order. The test reads the name of the kernel from the generated call and the parameters from its declaration in Kernels.h, i.e. it holds no names of its own (tests/unit/adrs/0001-unit-tests-query-names-from-the-code.md).

Definition at line 137 of file test_exagrype_ccz4_solver.py.

References _call().

Here is the call graph for this function:

◆ test_ncp_adds_advection_iff_the_scheme_does_not()

test_exagrype_ccz4_solver.test_ncp_adds_advection_iff_the_scheme_does_not ( solver_class,
parameters,
scheme_factory,
advection )

The non-conservative product adds the advection terms if and only if the Finite Differences do not (src/exagrype/ccz4/adrs/0003-the-solver-picks-who-adds-the-advection.md).

The Finite Volumes add none, and neither does the non-conservative product.

Definition at line 218 of file test_exagrype_ccz4_solver.py.

◆ test_ncp_adds_advection_rejects_lopsided_advection_of_other_quantities()

test_exagrype_ccz4_solver.test_ncp_adds_advection_rejects_lopsided_advection_of_other_quantities ( solver_class)

A scheme which advects other quantities than those the kernels leave out would add some advection terms twice or miss some.

Definition at line 236 of file test_exagrype_ccz4_solver.py.

◆ test_ncp_adds_advection_rejects_unknown_schemes()

test_exagrype_ccz4_solver.test_ncp_adds_advection_rejects_unknown_schemes ( )

Definition at line 259 of file test_exagrype_ccz4_solver.py.

◆ test_parameters_override_defaults()

test_exagrype_ccz4_solver.test_parameters_override_defaults ( )

Definition at line 85 of file test_exagrype_ccz4_solver.py.

◆ test_realisation_registers_the_ncp_which_fits_the_numerical_scheme()

test_exagrype_ccz4_solver.test_realisation_registers_the_ncp_which_fits_the_numerical_scheme ( scheme_factory,
advection,
tmp_path )

The solver is created before its numerical scheme, so it can pick the non-conservative product only when it is realised.

It registers a single, stateless one

Definition at line 378 of file test_exagrype_ccz4_solver.py.

◆ test_realisation_rejects_an_ncp_added_by_somebody_else()

test_exagrype_ccz4_solver.test_realisation_rejects_an_ncp_added_by_somebody_else ( stateless,
tmp_path )

The solver would replace it silently, and it might add advection terms the scheme adds as well, or miss them (src/exagrype/ccz4/adrs/0003-the-solver-picks-who-adds-the-advection.md).

Definition at line 408 of file test_exagrype_ccz4_solver.py.

◆ test_realising_twice_replaces_the_ncp_of_the_first_realisation()

test_exagrype_ccz4_solver.test_realising_twice_replaces_the_ncp_of_the_first_realisation ( tmp_path)

A project can be generated several times.

Definition at line 398 of file test_exagrype_ccz4_solver.py.

◆ test_removed_parameters_are_rejected()

test_exagrype_ccz4_solver.test_removed_parameters_are_rejected ( key)

Definition at line 103 of file test_exagrype_ccz4_solver.py.

◆ test_solver_has_58_named_unknowns()

test_exagrype_ccz4_solver.test_solver_has_58_named_unknowns ( )

Definition at line 20 of file test_exagrype_ccz4_solver.py.

◆ test_solver_has_no_initial_condition_of_its_own()

test_exagrype_ccz4_solver.test_solver_has_no_initial_condition_of_its_own ( )

Definition at line 69 of file test_exagrype_ccz4_solver.py.

◆ test_solver_registers_ccz4_pde_terms()

test_exagrype_ccz4_solver.test_solver_registers_ccz4_pde_terms ( )

The non-conservative product is missing until the solver is realised (test_realisation_registers_the_ncp_which_fits_the_numerical_scheme).

Definition at line 43 of file test_exagrype_ccz4_solver.py.

References _call().

Here is the call graph for this function:

◆ test_switches_are_integers()

test_exagrype_ccz4_solver.test_switches_are_integers ( )

Definition at line 109 of file test_exagrype_ccz4_solver.py.

◆ test_switches_reject_anything_but_zero_and_one()

test_exagrype_ccz4_solver.test_switches_reject_anything_but_zero_and_one ( value)

Definition at line 124 of file test_exagrype_ccz4_solver.py.

◆ test_unknown_parameter_is_rejected()

test_exagrype_ccz4_solver.test_unknown_parameter_is_rejected ( )

Definition at line 97 of file test_exagrype_ccz4_solver.py.

Variable Documentation

◆ Kernel

test_exagrype_ccz4_solver.Kernel = exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.RightHandSideKernel

Definition at line 172 of file test_exagrype_ccz4_solver.py.

◆ KERNELS_HEADER

test_exagrype_ccz4_solver.KERNELS_HEADER = kernels_header.read()

Definition at line 17 of file test_exagrype_ccz4_solver.py.