1"""Unit tests for the point-wise refinement criterion
2(@ref exahype2.api.RefineErasePointwisely)."""
8 assert exahype2.api.RefineErasePointwisely.SIGNATURE == (
9 "const double* __restrict__ Q, "
10 "const tarch::la::Vector<Dimensions, double>& x, "
12 "::exahype2::RefinementCommand* __restrict__ refinementCommand"
18 declaration = term.generator.generate_declaration()
19 assert declaration.startswith(
"virtual void refineErasePointwisely(")
21 "::exahype2::RefinementCommand* __restrict__ refinementCommand" in declaration
23 assert declaration.rstrip().endswith(
") = 0;")
27 body =
"if (Q[0] > 1.0) *refinementCommand = ::exahype2::RefinementCommand::Refine;"
29 definition = term.generator.generate_out_of_class_definitions(
30 "probe::AbstractProbe"
32 assert definition.startswith(
"void probe::AbstractProbe::refineErasePointwisely(")
33 assert body
in definition
38 assert "override" in term.generator.generate_stub_declaration()
39 stub = term.generator.generate_stub_definition(
"probe::Probe")
40 assert stub.startswith(
"void probe::Probe::refineErasePointwisely(")
41 assert "not implemented yet" in stub
49 for term
in solver.pde_terms
Point-wise refinement criterion: given the solution Q at a single degree of freedom,...
Abstract base class for all ExaHyPE 2 solvers.
test_signature_returns_refinement_command_through_pointer()
test_declaration_is_void_and_pure_virtual_without_implementation()
test_solver_accepts_term()
test_stub_for_user_solver()
test_implementation_becomes_body()