Peano
Loading...
Searching...
No Matches
exahype2::enumerator::FaceAoSLexicographicEnumerator Struct Reference

Default enumerator for all DoFs in ExaHyPE 2. More...

#include <FaceAoSLexicographicEnumerator.h>

Public Member Functions

constexpr GPUCallableInlineMethod FaceAoSLexicographicEnumerator (int faceNumber, int numberOfDoFsPerAxisInCell, int haloSize, int unknowns, int numberOfAuxiliaryVariables)
 
GPUCallableInlineMethod int operator() (const tarch::la::Vector< Dimensions, int > &dofIndex, int unknown) const
 Access a dof.
 
GPUCallableInlineMethod int size () const
 

Data Fields

const int _faceNumber
 
const int _numberOfDoFsPerAxisInCell
 
const int _haloSize
 
const int _unknowns
 
const int _numberOfAuxiliaryVariables
 

Detailed Description

Default enumerator for all DoFs in ExaHyPE 2.

This enumerator is meant for faces. You don't need this if you work purely within a cell or a patch, but you need an enumeration of the faces if you work patch-wisely.

Enumeration

The DoFs along a face are enumerated lexicographically.

So if we talk about faceNumber 0, we have an enumeration of

          6 | 7
          4 | 5
          2 | 3
          0 | 1

If we talk about number 1, we have

          7  8  9 10 11 12 13
          -------------------
          0  1  2  3  4  5  6

The ASCII art above gives only examples for a halo size of one, where we have two cells along the normal. The extension to bigger halo sizes is straightforward:

          21 22 23 24 25 26 27
          14 15 16 17 18 19 20
          --------------------
           7  8  9 10 11 12 13
           0  1  2  3  4  5  6

Differences to volumetric enumerators

Face enumerators always refer only to one batch, i.e., one piece of face data. ExaHyPE's volumetric enumerators in contrast can index a whole batch of cells in one go.

Definition at line 58 of file FaceAoSLexicographicEnumerator.h.

Constructor & Destructor Documentation

◆ FaceAoSLexicographicEnumerator()

constexpr GPUCallableInlineMethod exahype2::enumerator::FaceAoSLexicographicEnumerator::FaceAoSLexicographicEnumerator ( int faceNumber,
int numberOfDoFsPerAxisInCell,
int haloSize,
int unknowns,
int numberOfAuxiliaryVariables )
constexpr
Parameters
faceNumberAn integer value between 0 (inclusive) and 2*Dimensions (exklusive). Standard Peano enumeration of faces. While you can pass in a number bigger than Dimensions, i.e., while you can distinguish between left and right face, both the left and right face have the same dof enumeration. Consequently, the initialisation with i gives you the same as the initialisation with i+Dimensions.
numberOfDoFsPerAxisInCellNumber of volumes per direction if you work with block-structured Finite Volumes, order+1 if you work in a DG regime.
haloSizeFor a Finite Volume solver, this is one if each patch is augmented with one halo volume around it. For a DG solver, it is 1 if you project only one quantity, i.e., the solution. However, you might have a value bigger than 1 if you also project higher order properties such as the first derivative along the normal. Some code snippets within ExaHyPE 2 call the haloSize overlap.

Definition at line 80 of file FaceAoSLexicographicEnumerator.h.

Member Function Documentation

◆ operator()()

GPUCallableInlineMethod int exahype2::enumerator::FaceAoSLexicographicEnumerator::operator() ( const tarch::la::Vector< Dimensions, int > & dofIndex,
int unknown ) const

Access a dof.

Definition at line 90 of file FaceAoSLexicographicEnumerator.h.

References _faceNumber, _haloSize, _numberOfAuxiliaryVariables, _numberOfDoFsPerAxisInCell, _unknowns, assertion2, and toString().

Here is the call graph for this function:

◆ size()

GPUCallableInlineMethod int exahype2::enumerator::FaceAoSLexicographicEnumerator::size ( ) const

Definition at line 116 of file FaceAoSLexicographicEnumerator.h.

References _haloSize, _numberOfAuxiliaryVariables, _numberOfDoFsPerAxisInCell, and _unknowns.

Referenced by peano4.visualisation.input.Patch.Patch::__repr__().

Here is the caller graph for this function:

Field Documentation

◆ _faceNumber

const int exahype2::enumerator::FaceAoSLexicographicEnumerator::_faceNumber

Definition at line 124 of file FaceAoSLexicographicEnumerator.h.

Referenced by operator()().

◆ _haloSize

const int exahype2::enumerator::FaceAoSLexicographicEnumerator::_haloSize

Definition at line 126 of file FaceAoSLexicographicEnumerator.h.

Referenced by operator()(), and size().

◆ _numberOfAuxiliaryVariables

const int exahype2::enumerator::FaceAoSLexicographicEnumerator::_numberOfAuxiliaryVariables

Definition at line 128 of file FaceAoSLexicographicEnumerator.h.

Referenced by operator()(), and size().

◆ _numberOfDoFsPerAxisInCell

const int exahype2::enumerator::FaceAoSLexicographicEnumerator::_numberOfDoFsPerAxisInCell

Definition at line 125 of file FaceAoSLexicographicEnumerator.h.

Referenced by operator()(), and size().

◆ _unknowns

const int exahype2::enumerator::FaceAoSLexicographicEnumerator::_unknowns

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