Peano
Loading...
Searching...
No Matches
kernel_testbed.CCZ4Solver Class Reference
Inheritance diagram for kernel_testbed.CCZ4Solver:
Collaboration diagram for kernel_testbed.CCZ4Solver:

Public Member Functions

 __init__ (self, name, patch_size, min_volume_h, max_volume_h, cfl, domain_r, KOSig)
 Not so nice.
 
 create_action_sets (self)
 Adaptive mesh handing.
 
 get_user_action_set_includes (self)
 We take this routine to add a few additional include statements.
 
- Public Member Functions inherited from exahype2.solvers.fv.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking.GlobalAdaptiveTimeStepWithEnclaveTasking
 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 manually.
 
 create_data_structures (self)
 This routine does not really add new data, but it heavily tailors when data are stored, exchanged, ... Each generator has some guard attributes, i.e., some guards, which control when data is stored, sent, received.
 
 user_action_set_includes (self)
 Add further includes to this property, if your action sets require some additional routines from other header files.
 
- Public Member Functions inherited from exahype2.solvers.fv.EnclaveTasking.EnclaveTasking
 add_entries_to_text_replacement_dictionary (self, d)
 d: Dictionary of string to string in/out argument
 
 add_actions_to_create_grid (self, step, evaluate_refinement_criterion)
 The boundary information is set only once.
 
 add_actions_to_init_grid (self, step)
 Add all the action sets to init grid.
 
 add_actions_to_perform_time_step (self, step)
 Add enclave aspect to time stepping.
 
 add_implementation_files_to_project (self, namespace, output, dimensions, subdirectory="")
 The ExaHyPE project will call this operation when it sets up the overall environment.
 
 switch_storage_scheme (self, Storage cell_data_storage, Storage face_data_storage)
 By default, we hold all data on the heap using smart pointers.
 
- Public Member Functions inherited from exahype2.solvers.fv.FV.FV
 __str__ (self)
 
 get_min_number_of_spacetree_levels (self, domain_size)
 
 get_max_number_of_spacetree_levels (self, domain_size)
 
 get_coarsest_number_of_patches (self, domain_size)
 
 get_finest_number_of_patches (self, domain_size)
 
 get_coarsest_number_of_finite_volumes (self, domain_size)
 
 get_finest_number_of_finite_volumes (self, domain_size)
 
 get_coarsest_volume_size (self, domain_size)
 
 get_finest_volume_size (self, domain_size)
 
 create_readme_descriptor (self, domain_offset, domain_size)
 
 user_solver_includes (self)
 Add further includes to this property, if your solver requires some additional routines from other header files.
 
 add_user_action_set_includes (self, value)
 Add further includes to this property, if your action sets require some additional routines from other header files.
 
 add_user_solver_includes (self, value)
 Add further includes to this property, if your solver requires some additional routines from other header files.
 
 get_name_of_global_instance (self)
 
 add_to_Peano4_datamodel (self, datamodel, verbose)
 Add all required data to the Peano project's datamodel so it is properly built up.
 
 add_use_data_statements_to_Peano4_solver_step (self, step)
 Tell Peano what data to move around.
 
 plot_description (self)
 
 plot_description (self, description)
 Add a proper description to the plots.
 
 add_actions_to_plot_solution (self, step, output_path, restart_from_checkpoint=False)
 Add action sets to plot solution step.
 
 add_actions_to_checkpoint_solution (self, step, output_path, restart_from_checkpoint=False)
 Add action sets to plot solution step.
 
 set_solver_constants (self, datastring)
 
 add_solver_constants (self, datastring)
 
 unknowns (self)
 
 patch_size (self)
 
 auxiliary_variables (self)
 
 patch_size (self, value)
 
 unknowns (self, value)
 
 auxiliary_variables (self, value)
 
 preprocess_reconstructed_patch (self)
 
 preprocess_reconstructed_patch (self, kernel)
 Set a new processing kernel.
 
 name (self)
 
 postprocess_updated_patch (self)
 
 postprocess_updated_patch (self, kernel)
 Define a postprocessing routine over the data.
 
 overlap (self)
 
 overlap (self, value)
 
 interpolation (self)
 
 interpolation (self, value)
 
 restriction (self)
 
 restriction (self, value)
 

Data Fields

 postprocess_updated_patch
 
- Data Fields inherited from exahype2.solvers.fv.EnclaveTasking.EnclaveTasking
 enclave_task_priority
 
 make_copy_of_enclave_task_data
 
- Data Fields inherited from exahype2.solvers.fv.FV.FV
 select_dofs_to_print
 

Protected Attributes

 _my_user_includes
 
 _patch_size
 
 _domain_r
 
- Protected Attributes inherited from exahype2.solvers.fv.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking.GlobalAdaptiveTimeStepWithEnclaveTasking
 _time_step_relaxation
 
 _flux_implementation
 
 _ncp_implementation
 
 _eigenvalues_implementation
 
 _source_term_implementation
 
 _compute_eigenvalue
 
 _compute_kernel_call
 
 _compute_kernel_call_stateless
 
 _fused_compute_kernel_call_stateless_cpu
 
 _fused_compute_kernel_call_stateless_gpu
 
 _abstract_solver_user_declarations
 
 _abstract_solver_user_definitions
 
 _solver_user_declarations
 
 _solver_user_definitions
 
 _compute_time_step_size
 
 _compute_new_time_step_size
 
 _start_time_step_implementation
 
 _finish_time_step_implementation
 
 _constructor_implementation
 
