Peano
Loading...
Searching...
No Matches
peano4.api.toolbox.FixedResolutionGridSelector.FixedResolutionGridSelector Class Reference

Select the mesh entities of one level of the spacetree. More...

Inheritance diagram for peano4.api.toolbox.FixedResolutionGridSelector.FixedResolutionGridSelector:
Collaboration diagram for peano4.api.toolbox.FixedResolutionGridSelector.FixedResolutionGridSelector:

Public Member Functions

 __init__ (self, int level, domain_size)
 level: int Level of the spacetree, with 0 being the root.
str createVertexGuard (self)
 C++ boolean expression over a peano4.datamanagement.VertexMarker called marker.
str createFaceGuard (self)
 C++ boolean expression over a peano4.datamanagement.FaceMarker called marker.
str createCellGuard (self)
 C++ boolean expression over a peano4.datamanagement.CellMarker called marker.
Public Member Functions inherited from peano4.api.toolbox.GridSelector.GridSelector
str createVertexStoreGuard (self)
 C++ boolean expression over a peano4.datamanagement.VertexMarker called marker which decides whether a vertex's data is stored at the end of a mesh sweep.
str createFaceStoreGuard (self)
 Counterpart of createVertexStoreGuard() for faces.
str createCellStoreGuard (self)
 Counterpart of createVertexStoreGuard() for cells.

Protected Member Functions

str _guard (self)
 Compare each entry of marker.h() with the size of a cell on the selected level.

Protected Attributes

 _level = level
list _mesh_size = [size / 3**level for size in domain_size]

Detailed Description

Select the mesh entities of one level of the spacetree.

The root of the spacetree, i.e. the bounding box of the whole domain, is level 0. Each further level splits the cells of its parent into three along each axis, i.e. a cell on level l has the size domain_size/3^l. The guards select exactly the vertices, faces and cells of this size, no matter whether they are refined further or not. If the mesh is coarser than the level somewhere, the guards do not hold there.

The markers do not know their level, so the guards compare the mesh size h() of the vertex, face or cell with the size of a cell on the selected level. Different to FineGridSelector, the selection does not depend on the refinement state, i.e. it is the same in each and every mesh sweep.

Definition at line 6 of file FixedResolutionGridSelector.py.

Constructor & Destructor Documentation

◆ __init__()

peano4.api.toolbox.FixedResolutionGridSelector.FixedResolutionGridSelector.__init__ ( self,
int level,
domain_size )

level: int Level of the spacetree, with 0 being the root.

domain_size: list of float Size of the computational domain along each axis, i.e. the same value as handed over to the project's global simulation parameters.

Definition at line 27 of file FixedResolutionGridSelector.py.

Member Function Documentation

◆ _guard()

str peano4.api.toolbox.FixedResolutionGridSelector.FixedResolutionGridSelector._guard ( self)
protected

Compare each entry of marker.h() with the size of a cell on the selected level.

The tolerance is relative to this size, as the sizes become tiny on fine levels.

Definition at line 43 of file FixedResolutionGridSelector.py.

References _mesh_size.

Referenced by createCellGuard(), createFaceGuard(), and createVertexGuard().

Here is the caller graph for this function:

◆ createCellGuard()

◆ createFaceGuard()

◆ createVertexGuard()

Field Documentation

◆ _level

peano4.api.toolbox.FixedResolutionGridSelector.FixedResolutionGridSelector._level = level
protected

Definition at line 40 of file FixedResolutionGridSelector.py.

◆ _mesh_size

peano4.api.toolbox.FixedResolutionGridSelector.FixedResolutionGridSelector._mesh_size = [size / 3**level for size in domain_size]
protected

Definition at line 41 of file FixedResolutionGridSelector.py.

Referenced by _guard().


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