|
Peano
|
Setup phase of the fourth-order Finite Differences with Runge-Kutta time stepping (exahype2.api.rkfd4): sets the initial condition over a regular block-structured mesh and prepares the data required for the first time step. More...


Public Member Functions | |
| __init__ (self, Solver solver, float volume_size) | |
| construct_output (self, exahype2_project, peano_project, setup_simulation) | |
| Create the actual sequence of tasks following the description from Adding a numerical scheme, as grid construction, numerical scheme, but also plotting all follow the same pattern of tasks and dependencies. | |
Data Fields | |
| volume_size | |
Protected Attributes | |
| _solver | |
Protected Attributes inherited from exahype2.api.Solver.Solver.GridConstruction | |
| _solver | |
Setup phase of the fourth-order Finite Differences with Runge-Kutta time stepping (exahype2.api.rkfd4): sets the initial condition over a regular block-structured mesh and prepares the data required for the first time step.
The mesh is not refined adaptively: setup constructs the regular grid the simulation is going to stay on, fills in the initial condition and projects it onto the faces, where the first Runge-Kutta stage picks it up to reconstruct the halo of each patch.
The solver this is attached to has to have an exahype2.api.InitPointWisely PDE term registered (via solver.add_pde_term(...)), as that is what fills in the initial condition this class' setup task graph relies on; construct_output() asserts this before it builds anything.
The class is a copy of exahype2.api.fv.SetupSimulationOverRegularGrid, as rkfd4 does not depend on the Finite Volume package. It works against the data the numerical scheme assigns to the solver: solver._patch, solver._patch_overlap_update and solver._patch_overlap_current_time_step, plus the numerical scheme's patch_size.
Definition at line 14 of file SetupSimulationOverRegularGrid.py.
| exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.__init__ | ( | self, | |
| Solver | solver, | ||
| float | volume_size | ||
| ) |
| volume_size | float Maximum edge length of one Finite Differences grid cell, i.e. the maximum mesh width h of the scheme. Every mesh cell hosts one patch of patch_size grid cells per axis. The setup refines every mesh cell whose edge length is greater than or equal to volume_size times the patch size (peano4.api.actionsets.ConstructRegularGrid), i.e. the resulting grid cells are strictly smaller than volume_size. If you want grid cells of exactly 1/27 with patches of size 9, pass in a value slightly bigger than 1/27: 1/27 itself yields mesh cells of size 1/9 and hence grid cells of size 1/81. |
Reimplemented from exahype2.api.Solver.Solver.GridConstruction.
Definition at line 40 of file SetupSimulationOverRegularGrid.py.
References exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.__init__().
Referenced by exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.__init__().


| exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.construct_output | ( | self, | |
| exahype2_project, | |||
| peano_project, | |||
| setup_simulation | |||
| ) |
Create the actual sequence of tasks following the description from Adding a numerical scheme, as grid construction, numerical scheme, but also plotting all follow the same pattern of tasks and dependencies.
Reimplemented from exahype2.api.Solver.Solver.GridConstruction.
Definition at line 59 of file SetupSimulationOverRegularGrid.py.
References solvers.aderdg.actionsets.AbstractADERDGActionSet.AbstractADERDGActionSet._solver, solvers.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, solvers.fv.EnclaveTasking.UpdateCell._solver, solvers.fv.SingleSweep.UpdateCell._solver, solvers.limiting.actionsets.AbstractLimiterActionSet.AbstractLimiterActionSet._solver, solvers.rkdg.actionsets.AbstractRungeKuttaDGActionSet.AbstractRungeKuttaDGActionSet._solver, exagrype.api.FD4WithKODissipation.FD4WithKODissipation._solver, exahype2.api.blockstructured.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.blockstructured.ConsumeRefinementRequests.ConsumeRefinementRequests._solver, exahype2.api.blockstructured.DynamicMeshRefinement.DynamicMeshRefinement._solver, exahype2.api.blockstructured.LoadCheckpoint._LoadPatchesFromCheckpoint._solver, exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint._solver, exahype2.api.fv.actionsets.AbstractFVActionSet.AbstractFVActionSet._solver, exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.fv.actionsets.DiscardPatchInterior.DiscardPatchInterior._solver, exahype2.api.fv.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.fv.RusanovWithExplicitEuler.RusanovWithExplicitEuler._solver, exahype2.api.fv.RusanovWithOptimisticExplicitEuler.RusanovWithOptimisticExplicitEuler._solver, exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion._solver, exahype2.api.fv.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.rkfd4.actionsets.AbstractRKFD4ActionSet.AbstractRKFD4ActionSet._solver, exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions._solver, exahype2.api.rkfd4.AdaptMeshAndBalanceLoad.AdaptMeshAndBalanceLoad._solver, exahype2.api.rkfd4.CentralDifferencesWithRungeKutta.CentralDifferencesWithRungeKutta._solver, exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._solver, exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._solver, exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint._solver, exahype2.api.Solver.Solver.SolverGenerator._solver, exahype2.api.Solver.Solver.NumericalScheme._solver, exahype2.api.Solver.Solver.GridConstruction._solver, exahype2.api.Solver.Solver.Plotter._solver, exahype2.api.Solver.Solver.MeshAdaptation._solver, 20_additional-solver-steps.RusanovWithDensityFloor._solver, 20_additional-solver-steps.RungeKuttaWithDensityFloor._solver, exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.volume_size, and exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.volume_size.
|
protected |
Definition at line 158 of file SetupSimulationOverRegularGrid.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.RusanovWithExplicitEuler.__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.RusanovWithExplicitEuler.__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.RusanovWithExplicitEuler.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.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().
| exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.volume_size |
Definition at line 57 of file SetupSimulationOverRegularGrid.py.
Referenced by exahype2.api.fv.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid._construct_task_graph(), exahype2.api.fv.SetupSimulationWithUserCodedRefinementCriterion.SetupSimulationWithUserCodedRefinementCriterion._create_adapt_mesh_task(), and exahype2.api.rkfd4.SetupSimulationOverRegularGrid.SetupSimulationOverRegularGrid.construct_output().