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 ::exagrype::initialvalues::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 "exagrype/ccz4/Kernels.h"
176#include "exagrype/ccz4/SecondOrderAuxiliaryVariablesReconstruction.h"
179 self.add_user_solver_includes(
181#include "exagrype/ccz4/Kernels.h"
182#include "exagrype/initialvalues/InitialValues.h"
183#include "exagrype/initialvalues/ApplyTwoPunctures.h"
184#include "exagrype/ccz4/SecondOrderAuxiliaryVariablesReconstruction.h"
192 Add domain-specific constants
194 I need a couple of constants. I could either replace them directly
195 within the Python snippets below, but I prefer here to go a different
196 way and to export them as proper C++ constants.
198 There are two ways to inject solver constants into Peano: We can either
199 add them to the Makefile as global const expressions, or we can add
200 them to the ExaHyPE2 solver. The latter is the route we go down here,
201 as these constants logically belong to the solver and not to the project.
203 This operation uses the parent class' add_solver_constants(). You still
204 can use this operation to add further parameters. Or you can, as a user,
205 always add new entries to integer_constants or double_constants and then
206 call this routine rather than adding individual constants one by one.
210 self.add_solver_constants(
211 "static constexpr int {} = {};".format(key, value)
214 self.add_solver_constants(
215 "static constexpr double {} = {};".format(key, value)
221 Add include path and minimal required cpp files to makefile
223 If you have multiple CCZ4 solvers, i.e. different solvers of CCZ4 or multiple
224 instances of the CCZ4 type, please call this operation only once on one of
227 The CCZ4 kernels, the analytical initial values and the reconstruction
228 of the auxiliary variables are part of the ExaGRyPE library. Peano
229 therefore has to be configured with --enable-exagrype (or
230 -DENABLE_EXAGRYPE=ON), and the generated Makefile links against that
231 library. TwoPunctures (black hole initial data) is part of the library
232 if Peano is configured with --with-gsl. Therefore, I only add the
233 application's directory to the header search path.
235 You can always add further files via
236 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
237 peano4_project.output.makefile.add_cpp_file( "mypath/myfile.cpp" )
238 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
241 if path_of_ccz4_application[-1] !=
"/":
242 path_of_ccz4_application +=
"/"
244 peano4_project.output.makefile.add_header_search_path(path_of_ccz4_application)
252 number_of_entries_between_two_db_flushes,
253 data_delta_between_two_snapsots,
254 time_delta_between_two_snapsots,
255 clear_database_after_flush,
256 tracer_unknowns=None,
260 Add tracer to project
262 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
263 some of the arguments. Most of them are simply piped through to this
266 The tracer is given a name and initial coordinates (list of three-tuples).
267 We need to know the underlying project as well, as we have to add the
268 tracing to the time stepping and the database update to the plotting.
269 ~~~~~~~~~~~~~~~~~~~~~~~
270 project.add_action_set_to_timestepping(my_interpolation)
271 project.add_action_set_to_timestepping(exahype2.tracer.DumpTracerIntoDatabase(
272 particle_set=tracer_particles,
274 filename=name + "-" + self._name,
275 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
277 data_delta_between_two_snapsots = data_delta_between_two_snapsots,
278 time_delta_between_two_snapsots = time_delta_between_two_snapsots,
279 clear_database_after_flush = True,
281 ~~~~~~~~~~~~~~~~~~~~~~~
284 assert "should not be called"
289 AbstractCCZ4Solver, exahype2.solvers.fv.rusanov.GlobalAdaptiveTimeStep
293 CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking
295 Please consult CCZ4Solver_FV_GlobalAdaptiveTimeStepWithEnclaveTasking.
300 self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state
302 AbstractCCZ4Solver.__init__(self)
303 exahype2.solvers.fv.rusanov.GlobalAdaptiveTimeStep.__init__(
306 patch_size=patch_size,
308 auxiliary_variables=0,
309 min_volume_h=min_volume_h,
310 max_volume_h=max_volume_h,
311 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
315 self.set_implementation(
316 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
318 flux=exahype2.solvers.PDETerms.None_Implementation,
320 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
331 number_of_entries_between_two_db_flushes,
332 data_delta_between_two_snapsots,
333 time_delta_between_two_snapsots,
334 clear_database_after_flush,
339 Add tracer to project
341 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
342 some of the arguments. Most of them are simply piped through to this
345 project: exahype2.Project
353 number_of_entries_between_two_db_flushes,
354 data_delta_between_two_snapsots,
355 time_delta_between_two_snapsots,
356 clear_database_after_flush,
362 AbstractCCZ4Solver, exahype2.solvers.fv.musclhancock.GlobalAdaptiveTimeStep
366 CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking
368 Please consult CCZ4Solver_FV_GlobalAdaptiveTimeStepWithEnclaveTasking.
373 self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state
375 AbstractCCZ4Solver.__init__(self)
376 exahype2.solvers.fv.musclhancock.GlobalAdaptiveTimeStep.__init__(
379 patch_size=patch_size,
381 auxiliary_variables=0,
382 min_volume_h=min_volume_h,
383 max_volume_h=max_volume_h,
384 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
388 self.set_implementation(
389 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
391 flux=exahype2.solvers.PDETerms.None_Implementation,
393 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
404 number_of_entries_between_two_db_flushes,
405 data_delta_between_two_snapsots,
406 time_delta_between_two_snapsots,
407 clear_database_after_flush,
412 Add tracer to project
414 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
415 some of the arguments. Most of them are simply piped through to this
418 project: exahype2.Project
426 number_of_entries_between_two_db_flushes,
427 data_delta_between_two_snapsots,
428 time_delta_between_two_snapsots,
429 clear_database_after_flush,
436 exahype2.solvers.fv.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking,
440 CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking
442 The constructor of this classs is straightforward and realises the standard
443 steps of any numerical implementation of the CCZ4 scheme:
445 1. Init the actual numerical scheme. This happens through the constructor
448 2. Add the header files that we need, i.e. those files which contain the
449 actual CCZ4 implementation.
451 3. Add some constants that any CCZ4 C++ code requires.
453 4. Set the actual implementation, i.e. link the generic PDE terms to the
454 CCZ4-specific function calls.
456 5. Add the CCZ4-specific postprocessing.
466 pde_terms_without_state
470 Construct solver with enclave tasking and adaptive time stepping
473 AbstractCCZ4Solver.__init__(self)
474 exahype2.solvers.fv.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
477 patch_size=patch_size,
479 auxiliary_variables=0,
480 min_volume_h=min_volume_h,
481 max_volume_h=max_volume_h,
482 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
483 pde_terms_without_state=pde_terms_without_state
487 self.set_implementation(
488 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
490 flux=exahype2.solvers.PDETerms.None_Implementation,
492 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
503 number_of_entries_between_two_db_flushes,
504 data_delta_between_two_snapsots,
505 time_delta_between_two_snapsots,
506 clear_database_after_flush,
511 Add tracer to project
513 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
514 some of the arguments. Most of them are simply piped through to this
518 project: exahype2.Project
526 number_of_entries_between_two_db_flushes,
527 data_delta_between_two_snapsots,
528 time_delta_between_two_snapsots,
529 clear_database_after_flush,
535 AbstractCCZ4Solver, exahype2.solvers.fv.musclhancock.GlobalAdaptiveTimeStep
539 CCZ4 solver using finite volumes and global adaptive time stepping incl enclave tasking
541 Please consult CCZ4Solver_FV_GlobalAdaptiveTimeStepWithEnclaveTasking.
546 self, name, patch_size, min_volume_h, max_volume_h, pde_terms_without_state
548 AbstractCCZ4Solver.__init__(self)
549 exahype2.solvers.fv.musclhancock.GlobalAdaptiveTimeStep.__init__(
552 patch_size=patch_size,
554 auxiliary_variables=0,
555 min_volume_h=min_volume_h,
556 max_volume_h=max_volume_h,
557 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
558 pde_terms_without_state=pde_terms_without_state,
562 self.set_implementation(
563 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
565 flux=exahype2.solvers.PDETerms.None_Implementation,
567 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
578 number_of_entries_between_two_db_flushes,
579 data_delta_between_two_snapsots,
580 time_delta_between_two_snapsots,
581 clear_database_after_flush,
586 Add tracer to project
588 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
589 some of the arguments. Most of them are simply piped through to this
592 project: exahype2.Project
600 number_of_entries_between_two_db_flushes,
601 data_delta_between_two_snapsots,
602 time_delta_between_two_snapsots,
603 clear_database_after_flush,
610#if defined(GPUOffloadingOMP)
611 double* deltaQSerialised = new double[NumberOfUnknowns*3];
613 double deltaQSerialised[NumberOfUnknowns*3];
615 for (int i=0; i<NumberOfUnknowns; i++) {
616 deltaQSerialised[i+0*NumberOfUnknowns] = 0.0;
617 deltaQSerialised[i+1*NumberOfUnknowns] = 0.0;
618 deltaQSerialised[i+2*NumberOfUnknowns] = 0.0;
620 deltaQSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
622 ::exagrype::ccz4::ncp(BTimesDeltaQ, Q, deltaQSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
623#if defined(GPUOffloadingOMP)
624 delete[] deltaQSerialised;
631#if defined(GPUOffloadingOMP)
632 double* deltaQSerialised = new double[NumberOfUnknowns*3];
634 double deltaQSerialised[NumberOfUnknowns*3];
636 for (int i=0; i<NumberOfUnknowns; i++) {
637 deltaQSerialised[i+0*NumberOfUnknowns] = 0.0;
638 deltaQSerialised[i+1*NumberOfUnknowns] = 0.0;
639 deltaQSerialised[i+2*NumberOfUnknowns] = 0.0;
641 deltaQSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
643 ::exagrype::ccz4::ncp(BTimesDeltaQ, Q, deltaQSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
644#if defined(GPUOffloadingOMP)
645 delete[] deltaQSerialised;
652 ::exagrype::ccz4::source(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3, CCZ4SO);
658 ::exagrype::ccz4::source(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3, CCZ4SO);
664 ::exagrype::ccz4::maxEigenvalue(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd, maxEigenvalue );
670 ::exagrype::ccz4::maxEigenvalue(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd, maxEigenvalue );
677 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}};
679 for (int i=0;i<itmax;i++)
681 exagrype::ccz4::enforceCCZ4constraints( newQ+index );
682 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
691 constexpr int itmax = {{NUMBER_OF_VOLUMES_PER_AXIS}} * {{NUMBER_OF_VOLUMES_PER_AXIS}} * {{NUMBER_OF_VOLUMES_PER_AXIS}};
693 for (int i=0;i<itmax;i++)
695 exagrype::ccz4::enforceCCZ4constraints( newQ+index );
696 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
707 number_of_entries_between_two_db_flushes,
708 data_delta_between_two_snapsots,
709 time_delta_between_two_snapsots,
710 clear_database_after_flush,
715 Add tracer to project
717 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
718 some of the arguments. Most of them are simply piped through to this
721 I realise this as a separate routine, as we need it for all FV flavours
724 number_of_attributes = (
725 (solver.unknowns + solver.auxiliary_variables)
726 if tracer_unknowns ==
None
727 else len(tracer_unknowns)
729 tracer_particles = project.add_tracer(
730 name=name, attribute_count=number_of_attributes
732 init_action_set = exahype2.tracer.InsertParticlesByCoordinates(
733 particle_set=tracer_particles, coordinates=coordinates
735 init_action_set.descend_invocation_order = 0
736 project.add_action_set_to_initialisation(init_action_set)
738 project_on_tracer_properties_kernel =
""
739 if tracer_unknowns ==
None:
740 project_on_tracer_properties_kernel = (
741 "::exahype2::fv::projectAllValuesOntoParticle_piecewiseLinear"
744 elif len(tracer_unknowns) == 1:
745 project_on_tracer_properties_kernel = (
746 "::exahype2::fv::projectValueOntoParticle_piecewiseLinear<{},{}>".format(
747 i, tracer_unknowns.index(i)
751 project_on_tracer_properties_kernel = (
752 "::exahype2::fv::projectValuesOntoParticle_piecewiseLinear<{}>".format(
759 tracing_action_set = exahype2.tracer.FiniteVolumesTracing(
762 project_on_tracer_properties_kernel=project_on_tracer_properties_kernel,
764 tracing_action_set.descend_invocation_order = (
765 solver._action_set_update_cell.descend_invocation_order + 1
767 project.add_action_set_to_timestepping(tracing_action_set)
768 project.add_action_set_to_initialisation(tracing_action_set)
770 dump_into_database_action_set = exahype2.tracer.DumpTracerIntoDatabase(
771 particle_set=tracer_particles,
773 filename=name +
"-" + solver._name,
774 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
776 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
777 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
778 clear_database_after_flush=clear_database_after_flush,
780 dump_into_database_action_set.descend_invocation_order = (
781 solver._action_set_update_cell.descend_invocation_order + 2
783 project.add_action_set_to_timestepping(dump_into_database_action_set)
791 number_of_entries_between_two_db_flushes,
792 data_delta_between_two_snapsots,
793 time_delta_between_two_snapsots,
794 clear_database_after_flush,
799 I realise this as a separate routine, as we need it for all FD4 flavours
801 This is a wrapper around all the tracer handling. It adds the tracer to the
802 exahype2.Project, but it also instantiates the solution to tracer mapping
803 as well as the database bookkeeping.
805 @param tracer_unknowns: Integer
806 You can set this variable to None. In this case, all variables are
810 number_of_attributes = (
811 (solver.unknowns + solver.auxiliary_variables)
812 if tracer_unknowns ==
None
813 else len(tracer_unknowns)
815 tracer_particles = project.add_tracer(
816 name=name, attribute_count=number_of_attributes
818 project.add_action_set_to_initialisation(
819 exahype2.tracer.InsertParticlesByCoordinates(
820 particle_set=tracer_particles, coordinates=coordinates
823 project_on_tracer_properties_kernel =
""
824 if tracer_unknowns ==
None:
825 project_on_tracer_properties_kernel = (
826 "::exahype2::fv::projectAllValuesOntoParticle_piecewiseLinear"
828 elif len(tracer_unknowns) == 1:
829 project_on_tracer_properties_kernel = (
830 "::exahype2::fv::projectValueOntoParticle_piecewiseLinear<{},{}>".format(
831 i, tracer_unknowns.index(i)
835 project_on_tracer_properties_kernel = (
836 "::exahype2::fv::projectValuesOntoParticle_piecewiseLinear<{}>".format(
843 tracing_action_set = exahype2.tracer.FiniteVolumesTracing(
846 project_on_tracer_properties_kernel=project_on_tracer_properties_kernel,
848 tracing_action_set.descend_invocation_order = (
849 solver._action_set_compute_final_linear_combination.descend_invocation_order + 1
851 project.add_action_set_to_timestepping(tracing_action_set)
852 project.add_action_set_to_initialisation(tracing_action_set)
854 dump_into_database_action_set = exahype2.tracer.DumpTracerIntoDatabase(
855 particle_set=tracer_particles,
857 filename=name +
"-" + solver._name,
858 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
860 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
861 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
862 clear_database_after_flush=clear_database_after_flush,
864 dump_into_database_action_set.descend_invocation_order = (
865 solver._action_set_compute_final_linear_combination.descend_invocation_order + 2
867 project.add_action_set_to_timestepping(dump_into_database_action_set)
872 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStepWithEnclaveTasking,
876 CCZ4 solver using fourth-order finite differences and global adaptive time stepping incl enclave tasking
878 The constructor of this classs is straightforward and realises the standard
879 steps of any numerical implementation of the CCZ4 scheme:
881 1. Init the actual numerical scheme. This happens through the constructor
884 2. Add the header files that we need, i.e. those files which contain the
885 actual CCZ4 implementation.
887 3. Add some constants that any CCZ4 C++ code requires.
889 4. Set the actual implementation, i.e. link the generic PDE terms to the
890 CCZ4-specific function calls.
892 5. Add the CCZ4-specific postprocessing.
894 6. Switch to higher-order interpolation and restriction.
905 pde_terms_without_state,
907 device_resident_rk=False,
913 Calibrate the default time step size calibration with 1/16 to take into
914 account that we have a higher-order numerical scheme.
917 AbstractCCZ4Solver.__init__(self)
919 AbstractCCZ4Solver.enable_second_order(self)
920 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
923 patch_size=patch_size,
926 auxiliary_variables=0,
927 min_meshcell_h=min_meshcell_h,
928 max_meshcell_h=max_meshcell_h,
930 pde_terms_without_state=pde_terms_without_state,
931 device_resident_rk=device_resident_rk,
932 plot_grid_properties=
True
937 self.set_implementation(
938 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
940 flux=exahype2.solvers.PDETerms.None_Implementation,
942 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
949 # Use second order interpolation and restriction
950 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_interpolation(
953 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_restriction(
959 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_interpolation(self)
960 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_restriction(self)
963 # Use matrix interpolation and restriction
964 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_interpolation(
967 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_restriction(
973 # Use tensor product interpolation and restriction
974 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_interpolation(
976 "TP_linear_with_linear_extrap_normal_interp"
978 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_restriction(
980 "TP_average_normal_extrap"
989 number_of_entries_between_two_db_flushes,
990 data_delta_between_two_snapsots,
991 time_delta_between_two_snapsots,
992 clear_database_after_flush,
997 Add tracer to project
999 This is a delegate to add_tracer_to_FD4_solver() which passes the
1000 object in as first argument.
1002 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1003 some of the arguments. Most of them are simply piped through to this
1006 @param project: exahype2.Project
1008 @param tracer_unknowns: Integer
1009 You can set this variable to None. In this case, all variables are
1018 number_of_entries_between_two_db_flushes,
1019 data_delta_between_two_snapsots,
1020 time_delta_between_two_snapsots,
1021 clear_database_after_flush,
1027 AbstractCCZ4Solver, exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStep
1031 CCZ4 solver using fourth-order finite differences and global adaptive time stepping without enclave tasking
1033 Consult CCZ4Solver_FD4_GlobalAdaptiveTimeStepWithEnclaveTasking please.
1050 Calibrate the default time step size calibration with 1/16 to take into
1051 account that we have a higher-order numerical scheme.
1054 AbstractCCZ4Solver.__init__(self)
1056 AbstractCCZ4Solver.enable_second_order(self)
1057 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStep.__init__(
1060 patch_size=patch_size,
1063 auxiliary_variables=0,
1064 min_meshcell_h=min_meshcell_h,
1065 max_meshcell_h=max_meshcell_h,
1071 self.set_implementation(
1072 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1074 flux=exahype2.solvers.PDETerms.None_Implementation,
1076 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1083 # Use second order interpolation and restriction
1084 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_interpolation(
1087 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_restriction(
1093 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_interpolation(self)
1094 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_restriction(self)
1097 # Use matrix interpolation and restriction
1098 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_interpolation(
1101 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_restriction(
1107 # Use tensor product interpolation and restriction
1108 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_interpolation(
1110 "TP_linear_with_linear_extrap_normal_interp"
1112 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_restriction(
1114 "TP_average_normal_extrap"
1123 number_of_entries_between_two_db_flushes,
1124 data_delta_between_two_snapsots,
1125 time_delta_between_two_snapsots,
1126 clear_database_after_flush,
1131 Add tracer to project
1133 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1134 some of the arguments. Most of them are simply piped through to this
1137 project: exahype2.Project
1145 number_of_entries_between_two_db_flushes,
1146 data_delta_between_two_snapsots,
1147 time_delta_between_two_snapsots,
1148 clear_database_after_flush=clear_database_after_flush,
1149 tracer_unknowns=tracer_unknowns,
1155 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStepWithEnclaveTasking,
1159 Variation of classic FD4 which relies on second order PDE formulation
1161 The traditional ExaHyPE CCZ4 formulation is the first order formulation
1162 introduced by Dumbser et al. In this formulation, the second order terms
1163 in CCZ4 are substituted with helper variables which represent first order
1164 derivatives. While formally straightforward, keeping the whole system
1165 consistent and stricly hyperbolic is a different challenge.
1167 In this revised version, we have to evolve the primary quantities of CCZ4
1168 and also the helper variables, which blows the overall system up to 59
1169 equations in its simplest form. The work by Dumbser and others suggest that
1170 this is a consistent and stable approach, but limited work is actually
1171 published on proper physical simulations. We therefore also implemented a
1172 second order PDE version within ExaHyPE.
1174 This second order variant is not really second order from the start.
1175 Instead, we use the first order formulation, and we reconstruct the helper
1176 term via finite differences prior to the compute kernel application. That is,
1177 the compute kernels see variables representing first order derivatives, and
1178 they also evolve these guys. Afterwards, we throw away the evolved quantities
1179 and reconstruct them from the primary unknowns prior to the next time step.
1181 This might not be super efficient (it would be faster to stick to the
1182 second order formulation right from the start), but it allows us to reuse
1183 the compute kernels written for the first order PDE formulation.
1187 We have now a smaller number of real unknowns, i.e. only those guys who
1188 belong to the "original" second-order formulation. The remaining quantities
1189 compared to a first-order formulation are technically material or auxiliary
1190 quantities. We model them as such, which allows ExaHyPE's data management
1191 to deal more efficiently with them.
1194 reconstruction_type: "4thOrder", "centralDifferences", "leftDifference", "rightDifference"
1205 reconstruction_type,
1211 Calibrate the default time step size calibration with 1/16 to take into
1212 account that we have a higher-order numerical scheme.
1215 AbstractCCZ4Solver.__init__(self)
1216 exahype2.solvers.rkfd.fd4.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
1219 patch_size=patch_size,
1224 min_meshcell_h=min_meshcell_h,
1225 max_meshcell_h=max_meshcell_h,
1226 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation
1232 self.set_implementation(
1233 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1235 double deltaQSerialised[NumberOfUnknowns*3];
1236 for (int i=0; i<NumberOfUnknowns; i++) {
1237 deltaQSerialised[i+0*NumberOfUnknowns] = 0.0;
1238 deltaQSerialised[i+1*NumberOfUnknowns] = 0.0;
1239 deltaQSerialised[i+2*NumberOfUnknowns] = 0.0;
1241 deltaQSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
1243 ::exagrype::ccz4::ncpSecondOrderFormulation(BTimesDeltaQ, Q, deltaQSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
1245 flux=exahype2.solvers.PDETerms.None_Implementation,
1247 tarch::memset(S, 0.0, NumberOfUnknowns*sizeof(double));
1248 ::exagrype::ccz4::sourceSecondOrderFormulation(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3);
1250 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1253 return ::exagrype::ccz4::maxEigenvalueSecondOrderFormulation(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd );
1257 self.postprocess_updated_patch +=
"""
1259 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}};
1261 for (int i=0;i<itmax;i++)
1263 exagrype::ccz4::enforceCCZ4constraintsSecondOrderFormulation( newQ+index );
1264 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
1270 # Use second order interpolation and restriction
1271 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_interpolation(
1274 exahype2.solvers.rkfd.fd4.switch_to_FD4_second_order_restriction(
1280 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_interpolation(self)
1281 exahype2.solvers.rkfd.fd4.switch_to_FD4_third_order_restriction(self)
1284 # Use matrix interpolation and restriction
1285 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_interpolation(
1288 exahype2.solvers.rkfd.fd4.switch_to_FD4_matrix_restriction(
1294 # Use tensor product interpolation and restriction
1295 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_interpolation(
1297 "TP_linear_with_linear_extrap_normal_interp"
1299 exahype2.solvers.rkfd.fd4.switch_to_FD4_tensor_product_restriction(
1301 "TP_average_normal_extrap"
1305 self.preprocess_reconstructed_patch += (
1307::exahype2::CellData reconstructedPatchData(
1313 nullptr // targetPatch
1315::exagrype::ccz4::recomputeAuxiliaryVariablesFD4_"""
1316 + reconstruction_type
1318 reconstructedPatchData,
1319 {{NUMBER_OF_GRID_CELLS_PER_PATCH_PER_AXIS}},
1321 {{NUMBER_OF_UNKNOWNS}},
1322 {{NUMBER_OF_AUXILIARY_VARIABLES}}
1332 number_of_entries_between_two_db_flushes,
1333 data_delta_between_two_snapsots,
1334 time_delta_between_two_snapsots,
1335 clear_database_after_flush,
1340 Add tracer to project
1342 Consult exahype2.tracer.DumpTracerIntoDatabase for an explanation of
1343 some of the arguments. Most of them are simply piped through to this
1346 project: exahype2.Project
1349 number_of_attributes = (
1351 if tracer_unknowns ==
None
1352 else len(tracer_unknowns)
1354 tracer_particles = project.add_tracer(
1355 name=name, attribute_count=number_of_attributes
1357 init_action_set = exahype2.tracer.InsertParticlesByCoordinates(
1358 particle_set=tracer_particles, coordinates=coordinates
1360 init_action_set.descend_invocation_order = 0
1361 project.add_action_set_to_initialisation(init_action_set)
1363 project_on_tracer_properties_kernel =
""
1364 if tracer_unknowns ==
None:
1365 project_on_tracer_properties_kernel = (
1366 "::exahype2::fv::projectAllValuesOntoParticle_piecewiseLinear"
1368 elif len(tracer_unknowns) == 1:
1369 project_on_tracer_properties_kernel =
"::exahype2::fv::projectValueOntoParticle_piecewiseLinear<{},{}>".format(
1370 i, tracer_unknowns.index(i)
1373 project_on_tracer_properties_kernel = (
1374 "::exahype2::fv::projectValuesOntoParticle_piecewiseLinear<{}>".format(
1381 tracing_action_set = exahype2.tracer.FiniteVolumesTracing(
1384 project_on_tracer_properties_kernel=project_on_tracer_properties_kernel,
1386 tracing_action_set.descend_invocation_order = (
1387 self._action_set_compute_final_linear_combination.descend_invocation_order
1390 project.add_action_set_to_timestepping(tracing_action_set)
1391 project.add_action_set_to_initialisation(tracing_action_set)
1393 dump_into_database_action_set = exahype2.tracer.DumpTracerIntoDatabase(
1394 particle_set=tracer_particles,
1396 filename=name +
"-" + self._name,
1397 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
1398 output_precision=10,
1399 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
1400 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
1401 clear_database_after_flush=
True,
1403 dump_into_database_action_set.descend_invocation_order = (
1404 self._action_set_compute_final_linear_combination.descend_invocation_order
1407 project.add_action_set_to_timestepping(dump_into_database_action_set)
1412#if defined(GPUOffloadingOMP)
1413 double* dQdxSerialised = new double[NumberOfUnknowns*3];
1415 double dQdxSerialised[NumberOfUnknowns*3];
1417 for (int i=0; i<NumberOfUnknowns; i++) {
1418 dQdxSerialised[i+0*NumberOfUnknowns] = 0.0;
1419 dQdxSerialised[i+1*NumberOfUnknowns] = 0.0;
1420 dQdxSerialised[i+2*NumberOfUnknowns] = 0.0;
1422 dQdxSerialised[i+normal*NumberOfUnknowns] = deltaQ[i];
1424 ::exagrype::ccz4::ncp(BTimesDeltaQ, Q, dQdxSerialised, normal%Dimensions, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
1425#if defined(GPUOffloadingOMP)
1426 delete[] dQdxSerialised;
1433 tarch::memset(S, 0.0, NumberOfUnknowns*sizeof(double));
1434 ::exagrype::ccz4::source(S,Q, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4itau, CCZ4eta, CCZ4k1, CCZ4k2, CCZ4k3, CCZ4SO);
1440 ::exagrype::ccz4::maxEigenvalue(Q, normal%Dimensions, CCZ4e, CCZ4ds, CCZ4GLMc, CCZ4GLMd, maxEigenvalue );
1447 constexpr int itmax = ({{DG_ORDER}}+1) * ({{DG_ORDER}}+1) * ({{DG_ORDER}}+1);
1449 for (int i=0;i<itmax;i++)
1451 exagrype::ccz4::enforceCCZ4constraints( newQ+index );
1452 index += {{NUMBER_OF_UNKNOWNS}} + {{NUMBER_OF_AUXILIARY_VARIABLES}};
1463 number_of_entries_between_two_db_flushes,
1464 data_delta_between_two_snapsots,
1465 time_delta_between_two_snapsots,
1466 clear_database_after_flush,
1469 number_of_attributes = (
1470 (self.unknowns + self.auxiliary_variables)
1471 if tracer_unknowns ==
None
1472 else len(tracer_unknowns)
1474 tracer_particles = project.add_tracer(
1475 name=name, attribute_count=number_of_attributes
1477 init_action_set = exahype2.tracer.InsertParticlesByCoordinates(
1478 particle_set=tracer_particles, coordinates=coordinates
1480 init_action_set.descend_invocation_order = 0
1481 project.add_action_set_to_initialisation(init_action_set)
1483 assert tracer_unknowns ==
None
1485 tracing_action_set = exahype2.tracer.DiscontinuousGalerkinTracing(
1488 project_on_tracer_properties_kernel=
"::exahype2::dg::projectAllValuesOntoParticle",
1490 tracing_action_set.descend_invocation_order = (
1491 self._action_set_compute_final_linear_combination_and_project_solution_onto_faces.descend_invocation_order
1494 project.add_action_set_to_timestepping(tracing_action_set)
1495 project.add_action_set_to_initialisation(tracing_action_set)
1497 dump_into_database_action_set = exahype2.tracer.DumpTracerIntoDatabase(
1498 particle_set=tracer_particles,
1500 filename=name +
"-" + self._name,
1501 number_of_entries_between_two_db_flushes=number_of_entries_between_two_db_flushes,
1502 output_precision=10,
1503 data_delta_between_two_snapsots=data_delta_between_two_snapsots,
1504 time_delta_between_two_snapsots=time_delta_between_two_snapsots,
1505 clear_database_after_flush=clear_database_after_flush,
1507 dump_into_database_action_set.descend_invocation_order = (
1508 self._action_set_compute_final_linear_combination_and_project_solution_onto_faces.descend_invocation_order
1511 project.add_action_set_to_timestepping(dump_into_database_action_set)
1516 exahype2.solvers.rkdg.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking,
1520 CCZ4 solver using Runge-Kutta Discontinuous Galerkin and global adaptive time stepping incl enclave tasking
1522 The constructor of this classs is straightforward and realises the standard
1523 steps of any numerical implementation of the CCZ4 scheme:
1525 1. Init the actual numerical scheme. This happens through the constructor
1528 2. Add the header files that we need, i.e. those files which contain the
1529 actual CCZ4 implementation.
1531 3. Add some constants that any CCZ4 C++ code requires.
1533 4. Set the actual implementation, i.e. link the generic PDE terms to the
1534 CCZ4-specific function calls.
1536 5. Add the CCZ4-specific postprocessing.
1538 6. Switch to higher-order interpolation and restriction.
1549 pde_terms_without_state,
1553 Construct solver with enclave tasking
1556 AbstractCCZ4Solver.__init__(self)
1557 exahype2.solvers.rkdg.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking.__init__(
1561 polynomials=polynomials,
1563 auxiliary_variables=0,
1564 min_cell_h=min_cell_h,
1565 max_cell_h=max_cell_h,
1566 time_step_relaxation=AbstractCCZ4Solver.Default_Time_Step_Size_Relaxation,
1567 pde_terms_without_state=pde_terms_without_state,
1572 self.set_implementation(
1573 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1575 flux=exahype2.solvers.PDETerms.None_Implementation,
1577 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1579 point_source=exahype2.solvers.PDETerms.None_Implementation
1582 self.postprocess_updated_cell_after_final_linear_combination += (
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,
1626 exahype2.solvers.rkdg.rusanov.GlobalAdaptiveTimeStep,
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,
1682 self.set_implementation(
1683 boundary_conditions=exahype2.solvers.PDETerms.Empty_Implementation,
1685 flux=exahype2.solvers.PDETerms.None_Implementation,
1687 refinement_criterion=exahype2.solvers.PDETerms.Empty_Implementation,
1691 self.postprocess_updated_cell_after_final_linear_combination += (
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...
__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.
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()