13def _solver(quantities=None, sigma=8.0, rk_order=2):
19 kreiss_oliger_sigma=sigma,
20 quantities=quantities,
26 exahype2_project = types.SimpleNamespace(periodic_BC=[
True,
True,
True])
29 solver.numerical_scheme.construct_output(exahype2_project, peano_project, time_step)
30 return {task.name: task
for task
in time_step.tasks}
34 return action_set.get_body_of_operation(
35 peano4.api.solversteps.ActionSet.OPERATION_TOUCH_CELL_FIRST_TIME
41 assert solver.numerical_scheme.overlap == 3
42 assert solver._patch_with_halo.dim == (11, 11, 11)
43 assert solver._patch_overlap_current_time_step.dim == (6, 5, 5)
49 solver, patch_size=5, rk_order=2
51 assert scheme.overlap == 2
52 assert not hasattr(scheme,
"kreiss_oliger_sigma")
57 assert solver.numerical_scheme.dissipative_quantities == list(range(59))
61 solver =
_solver(quantities=[
"lapse",
"G", 58, 0])
62 assert solver.numerical_scheme.dissipative_quantities == [0, 1, 2, 3, 4, 5, 16, 58]
65@pytest.mark.parametrize("quantities", [["lapsee"], [59], [-1], [1.5], []])
67 with pytest.raises((ValueError, TypeError)):
72 with pytest.raises(ValueError):
77 solver =
_solver(quantities=[
"lapse",
"phi"], rk_order=2)
79 for stage
in range(2):
80 action_sets = tasks[f
"CCZ4_Evaluate right hand side stage {stage}"].action_sets
81 assert [type(action_set)
for action_set
in action_sets] == [
85 body =
_body(action_sets[1])
86 assert "::exagrype::ccz4::addKreissOligerDissipation(" in body
87 assert "constexpr int dissipativeQuantities[] = { 16, 54 };" in body
89 assert f
"fineGridCellCCZ4QRhsEstimates.value + {stage * 59 * 125}," in body
90 assert " 3,\n" in body
91 assert " 8.0,\n" in body
98 assert "<\n 5,\n 3,\n 59,\n 0\n>" in solver.compute_kernel_call
99 assert "(\n patchData,\n [&](" in solver.compute_kernel_call
Solver for the Einstein equations in the first-order CCZ4 formulation.
Fourth-order Finite Differences with Kreiss-Oliger dissipation.
Add the Kreiss-Oliger dissipation to the right-hand side of one Runge-Kutta stage.
Fourth-order central Finite Differences with explicit Runge-Kutta time stepping, realised over a bloc...
Evaluate the right-hand side of one Runge-Kutta stage over a patch.
Represents a Peano 4 project.
Holds a sequence of Task instances.
This file is part of the ExaGRyPE project.
The Python-side model of "what happens during one mesh sweep".
The task graph abstraction allows users to formalise their solver steps over small task graphs which ...
test_dissipation_runs_after_right_hand_side_in_each_stage(tmp_path)
_solver(quantities=None, sigma=8.0, rk_order=2)
test_plain_fd4_keeps_halo_of_two()
test_kernel_call_takes_no_dissipation_argument(tmp_path)
test_dissipation_applies_to_all_unknowns_by_default()
test_invalid_quantities_are_rejected(quantities)
test_negative_sigma_is_rejected()
test_scheme_widens_halo_to_three()
_construct_time_step(solver, directory)
test_quantities_accept_names_and_indices()