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,
911 device_resident_rk=False,
917 Calibrate the default time step size calibration with 1/16 to take into
918 account that we have a higher-order numerical scheme.
921 AbstractCCZ4Solver.__init__(self)
923 AbstractCCZ4Solver.enable_second_order(self)
924 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
927 patch_size=patch_size,
930 auxiliary_variables=0,
931 min_meshcell_h=min_meshcell_h,
932 max_meshcell_h=max_meshcell_h,
934 pde_terms_without_state=pde_terms_without_state,
935 device_resident_rk=device_resident_rk,
936 plot_grid_properties=
True
942 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
944 flux=exahype2.solvers.PDETerms.None_Implementation,
946 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
953 # Use second order interpolation and restriction
954 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_interpolation(
957 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_restriction(
963 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_interpolation(self)
964 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_restriction(self)
967 # Use matrix interpolation and restriction
968 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_interpolation(
971 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_restriction(
977 # Use tensor product interpolation and restriction
978 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_interpolation(
980 "TP_linear_with_linear_extrap_normal_interp"
982 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_restriction(
984 "TP_average_normal_extrap"
993 number_of_entries_between_two_db_flushes,
994 data_delta_between_two_snapsots,
995 time_delta_between_two_snapsots,
996 clear_database_after_flush,
1001 Add tracer to project
1003 This is a delegate to add_tracer_to_FD4_solver() which passes the
1004 object in as first argument.
1006 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1007 some of the arguments. Most of them are simply piped through to this
1010 @param project: exahype2.Project
1012 @param tracer_unknowns: Integer
1013 You can set this variable to None. In this case, all variables are
1022 number_of_entries_between_two_db_flushes,
1023 data_delta_between_two_snapsots,
1024 time_delta_between_two_snapsots,
1025 clear_database_after_flush,
1035 CCZ4 solver using fourth-order finite differences and global adaptive time stepping without enclave tasking
1037 Consult CCZ4Solver_FD4_GlobalAdaptiveTimeStepWithEnclaveTasking please.
1054 Calibrate the default time step size calibration with 1/16 to take into
1055 account that we have a higher-order numerical scheme.
1058 AbstractCCZ4Solver.__init__(self)
1060 AbstractCCZ4Solver.enable_second_order(self)
1061 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStep.__init__(
1064 patch_size=patch_size,
1067 auxiliary_variables=0,
1068 min_meshcell_h=min_meshcell_h,
1069 max_meshcell_h=max_meshcell_h,
1076 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1078 flux=exahype2.solvers.PDETerms.None_Implementation,
1080 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1087 # Use second order interpolation and restriction
1088 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_interpolation(
1091 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_restriction(
1097 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_interpolation(self)
1098 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_restriction(self)
1101 # Use matrix interpolation and restriction
1102 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_interpolation(
1105 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_restriction(
1111 # Use tensor product interpolation and restriction
1112 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_interpolation(
1114 "TP_linear_with_linear_extrap_normal_interp"
1116 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_restriction(
1118 "TP_average_normal_extrap"
1127 number_of_entries_between_two_db_flushes,
1128 data_delta_between_two_snapsots,
1129 time_delta_between_two_snapsots,
1130 clear_database_after_flush,
1135 Add tracer to project
1137 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1138 some of the arguments. Most of them are simply piped through to this
1141 project: exahype2.Project
1149 number_of_entries_between_two_db_flushes,
1150 data_delta_between_two_snapsots,
1151 time_delta_between_two_snapsots,
1152 clear_database_after_flush=clear_database_after_flush,
1153 tracer_unknowns=tracer_unknowns,
1163 Variation of classic FD4 which relies on second order PDE formulation
1165 The traditional ExaHyPE CCZ4 formulation is the first order formulation
1166 introduced by Dumbser et al. In this formulation, the second order terms
1167 in CCZ4 are substituted with helper variables which represent first order
1168 derivatives. While formally straightforward, keeping the whole system
1169 consistent and stricly hyperbolic is a different challenge.
1171 In this revised version, we have to evolve the primary quantities of CCZ4
1172 and also the helper variables, which blows the overall system up to 59
1173 equations in its simplest form. The work by Dumbser and others suggest that
1174 this is a consistent and stable approach, but limited work is actually
1175 published on proper physical simulations. We therefore also implemented a
1176 second order PDE version within ExaHyPE.
1178 This second order variant is not really second order from the start.
1179 Instead, we use the first order formulation, and we reconstruct the helper
1180 term via finite differences prior to the compute kernel application. That is,
1181 the compute kernels see variables representing first order derivatives, and
1182 they also evolve these guys. Afterwards, we throw away the evolved quantities
1183 and reconstruct them from the primary unknowns prior to the next time step.
1185 This might not be super efficient (it would be faster to stick to the
1186 second order formulation right from the start), but it allows us to reuse
1187 the compute kernels written for the first order PDE formulation.
1191 We have now a smaller number of real unknowns, i.e. only those guys who
1192 belong to the "original" second-order formulation. The remaining quantities
1193 compared to a first-order formulation are technically material or auxiliary
1194 quantities. We model them as such, which allows ExaHyPE's data management
1195 to deal more efficiently with them.
1198 reconstruction_type: "4thOrder", "centralDifferences", "leftDifference", "rightDifference"
1209 reconstruction_type,
1215 Calibrate the default time step size calibration with 1/16 to take into
1216 account that we have a higher-order numerical scheme.
1219 AbstractCCZ4Solver.__init__(self)
1220 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
1223 patch_size=patch_size,
1228 min_meshcell_h=min_meshcell_h,
1229 max_meshcell_h=max_meshcell_h,
1230 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation
1237 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1239 double deltaQSerialised[NumberOfUnknowns*3];
1240 for (int i=0; i<NumberOfUnknowns; i++) {
1241 deltaQSerialised[i+0*NumberOfUnknowns] = 0.0;
1242 deltaQSerialised[i+1*NumberOfUnknowns] = 0.0;
1243 deltaQSerialised[i+2*NumberOfUnknowns] = 0.0;
1245 deltaQSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
1247 ::applications::exahype2::ccz4::ncpSecondOrderFormulation(BTimesDeltaQ, Q, deltaQSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
1249 flux=exahype2.solvers.PDETerms.None_Implementation,
1251 tarch::memset(S, 0.0, NumberOfUnknowns*sizeof(double));
1252 ::applications::exahype2::ccz4::sourceSecondOrderFormulation(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3);
1254 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1257 return ::applications::exahype2::ccz4::maxEigenvalueSecondOrderFormulation(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd );
1263 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}};
1265 for (int i=0;i<itmax;i++)
1267 applications::exahype2::ccz4::enforceCCZ4constraintsSecondOrderFormulation( newQ+index );
1268 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
1274 # Use second order interpolation and restriction
1275 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_interpolation(
1278 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_restriction(
1284 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_interpolation(self)
1285 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_restriction(self)
1288 # Use matrix interpolation and restriction
1289 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_interpolation(
1292 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_restriction(
1298 # Use tensor product interpolation and restriction
1299 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_interpolation(
1301 "TP_linear_with_linear_extrap_normal_interp"
1303 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_restriction(
1305 "TP_average_normal_extrap"
1311::exahype2::CellData reconstructedPatchData(
1317 nullptr // targetPatch
1319::applications::exahype2::ccz4::recomputeAuxiliaryVariablesFD4_"""
1320 + reconstruction_type
1322 reconstructedPatchData,
1323 {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}},
1325 {{NUMBER_OF_UNKNOWNS}},
1326 {{NUMBER_OF_AUXILIARY_VARIABLES}}
1336 number_of_entries_between_two_db_flushes,
1337 data_delta_between_two_snapsots,
1338 time_delta_between_two_snapsots,
1339 clear_database_after_flush,
1344 Add tracer to project
1346 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1347 some of the arguments. Most of them are simply piped through to this
1350 project: exahype2.Project
1353 number_of_attributes = (
1355 if tracer_unknowns ==
None
1356 else len(tracer_unknowns)
1358 tracer_particles = project.add_tracer(
1359 name=name, attribute_count=number_of_attributes
1362 particle_set=tracer_particles, coordinates=coordinates
1364 init_action_set.descend_invocation_order = 0
1365 project.add_action_set_to_initialisation(init_action_set)
1367 project_on_tracer_properties_kernel =
""
1368 if tracer_unknowns ==
None:
1369 project_on_tracer_properties_kernel = (
1370 "::exahype2::fv::projectAllValuesOntoParticle_piecewiseLinear"
1372 elif len(tracer_unknowns) == 1:
1373 project_on_tracer_properties_kernel =
"::exahype2::fv::projectValueOntoParticle_piecewiseLinear<{},{}>".format(
1374 i, tracer_unknowns.index(i)
1377 project_on_tracer_properties_kernel = (
1378 "::exahype2::fv::projectValuesOntoParticle_piecewiseLinear<{}>".format(
1388 project_on_tracer_properties_kernel=project_on_tracer_properties_kernel,
1390 tracing_action_set.descend_invocation_order = (
1394 project.add_action_set_to_timestepping(tracing_action_set)
1395 project.add_action_set_to_initialisation(tracing_action_set)
1398 particle_set=tracer_particles,
1401 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
1402 output_precision=10,
1403 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
1404 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
1405 clear_database_after_flush=
True,
1407 dump_into_database_action_set.descend_invocation_order = (
1411 project.add_action_set_to_timestepping(dump_into_database_action_set)
1416#if defined(GPUOffloadingOMP)
1417 double* dQdxSerialised = new double[NumberOfUnknowns*3];
1419 double dQdxSerialised[NumberOfUnknowns*3];
1421 for (int i=0; i<NumberOfUnknowns; i++) {
1422 dQdxSerialised[i+0*NumberOfUnknowns] = 0.0;
1423 dQdxSerialised[i+1*NumberOfUnknowns] = 0.0;
1424 dQdxSerialised[i+2*NumberOfUnknowns] = 0.0;
1426 dQdxSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
1428 ::applications::exahype2::ccz4::ncp(BTimesDeltaQ, Q, dQdxSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
1429#if defined(GPUOffloadingOMP)
1430 delete[] dQdxSerialised;
1437 tarch::memset(S, 0.0, NumberOfUnknowns*sizeof(double));
1438 ::applications::exahype2::ccz4::source(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3, CCZ4SO);
1444 ::applications::exahype2::ccz4::maxEigenvalue(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd, maxEigenvalue );
1451 constexpr int itmax = ({{DG_ORDER}}+1) * ({{DG_ORDER}}+1) * ({{DG_ORDER}}+1);
1453 for (int i=0;i<itmax;i++)
1455 applications::exahype2::ccz4::enforceCCZ4constraints( newQ+index );
1456 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
1467 number_of_entries_between_two_db_flushes,
1468 data_delta_between_two_snapsots,
1469 time_delta_between_two_snapsots,
1470 clear_database_after_flush,
1473 number_of_attributes = (
1474 (self.unknowns + self.auxiliary_variables)
1475 if tracer_unknowns ==
None
1476 else len(tracer_unknowns)
1478 tracer_particles = project.add_tracer(
1479 name=name, attribute_count=number_of_attributes
1482 particle_set=tracer_particles, coordinates=coordinates
1484 init_action_set.descend_invocation_order = 0
1485 project.add_action_set_to_initialisation(init_action_set)
1487 assert tracer_unknowns ==
None
1492 project_on_tracer_properties_kernel=
"::exahype2::dg::projectAllValuesOntoParticle",
1494 tracing_action_set.descend_invocation_order = (
1495 self._action_set_compute_final_linear_combination_and_project_solution_onto_faces.descend_invocation_order
1498 project.add_action_set_to_timestepping(tracing_action_set)
1499 project.add_action_set_to_initialisation(tracing_action_set)
1502 particle_set=tracer_particles,
1504 filename=name +
"-" + self._name,
1505 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
1506 output_precision=10,
1507 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
1508 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
1509 clear_database_after_flush=clear_database_after_flush,
1511 dump_into_database_action_set.descend_invocation_order = (
1512 self._action_set_compute_final_linear_combination_and_project_solution_onto_faces.descend_invocation_order
1515 project.add_action_set_to_timestepping(dump_into_database_action_set)
1524 CCZ4 solver using Runge-Kutta Discontinuous Galerkin and global adaptive time stepping incl enclave tasking
1526 The constructor of this classs is straightforward and realises the standard
1527 steps of any numerical implementation of the CCZ4 scheme:
1529 1. Init the actual numerical scheme. This happens through the constructor
1532 2. Add the header files that we need, i.e. those files which contain the
1533 actual CCZ4 implementation.
1535 3. Add some constants that any CCZ4 C++ code requires.
1537 4. Set the actual implementation, i.e. link the generic PDE terms to the
1538 CCZ4-specific function calls.
1540 5. Add the CCZ4-specific postprocessing.
1542 6. Switch to higher-order interpolation and restriction.
1553 pde_terms_without_state,
1557 Construct solver with enclave tasking
1560 AbstractCCZ4Solver.__init__(self)
1561 exahype2.solvers.rkdg.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
1565 polynomials=polynomials,
1567 auxiliary_variables=0,
1568 min_cell_h=min_cell_h,
1569 max_cell_h=max_cell_h,
1570 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
1571 pde_terms_without_state=pde_terms_without_state,
1577 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1579 flux=exahype2.solvers.PDETerms.None_Implementation,
1581 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1594 number_of_entries_between_two_db_flushes,
1595 data_delta_between_two_snapsots,
1596 time_delta_between_two_snapsots,
1597 clear_database_after_flush,
1602 Add tracer to project
1604 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1605 some of the arguments. Most of them are simply piped through to this
1608 At this point, we have not yet created the Peano 4 project. Therefore, we
1609 have not yet befilled the time stepping action set.
1611 project: exahype2.Project
1619 number_of_entries_between_two_db_flushes,
1620 data_delta_between_two_snapsots,
1621 time_delta_between_two_snapsots,
1622 clear_database_after_flush,
1633 CCZ4 solver using Runge-Kutta Discontinuous Galerkin and global adaptive time stepping incl enclave tasking
1635 The constructor of this classs is straightforward and realises the standard
1636 steps of any numerical implementation of the CCZ4 scheme:
1638 1. Init the actual numerical scheme. This happens through the constructor
1641 2. Add the header files that we need, i.e. those files which contain the
1642 actual CCZ4 implementation.
1644 3. Add some constants that any CCZ4 C++ code requires.
1646 4. Set the actual implementation, i.e. link the generic PDE terms to the
1647 CCZ4-specific function calls.
1649 5. Add the CCZ4-specific postprocessing.
1651 6. Switch to higher-order interpolation and restriction.
1662 pde_terms_without_state,
1666 Construct solver with enclave tasking
1669 AbstractCCZ4Solver.__init__(self)
1670 exahype2.solvers.rkdg.rusanov.GlobalAdaptiveTimeStep.__init__(
1674 polynomials=polynomials,
1676 auxiliary_variables=0,
1677 min_cell_h=min_cell_h,
1678 max_cell_h=max_cell_h,
1679 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
1680 pde_terms_without_state=pde_terms_without_state,
1686 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1688 flux=exahype2.solvers.PDETerms.None_Implementation,
1690 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1703 number_of_entries_between_two_db_flushes,
1704 data_delta_between_two_snapsots,
1705 time_delta_between_two_snapsots,
1706 clear_database_after_flush,
1711 Add tracer to project
1713 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1714 some of the arguments. Most of them are simply piped through to this
1717 At this point, we have not yet created the Peano 4 project. Therefore, we
1718 have not yet befilled the time stepping action set.
1720 project: exahype2.Project
1728 number_of_entries_between_two_db_flushes,
1729 data_delta_between_two_snapsots,
1730 time_delta_between_two_snapsots,
1731 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...
__init__(self, name, patch_size, rk_order, min_meshcell_h, max_meshcell_h, pde_terms_without_state, second_order=False, device_resident_rk=False)
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 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()