4from enum
import IntEnum
5from abc
import abstractmethod
10import peano4.datamodel
24Used to have a central way for all of this class' descendants to differentiate between Gauss-Legendre
25and Gauss-Lobatto nodes, helps to avoid having to constantly pass a string and ensure that this string is
33Denotes valid precisions for kernels and storage but also is supposed to allow a little more flexibility
34in the naming. If a user wants to name it float because they're more used to C-based languages that's
35fine but if they'd rather use single we allow it as well.
45 "quadruple":
"long double",
46 "long double":
"long double",
47 "fp128":
"long double",
48 "float16_t":
"std::float16_t",
49 "std::float16_t":
"std::float16_t",
50 "_Float16":
"_Float16",
52 "bfloat16_t":
"std::bfloat16_t",
53 "std::bfloat16_t":
"std::bfloat16_t",
68 plot_grid_properties=False,
73 Polynomial order of the representation of the underlying function in each spatial dimension.
74 The number of support points used to represent this polynomial is always the order + 1
79 self._unknowns and self._auxiliary_variables respectively hold the number of unknowns and
80 auxiliary variables in the equation to be computed. Unknowns are variables that change over
81 time whereas auxiliary variables can be space-dependent but don't vary over time.
82 These can be specified either as simple ints or by a dictionary
83 (e.g.) unknowns = {'a': 1, 'b': 1, 'c': 3}
84 in which the user specifies the multiplicity of the variable (the velocity has one component
85 per dimension for example.)
86 If they are specified by a dictionary then the code generates a "VariableShortcuts" file which
87 allows the user to specify a variable by name and automatically maps this to the right position
88 in an array for better legibility. Otherwise they must manually remember the position of each
91 use_var_shortcut is used to know whether or not the user passed their variables via a dict
92 variable_names and variable_pos are used internally to remember the names and respective
93 positions of variables if set by a dictionary.
99 if type(unknowns)
is dict:
102 for var
in list(unknowns.values()):
105 elif type(unknowns)
is int:
109 "not a valid type for parameter unknowns, needs to be int or dictionary."
112 if type(auxiliary_variables)
is dict:
115 for var
in list(auxiliary_variables.values()):
118 elif type(auxiliary_variables)
is int:
122 "not a valid type for parameter auxiliary_variables, needs to be int or dictionary."
126 Minimal and maximal accepted sizes for the cell, domain will be subdivided until the cell size is smaller
127 than the minimal size but will never be subdivided to be smaller than the minimal size.
131 if min_cell_h > max_cell_h:
135 +
") is bigger than max_cell_h ("
167 These specify the time step, they must be set by child classes in order to advance the timestepping.
168 These are the main difference between child classes as they all use the same underlying routines.
174 These are all the optional and mandatory plugins that can be specified by the user.
175 eigenvalues, boundary conditions, refinement criteria and initial conditions must
176 all be specified, all others are optional but can be added via the set_implementation() function.
177 There are four choices for these, three of which are specified in PDETerms:
178 User_Defined_Implementation creates empty stubs that the user must then manually fill.
179 None_implementation leaves out this optional stub and ensures the kernels don't use this function.
180 Empty_implementation does... the same thing as user_defined I think?
181 The final option is to fill these with a string, in which case this string is directly taken as
182 C++ code and used as the implementation of this function. The user is trusted to provide code that
183 compiles and runs properly, it is never checked.
201 These will be used by children of this class to fill them with the declaration and definition of the
202 above mandatory and optional functions.
210 Used by child classes; will contain code to be executed at the start and end respectively of the
211 time step. Typically specifies some timestep variable and advances the overall timestamp of the
221 These are ADER-DG CFL factors, they help determine the maximal stable timestep size.
222 Up to order 4, computed via von Neumann analysis [1].
223 [1] M. Dumbser, D. S. Balsara, E. F. Toro, and C.-D. Munz,
224 ‘A unified framework for the construction of one-step finite volume and discontinuous Galerkin schemes on unstructured meshes’, Journal of Computational Physics, vol. 227, no. 18, pp. 8209–8253, Sep. 2008.
225 They are necessary to compute stable timestep sizes as dt <= c*dx / (lambda_max*(2N+1)
226 with c the CFL for given order, lambda_max the maximal eigenvalue, N the order and dx the minimal mesh distance.
239 0.008821428571428572,
240 0.005235326086956522,
241 0.0031307249999999996,
242 0.0018842326388888888,
243 0.001140285614224138,
244 0.0006933672202620968,
251 Used if the user wants to add some function to postprocessing, meaning
252 it should be added after every other computation in ADER-DG is done.
272 + self.__class__.__module__
295Auxiliary variables: """
304Initial conditions: """
307Boundary conditions: """
310Refinement criterion: """
328Number of point sources:"""
334Material parameters: """
344 Creates all the structures that are attached on the Peano grid either in a cell or on the faces.
345 These are defined as Peano patches which have given sizes to contain persistent data as well as
346 conditions for when they should be merged, sent, received, stored, loaded, etc.
407 assert False,
"Storage variant {} not supported".format(
439 assert False,
"Storage variant {} not supported".format(
449#include "peano4/utils/Loop.h"
450#include "repositories/SolverRepository.h"
457#include "peano4/utils/Loop.h"
458#include "repositories/SolverRepository.h"
461 self.
_current_time_step.generator.load_store_compute_flag =
"::peano4::grid::constructLoadStoreComputeFlag({},{},{})".format(
467 self.
_previous_time_step.generator.load_store_compute_flag =
"::peano4::grid::constructLoadStoreComputeFlag({},{},{})".format(
473 self.
_rhs_estimates_projection.generator.load_store_compute_flag =
"::peano4::grid::constructLoadStoreComputeFlag({},{},{})".format(
483 self.
_flux_estimates_projection.generator.load_store_compute_flag =
"::peano4::grid::constructLoadStoreComputeFlag({},{},{})".format(
493#include "../repositories/SolverRepository.h"
497#include "../repositories/SolverRepository.h"
501#include "../repositories/SolverRepository.h"
505#include "../repositories/SolverRepository.h"
512 Creates the action sets, these are actions tied to the grid that are executed at given points of
513 grid generation, construction or steps of the ADER-DG solver. Peano handles grid structures that
514 contain data as well as operations that are executed on that data. These are the latter.
515 The guard here are the conditions for the execution of the operation, as in they are only executed
516 if the guard evaluates to true.
571 +
" and (repositories::"
573 +
".isFirstGridSweepOfTimeStep() or repositories::"
575 +
".getSolverState()=="
577 +
"::SolverState::GridInitialisation)",
578 build_up_new_refinement_instructions=
True,
579 called_by_grid_construction=
False,
580 implement_previous_refinement_instructions=
True
587 build_up_new_refinement_instructions=
False,
588 implement_previous_refinement_instructions=
True,
589 called_by_grid_construction=
False,
596 build_up_new_refinement_instructions=
True,
597 implement_previous_refinement_instructions=
True,
598 called_by_grid_construction=
True,
608 """ ExaHyPE 2 ADER-DG solver of order: """
610 +
""" with a domain size of: """
612 +
""" and a domain offset of: """
624 Add further includes to this property, if your action sets require some additional
625 routines from other header files.
631 Add further includes to this property, if your solver requires some additional
632 routines from other header files.
638 "not marker.willBeRefined() "
639 +
"and repositories::"
641 +
".getSolverState()!="
643 +
"::SolverState::GridConstruction"
648 "not marker.willBeRefined() "
649 +
"and repositories::"
651 +
".getSolverState()!="
653 +
"::SolverState::GridConstruction"
658 "not marker.willBeRefined() "
659 +
"and repositories::"
661 +
".getSolverState()!="
663 +
"::SolverState::GridConstruction"
668 "not marker.hasBeenRefined() "
669 +
"and repositories::"
671 +
".getSolverState()!="
673 +
"::SolverState::GridConstruction "
674 +
"and repositories::"
676 +
".getSolverState()!="
678 +
"::SolverState::GridInitialisation"
683 "not marker.willBeRefined() "
684 +
"and repositories::"
686 +
".getSolverState()!="
688 +
"::SolverState::GridConstruction"
693 "not marker.hasBeenRefined() "
694 +
"and repositories::"
696 +
".getSolverState()!="
698 +
"::SolverState::GridConstruction "
699 +
"and repositories::"
701 +
".getSolverState()!="
703 +
"::SolverState::GridInitialisation"
709 +
" and not repositories::"
711 +
".PeriodicBC[marker.getSelectedFaceNumber()%Dimensions]"
712 +
" and not marker.hasBeenRefined() and fineGridFace"
714 +
"FaceLabel.getBoundary()"
724 +
".getSolverState()!="
726 +
"::SolverState::GridInitialisation"
733 return self.
_name +
"Q"
736 return "instanceOf" + self.
_name
740#include "tarch/la/Vector.h"
742#include "peano4/utils/Globals.h"
743#include "peano4/utils/Loop.h"
745#include "repositories/SolverRepository.h"
749 The following functions will be called by the Peano 4 project,
750 they tell Peano which of our generated data it should attach
751 to each grid element and use.
758 print(
"Patch overlap data")
788 if evaluate_refinement_criterion:
802 for z
in self.
_basis.quadrature_points():
803 for y
in self.
_basis.quadrature_points():
804 for x
in self.
_basis.quadrature_points():
805 mapping.append((x, y, z))
810 filename=output_path +
"solution-" + self.
_name,
816 guard=
"repositories::plotFilter.plotPatch(marker) and "
818 additional_includes=
"""
819#include "exahype2/PlotFilter.h"
820#include "../repositories/SolverRepository.h"
822 precision=
"PlotterPrecision",
823 time_stamp_evaluation=
"0.5*(repositories::getMinTimeStamp()+repositories::getMaxTimeStamp())",
824 plot_cell_data=
False,
834 filename=output_path +
"grid-" + self.
_name,
836 guard_guard=
"repositories::plotFilter.plotPatch(marker) and "
838 additional_includes=
"""
839#include "exahype2/PlotFilter.h"
840#include "../repositories/SolverRepository.h"
842 plot_cell_data=
False,
870 "Material parameters and point sources are currently only available for linear generated kernels."
876 d[
"DIMENSIONS"] = dimensions
877 d[
"NUMBER_OF_DOF_3D"] = 1
if dimensions == 2
else d[
"NUMBER_OF_DOF"]
878 d[
"FULL_QUALIFIED_SOLVER_NAME"] =
"::".join(namespace) +
"::" + self.
_name
880 kernels_namespace = namespace + [
"kernels", self.
_name]
881 kernels_output_path = subdirectory +
"kernels/" + self.
_name
882 kernels_templates_prefix = os.path.dirname(os.path.realpath(__file__)) +
"/kernels/"
884 if not os.path.exists(kernels_output_path):
885 os.makedirs(kernels_output_path)
887 generated_kernels = (
889 headfile_template=kernels_templates_prefix +
"CellErrorIntegral.template.h",
890 cppfile_template=kernels_templates_prefix +
"CellErrorIntegral.template.cpp",
891 classname=kernels_output_path +
"/CellErrorIntegral",
892 namespace=kernels_namespace,
893 subdirectory=subdirectory +
".",
895 default_overwrite=
True,
896 apply_iteratively=
True,
899 output.add(generated_kernels)
900 output.makefile.add_h_file(kernels_output_path +
"/CellErrorIntegral.h", generated=
True)
901 output.makefile.add_cpp_file(kernels_output_path +
"/CellErrorIntegral.cpp", generated=
True)
903 generated_kernels = (
905 headfile_template=kernels_templates_prefix +
"MaxScaledEigenvalue.template.h",
906 cppfile_template=kernels_templates_prefix +
"MaxScaledEigenvalue.template.cpp",
907 classname=kernels_output_path +
"/MaxScaledEigenvalue",
908 namespace=kernels_namespace,
909 subdirectory=subdirectory +
".",
911 default_overwrite=
True,
912 apply_iteratively=
True,
915 output.add(generated_kernels)
916 output.makefile.add_h_file(kernels_output_path +
"/MaxScaledEigenvalue.h", generated=
True)
917 output.makefile.add_cpp_file(kernels_output_path +
"/MaxScaledEigenvalue.cpp", generated=
True)
919 generated_kernels = (
921 headfile_template=kernels_templates_prefix +
"FaceIntegral.template.h",
922 cppfile_template=kernels_templates_prefix +
"FaceIntegral.template.cpp",
923 classname=kernels_output_path +
"/FaceIntegral",
924 namespace=kernels_namespace,
925 subdirectory=subdirectory +
".",
927 default_overwrite=
True,
928 apply_iteratively=
True,
931 output.add(generated_kernels)
932 output.makefile.add_h_file(kernels_output_path +
"/FaceIntegral.h", generated=
True)
933 output.makefile.add_cpp_file(kernels_output_path +
"/FaceIntegral.cpp", generated=
True)
935 generated_kernels = (
937 headfile_template=kernels_templates_prefix +
"RiemannSolver.template.h",
938 cppfile_template=kernels_templates_prefix +
"RiemannSolverLinear.template.cpp" if self.
_is_linear
939 else kernels_templates_prefix +
"RiemannSolverNonlinear.template.cpp",
940 classname=kernels_output_path +
"/RiemannSolver",
941 namespace=kernels_namespace,
942 subdirectory=subdirectory +
".",
944 default_overwrite=
True,
945 apply_iteratively=
True,
948 output.add(generated_kernels)
949 output.makefile.add_h_file(kernels_output_path +
"/RiemannSolver.h", generated=
True)
950 output.makefile.add_cpp_file(kernels_output_path +
"/RiemannSolver.cpp", generated=
True)
953 kernels_namespace, output, subdirectory, kernels_templates_prefix, kernels_output_path
956 kernels_namespace, output, subdirectory, kernels_templates_prefix, kernels_output_path
959 kernels_namespace, output, subdirectory, kernels_templates_prefix, kernels_output_path
962 kernels_namespace, output, subdirectory, kernels_templates_prefix, kernels_output_path
965 kernels_namespace, output, subdirectory, kernels_templates_prefix, kernels_output_path
969 generated_kernels = (
971 headfile_template=kernels_templates_prefix +
"PointSources.template.h",
972 cppfile_template=kernels_templates_prefix +
"PointSources.template.cpp",
973 classname=kernels_output_path +
"/PointSources",
974 namespace=kernels_namespace,
975 subdirectory=subdirectory +
".",
977 default_overwrite=
True,
978 apply_iteratively=
True,
981 output.add(generated_kernels)
982 output.makefile.add_h_file(kernels_output_path +
"/PointSources.h", generated=
True)
983 output.makefile.add_cpp_file(kernels_output_path +
"/PointSources.cpp", generated=
True)
986 generated_kernels = (
988 headfile_template=kernels_templates_prefix +
"Gemms.template.h",
989 cppfile_template=kernels_templates_prefix +
"Gemms.template.cpp",
990 classname=kernels_output_path +
"/Gemms",
991 namespace=kernels_namespace,
992 subdirectory=subdirectory +
".",
994 default_overwrite=
True,
995 apply_iteratively=
True,
998 output.add(generated_kernels)
999 output.makefile.add_h_file(kernels_output_path +
"/Gemms.h", generated=
True)
1000 output.makefile.add_cpp_file(kernels_output_path +
"/Gemms.cpp", generated=
True)
1003 This is a very ugly fix that should be replaced asap.
1004 Essentially, the libxsmm kernel generator generates faulty code if
1005 'noarch' is specified. This code works fine except that it contains a
1006 #ifdef which is missing its corresponding #endif.
1007 This code just inserts that missing #endif.
1010 file = open(
"kernels/" + self.
_name +
"/FusedSpaceTimePredictorVolumeIntegral_libxsmm.c",
"r")
1011 content = file.read()
1013 file = open(
"kernels/" + self.
_name +
"/FusedSpaceTimePredictorVolumeIntegral_libxsmm.c",
"w")
1014 content = content.replace(
"__FILE__)\n",
"__FILE__)\n#endif\n")
1018 file = open(
"kernels/" + self.
_name +
"/AMRRoutines_libxsmm.c",
"r")
1019 content = file.read()
1021 file = open(
"kernels/" + self.
_name +
"/AMRRoutines_libxsmm.c",
"w")
1022 content = content.replace(
"__FILE__)\n",
"__FILE__)\n#endif\n")
1027 This tells Peano to add the solver files to the project. It generates any files that are not
1028 specifically cell or face data or grid actions such as the actionsets.
1029 Currently it generates solver implementation and header files as well as abstract solver
1030 implementation and header files.
1031 In addition to this if the user has specified that they would like to use shortcuts to refer
1032 to their variable (e.g., specified their unknowns or aux. variables through a dict) it generates
1033 a VariableShortcuts file which is then connected to the solver so that users can specify their
1034 variables through name.
1038 The ExaHyPE2 project will call this operation when it sets
1039 up the overall environment.
1041 This routine is typically not invoked by a user.
1043 output: peano4.output.Output
1045 templatefile_prefix = os.path.dirname(os.path.realpath(__file__)) +
"/"
1047 if self._solver_template_file_class_name
is None:
1048 templatefile_prefix += self.__class__.__name__
1050 templatefile_prefix += self._solver_template_file_class_name
1055 abstractHeaderDictionary = {}
1056 implementationDictionary = {}
1062 generated_abstract_header_file = (
1064 templatefile_prefix +
"Abstract.template.h",
1065 templatefile_prefix +
"Abstract.template.cpp",
1066 "Abstract" + self.
_name,
1069 abstractHeaderDictionary,
1074 generated_solver_files = (
1076 templatefile_prefix +
".template.h",
1077 templatefile_prefix +
".template.cpp",
1081 implementationDictionary,
1087 output.add(generated_abstract_header_file)
1088 output.add(generated_solver_files)
1089 output.makefile.add_h_file(subdirectory +
"Abstract" + self.
_name +
".h", generated=
True)
1090 output.makefile.add_h_file(subdirectory + self.
_name +
".h", generated=
True)
1091 output.makefile.add_cpp_file(subdirectory +
"Abstract" + self.
_name +
".cpp", generated=
True)
1092 output.makefile.add_cpp_file(subdirectory + self.
_name +
".cpp", generated=
True)
1096 os.path.dirname(os.path.realpath(__file__))
1098 +
"../VariableShortcuts.template.h",
1099 "VariableShortcuts",
1102 implementationDictionary,
1106 output.add(generated_shortcut_file)
1107 output.makefile.add_h_file(subdirectory +
"VariableShortcuts.h", generated=
True)
1133 @preprocess_reconstructed_patch.setter
1143 @postprocess_updated_patch.setter
1154 Generates a dictionary of "words" that will later be used in various templates to fill these out by adding
1155 information from the solver or which was specified by the user.
1159 d[
"SOLVER_NAME"] = self.
_name
1162 d[
"ALIGNMENT"] = Architectures.get_alignment(self.
_architecture)
1163 d[
"SIMD_WIDTH"] = Architectures.get_simd_width(self.
_architecture)
1165 d[
"NUMBER_OF_DOF"] = self.
_order + 1
1166 d[
"NUMBER_OF_DOF_PADDED"] = Architectures.get_size_with_padding(self.
_architecture, self.
_order + 1)
1167 d[
"NUMBER_OF_UNKNOWNS"] = self.
_unknowns
1179 d[
"LINEARITY"] =
"linear" if self.
_is_linear else "nonlinear"
1181 d[
"USE_GAUSS_LOBATTO"] = (
"true" if self.
_polynomials is Polynomials.Gauss_Lobatto
else "false" )
1182 d[
"POLYNOMIAL_TYPE"] = (
"lobatto" if self.
_polynomials is Polynomials.Gauss_Lobatto
else "legendre" )
1194 d[
"NUMBER_OF_PREDICTOR_PRECISIONS"] = len(d[
"PREDICTOR_COMPUTATION_PRECISIONS"])
1195 d[
"NUMBER_OF_PRECISIONS"] = len(d[
"COMPUTATION_PRECISIONS"])
1198 raise Exception(
"min/max h are inconsistent")
1211 d[
"ABSTRACT_SOLVER_USER_DECLARATIONS"] = jinja2.Template(
1214 d[
"ABSTRACT_SOLVER_USER_DEFINITIONS"] = jinja2.Template(
1217 d[
"SOLVER_USER_DECLARATIONS"] = jinja2.Template(
1220 d[
"SOLVER_USER_DEFINITIONS"] = jinja2.Template(
1224 d[
"START_TIME_STEP_IMPLEMENTATION"] = jinja2.Template(
1227 d[
"FINISH_TIME_STEP_IMPLEMENTATION"] = jinja2.Template(
1231 d[
"CONSTRUCTOR_IMPLEMENTATION"] = jinja2.Template(
1234 d[
"DESTRUCTOR_IMPLEMENTATION"] = jinja2.Template(
1237 d[
"COMPUTE_TIME_STEP_SIZE"] = jinja2.Template(
1240 d[
"COMPUTE_NEW_TIME_STEP_SIZE"] = jinja2.Template(
1244 d[
"PREPROCESS_RECONSTRUCTED_PATCH"] = jinja2.Template(
1247 d[
"POSTPROCESS_UPDATED_PATCH"] = jinja2.Template(
1262 d[
"QUADRATURE_POINTS"] =
", ".join(self.
_basis.quadrature_points())
1274 boundary_conditions,
1275 refinement_criterion,
1278 material_parameters,
1280 additional_action_set_includes,
1281 additional_user_includes,
1284 If you pass in User_Defined, then the generator will create C++ stubs
1285 that you have to befill manually. If you pass in None_Implementation, it
1286 will create nop, i.e., no implementation or defaults. Any other string
1287 is copied 1:1 into the implementation. If you pass in None, then the
1288 set value so far won't be overwritten.
1290 if boundary_conditions
is not None:
1292 if refinement_criterion
is not None:
1294 if initial_conditions
is not None:
1297 if flux
is not None:
1301 if eigenvalues
is not None:
1303 if source_term
is not None:
1305 if material_parameters
is not None:
1308 if type(point_source) != int:
1310 "point_source needs to be an integer, this determines the number of point sources that will be used."
1313 if point_source > 0:
1326 polynomials = Polynomials.Gauss_Legendre,
1327 use_libxsmm = False,
1329 predictor_computation_precisions = False,
1330 corrector_computation_precision = False,
1331 solution_persistent_storage_precision = False,
1332 precompute_picard_precision = False,
1333 precision_criterion_implementation = PDETerms.User_Defined_Implementation,
1334 riemann_solver_implementation = PDETerms.None_Implementation,
1335 architecture = "noarch",
1336 initialise_patches = False
1338 if polynomials
is Polynomials.Gauss_Legendre:
1340 elif polynomials
is Polynomials.Gauss_Lobatto:
1344 "No proper basis chosen: {}, valid options are Gauss_Legendre and Gauss_Lobatto nodes".format(
1354 if precision!=
False:
1355 if precision
not in PrecisionType.keys():
1356 raise AssertionError(
1357 "The chosen precision was not a valid choice. valid choices are: "
1358 +
", ".join(PrecisionType.keys())
1366 if solution_persistent_storage_precision !=
False:
1367 if solution_persistent_storage_precision
not in PrecisionType.keys():
1368 raise AssertionError(
1369 "The chosen precision was not a valid choice. valid choices are: "
1370 +
", ".join(PrecisionType.keys())
1374 if corrector_computation_precision !=
False:
1375 if corrector_computation_precision
not in PrecisionType.keys():
1376 raise AssertionError(
1377 "The chosen precision was not a valid choice. valid choices are: "
1378 +
", ".join(PrecisionType.keys())
1382 if precompute_picard_precision !=
False:
1383 if precompute_picard_precision
not in PrecisionType.keys():
1384 raise AssertionError(
1385 "The chosen precision was not a valid choice. valid choices are: "
1386 +
", ".join(PrecisionType.keys())
1390 if predictor_computation_precisions !=
False:
1392 for prec
in predictor_computation_precisions:
1393 if prec
not in PrecisionType.keys():
1394 raise AssertionError(
1395 "The chosen precision was not a valid choice. valid choices are: "
1396 +
", ".join(PrecisionType.keys())
1403 if riemann_solver_implementation
is not PDETerms.None_Implementation:
1415 cell_data_storage: Storage,
1416 face_data_storage: Storage,
1419 By default, we hold all data on the heap using raw pointers. You can explicitly switch
1420 to storage on the call stack or heap using smart pointers.
1422 @see create_data_structures()
1424 assert isinstance(cell_data_storage, Storage)
1425 assert isinstance(face_data_storage, Storage)
1435 "OVERLAP": patch_overlap.dim[0]
1437 "DOFS_PER_AXIS": patch_overlap.dim[1],
1438 "UNKNOWNS": patch_overlap.no_of_unknowns,
1442 constexpr int SpaceFaceSize = {DOFS_PER_AXIS} * {UNKNOWNS}; // Order + 1
1444 constexpr int SpaceFaceSize = {DOFS_PER_AXIS} * {DOFS_PER_AXIS} * {UNKNOWNS}; // (Order + 1)^2
1447 const int faceDimension = marker.getSelectedFaceNumber() % Dimensions;
1448 // If the outer normal is positive, the normal points to the right so the face is on the right.
1449 const int faceLR = (marker.outerNormal()[faceDimension] > 0.0 ? 0 : 1);
1451 // std::copy_n(from, how_many, to);
1453 &neighbour.value[(1 - faceLR) * SpaceFaceSize],
1455 &value[(1 - faceLR) * SpaceFaceSize]
1458 return Template.format(**d)
Update the cell label within a sweep.
_interpolate_face_data_default_guard(self)
add_actions_to_plot_solution(self, step, output_path)
_restrict_face_data_default_guard(self)
_get_default_includes(self)
set_implementation(self, flux, ncp, eigenvalues, boundary_conditions, refinement_criterion, initial_conditions, source_term, material_parameters, point_source, additional_action_set_includes, additional_user_includes)
If you pass in User_Defined, then the generator will create C++ stubs that you have to befill manuall...
_load_cell_data_default_guard(self)
create_readme_descriptor(self, domain_offset, domain_size)
_action_set_prediction_on_hanging_cells
get_user_solver_includes(self)
_store_boundary_data_default_guard(self)
add_user_solver_includes(self, value)
Add further includes to this property, if your solver requires some additional routines from other he...
_action_set_update_face_label
add_implementation_files_to_project(self, namespace, output, dimensions, subdirectory="")
The ExaHyPE2 project will call this operation when it sets up the overall environment.
_point_sources_implementation
add_use_data_statements_to_Peano4_solver_step(self, step)
get_user_action_set_includes(self)
_compute_new_time_step_size
create_data_structures(self)
_load_face_data_default_guard(self)
_delete_face_data_default_guard(self)
_number_of_face_projections
_riemann_solver_implementation
get_name_of_global_instance(self)
_finish_time_step_implementation
__init__(self, name, order, unknowns, auxiliary_variables, min_cell_h, max_cell_h, plot_grid_properties=False)
_action_set_initial_conditions
add_actions_to_create_grid(self, step, evaluate_refinement_criterion)
_store_face_data_default_guard(self)
_unknown_identifier(self)
add_solver_constants(self, datastring)
_rhs_estimates_projection
_refinement_criterion_implementation
add_actions_to_perform_time_step(self, step)
set_solver_constants(self, datastring)
_initial_conditions_implementation
add_user_action_set_includes(self, value)
Add further includes to this property, if your action sets require some additional routines from othe...
auxiliary_variables(self)
_flux_estimates_projection
_destructor_implementation
_action_set_AMR_throughout_grid_construction
_preprocess_reconstructed_patch
add_actions_to_init_grid(self, step)
_generate_kernels(self, namespace, output, subdirectory, dimensions)
_postprocess_updated_patch
switch_storage_scheme(self, Storage cell_data_storage, Storage face_data_storage)
By default, we hold all data on the heap using raw pointers.
_provide_cell_data_to_compute_kernels_default_guard(self)
_init_dictionary_with_default_parameters(self, d)
add_kernel_optimisations(self, is_linear=False, polynomials=Polynomials.Gauss_Legendre, use_libxsmm=False, precision=False, predictor_computation_precisions=False, corrector_computation_precision=False, solution_persistent_storage_precision=False, precompute_picard_precision=False, precision_criterion_implementation=PDETerms.User_Defined_Implementation, riemann_solver_implementation=PDETerms.None_Implementation, architecture="noarch", initialise_patches=False)
_precision_criterion_implementation
_solver_user_declarations
_action_set_couple_resolution_transitions_and_handle_dynamic_mesh_refinement
_corrector_computation_precision
_action_set_postprocess_solution
_precompute_picard_precision
preprocess_reconstructed_patch(self)
_eigenvalues_implementation
postprocess_updated_patch(self)
_constructor_implementation
set_plot_description(self, description)
_solution_persistent_storage_precision
_source_term_implementation
_store_cell_data_default_guard(self)
_action_set_handle_boundary
_action_set_initial_conditions_for_grid_construction
_abstract_solver_user_declarations
_action_set_update_cell_label
_predictor_computation_precisions
_abstract_solver_user_definitions
add_entries_to_text_replacement_dictionary(self, d)
_material_param_implementation
_action_set_AMR_commit_without_further_analysis
_provide_face_data_to_compute_kernels_default_guard(self)
add_to_Peano4_datamodel(self, datamodel, verbose)
_start_time_step_implementation
_boundary_conditions_implementation
The action set to realise AMR.
The linear combination of the Runge-Kutta trials has to be projected onto the faces,...
ExaHyPE 2 ADER-DG handling of adaptive meshes.
The linear combination of the Runge-Kutta trials has to be projected onto the faces,...
PostprocessSolution differs from other action sets, as we only create it once.
The extrapolated solution from the space-time predictor has to be projected onto the faces,...
Realise patch via smart pointers.
Realise patch via smart pointers.
Very simple converter which maps the patch 1:1 onto a double array.
get_face_overlap_merge_implementation(patch_overlap)