Peano
Loading...
Searching...
No Matches
solvers.fv.actionsets.DynamicAMR.DynamicAMR Class Reference

The ExaHyPE 2 Finite Volume handling of (dynamically) adaptive meshes. More...

Inheritance diagram for solvers.fv.actionsets.DynamicAMR.DynamicAMR:
Collaboration diagram for solvers.fv.actionsets.DynamicAMR.DynamicAMR:

Public Member Functions

 __init__ (self, solver, interpolation, restriction)
 Construct object.
 get_action_set_name (self)
 get_includes (self)

Protected Attributes

str _Template_TouchFaceFirstTime
str _Template_DestroyHangingFace
str _Template_DestroyPersistentFace
str _Template_CreateHangingFace
str _Template_CreatePersistentFace
str _Template_CreateCell
str _Template_DestroyCell

Detailed Description

The ExaHyPE 2 Finite Volume handling of (dynamically) adaptive meshes.

This class is basically a plain copy of the DynamicAMR action set from the toolbox. However, we have to ensure that we also set the update markers appropriately such that restricted data are taken into account. This action set thus has to be studied in combination with the ProjectPatchOntoFaces action set which is very similar and also enriches the toolbox version by this marker aspect.

Definition at line 11 of file DynamicAMR.py.

Constructor & Destructor Documentation

◆ __init__()

solvers.fv.actionsets.DynamicAMR.DynamicAMR.__init__ ( self,
solver,
interpolation,
restriction )

Construct object.

Please consult exahype2.solvers.rkfd.actionsets.DynamicAMR's class documentation of details.

Definition at line 26 of file DynamicAMR.py.