- Protected Attributes inherited from exahype2.solvers.fv.EnclaveTasking.EnclaveTasking
 _name
 
 _fused_compute_kernel_call_stateless_cpu
 
 _fused_compute_kernel_call_stateless_gpu
 
 _solver_template_file_class_name
 
 _initialisation_sweep_guard
 
 _first_iteration_after_initialisation_guard
 
 _primary_sweep_guard
 
 _primary_sweep_or_plot_guard
 
 _primary_or_initialisation_sweep_guard
 
 _primary_or_grid_construction_or_initialisation_sweep_guard
 
 _secondary_sweep_guard
 
 _secondary_sweep_or_grid_construction_guard
 
 _secondary_sweep_or_grid_initialisation_guard
 
 _secondary_sweep_or_grid_initialisation_or_plot_guard
 
 _action_set_update_cell
 
 _action_set_merge_enclave_task_outcome
 
 _boundary_conditions_implementation
 
 _refinement_criterion_implementation
 
 _initial_conditions_implementation
 
 _reconstructed_array_memory_location
 
 _use_split_loop
 
- Protected Attributes inherited from exahype2.solvers.fv.FV.FV
 _name
 
 _min_volume_h
 
 _max_volume_h
 
 _plot_grid_properties
 
 _patch_size
 
 _overlap
 
 _use_var_shortcut
 
 _variable_names
 
 _variable_pos
 
 _unknowns
 
 _auxiliary_variables
 
 _solver_constants
 
 _user_action_set_includes
 
 _user_solver_includes
 
 _reconstructed_array_memory_location
 
 _solver_template_file_class_name
 
 _plot_description
 
 _action_set_initial_conditions
 
 _action_set_initial_conditions_for_grid_construction
 
 _action_set_AMR
 
 _action_set_AMR_throughout_grid_construction
 
 _action_set_AMR_commit_without_further_analysis
 
 _action_set_handle_boundary
 
 _action_set_project_patch_onto_faces
 
 _action_set_roll_over_update_of_faces
 
 _action_set_copy_new_faces_onto_old_faces
 
 _action_set_couple_resolution_transitions_and_handle_dynamic_mesh_refinement
 
 _action_set_postprocess_solution
 
 _action_set_preprocess_solution
 
 _compute_time_step_size
 
 _compute_new_time_step_size
 
 _preprocess_reconstructed_patch
 
 _postprocess_updated_patch
 
 _compute_kernel_call
 
 _compute_kernel_call_stateless
 
 _pde_terms_without_state
 
 _compute_eigenvalue
 
 _abstract_solver_user_declarations
 
 _abstract_solver_user_definitions
 
 _solver_user_declarations
 
 _solver_user_definitions
 
 _start_time_step_implementation
 
 _finish_time_step_implementation
 
 _constructor_implementation
 
 _boundary_conditions_implementation
 
 _refinement_criterion_implementation
 
 _initial_conditions_implementation
 
 _interpolation
 
 _restriction
 
 _kernel_namespace
 
 _baseline_action_set_descend_invocation_order
 
 _cell_data_storage
 
 _face_data_storage
 
 _eigenvalues_implementation
 
 _flux_implementation
 
 _ncp_implementation
 
 _source_term_implementation
 
 _patch
 
 _patch_overlap_old
 
 _patch_overlap_new
 
 _patch_overlap_update
 
 _cell_label
 
 _face_label
 
 _action_set_update_face_label
 
 _action_set_update_cell_label
 
 _action_set_update_cell
 

Additional Inherited Members

- Protected Member Functions inherited from exahype2.solvers.fv.EnclaveTasking.EnclaveTasking
 _create_guards (self)
 All the internal logic depends on guards, i.e., boolean predicates.
 
 _optimise_patch_storage_for_global_time_stepping (self)
 Make storage and loading more restrictive such that enclave data are not held in-between primary and secondary sweep.
 
 _enclave_task_name (self)
 
- Protected Member Functions inherited from exahype2.solvers.fv.FV.FV
 _provide_cell_data_to_compute_kernels_default_guard (self)
 Default logic when to create cell data or not.
 
 _provide_face_data_to_compute_kernels_default_guard (self)
 
 _store_cell_data_default_guard (self)
 Extend the guard via ands only.
 
 _load_cell_data_default_guard (self)
 Extend the guard via ands only.
 
 _store_face_data_default_guard (self)
 Extend the guard via ands only.
 
 _load_face_data_default_guard (self)
 Extend the guard via ands only.
 
 _unknown_identifier (self)
 
 _get_default_includes (self)
 
 _init_dictionary_with_default_parameters (self, d)
 This one is called by all algorithmic steps before I invoke add_entries_to_text_replacement_dictionary().
 

Detailed Description

Definition at line 30 of file kernel_testbed.py.

