14from abc
import abstractmethod
29 Abstract solver for patch-based finite diffences
31 All solvers in ExaHyPE are cell-centered discretisations.
34 ## Adaptive mesh refinement
36 We have, at the moment, no hard-coded AMR operator set available unless
37 you work with an overlap of one. In this case, you find operators in the
38 toolbox. Very few pre-manufactured operators there are ready to go for
39 higher overlaps (the injection operator is an example). In general, you
40 will have to inject your own transfer operators.
42 It depends on the flavour that you want to use for your interpolation and
43 restriction. A simple interpolation for an overlap of three and a patch_size
46 self._interpolation = "tensor_product< " + self._name + ">"
47 self.add_solver_constants( "static constexpr double NormalInterpolationMatrix1d[] = {0.0, 1.0, 0.0};" )
48 self.add_solver_constants( " ""static constexpr double TangentialInterpolationMatrix1d[] = {
80 baseline_action_set_descend_invocation_order=0,
84 A unique name for the solver. This one will be used for all generated
85 classes. Also the C++ object instance later on will incorporate this
89 Size of the patch in one dimension. All stuff here's dimension-generic.
92 That's the size of the halo layer which is half of the overlap with a
93 neighbour. A value of 1 means that a patch_size x patch_size patch in
94 2d is surrounded by one additional cell layer. The overlap has to be
95 bigger or equal to one. It has to be smaller or equal to patch_size.
98 Number of unknowns per Finite Volume voxel.
100 auxiliary_variables: int
101 Number of auxiliary variables per Finite Volume voxel. Eventually, both
102 unknowns and auxiliary_variables are merged into one big vector if we
103 work with AoS. But the solver has to be able to distinguish them, as
104 only the unknowns are subject to a hyperbolic formulation.
106 min_meshcell_h: double
107 This size refers to the individual Finite Volume.
109 max_meshcell_h: double
110 This size refers to the individual Finite Volume.
112 plot_grid_properties: Boolean
113 Clarifies whether a dump of the data should be enriched with grid info
114 (such as enclave status flags), too.
127 self._unknowns and self._auxiliary_variables respectively hold the number of unknowns and
128 auxiliary variables in the equation to be computed. Unknowns are variables that change over
129 time whereas auxiliary variables can be space-dependent but don't vary over time.
130 These can be specified either as simple ints or by a dictionary
131 (e.g.) unknowns = {'a': 1, 'b': 1, 'c': 3}
132 in which the user specifies the multiplicity of the variable (the velocity has one component
133 per dimension for example.)
134 If they are specified by a dictionary then the code generates a "VariableShortcuts" file which
135 allows the user to specifiy a variable by name and automatically maps this to the right position
136 in an array for better legibility. Otherwise they must manually remember the position of each
139 use_var_shortcut is used to know whether or not the user passed their variables via a dict
140 variable_names and variable_pos are used internally to remember the names and respective
141 positions of variables if set by a dictionary.
147 if type(unknowns)
is dict:
150 for var
in list(unknowns.values()):
153 elif type(unknowns)
is int:
157 "not a valid type for parameter unknowns, needs to be int or dictionary"
160 if type(auxiliary_variables)
is dict:
163 for var
in list(auxiliary_variables.values()):
166 elif type(auxiliary_variables)
is int:
170 "not a valid type for parameter auxiliary_variables, needs to be int or dictionary"
179 if min_meshcell_h > max_meshcell_h:
181 "Error: min_meshcell_h ("
182 + str(min_meshcell_h)
183 +
") is bigger than max_meshcell_h ("
184 + str(max_meshcell_h)
189 peano4.toolbox.blockstructured.ReconstructedArrayMemoryLocation.CallStack
248 + self.__class__.__name__
253Runge-Kutta order: """
262Auxiliary variables: """
278 coarsest_tree_level = 0
280 domain_size * 3 ** (-coarsest_tree_level) / self.
_patch_size
283 coarsest_tree_level += 1
284 return coarsest_tree_level
287 finest_tree_level = 0
289 domain_size * 3 ** (-finest_tree_level) / self.
_patch_size
292 finest_tree_level += 1
293 return finest_tree_level
326Real type of this solver: """
330We assume that you use a domain size of (0,"""
332 +
""")^d. Peano 4 will cut this domain equidistantly
333and recursively into three parts along each coordinate axis. This yields a spacetree.
335The spacetree will at least have """
338The spacetree will at most have """
342The spacetree will thus span at least """
344 +
""" octants/cells (see clarification below) per coordinate axis. This means a """
346 +
"""^d grid of octants.
347The spacetree will thus span at most """
349 +
""" octants/cells (see clarification below) per coordinate axis. This means a """
351 +
"""^d grid of octants.
355 +
"""^d patches of compute cells into the finest tree level.
356In the text above, we refer to the elements of this level of the tree as octants.
357The octants are squares/cubes and many papers refer to them as cells, but they are not
358the actual compute data structure. The compute data structure is the cells that
359are embedded into these finest level spacetree cells. We therefore prefer the
360term octant for the latter, whereas we use the term (compute) cell for the
361entities that are actually used for the computations, i.e. hold degrees of
362freedom, and are actually visible within Paraview, e.g.
364The coarsest possible mesh will consist of """
366 +
""" compute cells per coordinate axis.
367The finest possible mesh will consist of """
369 +
""" compute cells per coordinate axis.
371The coarsest mesh width of """
373 +
""" is thus just smaller than the maximum mesh size """
376The finest mesh width of """
378 +
""" is thus just smaller than the minimum mesh size """
389 Add further includes to this property, if your action sets require some additional
390 routines from other header files.
399 Add further includes to this property, if your solver requires some additional
400 routines from other header files.
408 Return number of steps required to realise the Runge-Kutta scheme
410 Delegate to ButcherTableau.RungeKutta_steps, which tells us for a given
411 polynomial order _rk_order how many Runge Kutta steps we have to
420 Add further includes to this property, if your action sets require some additional
421 routines from other header files.
429 Add further includes to this property, if your solver requires some additional
430 routines from other header files.
439 Recall in subclasses if you wanna change the number of unknowns
440 or auxiliary variables. See class description's subsection on
443 :: Call order and ownership
445 This operation can be called multiple times. However, only the very
446 last call matters. All previous calls are wiped out.
448 If you have a hierarchy of solvers, every create_data_structure()
449 should first(!) call its parent version. This way, you always ensure
450 that all data are in place before you continue to alter the more
451 specialised versions. So it is (logically) a top-down (general to
452 specialised) run through all create_data_structure() variants
453 within the inheritance tree.
458 _patch: Patch (NxNxN)
459 Actual patch data. We use Finite Volumes, so this is
460 always the current snapshot, i.e. the valid data at one point.
462 _patch_overlap_old, _patch_overlap_new: Patch (2xNxN)
463 This is a copy/excerpt from the two adjacent finite volume
464 snapshots plus the old data as backup. If I want to implement
465 local timestepping, I don't have to backup the whole patch
466 (see _patch), but I need a backup of the face data to be able
467 to interpolate in time.
469 _patch_overlap_update: Patch (2xNxN)
470 This is hte new update. After the time step, I roll this
471 information over into _patch_overlap_new, while I backup the
472 previous _patch_overlap_new into _patch_overlap_old. If I
473 worked with regular meshes only, I would not need this update
474 field and could work directly with _patch_overlap_new. However,
475 AMR requires me to accumulate data within new while I need
476 the new and old data temporarily. Therefore, I employ this
477 accumulation/roll-over data which usually is not stored
578 assert False,
"storage variant {} not supported".format(
583 peano4.toolbox.blockstructured.get_face_merge_implementation(
588 peano4.toolbox.blockstructured.get_face_merge_implementation(
592 self.
_patch.generator.merge_method_definition = (
593 peano4.toolbox.blockstructured.get_cell_merge_implementation(self.
_patch)
597#include "peano4/utils/Loop.h"
598#include "repositories/SolverRepository.h"
601#include "peano4/utils/Loop.h"
602#include "repositories/SolverRepository.h"
605 self.
_patch.generator.load_store_compute_flag =
"::peano4::grid::constructLoadStoreComputeFlag({},{},{})".format(
611 self.
_patch_estimates.generator.load_store_compute_flag =
"::peano4::grid::constructLoadStoreComputeFlag({},{},{})".format(
626 self.
_patch_overlap_old.generator.load_store_compute_flag =
"::peano4::grid::constructLoadStoreComputeFlag({},{},{})".format(
632 self.
_patch_overlap_new.generator.load_store_compute_flag =
"::peano4::grid::constructLoadStoreComputeFlag({},{},{})".format(
638 self.
_patch_overlap_update.generator.load_store_compute_flag =
"::peano4::grid::constructLoadStoreComputeFlag({},{},{})".format(
644 self.
_patch.generator.includes +=
"""
645#include "../repositories/SolverRepository.h"
648#include "../repositories/SolverRepository.h"
651#include "../repositories/SolverRepository.h"
654#include "../repositories/SolverRepository.h"
657#include "../repositories/SolverRepository.h"
667 Create required action sets
669 Overwrite in subclasses if you wanna create different
672 ## Call order and ownership
674 This operation can be called multiple times. However, only the very
675 last call matters. All previous calls are wiped out.
677 If you have a hierarchy of solvers, every create_data_structure()
678 should first(!) call its parent version. This way, you always ensure
679 that all data are in place before you continue to alter the more
680 specialised versions. So it is (logically) a top-down (general to
681 specialised) run through all create_data_structure() variants
682 within the inheritance tree.
684 :: Recreation vs backup (state discussion)
686 We faced some issues with action sets that should not be
687 overwritten. For example, the postprocessing should not be overwritten
688 as users might want to set it and then later on reset the number of
689 unknowns, e.g. In this case, you would loose your postprocessing if
690 create_action_sets() recreated them. So I decided to make an exception
691 here: the postprocessing step is never overwritten by the standard
694 There are further action sets which have a state, which users might
695 want to alter. The most prominent one is the AMR routines, where users
696 often alter the interpolation and restriction scheme. Here, things are
697 tricky: If we keep the default one, the action set would not pick up
698 if you changed the number of unknowns, e.g. However, if we recreated
699 the action set, we'd miss out on any changed interpolation/restriction
700 scheme. Therefore, I have to hold the interpolation and restriction
703 ## Injecting your own guards
705 If you inject your own guards, you should combine them with a storage
706 predicate, i.e. _store_cell_data_default_guard() and
707 _load_cell_data_default_guard(). The action sets themselves will not
708 combine the guard with further boolean expressions. Also, you have to
709 study carefully if a predicate accepts a unique guard or a set of
715 All action sets are given the right (default) priorities in this step.
716 You can alter them in subclasses, but it might be more appropriate to
717 set the priorities of your own action sets relative to the existing
718 ones using self._baseline_action_set_descend_invocation_order.
734 build_up_new_refinement_instructions=
True,
735 implement_previous_refinement_instructions=
True,
736 called_by_grid_construction=
False,
742 build_up_new_refinement_instructions=
False,
743 implement_previous_refinement_instructions=
True,
744 called_by_grid_construction=
False,
751 build_up_new_refinement_instructions=
True,
752 implement_previous_refinement_instructions=
True,
753 called_by_grid_construction=
True,
847 "not marker.willBeRefined() "
848 +
"and repositories::"
850 +
".getSolverState()!="
852 +
"::SolverState::GridConstruction"
857 "not marker.willBeRefined() "
858 +
"and repositories::"
860 +
".getSolverState()!="
862 +
"::SolverState::GridConstruction"
868 Extend the guard via ands only. Never use an or, as subclasses might
869 extend it as well, and they will append further ends.
873 "not marker.willBeRefined() "
874 +
"and repositories::"
876 +
".getSolverState()!="
878 +
"::SolverState::GridConstruction"
884 Extend the guard via ands only. Never use an or, as subclasses might
885 extend it as well, and they will append further ends.
889 "not marker.hasBeenRefined() "
890 +
"and repositories::"
892 +
".getSolverState()!="
894 +
"::SolverState::GridConstruction "
895 +
"and repositories::"
897 +
".getSolverState()!="
899 +
"::SolverState::GridInitialisation"
905 Extend the guard via ands only. Never use an or, as subclasses might
906 extend it as well, and they will append further ends.
910 "not marker.willBeRefined() "
911 +
"and repositories::"
913 +
".getSolverState()!="
915 +
"::SolverState::GridConstruction"
921 Extend the guard via ands only. Never use an or, as subclasses might
922 extend it as well, and they will append further ends.
926 "not marker.hasBeenRefined() "
927 +
"and repositories::"
929 +
".getSolverState()!="
931 +
"::SolverState::GridConstruction "
932 +
"and repositories::"
934 +
".getSolverState()!="
936 +
"::SolverState::GridInitialisation"
940 return self.
_name +
"Q"
943 return "instanceOf" + self.
_name
948 Add all required data to the Peano4 project's datamodel
949 so it is properly built up
956 print(
"Patch overlap data")
959 print(
"Patch overlap data")
963 datamodel.add_cell(self.
_patch)
972 Tell Peano what data to move around
974 Inform Peano4 step which data are to be moved around via the
975 use_cell and use_face commands. This operation is generic from
976 ExaHyPE's point of view, i.e. I use it for all grid sweep types.
979 step.use_cell(self.
_patch)
989#include "tarch/la/Vector.h"
991#include "peano4/utils/Globals.h"
992#include "peano4/utils/Loop.h"
994#include "repositories/SolverRepository.h"
1000 Add your actions to init grid
1002 The AMR stuff has to be the very first thing. Actually, the AMR routines'
1003 interpolation doesn't play any role here. But the restriction indeed is
1004 very important, as we have to get the face data for BCs et al. The action
1005 set order is inverted while we ascend within the tree again. Therefore, we
1006 add the AMR action set first which means it will be called last when we go
1007 from fine to coarse levels within the tree.
1009 The projection onto the faces is a postprocessing step. This is different
1010 to DG, where we need face data for the current time step's solution. Here,
1011 we ensure that all halos are valid for the subsequent time step again.
1015 The order of the action sets is preserved throughout the steps down within
1016 the tree hierarchy. It is inverted throughout the backrolling.
1018 This is what we want to achieve:
1020 - Project solution onto faces. This happens in touchCellLastTime(). See
1021 exahype2.solvers.rkfd.actionsets.ProjectPatchOntoFaces for comments.
1022 The project will end up in QUpdate.
1023 - Roll updates over on the faces from QUpdate into Q_new. This is done
1024 by RollOverUpdateFace, which requires in turn that the getUpdated()
1025 flag is set. As the roll-over plugs into touchFaceLastTime(), it will
1026 always be called after the projection, since the latter is a cell
1028 - Copy new face data Q_new into old face data Q_old, as this is the
1029 initial sweep, i.e. the old face data otherwise might hold rubbish.
1030 This is a backup operation realised through the action set
1031 BackupPatchOverlap. This one plugs into touchFaceLastTime() too.
1032 Therefore, it is important that its priority is smaller than the one
1033 of the roll-over, since we invert the call order for the touch-last
1035 - Restrict the data to the coarser level if we are on a hanging face.
1045 step.add_action_set(
1060 The boundary information is set only once. It is therefore important that
1061 we ues the face label and initialise it properly.
1067 if evaluate_refinement_criterion:
1078 @plot_description.setter
1082 Use this one to set a description within the output patch file that tells
1083 the vis solver what the semantics of the entries are. Typicallly, I use
1084 a comma-separated list here.
1092 Add action sets to plotting grid sweep
1094 Consult the discussion in add_actions_to_init_grid() around the order
1095 of the individual action sets.
1098 ## Adaptive mesh refinement
1100 It is important that we have the coupling/dynamic AMR part in here, as
1101 there might be pending AMR refinement requests that now are realised.
1102 For the same reason, we need the update of the face label and the update
1103 of the cell label in here: The AMR might just propagate over into the
1104 plotting, i.e. we might create new grid entities throughout the plot.
1105 These entities (faces and cells) have to be initialised properly.
1106 Otherwise, their un-initialised data will propagate through to the next
1109 To make the restriction work, we have to project the solutions onto the
1113 ## Roll over face data
1115 Das ist ein Kaese, weil das nur einspringt, wenn project wahr ist
1123 step.add_action_set(
1132 filename=output_path +
"solution-" + self.
_name,
1136 guard=
"repositories::plotFilter.plotPatch(marker) and "
1138 additional_includes=
"""
1139#include "exahype2/PlotFilter.h"
1140#include "../repositories/SolverRepository.h"
1142 precision=
"PlotterPrecision",
1143 time_stamp_evaluation=
"0.5*(repositories::getMinTimeStamp()+repositories::getMaxTimeStamp())",
1147 step.add_action_set(plot_patches_action_set)
1151 filename=output_path +
"grid-" + self.
_name,
1153 guard=
"repositories::plotFilter.plotPatch(marker) and "
1155 additional_includes=
"""
1156#include "exahype2/PlotFilter.h"
1157#include "../repositories/SolverRepository.h"
1161 step.add_action_set(plot_grid_action_set)
1170 It is important that we do the inter-grid transfer operators before we
1171 apply the boundary conditions.
1179 step.add_action_set(
1199 The ExaHyPE2 project will call this operation when it sets
1200 up the overall environment.
1202 This routine is typically not invoked by a user.
1204 output: peano4.output.Output
1207 templatefile_prefix = os.path.dirname(os.path.realpath(__file__)) +
"/"
1209 if self._solver_template_file_class_name
is None:
1210 templatefile_prefix += self.__class__.__name__
1212 templatefile_prefix += self._solver_template_file_class_name
1217 abstractHeaderDictionary = {}
1218 implementationDictionary = {}
1219 self._init_dictionary_with_default_parameters(abstractHeaderDictionary)
1220 self._init_dictionary_with_default_parameters(implementationDictionary)
1221 self.add_entries_to_text_replacement_dictionary(abstractHeaderDictionary)
1222 self.add_entries_to_text_replacement_dictionary(implementationDictionary)
1224 generated_abstract_header_file = (
1226 templatefile_prefix +
"Abstract.template.h",
1227 templatefile_prefix +
"Abstract.template.cpp",
1228 "Abstract" + self._name,
1231 abstractHeaderDictionary,
1236 generated_solver_files = (
1238 templatefile_prefix +
".template.h",
1239 templatefile_prefix +
".template.cpp",
1243 implementationDictionary,
1249 output.add(generated_abstract_header_file)
1250 output.add(generated_solver_files)
1251 output.makefile.add_h_file(subdirectory +
"Abstract" + self._name +
".h", generated=
True)
1252 output.makefile.add_h_file(subdirectory + self._name +
".h", generated=
True)
1253 output.makefile.add_cpp_file(subdirectory +
"Abstract" + self._name +
".cpp", generated=
True)
1254 output.makefile.add_cpp_file(subdirectory + self._name +
".cpp", generated=
True)
1256 if self._use_var_shortcut:
1258 os.path.dirname(os.path.realpath(__file__))
1260 +
"../VariableShortcuts.template.h",
1261 "VariableShortcuts",
1264 implementationDictionary,
1268 output.add(generated_shortcut_file)
1269 output.makefile.add_h_file(subdirectory +
"VariableShortcuts.h", generated=
True)
1279 This one is called by all algorithmic steps before I invoke
1280 add_entries_to_text_replacement_dictionary().
1282 See the remarks on set_postprocess_updated_patch_kernel to understand why
1283 we have to apply the (partially befilled) dictionary to create a new entry
1284 for this very dictionary.
1286 d[
"NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS"] = self.
_patch.dim[0]
1292 d[
"SOLVER_NAME"] = self.
_name
1294 d[
"NUMBER_OF_UNKNOWNS"] = self.
_unknowns
1296 d[
"SOLVER_NUMBER"] = 22
1298 d[
"ASSERTION_WITH_1_ARGUMENTS"] =
"nonCriticalAssertion1"
1299 d[
"ASSERTION_WITH_2_ARGUMENTS"] =
"nonCriticalAssertion2"
1300 d[
"ASSERTION_WITH_3_ARGUMENTS"] =
"nonCriticalAssertion3"
1301 d[
"ASSERTION_WITH_4_ARGUMENTS"] =
"nonCriticalAssertion4"
1302 d[
"ASSERTION_WITH_5_ARGUMENTS"] =
"nonCriticalAssertion5"
1303 d[
"ASSERTION_WITH_6_ARGUMENTS"] =
"nonCriticalAssertion6"
1306 raise Exception(
"min/max h are inconsistent")
1315 "BOUNDARY_CONDITIONS_IMPLEMENTATION"
1318 "REFINEMENT_CRITERION_IMPLEMENTATION"
1322 d[
"COMPUTE_KERNEL_CALL"] = jinja2.Template(
1326 d[
"ABSTRACT_SOLVER_USER_DECLARATIONS"] = jinja2.Template(
1329 d[
"ABSTRACT_SOLVER_USER_DEFINITIONS"] = jinja2.Template(
1332 d[
"SOLVER_USER_DECLARATIONS"] = jinja2.Template(
1335 d[
"SOLVER_USER_DEFINITIONS"] = jinja2.Template(
1338 d[
"START_TIME_STEP_IMPLEMENTATION"] = jinja2.Template(
1341 d[
"FINISH_TIME_STEP_IMPLEMENTATION"] = jinja2.Template(
1344 d[
"CONSTRUCTOR_IMPLEMENTATION"] = jinja2.Template(
1348 d[
"PREPROCESS_RECONSTRUCTED_PATCH"] = jinja2.Template(
1351 d[
"POSTPROCESS_UPDATED_PATCH"] = jinja2.Template(
1355 d[
"COMPUTE_TIME_STEP_SIZE"] = jinja2.Template(
1358 d[
"COMPUTE_NEW_TIME_STEP_SIZE"] = jinja2.Template(
1393 @auxiliary_variables.setter
1403 @preprocess_reconstructed_patch.setter
1407 Please consult exahype2.solvers.fv.FV.preprocess_reconstructed_patch() for
1408 a documentation on this routine.
1423 @postprocess_updated_patch.setter
1427 Define a postprocessing routine over the data
1429 The postprocessing kernel often looks similar to the following code:
1433 dfor( volume, {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}} ) {
1434 enforceCCZ4constraints( newQ+index );
1435 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
1440 Within this kernel, you have at least the following variables available:
1442 - newQ This is a pointer to the whole data structure (one large
1444 The patch is not supplemented by a halo layer.
1445 - oldQWithHalo This is a pointer to the data snapshot before the
1446 actual update. This data is combined with the halo layer, i.e. if you
1447 work with 7x7 patches and a halo of 2, the pointer points to a 11x11
1451 Furthermore, you can use all the symbols (via Jinja2 syntax) from
1452 _init_dictionary_with_default_parameters().
1455 C++ code that holds the postprocessing kernel
1470 "Halo (overlap) size has to be bigger than zero but was {}".format(
1482 @interpolation.setter
1486 Set the interpolation scheme. If you rely on a built-in operation, then this
1487 call is all you have to do. Some ExaHyPE solvers however require each solver
1488 to provide special matrices/operators for some interpolation/restriction
1489 variants. If this is the case, you still have to add these matrices manually
1502 Set the restriction scheme. If you rely on a built-in operation, then this
1503 call is all you have to do. Some ExaHyPE solvers however require each solver
1504 to provide special matrices/operators for some interpolation/restriction
1505 variants. If this is the case, you still have to add these matrices manually
1520 cell_data_storage: Storage,
1521 face_data_storage: Storage,
1525 By default, we hold all data on the call stacks. You can explicitly switch
1526 to storage on the heap via smart pointers.
1528 @see create_data_structures()
1531 assert isinstance(cell_data_storage, Storage)
1532 assert isinstance(face_data_storage, Storage)
Update the cell label within a sweep.
Abstract solver for patch-based finite diffences.
_abstract_solver_user_definitions
add_actions_to_create_grid(self, step, evaluate_refinement_criterion)
The boundary information is set only once.
_load_face_data_default_guard(self)
Extend the guard via ands only.
_provide_cell_data_to_compute_kernels_default_guard(self)
get_min_number_of_spacetree_levels(self, domain_size)
postprocess_updated_patch(self)
_action_set_project_patch_onto_faces
_preprocess_reconstructed_patch
_action_set_initial_conditions_for_grid_construction
_user_action_set_includes
set_solver_constants(self, datastring)
add_actions_to_perform_time_step(self, step)
AMR.
_store_cell_data_default_guard(self)
Extend the guard via ands only.
add_actions_to_plot_solution(self, step, output_path)
Add action sets to plotting grid sweep.
add_user_solver_includes(self, value)
Add further includes to this property, if your solver requires some additional routines from other he...
create_readme_descriptor(self, domain_offset, domain_size)
_action_set_update_face_label
_action_set_postprocess_solution
_action_set_roll_over_update_of_faces
user_action_set_includes(self)
Add further includes to this property, if your action sets require some additional routines from othe...
_postprocess_updated_patch
_provide_face_data_to_compute_kernels_default_guard(self)
_load_cell_data_default_guard(self)
Extend the guard via ands only.
auxiliary_variables(self)
get_max_number_of_spacetree_levels(self, domain_size)
_action_set_couple_resolution_transitions_and_handle_dynamic_mesh_refinement
add_implementation_files_to_project(self, namespace, output, dimensions, subdirectory="")
The ExaHyPE2 project will call this operation when it sets up the overall environment.
_finish_time_step_implementation
get_name_of_global_instance(self)
add_to_Peano4_datamodel(self, datamodel, verbose)
Add all required data to the Peano4 project's datamodel so it is properly built up.
switch_storage_scheme(self, Storage cell_data_storage, Storage face_data_storage)
By default, we hold all data on the call stacks.
_start_time_step_implementation
__init__(self, name, patch_size, overlap, rk_order, unknowns, auxiliary_variables, min_meshcell_h, max_meshcell_h, plot_grid_properties, kernel_namespace, baseline_action_set_descend_invocation_order=0)
name: string A unique name for the solver.
add_actions_to_init_grid(self, step)
Add your actions to init grid.
_compute_new_time_step_size
number_of_Runge_Kutta_steps(self)
Return number of steps required to realise the Runge-Kutta scheme.
_solver_user_declarations
_solver_template_file_class_name
_baseline_action_set_descend_invocation_order
user_solver_includes(self)
Add further includes to this property, if your solver requires some additional routines from other he...
_action_set_update_cell_label
_init_dictionary_with_default_parameters(self, d)
This one is called by all algorithmic steps before I invoke add_entries_to_text_replacement_dictionar...
add_solver_constants(self, datastring)
_abstract_solver_user_declarations
_boundary_conditions_implementation
create_data_structures(self)
Recall in subclasses if you wanna change the number of unknowns or auxiliary variables.
get_coarsest_compute_grid_cell_size(self, domain_size)
get_finest_number_of_patches(self, domain_size)
_action_set_initial_conditions
_get_default_includes(self)
get_coarsest_number_of_patches(self, domain_size)
_reconstructed_array_memory_location
_action_set_AMR_commit_without_further_analysis
_unknown_identifier(self)
_action_set_preprocess_solution
create_action_sets(self)
Create required action sets.
add_user_action_set_includes(self, value)
Add further includes to this property, if your action sets require some additional routines from othe...
_store_face_data_default_guard(self)
Extend the guard via ands only.
get_finest_number_of_compute_grid_cells(self, domain_size)
get_coarsest_number_of_compute_grid_cells(self, domain_size)
add_use_data_statements_to_Peano4_solver_step(self, step)
Tell Peano what data to move around.
_action_set_handle_boundary
add_entries_to_text_replacement_dictionary(self, d)
restriction(self)
Set the restriction scheme.
_action_set_compute_final_linear_combination
_action_set_copy_new_faces_onto_old_faces
preprocess_reconstructed_patch(self)
get_finest_compute_grid_cell_size(self, domain_size)
_initial_conditions_implementation
_action_set_AMR_throughout_grid_construction
_constructor_implementation
_refinement_criterion_implementation
The action set to realise AMR.
The handling of (dynamically) adaptive meshes for finite differences.
The global periodic boundary conditions are set in the Constants.h.
PostprocessSolution differs from other action sets, as I only create it once.
PreprocessSolution differs from other action sets, as I only create it once.
Project patch data onto faces, so the faces hold valid data which can feed into the subsequent Runge-...
Roll over QUpdate data on face into QNew.
Realise patch via smart pointers.
Realise patch via smart pointers.
Very simple converter which maps the patch 1:1 onto a double array.