References __init__(), api.actionsets.EnumerateDoFs.EnumerateDoFs.d, api.actionsets.ImposeDirichletBoundaryConditions.ImposeDirichletBoundaryConditions.d, api.actionsets.ImposeDirichletBoundaryConditionsWithInteriorPenaltyMethod.ImposeDirichletBoundaryConditionsWithInteriorPenaltyMethod.d, api.actionsets.InitCellDoFs.InitCellDoFs.d, api.actionsets.InitFaceDoFs.InitFaceDoFs.d, api.actionsets.InitPetsc.SendDofsToVertices.d, api.actionsets.InitVertexDoFs.InitVertexDoFs.d, api.actionsets.PlotDGDataInPeanoBlockFormat.PlotDGDataInPeanoBlockFormat.d, api.actionsets.PlotExactSolution.PlotExactSolution.d, api.actionsets.ProjectPETScSolutionBackOntoMesh.ProjectPETScSolutionOnCellsBackOntoMesh.d, api.actionsets.ProjectPETScSolutionBackOntoMesh.ProjectPETScSolutionOnVerticesBackOntoMesh.d, api.BackupPatchOverlap.BackupPatchOverlap.d, api.DynamicAMR.DynamicAMR.d, api.InterpolateAndRestrictCells.InterpolateAndRestrictCells.d, api.InterpolateHangingFaces.InterpolateHangingFaces.d, api.PlotPatchesInPeanoBlockFormat.PlotPatchesInPeanoBlockFormat.d, api.PlotPatchesOverFacesInPeanoBlockFormat.PlotPatchesOverFacesInPeanoBlockFormat.d, api.ProjectPatchOntoFaces.ProjectPatchOntoFaces.d, api.RestrictHangingFaces.RestrictHangingFaces.d, api.solvers.CollocatedLowOrderDiscretisation.AssemblePetscMatrix.d, api.solvers.DiscontinuousGalerkinDiscretisation.AssemblePetscMatrix.d, archive_AssemblePETSCMatrix.AssemblePETSCMatrixOnCellsAndFaces.d, DGCGCoupling.Test4Coupling.d, DGCGCoupling.Test5Coupling.d, DGCGCoupling.Test7Coupling.d, exahype2.api.fv.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.d, exahype2.api.fv.actionsets.RollOverUpdatedFace.RollOverUpdatedFace.d, exahype2.api.rkfd4.actionsets.ApplyDirichletBoundaryConditions.ApplyDirichletBoundaryConditions.d, exahype2.api.rkfd4.actionsets.RollOverUpdatedFace.RollOverUpdatedFace.d, exaparty.api.actionsets.Cleanup.Cleanup.d, exaparty.api.actionsets.DynamicMeshRefinementAnalysis.DynamicMeshRefinementAnalysis.d, exaparty.api.actionsets.ScatterGlobalMemory.ScatterGlobalMemory.d, exaparty.api.actionsets.SynchroniseVerticesWithPreviousMeshSweep.SynchroniseVerticesWithPreviousMeshSweep.d, exaparty.api.actionsets.UpdateParticleMarker.UpdateParticleMarker.d, exaparty.api.boundaryconditions.Fixed.Fixed.d, initCollocatedRandom.InitCollocatedTest4.d, initCollocatedRandom.InitCollocatedTest5.d, initCollocatedRandom.InitDofsCollocatedRandomRhs.d, InitDG.InitDofsDGTest1.d, InitDG.InitDofsDGTest7.d, InitDG.InitDofsIntermediatePhaseTest1.d, peano4.api.datamodel.ModelToDataRepository.ModelToDataRepository.d, peano4.api.output.Constants.Constants.d, peano4.api.output.Jinja2TemplatedHeaderFile.Jinja2TemplatedHeaderFile.d, peano4.api.output.Jinja2TemplatedHeaderImplementationFilePair.Jinja2TemplatedHeaderImplementationFilePair.d, peano4.api.output.Jinja2TemplateStringHeaderImplementationFilePair.Jinja2TemplateStringHeaderImplementationFilePair.d, peano4.api.output.Makefile.Makefile.d, peano4.api.output.Observer.Observer.d, peano4.api.output.TemplatedHeaderFile.TemplatedHeaderFile.d, peano4.api.output.TemplatedHeaderImplementationFilePair.TemplatedHeaderImplementationFilePair.d, peano4.api.runner.DefaultSequence.DefaultSequence.d, peano4.api.solversteps.StepsToStepRepository.StepsToStepRepository.d, peano4.api.toolbox.CreateRegularGrid.CreateRegularGrid.d, peano4.api.toolbox.multigrid.cellbased.ScalarJacobiWithRediscretisation.ScalarJacobiWithRediscretisation.d, peano4.api.toolbox.multigrid.MatrixFreeJacobi.MatrixFreeJacobi.d, peano4.api.toolbox.multigrid.vertexbased.ScalarJacobiWithRediscretisation.ScalarJacobiWithRediscretisation.d, peano4.api.toolbox.particles.api.AbstractUpdateParticleGridAssociation.AbstractUpdateParticleGridAssociation.d, peano4.api.toolbox.particles.api.UpdateParallelState.UpdateParallelState.d, peano4.api.toolbox.particles.api.UpdateParticleGridAssociation_BucketSort.UpdateParticleGridAssociation_BucketSort.d, peano4.api.toolbox.particles.GatherParticlesInMemoryPool.GatherParticlesInMemoryPool.d, peano4.api.toolbox.particles.InsertParticlesAlongCartesianLayoutIntoUnrefinedCells.InsertParticlesAlongCartesianLayoutIntoUnrefinedCells.d, peano4.api.toolbox.particles.InsertParticlesByCoordinates.InsertParticlesByCoordinates.d, peano4.api.toolbox.particles.InsertRandomParticlesIntoUnrefinedCells.InsertRandomParticlesIntoUnrefinedCells.d, peano4.api.toolbox.particles.ParticleAMR.ParticleAMR.d, peano4.api.toolbox.particles.ParticleTreeAnalysis.ParticleTreeAnalysis.d, peano4.api.toolbox.particles.PlotParticlesInVTKFormat.PlotParticlesInVTKFormat.d, peano4.api.toolbox.particles.UpdateParticle_MultiLevelInteraction_Sets.UpdateParticle_MultiLevelInteraction_Sets.d, peano4.api.toolbox.particles.UpdateParticle_MultiLevelInteraction_StackOfLists.UpdateParticle_MultiLevelInteraction_StackOfLists.d, peano4.api.toolbox.particles.UpdateParticle_MultiLevelInteraction_StackOfLists_ContiguousParticles.UpdateParticle_MultiLevelInteraction_StackOfLists_ContiguousParticles.d, peano4.api.toolbox.particles.UpdateParticle_SingleLevelInteraction.UpdateParticle_SingleLevelInteraction.d, peano4.api.toolbox.particles.UpdateParticle_SingleLevelInteraction_ContiguousParticles.UpdateParticle_SingleLevelInteraction_ContiguousParticles.d, peano4.api.toolbox.PlotCellDataInPeanoBlockFormat.PlotCellDataInPeanoBlockFormat.d, peano4.api.toolbox.PlotGridInPeanoBlockFormat.PlotGridInPeanoBlockFormat.d, peano4.api.toolbox.PlotVertexDataInPeanoBlockFormat.PlotVertexDataInPeanoBlockFormat.d, ProjectResidualsAndDiagonalOntoFacets.ProjectResidualsAndDiagonalOntoFacets.d, solvers.aderdg.kernels.AMRRoutines.AMRRoutines.d, solvers.aderdg.kernels.CellData.CellData.d, solvers.aderdg.kernels.DGMatrices.DGMatrices.d, solvers.aderdg.kernels.FusedSpaceTimePredictorVolumeIntegral.FusedSpaceTimePredictorVolumeIntegral.d, solvers.aderdg.kernels.Quadrature.Quadrature.d, solvers.api.actionsets.CollocatedMGSingleThreaded.UpdateSolution.UpdateSolution.d, solvers.api.actionsets.CollocatedMGSolver.InitDofs.InitDofsCollocatedMG.d, solvers.api.actionsets.CollocatedMGSolver.Prolongation.Prolongation.d, solvers.api.actionsets.CollocatedMGSolver.ResetAndUpdateResidual.ResetAndUpdateResidual.d, solvers.api.actionsets.CollocatedMGSolver.Restriction.Restriction.d, solvers.api.actionsets.CollocatedMGSolver.UpdateSolution.UpdateSolution.d, solvers.api.actionsets.CollocatedSolver.InitDofs.InitDofsCollocated.d, solvers.api.actionsets.CollocatedSolver.ResetAndUpdateResidual.ResetAndUpdateResidual.d, solvers.api.actionsets.CollocatedSolver.UpdateSolution.UpdateSolution.d, solvers.api.actionsets.DGCGCoupling.AbstractDGCGCoupling.d, solvers.api.actionsets.DGCGCoupling.AdditiveDGCGCoupling.d, solvers.api.actionsets.DGCGCoupling.MultiplicativeDGCGCoupling.d, solvers.api.actionsets.DGSolver.ProjectIntoCellAndUpdateCellSolution.ProjectIntoCellAndUpdateCellSolution.d, solvers.api.actionsets.DGSolver.ProjectIntoCellAndUpdateCellSolutionWithTasks.ProjectIntoCellAndUpdateCellSolutionWithTasks.d, solvers.api.actionsets.DGSolver.ProjectOntoFaces.ProjectOntoFaces.d, solvers.api.actionsets.DGSolver.UpdateFaceSolution.UpdateFaceSolution.d, solvers.api.actionsets.DGSolver.UpdateResidual.UpdateResidual.d, solvers.api.actionsets.DGSolver.UpdateResidualWithTasks.UpdateResidualWithTasks.d, solvers.api.actionsets.InitHigherOrderDofs.InitHigherOrderDofs.d, solvers.api.actionsets.PlotDGDataInPeanoBlockFormat.PlotDGDataInPeanoBlockFormat.d, solvers.api.actionsets.PlotDGPatchesInPeanoBlockFormat.PlotDGPatchesInPeanoBlockFormat.d, solvers.api.actionsets.PlotVertexDataInPeanoBlockFormat.PlotVertexDataInPeanoBlockFormat.d, solvers.fv.actionsets.HandleBoundary.HandleBoundary.d, solvers.fv.actionsets.RollOverUpdatedFace.RollOverUpdatedFace.d, solvers.limiting.kernels.Limiter.Limiter.d, solvers.limiting.kernels.Quadrature.Quadrature.d, test8.InitDofsTest8.d, tracer.DumpTracerIntoDatabase.DumpTracerIntoDatabase.d, tracer.InsertParticlesFromFile.InsertParticlesFromFile.d, UpdateCell.UpdateCell.d, and UpdateFacets.UpdateFacets.d.