Constructor & Destructor Documentation

◆ __init__()

kernel_testbed.CCZ4Solver.__init__ ( self,
name,
patch_size,
overlap,
unknowns,
auxiliary_variables,
min_volume_h,
max_volume_h )

Not so nice.

I have to store this field as I later rely on get_name_of_global_instance() which uses this field.

Reimplemented from exahype2.solvers.fv.rusanov.GlobalAdaptiveTimeStepWithEnclaveTasking.GlobalAdaptiveTimeStepWithEnclaveTasking.

Definition at line 31 of file kernel_testbed.py.

Member Function Documentation

◆ create_action_sets()

kernel_testbed.CCZ4Solver.create_action_sets ( self)

Adaptive mesh handing.

Adaptive meshes require us to clear the patch overlaps and to restrict/interpolate. Obviously, there's no need to do this for a refined faces. So we can eliminate these cases a priori. Furthermore, we clear faces only in the primary sweep. We know that either the primary sweep (for skeleton) or the secondary sweep (for enclaves) will write in proper data into anything that's cleared, and we know that restriction only has to happen after the primary sweep, as all cells next to an adaptivity boundary are skeleton cells.

As pointed out, both interpolation and restriction are to be active for the first sweep only. We interpolate into hanging faces, and we have to restrict immediately again as they are non-persistent. The projection onto the (hanging) faces is also happening directly in the primary sweep, as the cells adjacent to the hanging face are skeleton cells.

AMR and adjust cell have to be there always, i.e., also throughout the grid construction. But the criterion is something that we only evaluate in the secondary sweep. That's when we have an updated/changed time step. If we identify coarsening and refinement instructions in the secondary sweep, the next primary one will actually see them and trigger the update. That is, the subsequent secondary switch will actually implement the grid changes, and we can evaluate the criteria again.

For dynamic AMR, this implies that we have to ensure that all changed grid parts are labelled as skeleton cells. This way, we can implement the AMR properly, we ensure that all the enclaves run in parallel, and we know that all data is held persistently on the stacks.

Reimplemented from exahype2.solvers.fv.EnclaveTasking.EnclaveTasking.

Definition at line 99 of file kernel_testbed.py.

References exahype2.solvers.aderdg.ADERDG.ADERDG._action_set_couple_resolution_transitions_and_handle_dynamic_mesh_refinement, exahype2.solvers.fv.FV.FV._action_set_couple_resolution_transitions_and_handle_dynamic_mesh_refinement, exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG._action_set_couple_resolution_transitions_and_handle_dynamic_mesh_refinement, exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences._action_set_couple_resolution_transitions_and_handle_dynamic_mesh_refinement, and kernel_testbed.CCZ4Solver.create_action_sets().

Referenced by mgccz4.MGCCZ4Solver.add_derivative_calculation(), exahype2.solvers.aderdg.ADERDG.ADERDG.add_kernel_optimisations(), ccz4.CCZ4Solver.add_Psi4W(), exahype2.solvers.fv.FV.FV.auxiliary_variables(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.auxiliary_variables(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.auxiliary_variables(), exahype2.solvers.elliptic.AMRMarker.AMRMarker.couple_with_FV_solver(), kernel_testbed.CCZ4Solver.create_action_sets(), exahype2.solvers.fv.FV.FV.interpolation(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.interpolation(), exahype2.solvers.fv.FV.FV.overlap(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.overlap(), exahype2.solvers.fv.FV.FV.patch_size(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.patch_size(), exahype2.solvers.elliptic.ConstrainedPoissonEquationForMarkerOnCells.ConstrainedPoissonEquationForMarkerOnCells.postprocess_updated_cell(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.postprocess_updated_cell_after_final_linear_combination(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.postprocess_updated_cell_after_Runge_Kutta_step(), exahype2.solvers.aderdg.ADERDG.ADERDG.postprocess_updated_patch(), exahype2.solvers.fv.FV.FV.postprocess_updated_patch(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.postprocess_updated_patch(), exahype2.solvers.aderdg.ADERDG.ADERDG.preprocess_reconstructed_patch(), exahype2.solvers.fv.FV.FV.preprocess_reconstructed_patch(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.preprocess_reconstructed_patch(), exahype2.solvers.fv.FV.FV.restriction(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.restriction(), exahype2.solvers.aderdg.ADERDG.ADERDG.set_implementation(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.set_implementation(), exahype2.solvers.aderdg.ADERDG.ADERDG.switch_storage_scheme(), exahype2.solvers.fv.FV.FV.switch_storage_scheme(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.switch_storage_scheme(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.switch_storage_scheme(), exahype2.solvers.fv.FV.FV.unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG.unknowns(), and exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences.unknowns().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_user_action_set_includes()

kernel_testbed.CCZ4Solver.get_user_action_set_includes ( self)

Field Documentation

◆ _domain_r

kernel_testbed.CCZ4Solver._domain_r
protected

Definition at line 68 of file kernel_testbed.py.

Referenced by ccz4.CCZ4Solver.__init__().

◆ _my_user_includes

◆ _patch_size

◆ postprocess_updated_patch


The documentation for this class was generated from the following file: