10import peano4.toolbox.particles
16import exahype2.solvers.fv.rusanov.kernels
23from CCZ4Solver
import CCZ4Solver_FV_GlobalAdaptiveTimeStepWithEnclaveTasking
24from CCZ4Solver
import CCZ4Solver_FD4_GlobalAdaptiveTimeStepWithEnclaveTasking
25from CCZ4Solver
import (
26 CCZ4Solver_FD4_SecondOrderFormulation_GlobalAdaptiveTimeStepWithEnclaveTasking,
29from CCZ4Solver
import CCZ4Solver_FV_GlobalAdaptiveTimeStep
30from CCZ4Solver
import CCZ4Solver_FD4_GlobalAdaptiveTimeStep
34from exahype2.solvers.fv.actionsets.AbstractFVActionSet
import AbstractFVActionSet
40 NONE =
"::peano4::utils::LoopPlacement::Serial"
41 PARALLEL_FOR =
"::peano4::utils::LoopPlacement::Nested"
42 SUBTASKS =
"::peano4::utils::LoopPlacement::SpreadOut"
48 Construct the Finite Volume (limiter) scheme
50 We assume that the underlying Finite Differences scheme has a patch
51 size of 6x6x6. To make the Finite Volume scheme's time stepping (and
52 accuracy) match this patch size, we have to employ a 16 times finer
55 It is interesting to see that the limiter does not really have a min
56 and max mesh size. The point is that the higher order solver dictates
57 the mesh structure, and we then follow this structure with the
66 amend_priorities: bool,
67 parallelisation_of_kernels: KernelParallelisation,
74 Pass in the patch size of the FD4 scheme or, if you are using RKDG,
75 hand in the number 1. The Finite Volume patch then will be 16 times
79 SubPatchSize = int(patch_size * 4 * 4)
83 patch_size=SubPatchSize,
84 min_volume_h=1.0 / 65536,
86 pde_terms_without_state=
True,
90 self._user_action_set_includes +=
"""
91#include "toolbox/blockstructured/Restriction.h"
92#include "toolbox/blockstructured/Interpolation.h"
105 self.set_implementation(
106 initial_conditions=exahype2.solvers.PDETerms.User_Defined_Implementation,
107 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
108 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
111 if parallelisation_of_kernels == KernelParallelisation.SUBTASKS:
123 compute_max_eigenvalue_of_next_time_step=
True,
124 solver_variant=exahype2.solvers.fv.rusanov.kernels.SolverVariant.Multicore,
125 kernel_variant=exahype2.solvers.fv.rusanov.kernels.KernelVariant.PatchWiseAoSHeap,
134 Mask out exterior cells
140 +
" and repositories::instanceOf"
142 +
".isCellOverlappingWithBHImpactArea(marker) )"
149 +
" and repositories::instanceOf"
151 +
".isCellOverlappingWithBHImpactArea(marker) )"
158 +
" and repositories::instanceOf"
160 +
".isCellOverlappingWithBHImpactArea(marker) )"
164 return "{} and repositories::instanceOf{}.isOneAdjacentCellOverlappingWithBHImpactArea(marker)".format(
170 return "({} and repositories::instanceOf{}.areBothAdjacentCellsOverlappingWithBHImpactArea(marker))".format(
175 return "({} and repositories::instanceOf{}.areBothAdjacentCellsOverlappingWithBHImpactArea(marker))".format(
182 Not really a lot of things to do here. The only exception that is
183 really important is that we have to ensure that we only solve stuff
184 inside the local domain of the FV. By default, ExaHyPE 2 solves the
185 PDE everywhere. If data is not stored persistently or loaded from
186 the persistent stacks, it still solves, as it then would assume that
187 such data arises from dynamic AMR. In this particular case, we have
188 to really mask out certain subdomains.
190 It is not just a nice optimisation to do so. It is absolutely key,
191 as the application of the compute kernel on garbage would mean that
192 we end up with invalid eigenvalues.
197 self._action_set_update_cell.guard =
"({} and repositories::instanceOf{}.isCellOverlappingWithBHImpactArea(marker))".format(
198 self._action_set_update_cell.guard, self.
_name
200 self._action_set_merge_enclave_task_outcome.guard =
"({} and repositories::instanceOf{}.isCellOverlappingWithBHImpactArea(marker))".format(
201 self._action_set_merge_enclave_task_outcome.guard, self.
_name
208 4th order Finite Differences solver with a limiter
210 The FD scheme is our primary solver, i.e. the one we wanna use (almost)
211 everywhere. Hence, we have to be sure that we use the right boundary
212 conditions. In our case, that should be Sommerfeld ones. As we work
213 with a limited FD4 solver, we have to ensure that we get the
214 @ref benchmarks_exahype2_ccz4_single_black_hole "solver coupling" right.
216 The primary solver is a plain CCZ4 FD4 solver with enclave tasking. There
217 are some modification though:
219 1. We ensure that we use Sommerfeld boundary conditions. This means that
220 we have to replace the whole generic boundary treatment with a bespoke
222 2. The coupling has to be injected. We model the coupling as separate
223 (enclave) tasks to avoid that we totally serialise the solver steps
224 whenever we encounter a coupling.
234 parallelisation_of_interpolation: KernelParallelisation,
235 parallelisation_of_kernels: KernelParallelisation,
236 interpolation_method,
242 CCZ4Solver_FD4_GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
245 patch_size=patch_size,
247 min_meshcell_h=min_cell_size / patch_size,
248 max_meshcell_h=max_cell_size / patch_size,
249 pde_terms_without_state=
False,
252 self._user_action_set_includes +=
"""
253#include "toolbox/blockstructured/Projection.h"
254#include "toolbox/blockstructured/Restriction.h"
255#include "toolbox/blockstructured/Interpolation.h"
256#include "toolbox/blockstructured/Copy.h"
259 self._user_action_set_includes += (
261#include "matrixdata/Interpolator_"""
264 + str(patch_size * 16)
270 self.set_implementation(
271 initial_conditions=exahype2.solvers.PDETerms.User_Defined_Implementation,
272 refinement_criterion=exahype2.solvers.PDETerms.User_Defined_Implementation,
273 boundary_conditions=exahype2.solvers.PDETerms.None_Implementation,
277 if parallelisation_of_kernels == KernelParallelisation.SUBTASKS:
279 "WARNING: Unfortunately, we have not yet written parallelised kernels for FD4"
286 solver_matrix_interpolator = exahype2.solvers.SolverMatrixInterpolator(
287 patch_size, patch_size * 16, 3, 1
289 solver_matrix_interpolator.generateData()
294 Tailor action set behaviour
296 We first make a few additional cells skeleton cells. The rationale
297 behind additional skeletons is given in the @ref benchmarks_exahype2_ccz4_single_black_hole "generic overview".
298 Given the first remark there on FD4-FV coupling, one would be tempted
301 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
302 self._action_set_update_cell.additional_skeleton_guard = " " "(
303 repositories::instanceOf" " " + self._name_without_FD4_extension + " " "_FV.isCellOverlappingWithBHImpactArea(marker)
305 not repositories::instanceOf" " " + self._name_without_FD4_extension + " " "_FV.areAllFaceConnectedCellsOverlappingWithBHImpactArea(marker)
308 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
310 Once we study the other items (notably the fourth), we see that it is
311 reasonable to make all the overlap region a skeleton within the FD4
317 self._action_set_handle_boundary.TemplateHandleBoundary_KernelCalls = (
319 double Qinf[59]={1.0, 0.0, 0.0, 1.0, 0.0, 1.0, //q0-5
320 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, //q6-11
321 0.0, 0.0, 0.0, 0.0, //q12-15
322 1.0, 0.0, 0.0, 0.0, //q16-19
323 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, //q20-25
324 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, //q26-34
325 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
326 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, //q35-52
327 0.0, 1.0, 0.0, 0.0, 0.0, 0.0 //q53-58
328 }; //approximate background solution at infinity
329 ::exahype2::fd::applySommerfeldConditions(
331 const double * NOALIAS Q,
332 const tarch::la::Vector<DIMENSIONS,double>& faceCentre,
333 const tarch::la::Vector<DIMENSIONS,double>& gridCellH,
338 return repositories::{{SOLVER_INSTANCE}}.maxEigenvalue( Q, faceCentre, gridCellH, t, dt, normal );
342 const tarch::la::Vector<DIMENSIONS,double>& faceCentre,
343 const tarch::la::Vector<DIMENSIONS,double>& gridCellH
350 Q[0] = 1.0; Q[3] = 1.0; Q[5] = 1.0;
351 Q[16] = 0.95; Q[54] = 0.95;
355 {{FACE_METADATA_ACCESSOR}}.getOldTimeStamp(marker.getSelectedFaceNumber()<DIMENSIONS ? 1 : 0),
356 repositories::{{SOLVER_INSTANCE}}.getMinTimeStepSize(),
357 {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}},
359 {{NUMBER_OF_UNKNOWNS}},
360 {{NUMBER_OF_AUXILIARY_VARIABLES}},
361 marker.getSelectedFaceNumber(),
363 fineGridFace{{UNKNOWN_IDENTIFIER}}Old.data(),
364 fineGridFace{{UNKNOWN_IDENTIFIER}}New.data(),
365 -1 //not use checkpoint yet
372 enclave_task_cell_label=
"fineGridCell"
375 compute_kernel_implementation=
"""
376const int sizeOfPatch = (repositories::instanceOf"""
378 +
"""_FV.NumberOfFiniteVolumesPerAxisPerPatch+2)
379 * (repositories::instanceOf"""
381 +
"""_FV.NumberOfFiniteVolumesPerAxisPerPatch+2)
382 * (repositories::instanceOf"""
384 +
"""_FV.NumberOfFiniteVolumesPerAxisPerPatch+2)
385 * (repositories::instanceOf"""
387 +
"""_FV.NumberOfUnknowns + repositories::instanceOf"""
389 +
"""_FV.NumberOfAuxiliaryVariables);
390const int sizeOfFace = 2
391 * (repositories::instanceOf"""
393 +
"""_FV.NumberOfFiniteVolumesPerAxisPerPatch+2)
394 * (repositories::instanceOf"""
396 +
"""_FV.NumberOfFiniteVolumesPerAxisPerPatch+2)
397 * (repositories::instanceOf"""
399 +
"""_FV.NumberOfUnknowns + repositories::instanceOf"""
401 +
"""_FV.NumberOfAuxiliaryVariables);
403double* interpolatedFVDataWithHalo = ::tarch::allocateMemory<double>(sizeOfPatch, ::tarch::MemoryLocation::Heap);
405bool faceIsReal0 = repositories::instanceOf"""
407 +
"""_FV.areBothAdjacentCellsOverlappingWithBHImpactArea(marker,0);
408bool faceIsReal1 = repositories::instanceOf"""
410 +
"""_FV.areBothAdjacentCellsOverlappingWithBHImpactArea(marker,1);
411bool faceIsReal2 = repositories::instanceOf"""
413 +
"""_FV.areBothAdjacentCellsOverlappingWithBHImpactArea(marker,2);
414bool faceIsReal3 = repositories::instanceOf"""
416 +
"""_FV.areBothAdjacentCellsOverlappingWithBHImpactArea(marker,3);
417bool faceIsReal4 = repositories::instanceOf"""
419 +
"""_FV.areBothAdjacentCellsOverlappingWithBHImpactArea(marker,4);
420bool faceIsReal5 = repositories::instanceOf"""
422 +
"""_FV.areBothAdjacentCellsOverlappingWithBHImpactArea(marker,5);
424double* realFace0 = faceIsReal0 ? fineGridFaces"""
426 +
"""_FVQNew(0).data() : nullptr;
427double* realFace1 = faceIsReal1 ? fineGridFaces"""
429 +
"""_FVQNew(1).data() : nullptr;
430double* realFace2 = faceIsReal2 ? fineGridFaces"""
432 +
"""_FVQNew(2).data() : nullptr;
433double* realFace3 = faceIsReal3 ? fineGridFaces"""
435 +
"""_FVQNew(3).data() : nullptr;
436double* realFace4 = faceIsReal4 ? fineGridFaces"""
438 +
"""_FVQNew(4).data() : nullptr;
439double* realFace5 = faceIsReal5 ? fineGridFaces"""
441 +
"""_FVQNew(5).data() : nullptr;
443double* dummyFace0 = faceIsReal0 ? nullptr : ::tarch::allocateMemory<double>(sizeOfFace, ::tarch::MemoryLocation::Heap);
444double* dummyFace1 = faceIsReal1 ? nullptr : ::tarch::allocateMemory<double>(sizeOfFace, ::tarch::MemoryLocation::Heap);
445double* dummyFace2 = faceIsReal2 ? nullptr : ::tarch::allocateMemory<double>(sizeOfFace, ::tarch::MemoryLocation::Heap);
446double* dummyFace3 = faceIsReal3 ? nullptr : ::tarch::allocateMemory<double>(sizeOfFace, ::tarch::MemoryLocation::Heap);
447double* dummyFace4 = faceIsReal4 ? nullptr : ::tarch::allocateMemory<double>(sizeOfFace, ::tarch::MemoryLocation::Heap);
448double* dummyFace5 = faceIsReal5 ? nullptr : ::tarch::allocateMemory<double>(sizeOfFace, ::tarch::MemoryLocation::Heap);
450::toolbox::blockstructured::interpolateCellDataAssociatedToVolumesIntoOverlappingCell_"""
453 repositories::instanceOf"""
455 +
"""_FD4.NumberOfGridCellsPerPatchPerAxis,
456 repositories::instanceOf"""
458 +
"""_FV.NumberOfFiniteVolumesPerAxisPerPatch,
461 repositories::instanceOf"""
463 +
"""_FV.NumberOfUnknowns + repositories::instanceOf"""
465 +
"""_FV.NumberOfAuxiliaryVariables,
468 """InterpolationMatrixData::Data,
469 InterpolationMatrixData::Indices,
470 InterpolationMatrixData::Indptr,"""
476 interpolatedFVDataWithHalo,
482::toolbox::blockstructured::projectPatchHaloOntoFaces(
483 repositories::instanceOf"""
485 +
"""_FV.NumberOfFiniteVolumesPerAxisPerPatch,
487 repositories::instanceOf"""
489 +
"""_FV.NumberOfUnknowns,
490 repositories::instanceOf"""
492 +
"""_FV.NumberOfAuxiliaryVariables,
493 interpolatedFVDataWithHalo,
494 faceIsReal0 ? realFace0 : dummyFace0,
495 faceIsReal1 ? realFace1 : dummyFace1,
496 faceIsReal2 ? realFace2 : dummyFace2,
497 faceIsReal3 ? realFace3 : dummyFace3,
498 faceIsReal4 ? realFace4 : dummyFace4,
499 faceIsReal5 ? realFace5 : dummyFace5
502::tarch::freeMemory(interpolatedFVDataWithHalo, tarch::MemoryLocation::Heap );
503if (dummyFace0!=nullptr) ::tarch::freeMemory(dummyFace0, tarch::MemoryLocation::Heap );
504if (dummyFace1!=nullptr) ::tarch::freeMemory(dummyFace1, tarch::MemoryLocation::Heap );
505if (dummyFace2!=nullptr) ::tarch::freeMemory(dummyFace2, tarch::MemoryLocation::Heap );
506if (dummyFace3!=nullptr) ::tarch::freeMemory(dummyFace3, tarch::MemoryLocation::Heap );
507if (dummyFace4!=nullptr) ::tarch::freeMemory(dummyFace4, tarch::MemoryLocation::Heap );
508if (dummyFace5!=nullptr) ::tarch::freeMemory(dummyFace5, tarch::MemoryLocation::Heap );
517 repositories::instanceOf"""
519 +
"""_FV.isCellOverlappingWithBHImpactArea(marker)
521 not repositories::instanceOf"""
523 +
"""_FV.areAllFaceConnectedCellsOverlappingWithBHImpactArea(marker)
525 not marker.willBeRefined()
533 repositories::instanceOf{0}_FV.isCellOverlappingWithBHImpactArea(marker)
535 not marker.willBeRefined()
537 logTraceIn( "touchCellFirstTime(...)-inject" );
539 repositories::instanceOf{0}_FV.incNumberOfPatches();
541 //if ( repositories::instanceOf{0}_FV.areAllFaceConnectedCellsOverlappingWithBHImpactArea(marker) ) {{
542 ::toolbox::blockstructured::restrictCellIntoOverlappingCell_inject(
543 repositories::instanceOf{0}_FV.NumberOfFiniteVolumesPerAxisPerPatch,
544 repositories::instanceOf{0}_FD4.NumberOfGridCellsPerPatchPerAxis,
545 repositories::instanceOf{0}_FV.NumberOfUnknowns + repositories::instanceOf{0}_FV.NumberOfAuxiliaryVariables,
546 fineGridCell{0}_FVQ.data(),
547 fineGridCell{0}_FD4Q.data()
551 ::toolbox::blockstructured::restrictCellIntoOverlappingCell_inject_and_average(
552 repositories::instanceOf{0}_FV.NumberOfFiniteVolumesPerAxisPerPatch,
553 repositories::instanceOf{0}_FD4.NumberOfGridCellsPerPatchPerAxis,
554 repositories::instanceOf{0}_FV.NumberOfUnknowns + repositories::instanceOf{0}_FV.NumberOfAuxiliaryVariables,
555 fineGridCell{0}_FVQ.data(),
556 fineGridCell{0}_FD4Q.data()
560 logTraceOut( "touchCellFirstTime(...)-inject" );
571 Construct 4th order Finite Differences solver without a limiter
584 CCZ4Solver_FD4_GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
587 patch_size=patch_size,
589 min_meshcell_h=min_cell_size / patch_size,
590 max_meshcell_h=max_cell_size / patch_size,
591 pde_terms_without_state=
False,
594 self._user_action_set_includes +=
"""
595#include "toolbox/blockstructured/Projection.h"
596#include "toolbox/blockstructured/Restriction.h"
597#include "toolbox/blockstructured/Interpolation.h"
598#include "toolbox/blockstructured/Copy.h"
604 self.set_implementation(
605 initial_conditions=exahype2.solvers.PDETerms.User_Defined_Implementation,
606 refinement_criterion=exahype2.solvers.PDETerms.User_Defined_Implementation,
607 boundary_conditions=exahype2.solvers.PDETerms.None_Implementation,
616 Tailor action set behaviour
618 We first make a few additional cells skeleton cells. The rationale
619 behind additional skeletons is given in the @ref benchmarks_exahype2_ccz4_single_black_hole "generic overview".
620 Given the first remark there on FD4-FV coupling, one would be tempted
623 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
624 self._action_set_update_cell.additional_skeleton_guard = " " "(
625 repositories::instanceOf" " " + self._name_without_FD4_extension + " " "_FV.isCellOverlappingWithBHImpactArea(marker)
627 not repositories::instanceOf" " " + self._name_without_FD4_extension + " " "_FV.areAllFaceConnectedCellsOverlappingWithBHImpactArea(marker)
630 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
632 Once we study the other items (notably the fourth), we see that it is
633 reasonable to make all the overlap region a skeleton within the FD4
639 self._action_set_handle_boundary.TemplateHandleBoundary_KernelCalls = (
641 double Qinf[59]={1.0, 0.0, 0.0, 1.0, 0.0, 1.0, //q0-5
642 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, //q6-11
643 0.0, 0.0, 0.0, 0.0, //q12-15
644 1.0, 0.0, 0.0, 0.0, //q16-19
645 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, //q20-25
646 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, //q26-34
647 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
648 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, //q35-52
649 0.0, 1.0, 0.0, 0.0, 0.0, 0.0 //q53-58
650 }; //approximate background solution at infinity
651 ::exahype2::fd::applySommerfeldConditions(
653 const double * NOALIAS Q,
654 const tarch::la::Vector<DIMENSIONS,double>& faceCentre,
655 const tarch::la::Vector<DIMENSIONS,double>& gridCellH,
660 return repositories::{{SOLVER_INSTANCE}}.maxEigenvalue( Q, faceCentre, gridCellH, t, dt, normal );
664 const tarch::la::Vector<DIMENSIONS,double>& faceCentre,
665 const tarch::la::Vector<DIMENSIONS,double>& gridCellH
672 Q[0] = 1.0; Q[3] = 1.0; Q[5] = 1.0;
673 Q[16] = 0.95; Q[54] = 0.95;
677 {{FACE_METADATA_ACCESSOR}}.getOldTimeStamp(marker.getSelectedFaceNumber()<DIMENSIONS ? 1 : 0),
678 repositories::{{SOLVER_INSTANCE}}.getMinTimeStepSize(),
679 {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}},
681 {{NUMBER_OF_UNKNOWNS}},
682 {{NUMBER_OF_AUXILIARY_VARIABLES}},
683 marker.getSelectedFaceNumber(),
685 fineGridFace{{UNKNOWN_IDENTIFIER}}Old.data(),
686 fineGridFace{{UNKNOWN_IDENTIFIER}}New.data()
695 A finite volume solver
697 This solver is not appropriate to simulate black holes as a stand-alone
698 solver, as it is way too diffusive. If you use it without another scheme,
699 you typically see the black hole disappear after a brief period. So we
700 have it in here merely for performance tests.
713 Construct the Finite Volume solver
715 @param patch_size: Integer
716 Defines how big the individual patches are. If you pass in 10, each
717 Finite Volume patch will have the dimensions 10x10x10.
718 @param min_cell_size: Float
719 This parameter refers to the cell size, i.e. the size of a whole
720 patch. We use this one here, to make the signature the same as for
721 the FD and DG solver variants. The superclass constructor argues
722 over finite volume sizes, and we hence have to recalibrate this
723 parameter with patch_size.
729 patch_size=patch_size,
730 min_volume_h=min_cell_size / patch_size,
731 max_volume_h=max_cell_size / patch_size,
732 pde_terms_without_state=
True,
735 self._user_action_set_includes +=
"""
736#include "toolbox/blockstructured/Projection.h"
737#include "toolbox/blockstructured/Restriction.h"
738#include "toolbox/blockstructured/Interpolation.h"
739#include "toolbox/blockstructured/Copy.h"
745 self.set_implementation(
746 initial_conditions=exahype2.solvers.PDETerms.User_Defined_Implementation,
747 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
748 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
757 Tailor action set behaviour
759 We first make a few additional cells skeleton cells. The rationale
760 behind additional skeletons is given in the @ref benchmarks_exahype2_ccz4_single_black_hole "generic overview".
761 Given the first remark there on FD4-FV coupling, one would be tempted
764 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
765 self._action_set_update_cell.additional_skeleton_guard = " " "(
766 repositories::instanceOf" " " + self._name_without_FD4_extension + " " "_FV.isCellOverlappingWithBHImpactArea(marker)
768 not repositories::instanceOf" " " + self._name_without_FD4_extension + " " "_FV.areAllFaceConnectedCellsOverlappingWithBHImpactArea(marker)
771 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
773 Once we study the other items (notably the fourth), we see that it is
774 reasonable to make all the overlap region a skeleton within the FD4
784 Update preconfigured solver parameters
786 The default parameters of CCZ4 are tailored towards gauge waves or similar.
787 For the single black hole, two parameters have to be changed. That's bs and
788 sk which both have to be 1.0.
791 solver.double_constants[
"CCZ4bs"] = 1.0
792 solver.double_constants[
"CCZ4sk"] = 1.0
add_all_solver_constants(self)
Add domain-specific constants.
CCZ4 solver using fourth-order finite differences and global adaptive time stepping incl enclave task...
CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking.
4th order Finite Differences solver with a limiter
_action_set_postprocess_solution
__init__(self, name, patch_size, min_cell_size, max_cell_size, KernelParallelisation parallelisation_of_interpolation, KernelParallelisation parallelisation_of_kernels, interpolation_method)
Constructor.
create_action_sets(self)
Tailor action set behaviour.
_name_without_FD4_extension
_parallelisation_of_interpolation
_action_set_preprocess_solution
Construct 4th order Finite Differences solver without a limiter.
_name_without_FD4_extension
create_action_sets(self)
Tailor action set behaviour.
__init__(self, name, patch_size, min_cell_size, max_cell_size)
Constructor.
__init__(self, name, patch_size, min_cell_size, max_cell_size)
Construct the Finite Volume solver.
create_action_sets(self)
Tailor action set behaviour.
Construct the Finite Volume (limiter) scheme.
create_action_sets(self)
Not really a lot of things to do here.
_source_term_implementation
_fused_compute_kernel_call_cpu
_provide_face_data_to_compute_kernels_default_guard(self)
_store_cell_data_default_guard(self)
Mask out exterior cells.
_provide_cell_data_to_compute_kernels_default_guard(self)
_store_face_data_default_guard(self)
_load_cell_data_default_guard(self)
__init__(self, name, patch_size, bool amend_priorities, KernelParallelisation parallelisation_of_kernels)
Construct the limiter.
_load_face_data_default_guard(self)
update_solver_parameters_for_single_black_hole(solver)
Update preconfigured solver parameters.