Referenced by __init__().

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

Member Function Documentation

◆ get_action_set_name()

solvers.fv.actionsets.DynamicAMR.DynamicAMR.get_action_set_name ( self)

Definition at line 371 of file DynamicAMR.py.

◆ get_includes()

solvers.fv.actionsets.DynamicAMR.DynamicAMR.get_includes ( self)

Definition at line 375 of file DynamicAMR.py.

References get_includes().

Referenced by get_includes().

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

Field Documentation

◆ _Template_CreateCell

str solvers.fv.actionsets.DynamicAMR.DynamicAMR._Template_CreateCell
protected
Initial value:
= """
logTraceIn( "createCell(...)" );
::toolbox::blockstructured::interpolateCell_AoS_{{INTERPOLATION_SCHEME}}(
marker,
{{DOFS_PER_AXIS}},
{{UNKNOWNS}},
{{COARSE_GRID_CELL}}.value,
{{FINE_GRID_CELL}}.value
);
::exahype2::fv::validatePatch(
{{FINE_GRID_CELL}}.value,
{{UNKNOWNS}},
0, // auxiliary values. Not known here
{{DOFS_PER_AXIS}},
0, // no halo
std::string(__FILE__) + "(" + std::to_string(__LINE__) + "): " + marker.toString()
);
fineGridCell""" + solver._cell_label.name + """.setTimeStamp( coarseGridCell""" + solver._cell_label.name + """.getTimeStamp() );
fineGridCell""" + solver._cell_label.name + """.setTimeStepSize( coarseGridCell""" + solver._cell_label.name + """.getTimeStepSize() );
logTraceOut( "createCell(...)" );
"""

Definition at line 317 of file DynamicAMR.py.

◆ _Template_CreateHangingFace

