Peano
Loading...
Searching...
No Matches
exagrype.api.FD4WithKODissipation.FD4WithKODissipation Class Reference

Fourth-order Finite Differences with Kreiss-Oliger dissipation. More...

Inheritance diagram for exagrype.api.FD4WithKODissipation.FD4WithKODissipation:
Collaboration diagram for exagrype.api.FD4WithKODissipation.FD4WithKODissipation:

Public Member Functions

 __init__ (self, exahype2.api.Solver solver, int patch_size, int rk_order, float kreiss_oliger_sigma, List[Union[str, int]] quantities=None, float time_step_size=None, float cfl_constant=0.5, exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.RightHandSideKernel right_hand_side_kernel=exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.RightHandSideKernel.CentralDifferences, advection_velocity=None, advected_quantities=None)
 
- Public Member Functions inherited from exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta
int overlap (self)
 Width of the halo, i.e.
 
int rk_order (self)
 
bool has_adaptive_time_step_size (self)
 
str right_hand_side_kernel_name (self)
 Name of the generated right-hand side kernel.
 
str max_eigenvalue_kernel_name (self)
 
Solver.MeshAdaptation create_default_mesh_adaptation (self)
 The finite differences adapt the mesh and balance the load through exahype2.api.rkfd4.AdaptMeshAndBalanceLoad by default.
 
"toolbox.blockstructured.api.RestrictHangingFaces" create_restriction_of_hanging_faces (self)
 Action set which restricts the projected fine data from the hanging faces onto the coarse faces.
 
 construct_output (self, exahype2_project, peano_project, time_step)
 Add the data to the Peano 4 project, generate the kernels and add the tasks of one Runge-Kutta step to time_step.
 

Data Fields

 kreiss_oliger_sigma
 
 dissipative_quantities
 
- Data Fields inherited from exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta
 interpolation
 
 restriction
 
 right_hand_side_kernel
 
 advection_velocity
 
 advected_quantities
 
 HALO_SIZE
 
 patch_size
 
 min_volume_size
 
 max_volume_size
 
 butcher_tableau
 
 time_step_size
 
 cfl_constant
 
 kernel_namespace
 
 max_eigenvalue_kernel_call
 
 right_hand_side_kernel_name
 
 max_eigenvalue_kernel_name
 
 rk_order
 

Static Public Attributes

int HALO_SIZE = 3
 
- Static Public Attributes inherited from exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta
int HALO_SIZE = 2
 Width of the halo.
 

Protected Member Functions

 _right_hand_side_action_sets (self, stage, cell_guard)
 The plain right-hand side of the superclass, followed by the dissipation.
 
- Protected Member Functions inherited from exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta
 _patches (self)
 All patches of this numerical scheme, i.e.
 

Protected Attributes

 _solver
 
- Protected Attributes inherited from exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta
 _solver
 Project the outcome onto the faces.
 
- Protected Attributes inherited from exahype2.api.Solver.Solver.NumericalScheme
 _solver
 

Detailed Description

Fourth-order Finite Differences with Kreiss-Oliger dissipation.

The numerical scheme is exahype2.api.rkfd4.CentralDifferencesWithRungeKutta plus a Kreiss-Oliger dissipation of sixth order on top: Per Runge-Kutta stage, it first evaluates the plain fourth-order right-hand side and then adds

\( \\frac{\\sigma}{64 \\Delta x_d} (Q_{i-3} - 6 Q_{i-2} + 15 Q_{i-1} - 20 Q_i + 15 Q_{i+1} - 6 Q_{i+2} + Q_{i+3}) \)

per axis d to the selected quantities (exagrype.api.actionsets.AddKreissOligerDissipation). Both kernels read the same stage input, i.e. the outcome is the right-hand side with dissipation. The dissipation stencil reaches three grid cells into the neighbouring patches, so the scheme widens the halo from two to three grid cells. Everything else is inherited.

To use the dissipation, replace the numerical scheme of a solver:

