5from abc
import abstractmethod
11 Abstract base class for any CCZ4 solver
13 Each CCZ4 solver inherits from this abstract base class which really only
14 defines some generic stuff such as the unknowns and includes that every
15 single solver will use.
17 The solver should, more or less, work out of the box, but you have to do
18 three things if you use a subclass:
20 1. If you use a CCZ4 solver, you will still have to add all the libraries to
21 your Peano project such that the Makefile picks them up. For this, the
22 solver offers an add_makefile_parameters().
24 2. You have to set the initial conditions via
26 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 my_solver.set_implementation(initial_conditions = " " "
28 for (int i=0; i<NumberOfUnknowns+NumberOfAuxiliaryVariables; i++) Q[i] = 0.0;
29 ::applications::exahype2::ccz4::gaugeWave(Q, volumeCentre, 0);
31 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 At this point, different CCZ4 solver variants might require different
34 syntax. The term volumeCentre for example above is only defined in a
37 3. Finally, you have to add domain-specific constants to the project.
38 For this, call add_all_solver_constants(). See the comment below.
40 Further to that, you might want to have to set boundary conditions. By
41 default, we do not set any boundary conditions. This works fine if
42 periodic boundary conditions are used. But once you switch off periodic
43 boundary conditions, you have to tell the solver how to treat the boundary.
44 This is typically done via set_implementation(), too.
46 ## More complex scenarios
48 Setting particular implementations via set_implementation() is not always
49 convenient or possible. You might want to add new functions to your classes,
50 do something in the solver constructor, and so forth. If so, feel free to
51 modify the file MySolverName.cpp which the tool generates. In this context,
52 you might want to pass in
54 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55 my_solver.set_implementation(initial_conditions = exahype2.solvers.PDETerms.User_Defined_Implementation,
56 refinement_criterion = exahype2.solvers.PDETerms.User_Defined_Implementation,
57 boundary_conditions=exahype2.solvers.PDETerms.User_Defined_Implementation
60 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62 which ensures that you get the right hook-in methods generated when you
63 invoke the Python script for the first time. These methods will contain
64 todo comments for you. Subsequent runs of the Python API should not
65 overwrite the solver implementation.
69 Each CCZ4 solver requires a minimal set of constants. These are represented
70 by integer_constants and double_constants. Please augment these dictionaries.
71 Eventually, you have to submit all the constants via add_all_solver_constants().
77 Dictionary which specifies the unknown names plus their cardinality
79 Has to be class attribute, as we need it in the constructor, i.e. before the
80 abstract object is created.
83 _FO_formulation_unknowns = {
106 Primary unknowns of the CCZ4 formulation which are there in the initial
107 formulation. All the other variables are auxiliary variables, i.e. ones
108 introduced to return to a first-order formulation. Unfortunately, the
109 ordering in _FO_formulation_unknows is motivated by the original papers
110 and not by the fact which quantities are original ones and which one are
111 helper or auxiliary variables.
114 _SO_formulation_unknowns = {
126 Default_Time_Step_Size_Relaxation = 0.1
133 Initialise the two dictionaries with default values (which work).
168 Add the headers for the compute kernels and initial condition implementations
170 Usually called by the subclass constructor.
173 self.add_user_action_set_includes(
175#include "CCZ4Kernels.h"
176#include "SecondOrderAuxiliaryVariablesReconstruction.h"
179 self.add_user_solver_includes(
181#include "CCZ4Kernels.h"
182#include "InitialValues.h"
183#include "SecondOrderAuxiliaryVariablesReconstruction.h"
191 Add domain-specific constants
193 I need a couple of constants. I could either replace them directly
194 within the Python snippets below, but I prefer here to go a different
195 way and to export them as proper C++ constants.
197 There are two ways to inject solver constants into Peano: We can either
198 add them to the Makefile as global const expressions, or we can add
199 them to the ExaHyPE2 solver. The latter is the route we go down here,
200 as these constants logically belong to the solver and not to the project.
202 This operation uses the parent class' add_solver_constants(). You still
203 can use this operation to add further parameters. Or you can, as a user,
204 always add new entries to integer_constants or double_constants and then
205 call this routine rather than adding individual constants one by one.
209 self.add_solver_constants(
210 "static constexpr int {} = {};".format(key, value)
213 self.add_solver_constants(
214 "static constexpr double {} = {};".format(key, value)
220 Add include path and minimal required cpp files to makefile
222 If you have multiple CCZ4 solvers, i.e. different solvers of CCZ4 or multiple
223 instances of the CCZ4 type, please call this operation only once on one of
224 your solvers. At the moment, I add hte following cpp files to the setup:
228 - SecondOrderAuxiliaryVariablesReconstruction.cpp
230 You can always add further files via
231 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
232 peano4_project.output.makefile.add_cpp_file( "mypath/myfile.cpp" )
233 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
236 if path_of_ccz4_application[-1] !=
"/":
237 path_of_ccz4_application +=
"/"
239 peano4_project.output.makefile.add_cpp_file(
240 path_of_ccz4_application +
"InitialValues.cpp"
242 peano4_project.output.makefile.add_cpp_file(
243 path_of_ccz4_application +
"CCZ4Kernels.cpp"
245 peano4_project.output.makefile.add_cpp_file(
246 path_of_ccz4_application +
"SecondOrderAuxiliaryVariablesReconstruction.cpp"
248 peano4_project.output.makefile.add_header_search_path(path_of_ccz4_application)
256 number_of_entries_between_two_db_flushes,
257 data_delta_between_two_snapsots,
258 time_delta_between_two_snapsots,
259 clear_database_after_flush,
260 tracer_unknowns=None,
264 Add tracer to project
266 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
267 some of the arguments. Most of them are simply piped through to this
270 The tracer is given a name and initial coordinates (list of three-tuples).
271 We need to know the underlying project as well, as we have to add the
272 tracing to the time stepping and the database update to the plotting.
273 ~~~~~~~~~~~~~~~~~~~~~~~
274 project.add_action_set_to_timestepping(my_interpolation)
275 project.add_action_set_to_timestepping(exahype2.tracer.DumpTracerIntoDatabase(
276 particle_set=tracer_particles,
278 filename=name + "-" + self._name,
279 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
281 data_delta_between_two_snapsots = data_delta_between_two_snapsots,
282 time_delta_between_two_snapsots = time_delta_between_two_snapsots,
283 clear_database_after_flush = True,
285 ~~~~~~~~~~~~~~~~~~~~~~~
288 assert "should not be called"
297 CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking
299 Please consult CCZ4Solver_FV_GlobalAdaptiveTimeStepWithEnclaveTasking.
304 self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state
306 AbstractCCZ4Solver.__init__(self)
307 exahype2.solvers.fv.rusanov.GlobalAdaptiveTimeStep.__init__(
310 patch_size=patch_size,
312 auxiliary_variables=0,
313 min_volume_h=min_volume_h,
314 max_volume_h=max_volume_h,
315 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
320 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
322 flux=exahype2.solvers.PDETerms.None_Implementation,
324 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
335 number_of_entries_between_two_db_flushes,
336 data_delta_between_two_snapsots,
337 time_delta_between_two_snapsots,
338 clear_database_after_flush,
343 Add tracer to project
345 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
346 some of the arguments. Most of them are simply piped through to this
349 project: exahype2.Project
357 number_of_entries_between_two_db_flushes,
358 data_delta_between_two_snapsots,
359 time_delta_between_two_snapsots,
360 clear_database_after_flush,
370 CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking
372 Please consult CCZ4Solver_FV_GlobalAdaptiveTimeStepWithEnclaveTasking.
377 self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state
379 AbstractCCZ4Solver.__init__(self)
380 exahype2.solvers.fv.musclhancock.GlobalAdaptiveTimeStep.__init__(
383 patch_size=patch_size,
385 auxiliary_variables=0,
386 min_volume_h=min_volume_h,
387 max_volume_h=max_volume_h,
388 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
393 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
395 flux=exahype2.solvers.PDETerms.None_Implementation,
397 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
408 number_of_entries_between_two_db_flushes,
409 data_delta_between_two_snapsots,
410 time_delta_between_two_snapsots,
411 clear_database_after_flush,
416 Add tracer to project
418 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
419 some of the arguments. Most of them are simply piped through to this
422 project: exahype2.Project
430 number_of_entries_between_two_db_flushes,
431 data_delta_between_two_snapsots,
432 time_delta_between_two_snapsots,
433 clear_database_after_flush,
444 CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking
446 The constructor of this classs is straightforward and realises the standard
447 steps of any numerical implementation of the CCZ4 scheme:
449 1. Init the actual numerical scheme. This happens through the constructor
452 2. Add the header files that we need, i.e. those files which contain the
453 actual CCZ4 implementation.
455 3. Add some constants that any CCZ4 C++ code requires.
457 4. Set the actual implementation, i.e. link the generic PDE terms to the
458 CCZ4-specific function calls.
460 5. Add the CCZ4-specific postprocessing.
470 pde_terms_without_state,
474 Construct solver with enclave tasking and adaptive time stepping
477 AbstractCCZ4Solver.__init__(self)
478 exahype2.solvers.fv.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
481 patch_size=patch_size,
483 auxiliary_variables=0,
484 min_volume_h=min_volume_h,
485 max_volume_h=max_volume_h,
486 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
487 pde_terms_without_state=pde_terms_without_state,
492 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
494 flux=exahype2.solvers.PDETerms.None_Implementation,
496 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
507 number_of_entries_between_two_db_flushes,
508 data_delta_between_two_snapsots,
509 time_delta_between_two_snapsots,
510 clear_database_after_flush,
515 Add tracer to project
517 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
518 some of the arguments. Most of them are simply piped through to this
522 project: exahype2.Project
530 number_of_entries_between_two_db_flushes,
531 data_delta_between_two_snapsots,
532 time_delta_between_two_snapsots,
533 clear_database_after_flush,
543 CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking
545 Please consult CCZ4Solver_FV_GlobalAdaptiveTimeStepWithEnclaveTasking.
550 self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state
552 AbstractCCZ4Solver.__init__(self)
553 exahype2.solvers.fv.musclhancock.GlobalAdaptiveTimeStep.__init__(
556 patch_size=patch_size,
558 auxiliary_variables=0,
559 min_volume_h=min_volume_h,
560 max_volume_h=max_volume_h,
561 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
562 pde_terms_without_state=pde_terms_without_state,
567 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
569 flux=exahype2.solvers.PDETerms.None_Implementation,
571 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
582 number_of_entries_between_two_db_flushes,
583 data_delta_between_two_snapsots,
584 time_delta_between_two_snapsots,
585 clear_database_after_flush,
590 Add tracer to project
592 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
593 some of the arguments. Most of them are simply piped through to this
596 project: exahype2.Project
604 number_of_entries_between_two_db_flushes,
605 data_delta_between_two_snapsots,
606 time_delta_between_two_snapsots,
607 clear_database_after_flush,
614#if defined(GPUOffloadingOMP)
615 double* deltaQSerialised = new double[NumberOfUnknowns*3];
617 double deltaQSerialised[NumberOfUnknowns*3];
619 for (int i=0; i<NumberOfUnknowns; i++) {
620 deltaQSerialised[i+0*NumberOfUnknowns] = 0.0;
621 deltaQSerialised[i+1*NumberOfUnknowns] = 0.0;
622 deltaQSerialised[i+2*NumberOfUnknowns] = 0.0;
624 deltaQSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
626 ::applications::exahype2::ccz4::ncp(BTimesDeltaQ, Q, deltaQSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
627#if defined(GPUOffloadingOMP)
628 delete[] deltaQSerialised;
635#if defined(GPUOffloadingOMP)
636 double* deltaQSerialised = new double[NumberOfUnknowns*3];
638 double deltaQSerialised[NumberOfUnknowns*3];
640 for (int i=0; i<NumberOfUnknowns; i++) {
641 deltaQSerialised[i+0*NumberOfUnknowns] = 0.0;
642 deltaQSerialised[i+1*NumberOfUnknowns] = 0.0;
643 deltaQSerialised[i+2*NumberOfUnknowns] = 0.0;
645 deltaQSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
647 ::applications::exahype2::ccz4::ncp(BTimesDeltaQ, Q, deltaQSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
648#if defined(GPUOffloadingOMP)
649 delete[] deltaQSerialised;
656 ::applications::exahype2::ccz4::source(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3, CCZ4SO);
662 ::applications::exahype2::ccz4::source(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3, CCZ4SO);
668 ::applications::exahype2::ccz4::maxEigenvalue(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd, maxEigenvalue );
674 ::applications::exahype2::ccz4::maxEigenvalue(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd, maxEigenvalue );
681 constexpr int itmax = {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}} * {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}} * {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}};
683 for (int i=0;i<itmax;i++)
685 applications::exahype2::ccz4::enforceCCZ4constraints( newQ+index );
686 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
695 constexpr int itmax = {{NUMBER_OF_VOLUMES_PER_AXIS}} * {{NUMBER_OF_VOLUMES_PER_AXIS}} * {{NUMBER_OF_VOLUMES_PER_AXIS}};
697 for (int i=0;i<itmax;i++)
699 applications::exahype2::ccz4::enforceCCZ4constraints( newQ+index );
700 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
711 number_of_entries_between_two_db_flushes,
712 data_delta_between_two_snapsots,
713 time_delta_between_two_snapsots,
714 clear_database_after_flush,
719 Add tracer to project
721 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
722 some of the arguments. Most of them are simply piped through to this
725 I realise this as a separate routine, as we need it for all FV flavours
728 number_of_attributes = (
729 (solver.unknowns + solver.auxiliary_variables)
730 if tracer_unknowns ==
None
731 else len(tracer_unknowns)
733 tracer_particles = project.add_tracer(
734 name=name, attribute_count=number_of_attributes
737 particle_set=tracer_particles, coordinates=coordinates
739 init_action_set.descend_invocation_order = 0
740 project.add_action_set_to_initialisation(init_action_set)
742 project_on_tracer_properties_kernel =
""
743 if tracer_unknowns ==
None:
744 project_on_tracer_properties_kernel = (
745 "::exahype2::fv::projectAllValuesOntoParticle_piecewiseLinear"
748 elif len(tracer_unknowns) == 1:
749 project_on_tracer_properties_kernel = (
750 "::exahype2::fv::projectValueOntoParticle_piecewiseLinear<{},{}>".format(
751 i, tracer_unknowns.index(i)
755 project_on_tracer_properties_kernel = (
756 "::exahype2::fv::projectValuesOntoParticle_piecewiseLinear<{}>".format(
766 project_on_tracer_properties_kernel=project_on_tracer_properties_kernel,
768 tracing_action_set.descend_invocation_order = (
769 solver._action_set_update_cell.descend_invocation_order + 1
771 project.add_action_set_to_timestepping(tracing_action_set)
772 project.add_action_set_to_initialisation(tracing_action_set)
775 particle_set=tracer_particles,
777 filename=name +
"-" + solver._name,
778 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
780 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
781 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
782 clear_database_after_flush=clear_database_after_flush,
784 dump_into_database_action_set.descend_invocation_order = (
785 solver._action_set_update_cell.descend_invocation_order + 2
787 project.add_action_set_to_timestepping(dump_into_database_action_set)
795 number_of_entries_between_two_db_flushes,
796 data_delta_between_two_snapsots,
797 time_delta_between_two_snapsots,
798 clear_database_after_flush,
803 I realise this as a separate routine, as we need it for all FD4 flavours
805 This is a wrapper around all the tracer handling. It adds the tracer to the
806 exahype2.Project, but it also instantiates the solution to tracer mapping
807 as well as the database bookkeeping.
809 @param tracer_unknowns: Integer
810 You can set this variable to None. In this case, all variables are
814 number_of_attributes = (
815 (solver.unknowns + solver.auxiliary_variables)
816 if tracer_unknowns ==
None
817 else len(tracer_unknowns)
819 tracer_particles = project.add_tracer(
820 name=name, attribute_count=number_of_attributes
822 project.add_action_set_to_initialisation(
824 particle_set=tracer_particles, coordinates=coordinates
827 project_on_tracer_properties_kernel =
""
828 if tracer_unknowns ==
None:
829 project_on_tracer_properties_kernel = (
830 "::exahype2::fv::projectAllValuesOntoParticle_piecewiseLinear"
832 elif len(tracer_unknowns) == 1:
833 project_on_tracer_properties_kernel = (
834 "::exahype2::fv::projectValueOntoParticle_piecewiseLinear<{},{}>".format(
835 i, tracer_unknowns.index(i)
839 project_on_tracer_properties_kernel = (
840 "::exahype2::fv::projectValuesOntoParticle_piecewiseLinear<{}>".format(
850 project_on_tracer_properties_kernel=project_on_tracer_properties_kernel,
852 tracing_action_set.descend_invocation_order = (
853 solver._action_set_compute_final_linear_combination.descend_invocation_order + 1
855 project.add_action_set_to_timestepping(tracing_action_set)
856 project.add_action_set_to_initialisation(tracing_action_set)
859 particle_set=tracer_particles,
861 filename=name +
"-" + solver._name,
862 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
864 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
865 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
866 clear_database_after_flush=clear_database_after_flush,
868 dump_into_database_action_set.descend_invocation_order = (
869 solver._action_set_compute_final_linear_combination.descend_invocation_order + 2
871 project.add_action_set_to_timestepping(dump_into_database_action_set)
880 CCZ4 solver using fourth-order finite differences and global adaptive time stepping incl enclave tasking
882 The constructor of this classs is straightforward and realises the standard
883 steps of any numerical implementation of the CCZ4 scheme:
885 1. Init the actual numerical scheme. This happens through the constructor
888 2. Add the header files that we need, i.e. those files which contain the
889 actual CCZ4 implementation.
891 3. Add some constants that any CCZ4 C++ code requires.
893 4. Set the actual implementation, i.e. link the generic PDE terms to the
894 CCZ4-specific function calls.
896 5. Add the CCZ4-specific postprocessing.
898 6. Switch to higher-order interpolation and restriction.
909 pde_terms_without_state,
916 Calibrate the default time step size calibration with 1/16 to take into
917 account that we have a higher-order numerical scheme.
920 AbstractCCZ4Solver.__init__(self)
922 AbstractCCZ4Solver.enable_second_order(self)
923 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
926 patch_size=patch_size,
929 auxiliary_variables=0,
930 min_meshcell_h=min_meshcell_h,
931 max_meshcell_h=max_meshcell_h,
933 pde_terms_without_state=pde_terms_without_state,
939 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
941 flux=exahype2.solvers.PDETerms.None_Implementation,
943 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
950 # Use second order interpolation and restriction
951 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_interpolation(
954 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_restriction(
960 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_interpolation(self)
961 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_restriction(self)
964 # Use matrix interpolation and restriction
965 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_interpolation(
968 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_restriction(
974 # Use tensor product interpolation and restriction
975 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_interpolation(
977 "TP_linear_with_linear_extrap_normal_interp"
979 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_restriction(
981 "TP_average_normal_extrap"
990 number_of_entries_between_two_db_flushes,
991 data_delta_between_two_snapsots,
992 time_delta_between_two_snapsots,
993 clear_database_after_flush,
998 Add tracer to project
1000 This is a delegate to add_tracer_to_FD4_solver() which passes the
1001 object in as first argument.
1003 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1004 some of the arguments. Most of them are simply piped through to this
1007 @param project: exahype2.Project
1009 @param tracer_unknowns: Integer
1010 You can set this variable to None. In this case, all variables are
1019 number_of_entries_between_two_db_flushes,
1020 data_delta_between_two_snapsots,
1021 time_delta_between_two_snapsots,
1022 clear_database_after_flush,
1032 CCZ4 solver using fourth-order finite differences and global adaptive time stepping without enclave tasking
1034 Consult CCZ4Solver_FD4_GlobalAdaptiveTimeStepWithEnclaveTasking please.
1051 Calibrate the default time step size calibration with 1/16 to take into
1052 account that we have a higher-order numerical scheme.
1055 AbstractCCZ4Solver.__init__(self)
1057 AbstractCCZ4Solver.enable_second_order(self)
1058 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStep.__init__(
1061 patch_size=patch_size,
1064 auxiliary_variables=0,
1065 min_meshcell_h=min_meshcell_h,
1066 max_meshcell_h=max_meshcell_h,
1073 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1075 flux=exahype2.solvers.PDETerms.None_Implementation,
1077 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1084 # Use second order interpolation and restriction
1085 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_interpolation(
1088 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_restriction(
1094 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_interpolation(self)
1095 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_restriction(self)
1098 # Use matrix interpolation and restriction
1099 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_interpolation(
1102 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_restriction(
1108 # Use tensor product interpolation and restriction
1109 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_interpolation(
1111 "TP_linear_with_linear_extrap_normal_interp"
1113 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_restriction(
1115 "TP_average_normal_extrap"
1124 number_of_entries_between_two_db_flushes,
1125 data_delta_between_two_snapsots,
1126 time_delta_between_two_snapsots,
1127 clear_database_after_flush,
1132 Add tracer to project
1134 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1135 some of the arguments. Most of them are simply piped through to this
1138 project: exahype2.Project
1146 number_of_entries_between_two_db_flushes,
1147 data_delta_between_two_snapsots,
1148 time_delta_between_two_snapsots,
1149 clear_database_after_flush=clear_database_after_flush,
1150 tracer_unknowns=tracer_unknowns,
1160 Variation of classic FD4 which relies on second order PDE formulation
1162 The traditional ExaHyPE CCZ4 formulation is the first order formulation
1163 introduced by Dumbser et al. In this formulation, the second order terms
1164 in CCZ4 are substituted with helper variables which represent first order
1165 derivatives. While formally straightforward, keeping the whole system
1166 consistent and stricly hyperbolic is a different challenge.
1168 In this revised version, we have to evolve the primary quantities of CCZ4
1169 and also the helper variables, which blows the overall system up to 59
1170 equations in its simplest form. The work by Dumbser and others suggest that
1171 this is a consistent and stable approach, but limited work is actually
1172 published on proper physical simulations. We therefore also implemented a
1173 second order PDE version within ExaHyPE.
1175 This second order variant is not really second order from the start.
1176 Instead, we use the first order formulation, and we reconstruct the helper
1177 term via finite differences prior to the compute kernel application. That is,
1178 the compute kernels see variables representing first order derivatives, and
1179 they also evolve these guys. Afterwards, we throw away the evolved quantities
1180 and reconstruct them from the primary unknowns prior to the next time step.
1182 This might not be super efficient (it would be faster to stick to the
1183 second order formulation right from the start), but it allows us to reuse
1184 the compute kernels written for the first order PDE formulation.
1188 We have now a smaller number of real unknowns, i.e. only those guys who
1189 belong to the "original" second-order formulation. The remaining quantities
1190 compared to a first-order formulation are technically material or auxiliary
1191 quantities. We model them as such, which allows ExaHyPE's data management
1192 to deal more efficiently with them.
1195 reconstruction_type: "4thOrder", "centralDifferences", "leftDifference", "rightDifference"
1206 reconstruction_type,
1212 Calibrate the default time step size calibration with 1/16 to take into
1213 account that we have a higher-order numerical scheme.
1216 AbstractCCZ4Solver.__init__(self)
1217 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
1220 patch_size=patch_size,
1225 min_meshcell_h=min_meshcell_h,
1226 max_meshcell_h=max_meshcell_h,
1227 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation
1234 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1236 double deltaQSerialised[NumberOfUnknowns*3];
1237 for (int i=0; i<NumberOfUnknowns; i++) {
1238 deltaQSerialised[i+0*NumberOfUnknowns] = 0.0;
1239 deltaQSerialised[i+1*NumberOfUnknowns] = 0.0;
1240 deltaQSerialised[i+2*NumberOfUnknowns] = 0.0;
1242 deltaQSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
1244 ::applications::exahype2::ccz4::ncpSecondOrderFormulation(BTimesDeltaQ, Q, deltaQSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
1246 flux=exahype2.solvers.PDETerms.None_Implementation,
1248 tarch::memset(S, 0.0, NumberOfUnknowns*sizeof(double));
1249 ::applications::exahype2::ccz4::sourceSecondOrderFormulation(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3);
1251 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1254 return ::applications::exahype2::ccz4::maxEigenvalueSecondOrderFormulation(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd );
1260 constexpr int itmax = {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}} * {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}} * {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}};
1262 for (int i=0;i<itmax;i++)
1264 applications::exahype2::ccz4::enforceCCZ4constraintsSecondOrderFormulation( newQ+index );
1265 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
1271 # Use second order interpolation and restriction
1272 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_interpolation(
1275 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_restriction(
1281 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_interpolation(self)
1282 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_restriction(self)
1285 # Use matrix interpolation and restriction
1286 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_interpolation(
1289 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_restriction(
1295 # Use tensor product interpolation and restriction
1296 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_interpolation(
1298 "TP_linear_with_linear_extrap_normal_interp"
1300 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_restriction(
1302 "TP_average_normal_extrap"
1308::exahype2::CellData reconstructedPatchData(
1314 nullptr // targetPatch
1316::applications::exahype2::ccz4::recomputeAuxiliaryVariablesFD4_"""
1317 + reconstruction_type
1319 reconstructedPatchData,
1320 {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}},
1322 {{NUMBER_OF_UNKNOWNS}},
1323 {{NUMBER_OF_AUXILIARY_VARIABLES}}
1333 number_of_entries_between_two_db_flushes,
1334 data_delta_between_two_snapsots,
1335 time_delta_between_two_snapsots,
1336 clear_database_after_flush,
1341 Add tracer to project
1343 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1344 some of the arguments. Most of them are simply piped through to this
1347 project: exahype2.Project
1350 number_of_attributes = (
1352 if tracer_unknowns ==
None
1353 else len(tracer_unknowns)
1355 tracer_particles = project.add_tracer(
1356 name=name, attribute_count=number_of_attributes
1359 particle_set=tracer_particles, coordinates=coordinates
1361 init_action_set.descend_invocation_order = 0
1362 project.add_action_set_to_initialisation(init_action_set)
1364 project_on_tracer_properties_kernel =
""
1365 if tracer_unknowns ==
None:
1366 project_on_tracer_properties_kernel = (
1367 "::exahype2::fv::projectAllValuesOntoParticle_piecewiseLinear"
1369 elif len(tracer_unknowns) == 1:
1370 project_on_tracer_properties_kernel =
"::exahype2::fv::projectValueOntoParticle_piecewiseLinear<{},{}>".format(
1371 i, tracer_unknowns.index(i)
1374 project_on_tracer_properties_kernel = (
1375 "::exahype2::fv::projectValuesOntoParticle_piecewiseLinear<{}>".format(
1385 project_on_tracer_properties_kernel=project_on_tracer_properties_kernel,
1387 tracing_action_set.descend_invocation_order = (
1391 project.add_action_set_to_timestepping(tracing_action_set)
1392 project.add_action_set_to_initialisation(tracing_action_set)
1395 particle_set=tracer_particles,
1398 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
1399 output_precision=10,
1400 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
1401 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
1402 clear_database_after_flush=
True,
1404 dump_into_database_action_set.descend_invocation_order = (
1408 project.add_action_set_to_timestepping(dump_into_database_action_set)
1413#if defined(GPUOffloadingOMP)
1414 double* dQdxSerialised = new double[NumberOfUnknowns*3];
1416 double dQdxSerialised[NumberOfUnknowns*3];
1418 for (int i=0; i<NumberOfUnknowns; i++) {
1419 dQdxSerialised[i+0*NumberOfUnknowns] = 0.0;
1420 dQdxSerialised[i+1*NumberOfUnknowns] = 0.0;
1421 dQdxSerialised[i+2*NumberOfUnknowns] = 0.0;
1423 dQdxSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
1425 ::applications::exahype2::ccz4::ncp(BTimesDeltaQ, Q, dQdxSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
1426#if defined(GPUOffloadingOMP)
1427 delete[] dQdxSerialised;
1434 tarch::memset(S, 0.0, NumberOfUnknowns*sizeof(double));
1435 ::applications::exahype2::ccz4::source(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3, CCZ4SO);
1441 ::applications::exahype2::ccz4::maxEigenvalue(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd, maxEigenvalue );
1448 constexpr int itmax = ({{DG_ORDER}}+1) * ({{DG_ORDER}}+1) * ({{DG_ORDER}}+1);
1450 for (int i=0;i<itmax;i++)
1452 applications::exahype2::ccz4::enforceCCZ4constraints( newQ+index );
1453 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
1464 number_of_entries_between_two_db_flushes,
1465 data_delta_between_two_snapsots,
1466 time_delta_between_two_snapsots,
1467 clear_database_after_flush,
1470 number_of_attributes = (
1471 (self.unknowns + self.auxiliary_variables)
1472 if tracer_unknowns ==
None
1473 else len(tracer_unknowns)
1475 tracer_particles = project.add_tracer(
1476 name=name, attribute_count=number_of_attributes
1479 particle_set=tracer_particles, coordinates=coordinates
1481 init_action_set.descend_invocation_order = 0
1482 project.add_action_set_to_initialisation(init_action_set)
1484 assert tracer_unknowns ==
None
1489 project_on_tracer_properties_kernel=
"::exahype2::dg::projectAllValuesOntoParticle",
1491 tracing_action_set.descend_invocation_order = (
1492 self._action_set_compute_final_linear_combination_and_project_solution_onto_faces.descend_invocation_order
1495 project.add_action_set_to_timestepping(tracing_action_set)
1496 project.add_action_set_to_initialisation(tracing_action_set)
1499 particle_set=tracer_particles,
1501 filename=name +
"-" + self._name,
1502 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
1503 output_precision=10,
1504 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
1505 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
1506 clear_database_after_flush=clear_database_after_flush,
1508 dump_into_database_action_set.descend_invocation_order = (
1509 self._action_set_compute_final_linear_combination_and_project_solution_onto_faces.descend_invocation_order
1512 project.add_action_set_to_timestepping(dump_into_database_action_set)
1521 CCZ4 solver using Runge-Kutta Discontinuous Galerkin and global adaptive time stepping incl enclave tasking
1523 The constructor of this classs is straightforward and realises the standard
1524 steps of any numerical implementation of the CCZ4 scheme:
1526 1. Init the actual numerical scheme. This happens through the constructor
1529 2. Add the header files that we need, i.e. those files which contain the
1530 actual CCZ4 implementation.
1532 3. Add some constants that any CCZ4 C++ code requires.
1534 4. Set the actual implementation, i.e. link the generic PDE terms to the
1535 CCZ4-specific function calls.
1537 5. Add the CCZ4-specific postprocessing.
1539 6. Switch to higher-order interpolation and restriction.
1550 pde_terms_without_state,
1554 Construct solver with enclave tasking
1557 AbstractCCZ4Solver.__init__(self)
1558 exahype2.solvers.rkdg.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
1562 polynomials=polynomials,
1564 auxiliary_variables=0,
1565 min_cell_h=min_cell_h,
1566 max_cell_h=max_cell_h,
1567 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
1568 pde_terms_without_state=pde_terms_without_state,
1574 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1576 flux=exahype2.solvers.PDETerms.None_Implementation,
1578 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1591 number_of_entries_between_two_db_flushes,
1592 data_delta_between_two_snapsots,
1593 time_delta_between_two_snapsots,
1594 clear_database_after_flush,
1599 Add tracer to project
1601 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1602 some of the arguments. Most of them are simply piped through to this
1605 At this point, we have not yet created the Peano 4 project. Therefore, we
1606 have not yet befilled the time stepping action set.
1608 project: exahype2.Project
1616 number_of_entries_between_two_db_flushes,
1617 data_delta_between_two_snapsots,
1618 time_delta_between_two_snapsots,
1619 clear_database_after_flush,
1630 CCZ4 solver using Runge-Kutta Discontinuous Galerkin and global adaptive time stepping incl enclave tasking
1632 The constructor of this classs is straightforward and realises the standard
1633 steps of any numerical implementation of the CCZ4 scheme:
1635 1. Init the actual numerical scheme. This happens through the constructor
1638 2. Add the header files that we need, i.e. those files which contain the
1639 actual CCZ4 implementation.
1641 3. Add some constants that any CCZ4 C++ code requires.
1643 4. Set the actual implementation, i.e. link the generic PDE terms to the
1644 CCZ4-specific function calls.
1646 5. Add the CCZ4-specific postprocessing.
1648 6. Switch to higher-order interpolation and restriction.
1659 pde_terms_without_state,
1663 Construct solver with enclave tasking
1666 AbstractCCZ4Solver.__init__(self)
1667 exahype2.solvers.rkdg.rusanov.GlobalAdaptiveTimeStep.__init__(
1671 polynomials=polynomials,
1673 auxiliary_variables=0,
1674 min_cell_h=min_cell_h,
1675 max_cell_h=max_cell_h,
1676 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
1677 pde_terms_without_state=pde_terms_without_state,
1683 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1685 flux=exahype2.solvers.PDETerms.None_Implementation,
1687 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1700 number_of_entries_between_two_db_flushes,
1701 data_delta_between_two_snapsots,
1702 time_delta_between_two_snapsots,
1703 clear_database_after_flush,
1708 Add tracer to project
1710 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1711 some of the arguments. Most of them are simply piped through to this
1714 At this point, we have not yet created the Peano 4 project. Therefore, we
1715 have not yet befilled the time stepping action set.
1717 project: exahype2.Project
1725 number_of_entries_between_two_db_flushes,
1726 data_delta_between_two_snapsots,
1727 time_delta_between_two_snapsots,
1728 clear_database_after_flush,
Abstract base class for any CCZ4 solver.
dict _SO_formulation_unknowns
__init__(self)
Constructor.
float Default_Time_Step_Size_Relaxation
_add_standard_includes(self)
Add the headers for the compute kernels and initial condition implementations.
add_tracer(self, name, coordinates, project, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns=None)
Add tracer to project.
add_all_solver_constants(self)
Add domain-specific constants.
enable_second_order(self)
Default_Time_Step_Size_Relaxation
dict _FO_formulation_unknowns
add_makefile_parameters(self, peano4_project, path_of_ccz4_application)
Add include path and minimal required cpp files to makefile.
CCZ4 solver using fourth-order finite differences and global adaptive time stepping incl enclave task...
add_tracer(self, name, coordinates, project, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
Add tracer to project.
__init__(self, name, patch_size, rk_order, min_meshcell_h, max_meshcell_h, pde_terms_without_state, second_order=False)
Constructor.
CCZ4 solver using fourth-order finite differences and global adaptive time stepping without enclave t...
add_tracer(self, name, coordinates, project, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
Add tracer to project.
__init__(self, name, patch_size, rk_order, min_meshcell_h, max_meshcell_h, second_order=False)
Constructor.
CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking.
add_tracer(self, name, coordinates, project, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
Add tracer to project.
__init__(self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state)
Construct solver with enclave tasking and adaptive time stepping.
CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking.
add_tracer(self, name, coordinates, project, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
Add tracer to project.
__init__(self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state)
Constructor.
CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking.
__init__(self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state)
Constructor.
add_tracer(self, name, coordinates, project, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
Add tracer to project.
CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking.
add_tracer(self, name, coordinates, project, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
Add tracer to project.
__init__(self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state)
Constructor.
CCZ4 solver using Runge-Kutta Discontinuous Galerkin and global adaptive time stepping incl enclave t...
__init__(self, name, rk_order, polynomials, min_cell_h, max_cell_h, pde_terms_without_state)
Construct solver with enclave tasking.
add_tracer(self, name, coordinates, project, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
Add tracer to project.
CCZ4 solver using Runge-Kutta Discontinuous Galerkin and global adaptive time stepping incl enclave t...
__init__(self, name, rk_order, polynomials, min_cell_h, max_cell_h, pde_terms_without_state)
Construct solver with enclave tasking.
add_tracer(self, name, coordinates, project, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
Add tracer to project.
set_implementation(self, boundary_conditions, refinement_criterion, initial_conditions, memory_location, use_split_loop, 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...
postprocess_updated_patch(self)
postprocess_updated_patch(self, kernel)
Define a postprocessing routine over the data.
set_implementation(self, boundary_conditions, refinement_criterion, initial_conditions, memory_location, use_split_loop, 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...
set_implementation(self, flux=None, ncp=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, source_term=None, memory_location=None, use_split_loop=False, 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...
set_implementation(self, flux=None, ncp=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, source_term=None, memory_location=None, use_split_loop=False, 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...
set_implementation(self, flux=None, ncp=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, source_term=None, memory_location=None, use_split_loop=False, 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...
postprocess_updated_cell_after_final_linear_combination(self)
postprocess_updated_cell_after_final_linear_combination(self, kernel)
Define a postprocessing routine over the data.
set_implementation(self, flux=None, ncp=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, source_term=None, point_source=None, 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...
RKDG solver with global adaptive time step.
set_implementation(self, flux=None, ncp=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, source_term=None, point_source=None, 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...
RKDG solver with Rusanov Riemann solver employing global adaptive time stepping.
set_implementation(self, flux=None, ncp=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, source_term=None, point_source=None, 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...
postprocess_updated_patch(self)
auxiliary_variables(self)
postprocess_updated_patch(self, kernel)
Define a postprocessing routine over the data.
auxiliary_variables(self, value)
preprocess_reconstructed_patch(self, kernel)
Please consult exahype2.solvers.fv.FV.preprocess_reconstructed_patch() for a documentation on this ro...
_action_set_compute_final_linear_combination
preprocess_reconstructed_patch(self)
set_implementation(self, flux, ncp, source_term, eigenvalues, boundary_conditions, refinement_criterion, initial_conditions, memory_location, 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...
set_implementation(self, flux=None, ncp=None, source_term=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, memory_location=None, additional_action_set_includes="", additional_user_includes="", KOSigma=None)
If you pass in User_Defined, then the generator will create C++ stubs that you have to befill manuall...
set_implementation(self, flux=None, ncp=None, source_term=None, eigenvalues=None, boundary_conditions=None, refinement_criterion=None, initial_conditions=None, memory_location=None, additional_action_set_includes="", additional_user_includes="", KOSigma=None, reconstruction_with_rk=False)
If you pass in User_Defined, then the generator will create C++ stubs that you have to befill manuall...
Particle tracing over the DG solver.
Dump the tracer data into a csv database.
Particle tracing over the Finite Volumes solver.
Basically superclass, though we add these numbers.
add_tracer_to_FV_solver(name, coordinates, project, solver, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
Add tracer to project.
construct_FV_source_term()
add_tracer_to_DG_solver(name, coordinates, project, self, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
construct_FV_eigenvalues()
add_tracer_to_FD4_solver(name, coordinates, project, solver, number_of_entries_between_two_db_flushes, data_delta_between_two_snapsots, time_delta_between_two_snapsots, clear_database_after_flush, tracer_unknowns)
I realise this as a separate routine, as we need it for all FD4 flavours.
construct_FD4_postprocessing_kernel()
construct_FD4_source_term()
construct_DG_eigenvalues()
construct_FV_postprocessing_kernel()
construct_FD4_eigenvalues()
construct_DG_postprocessing_kernel()
construct_DG_source_term()