str solvers.fv.actionsets.DynamicAMR.DynamicAMR._Template_CreateHangingFace
protected

Definition at line 178 of file DynamicAMR.py.

◆ _Template_CreatePersistentFace

str solvers.fv.actionsets.DynamicAMR.DynamicAMR._Template_CreatePersistentFace
protected

Definition at line 279 of file DynamicAMR.py.

◆ _Template_DestroyCell

str solvers.fv.actionsets.DynamicAMR.DynamicAMR._Template_DestroyCell
protected
Initial value:
= """
logTraceInWith1Argument( "destroyCell(...)", marker.toString() );
::toolbox::blockstructured::restrictCell_AoS_{{RESTRICTION_SCHEME}}(
marker,
{{DOFS_PER_AXIS}},
{{UNKNOWNS}},
{{FINE_GRID_CELL}}.value,
{{COARSE_GRID_CELL}}.value
);
// exploit the fact that we can "reuse" some FV utils here
::exahype2::fv::validatePatch(
{{FINE_GRID_CELL}}.value,
{{UNKNOWNS}},
0, // auxiliary values. Not known here
{{DOFS_PER_AXIS}},
0, // no halo
std::string(__FILE__) + "(" + std::to_string(__LINE__) + "): " + marker.toString()
);
coarseGridCell""" + solver._cell_label.name + """.setTimeStamp( fineGridCell""" + solver._cell_label.name + """.getTimeStamp() );
coarseGridCell""" + solver._cell_label.name + """.setTimeStepSize( fineGridCell""" + solver._cell_label.name + """.getTimeStepSize() );
logTraceOut( "destroyCell(...)" );
"""

Definition at line 343 of file DynamicAMR.py.

◆ _Template_DestroyHangingFace

str solvers.fv.actionsets.DynamicAMR.DynamicAMR._Template_DestroyHangingFace
protected
Initial value:
= """
if ( {{RESTRICT_GUARD}} ) {
logTraceInWith4Arguments( "destroyHangingFace(...)", "{{FINE_GRID_FACE_ACCESSOR_RESTRICTION}}", "{{COARSE_GRID_FACE_ACCESSOR_RESTRICTION}}", marker.getSelectedFaceNumber(), marker.toString() );
::toolbox::blockstructured::restrictInnerHalfOfHaloLayer_AoS_{{RESTRICTION_SCHEME}}(
marker,
{{DOFS_PER_AXIS}},
{{OVERLAP}},
{{UNKNOWNS}},
{{FINE_GRID_FACE_ACCESSOR_RESTRICTION}}QUpdate.value,
{{COARSE_GRID_FACE_ACCESSOR_RESTRICTION}}QUpdate(marker.getSelectedFaceNumber()).value
);
bool isLeftEntryOnCoarseFaceLabel = marker.getSelectedFaceNumber() >= Dimensions;
double newTimeStamp = std::max( coarseGridFaces""" + solver._face_label.name + """(marker.getSelectedFaceNumber()).getUpdatedTimeStamp( isLeftEntryOnCoarseFaceLabel ? 0 : 1 ), fineGridFace""" + solver._face_label.name + """.getUpdatedTimeStamp( isLeftEntryOnCoarseFaceLabel ? 0 : 1 ));
coarseGridFaces""" + solver._face_label.name + """(marker.getSelectedFaceNumber()).setUpdated( isLeftEntryOnCoarseFaceLabel ? 0 : 1,true);
coarseGridFaces""" + solver._face_label.name + """(marker.getSelectedFaceNumber()).setUpdatedTimeStamp( isLeftEntryOnCoarseFaceLabel ? 0 : 1,newTimeStamp);
logTraceOut( "destroyHangingFace(...)" );
}
"""

Definition at line 90 of file DynamicAMR.py.

◆ _Template_DestroyPersistentFace

str solvers.fv.actionsets.DynamicAMR.DynamicAMR._Template_DestroyPersistentFace
protected

Definition at line 112 of file DynamicAMR.py.

◆ _Template_TouchFaceFirstTime

str solvers.fv.actionsets.DynamicAMR.DynamicAMR._Template_TouchFaceFirstTime
protected
Initial value:
= """
if ( {{CLEAR_GUARD}} ) {
logTraceInWith2Arguments( "touchFaceFirstTime(...)", marker.toString(), "clear halo layer {{FINE_GRID_FACE_ACCESSOR_RESTRICTION}}" );
::toolbox::blockstructured::clearHaloLayerAoS(
marker,
{{DOFS_PER_AXIS}},
{{OVERLAP}},
{{UNKNOWNS}},
{{FINE_GRID_FACE_ACCESSOR_RESTRICTION}}QUpdate.value
);
logTraceOut( "touchFaceFirstTime(...)" );
}
"""

Definition at line 66 of file DynamicAMR.py.


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