solver.numerical_scheme = exagrype.api.FD4WithKODissipation(solver, patch_size=9, rk_order=4, kreiss_oliger_sigma=8.0)
solver.grid_construction = exahype2.api.rkfd4.SetupSimulationOverRegularGrid(solver, volume_size=0.04)
solver.plotter = exahype2.api.rkfd4.PlotAsVTKFile(solver, time_in_between_plots=0.1)
Fourth-order Finite Differences with Kreiss-Oliger dissipation.
Plotting counterpart of the fourth-order Finite Differences with Runge-Kutta time stepping (exahype2....
Setup phase of the fourth-order Finite Differences with Runge-Kutta time stepping (exahype2....

The grid construction and the plotter remain those of exahype2.api.rkfd4. The legacy ExaGRyPE runs used kreiss_oliger_sigma=8.0. The scheme is three-dimensional only, as it relies on exagrype::ccz4::addKreissOligerDissipation().

Definition at line 13 of file FD4WithKODissipation.py.

Constructor & Destructor Documentation

◆ __init__()

exagrype.api.FD4WithKODissipation.FD4WithKODissipation.__init__ (   self,
exahype2.api.Solver  solver,
int  patch_size,
int  rk_order,
float  kreiss_oliger_sigma,
List[Union[str, int]]   quantities = None,
float   time_step_size = None,
float   cfl_constant = 0.5,
exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.RightHandSideKernel   right_hand_side_kernel = exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.RightHandSideKernel.CentralDifferences,
  advection_velocity = None,
  advected_quantities = None 
)
Parameters
solverexahype2.api.Solver The solver this numerical scheme realises.
patch_sizeint Number of grid cells per axis within one patch. Has to be at least HALO_SIZE=3.
rk_orderint Order of the Runge-Kutta scheme, i.e. its number of stages.
kreiss_oliger_sigmafloat Scaling of the Kreiss-Oliger dissipation. Has to be non-negative.
quantitiesList[str or int] or None The unknowns which are subject to the dissipation. None, the default, selects all unknowns. A string is the name of an unknown as passed to the solver (e.g. "lapse" or "G" for exagrype.api.CCZ4Solver) and selects all of its entries. An int is the index of one entry of the unknowns. Auxiliary variables do not evolve in time and hence cannot be selected.
time_step_sizefloat or None Fixed time step size. If None, the time step size is adaptive.
cfl_constantfloat CFL constant for adaptive time step sizes.
right_hand_side_kernelexahype2.api.rkfd4.CentralDifferencesWithRungeKutta.RightHandSideKernel The kernel which evaluates the right-hand side before the dissipation is added,
See also
exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.
Parameters
advection_velocitystr or List[str or int] or None Only for lopsided advection,
See also
exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.
Parameters
advected_quantitiesList[str or int] or None Only for lopsided advection,
See also
exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.

Reimplemented from exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.

Definition at line 49 of file FD4WithKODissipation.py.

References exagrype.api.FD4WithKODissipation.FD4WithKODissipation.__init__().

Referenced by exagrype.api.FD4WithKODissipation.FD4WithKODissipation.__init__().

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

Member Function Documentation

◆ _right_hand_side_action_sets()

exagrype.api.FD4WithKODissipation.FD4WithKODissipation._right_hand_side_action_sets (   self,
  stage,
  cell_guard 
)
protected

The plain right-hand side of the superclass, followed by the dissipation.

Reimplemented from exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.

Definition at line 127 of file FD4WithKODissipation.py.

References exagrype.api.FD4WithKODissipation.FD4WithKODissipation._right_hand_side_action_sets().

Referenced by exagrype.api.FD4WithKODissipation.FD4WithKODissipation._right_hand_side_action_sets().

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

Field Documentation

◆ _solver

exagrype.api.FD4WithKODissipation.FD4WithKODissipation._solver
protected

Definition at line 133 of file FD4WithKODissipation.py.

Referenced by exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.__add_data_to_repository(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.__add_data_to_repository(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.__add_data_to_repository(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.__construct_kernel_call(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEulerGenerator.__construct_kernel_call(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.__construct_kernel_call(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.__create_data_structures(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.__create_data_structures(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.__create_data_structures(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEulerGenerator.__create_time_step_functions(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.__create_time_step_functions(), solvers.fv.EnclaveTasking.UpdateCell._add_action_set_entries_to_dictionary(), solvers.fv.SingleSweep.UpdateCell._add_action_set_entries_to_dictionary(), exahype2.api.fv.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._add_further_adaptation_action_sets(), exahype2.api.rkfd4.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._add_further_adaptation_action_sets(), exahype2.api.fv.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._add_projection_action_sets(), exahype2.api.rkfd4.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._add_projection_action_sets(), exahype2.api.Solver.Solver.Plotter._add_time_interval_bookkeeping_to_solver(), exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._construct_task_graph(), exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion._create_adapt_mesh_task(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._create_description(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._create_description(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._create_guard(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._create_guard(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._create_selected_entries(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._create_selected_entries(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._log_plot_graph(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._log_plot_graph(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta._patches(), exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._report_task_graph(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta._right_hand_side_action_sets(), exahype2.api.SolverToCPPFiles.SolverToCPPFiles._variables_declaration(), exahype2.api.SolverToCPPFiles.SolverToCPPFiles.construct_output(), exahype2.api.blockstructured.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad.construct_output(), exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.construct_output(), manipulate-solver-steps-illustrations.RusanovWithPostprocessing.construct_output(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEulerGenerator.construct_output(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.construct_output(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.construct_output(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.create_default_mesh_adaptation(), exahype2.api.Solver.Solver.Plotter.create_finish_call(), exahype2.api.Solver.Solver.Plotter.create_is_active_predicate(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.create_restriction_of_hanging_faces(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.create_restriction_of_hanging_faces(), solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.event_lifetime(), solvers.aderdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), solvers.aderdg.actionsets.Correction.Correction.get_body_of_operation(), solvers.aderdg.actionsets.DynamicAMR.DynamicAMR.get_body_of_operation(), solvers.aderdg.actionsets.HandleBoundary.HandleBoundary.get_body_of_operation(), solvers.aderdg.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.aderdg.actionsets.PostprocessSolution.EmptyPostprocessSolution.get_body_of_operation(), solvers.aderdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_body_of_operation(), solvers.aderdg.actionsets.PostprocessSolution.CellWisePostprocessSolution.get_body_of_operation(), solvers.aderdg.actionsets.Prediction.Prediction.get_body_of_operation(), solvers.fv.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), solvers.fv.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.fv.actionsets.PostprocessSolution.VolumeWisePostprocessSolution.get_body_of_operation(), solvers.fv.actionsets.PreprocessSolution.VolumeWisePreprocessSolution.get_body_of_operation(), solvers.fv.actionsets.RollOverUpdatedFace.RollOverUpdatedFace.get_body_of_operation(), solvers.fv.EnclaveTasking.MergeEnclaveTaskOutcome.get_body_of_operation(), solvers.limiting.actionsets.CopyAndConvertPatch.CopyAndConvertPatch.get_body_of_operation(), solvers.limiting.actionsets.SaveNewCellData.SaveNewCellData.get_body_of_operation(), solvers.limiting.actionsets.SpreadLimiterStatus.SpreadLimiterStatus.get_body_of_operation(), solvers.limiting.actionsets.VerifyTroubledness.VerifyTroubledness.get_body_of_operation(), solvers.rkdg.actionsets.AdaptivityCriterion.AdaptivityCriterion.get_body_of_operation(), solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.get_body_of_operation(), solvers.rkdg.actionsets.ComputeFinalLinearCombination.ComputeFinalLinearCombination.get_body_of_operation(), solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.get_body_of_operation(), solvers.rkdg.actionsets.HandleBoundary.HandleBoundary.get_body_of_operation(), solvers.rkdg.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.rkdg.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.get_body_of_operation(), solvers.rkdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.PostprocessSolution.CellWisePostprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.PreprocessSolution.DoFWisePreprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.PreprocessSolution.CellWisePreprocessSolution.get_body_of_operation(), solvers.rkdg.actionsets.ProjectLinearCombinationOfEstimatesOntoFaces.ProjectLinearCombinationOfEstimatesOntoFaces.get_body_of_operation(), solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.get_body_of_operation(), solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.get_body_of_operation(), solvers.rkdg.SeparateSweepsWithEnclaveTasking.MergeEnclaveTaskOutcome.get_body_of_operation(), exagrype.api.actionsets.AddKreissOligerDissipation.AddKreissOligerDissipation.get_body_of_operation(), exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_body_of_operation(), exahype2.api.blockstructured.LoadCheckpoint._LoadPatchesFromCheckpoint.get_body_of_operation(), exahype2.api.fv.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), exahype2.api.fv.actionsets.InsertPatchInterior.InsertPatchInterior.get_body_of_operation(), exahype2.api.fv.actionsets.UpdateCellGPU.UpdateCellGPU.get_body_of_operation(), exahype2.api.rkfd4.actionsets.AddLopsidedAdvection.AddLopsidedAdvection.get_body_of_operation(), exahype2.api.rkfd4.actionsets.ComputeLinearCombination.ComputeLinearCombination.get_body_of_operation(), exahype2.api.rkfd4.actionsets.ComputeMaxEigenvalue.ComputeMaxEigenvalue.get_body_of_operation(), exahype2.api.rkfd4.actionsets.EvaluateRightHandSide.EvaluateRightHandSide.get_body_of_operation(), exahype2.api.rkfd4.actionsets.InitialCondition.InitialCondition.get_body_of_operation(), solvers.fv.actionsets.InitialCondition.InitialCondition.get_body_of_prepareTraversal(), exahype2.api.rkfd4.actionsets.ComputeTimeStepSize.ComputeTimeStepSize.get_body_of_unprepareTraversal(), solvers.aderdg.actionsets.AbstractADERDGActionSet.AbstractADERDGActionSet.get_includes(), solvers.aderdg.actionsets.Correction.Correction.get_includes(), solvers.aderdg.actionsets.DynamicAMR.DynamicAMR.get_includes(), solvers.aderdg.actionsets.HandleBoundary.HandleBoundary.get_includes(), solvers.aderdg.actionsets.InitialCondition.InitialCondition.get_includes(), solvers.aderdg.actionsets.PostprocessSolution.EmptyPostprocessSolution.get_includes(), solvers.aderdg.actionsets.PostprocessSolution.DoFWisePostprocessSolution.get_includes(), solvers.aderdg.actionsets.Prediction.Prediction.get_includes(), solvers.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet.get_includes(), solvers.fv.actionsets.InitialCondition.InitialCondition.get_includes(), solvers.fv.EnclaveTasking.UpdateCell.get_includes(), solvers.fv.SingleSweep.UpdateCell.get_includes(), solvers.limiting.actionsets.AbstractLimiterActionSet.AbstractLimiterActionSet.get_includes(), solvers.limiting.actionsets.CopyAndConvertPatch.CopyAndConvertPatch.get_includes(), solvers.limiting.actionsets.SaveNewCellData.SaveNewCellData.get_includes(), solvers.limiting.actionsets.VerifyTroubledness.VerifyTroubledness.get_includes(), solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet.get_includes(), solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.get_includes(), exahype2.api.blockstructured.ConsumeRefinementRequests.ConsumeRefinementRequests.get_includes(), exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement.get_includes(), exahype2.api.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet.get_includes(), exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.get_includes(), exahype2.api.rkfd4.actionsets.AbstractRKFD4ActionSet.AbstractRKFD4ActionSet.get_includes(), exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.get_includes(), solvers.rkdg.actionsets.AddVolumeAndFaceSolution.AddVolumeAndFaceSolution.guards(), solvers.rkdg.actionsets.DynamicAMR.DynamicAMR.guards(), solvers.rkdg.actionsets.HandleBoundary.HandleBoundary.guards(), solvers.rkdg.actionsets.LinearCombinationOfEstimates.LinearCombinationOfEstimates.guards(), solvers.rkdg.actionsets.ProjectLinearCombinationOfEstimatesOntoFaces.ProjectLinearCombinationOfEstimatesOntoFaces.guards(), solvers.rkdg.actionsets.SolveRiemannProblem.SolveRiemannProblem.guards(), solvers.rkdg.actionsets.SolveVolumeIntegral.SolveVolumeIntegral.guards(), exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint.index_file_name(), exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler.kernel_function_name(), exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler.kernel_function_name(), exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.max_eigenvalue_kernel_name(), exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile.output_file_prefix(), exahype2.api.fv.WriteCheckpoint.WriteCheckpoint.output_file_prefix(), exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile.output_file_prefix(), exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint.output_file_prefix(), and exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta.right_hand_side_kernel_name().

◆ dissipative_quantities

exagrype.api.FD4WithKODissipation.FD4WithKODissipation.dissipative_quantities

Definition at line 121 of file FD4WithKODissipation.py.

◆ HALO_SIZE

◆ kreiss_oliger_sigma

exagrype.api.FD4WithKODissipation.FD4WithKODissipation.kreiss_oliger_sigma

Definition at line 120 of file FD4WithKODissipation.py.


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