|
Peano
|
Set up a simulation from a checkpoint. More...


Public Member Functions | |
| __init__ (self, Solver solver, str filename="checkpoint", str output_path=".", float time_stamp=None) | |
| str | index_file_name (self) |
| Path of the checkpoint's index file. | |
| construct_output (self, exahype2_project, peano_project, setup_simulation) | |
| Add the mesh construction and the loading of the data to the setup task graph. | |
Protected Attributes | |
| _filename | |
| _output_path | |
| _time_stamp | |
| _solver | |
Protected Attributes inherited from exahype2.api.Solver.Solver.GridConstruction | |
| _solver | |
Set up a simulation from a checkpoint.
Alternative to the setups over a regular grid (exahype2.api.fv.SetupSimulationOverRegularGrid, exahype2.api.rkfd4.SetupSimulationOverRegularGrid): Instead of constructing a mesh and setting the initial condition, the setup reads a checkpoint written by exahype2.api.fv.WriteCheckpoint or exahype2.api.rkfd4.WriteCheckpoint and continues the simulation from there. It is available for both schemes as exahype2.api.fv.LoadCheckpoint and exahype2.api.rkfd4.LoadCheckpoint, as both use the same data layout.
The setup consists of three phases:
The setup neither uses the initial condition nor the boundary conditions. The checkpoint has to be written by a solver with the same unknowns, auxiliary variables, patch size and halo, over the same domain. The code reads the checkpoint at runtime, i.e. the files have to exist when the simulation starts, but not when it is generated or built.
The time stamps of all solvers have to match, i.e. a project with several solvers has to load checkpoints of all of them, written at the same time.
Definition at line 191 of file LoadCheckpoint.py.
| exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint.__init__ | ( | self, | |
| Solver | solver, | ||
| str | filename = "checkpoint", |
||
| str | output_path = ".", |
||
| float | time_stamp = None |
||
| ) |
| solver | exahype2.api.Solver The solver whose data is loaded. |
| filename | str File name of the checkpoint as passed to WriteCheckpoint. The setup reads the index file output_path/filename-SolverName.peano-patch-file. |
| output_path | str Directory of the checkpoint, relative to the directory the simulation is started from, or absolute. |
| time_stamp | float or None Time stamp of the checkpoint to load. If None, the setup loads the latest checkpoint in the index file. Otherwise, it loads the checkpoint whose time stamp is closest to time_stamp. |
Reimplemented from exahype2.api.Solver.Solver.GridConstruction.
Definition at line 240 of file LoadCheckpoint.py.
References exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint.__init__().
Referenced by exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint.__init__().


| exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint.construct_output | ( | self, | |
| exahype2_project, | |||
| peano_project, | |||
| setup_simulation | |||
| ) |
Add the mesh construction and the loading of the data to the setup task graph.
Reimplemented from exahype2.api.Solver.Solver.GridConstruction.
Definition at line 280 of file LoadCheckpoint.py.
| str exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint.index_file_name | ( | self | ) |
Path of the checkpoint's index file.
Definition at line 271 of file LoadCheckpoint.py.
References tracer.InsertParticlesFromFile.InsertParticlesFromFile._filename, exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint._filename, exahype2.api.dslhype.SyntaxTree.LogDataBlock._filename, exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._filename, exahype2.api.fv.WriteCheckpoint.WriteCheckpoint._filename, exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._filename, exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint._filename, peano4::grid::TraversalVTKPlotter._filename, exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint._output_path, exahype2.api.fv.PlotAsVTKFile.PlotAsVTKFile._output_path, exahype2.api.fv.WriteCheckpoint.WriteCheckpoint._output_path, exahype2.api.Project.Project._output_path, exahype2.api.rkfd4.PlotAsVTKFile.PlotAsVTKFile._output_path, exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint._output_path, exaparty.api.Project.Project._output_path, api.Project.Project._output_path, 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.RusanovWithExplicitEuler.RusanovWithExplicitEulerGenerator._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.NumericalScheme.NumericalSchemeGenerator._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, and 20_additional-solver-steps.RungeKuttaWithDensityFloor._solver.
|
protected |
Definition at line 267 of file LoadCheckpoint.py.
Referenced by tracer.InsertParticlesFromFile.InsertParticlesFromFile.get_constructor_body(), exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint.index_file_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(), and exahype2.api.rkfd4.WriteCheckpoint.WriteCheckpoint.output_file_prefix().
|
protected |
Definition at line 268 of file LoadCheckpoint.py.
Referenced by api.Project.Project.__init__(), exahype2.api.blockstructured.LoadCheckpoint.LoadCheckpoint.index_file_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(), exahype2.api.Project.Project.set_output_path(), exaparty.api.Project.Project.set_output_path(), and api.Project.Project.set_output_path().
|
protected |
Definition at line 296 of file LoadCheckpoint.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().
|
protected |
Definition at line 269 of file LoadCheckpoint.py.