Peano
Loading...
Searching...
No Matches
exahype2::CellAccess Class Reference

Cell access class. More...

#include <CellAccess.h>

Public Member Functions

 CellAccess (const double *__restrict__ QIn, int haloSize, int unknowns, int numberOfAuxiliaryVariables, int numberOfDoFsPerAxisInPatch)
 
 ~CellAccess ()=default
 
int size () const
 
const double *__restrict__ operator() (const tarch::la::Vector< Dimensions, int > &relativeCellPosition) const
 Get a pointer to another cell's data.
 
double operator() (const tarch::la::Vector< Dimensions, int > &relativeCellPosition, int unknown) const
 
double centre (int unknown) const
 
const double *__restrict__ left (int normal) const
 Return access to the left neighbour.
 
const double *__restrict__ right (int normal) const
 
double left (int normal, int unknown) const
 
double right (int normal, int unknown) const
 
std::string toString () const
 

Private Attributes

const double *__restrict__ _QIn
 
const int _haloSize
 
const int _unknowns
 
const int _numberOfAuxiliaryVariables
 
const int _numberOfDoFsPerAxisInPatch
 

Detailed Description

Cell access class.

This class is to be used by user code which do not only want to work cell-wisely, but also need access to neighbour cells. For example, it can be used in the source term code to get access to the neighbour cell to evaluate a second derivative.

Parameters
haloSizeFor a Finite Volume solver, this is 1 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 call the haloSize overlap.

Definition at line 29 of file CellAccess.h.

Constructor & Destructor Documentation

◆ CellAccess()

exahype2::CellAccess::CellAccess ( const double *__restrict__ QIn,
int haloSize,
int unknowns,
int numberOfAuxiliaryVariables,
int numberOfDoFsPerAxisInPatch )

Definition at line 4 of file CellAccess.cpp.

◆ ~CellAccess()

exahype2::CellAccess::~CellAccess ( )
default

Member Function Documentation

◆ centre()

double exahype2::CellAccess::centre ( int unknown) const

Definition at line 79 of file CellAccess.cpp.

◆ left() [1/2]

const double *__restrict__ exahype2::CellAccess::left ( int normal) const

Return access to the left neighbour.

Left means left along coordinate axis normal.

Definition at line 51 of file CellAccess.cpp.

◆ left() [2/2]

double exahype2::CellAccess::left ( int normal,
int unknown ) const

Definition at line 65 of file CellAccess.cpp.

◆ operator()() [1/2]

const double *__restrict__ exahype2::CellAccess::operator() ( const tarch::la::Vector< Dimensions, int > & relativeCellPosition) const

Get a pointer to another cell's data.

Pass in {0,0,0} and 0 as unknown, and you will get the current cell for which you have created the CellAccess object. Pass in {0,0,0} and k to access its kth unknown. Pass in {-1,0,0} for example to access the left neighbour of a cell.

Definition at line 29 of file CellAccess.cpp.

◆ operator()() [2/2]

double exahype2::CellAccess::operator() ( const tarch::la::Vector< Dimensions, int > & relativeCellPosition,
int unknown ) const

Definition at line 45 of file CellAccess.cpp.

◆ right() [1/2]

const double *__restrict__ exahype2::CellAccess::right ( int normal) const

Definition at line 58 of file CellAccess.cpp.

◆ right() [2/2]

double exahype2::CellAccess::right ( int normal,
int unknown ) const

Definition at line 72 of file CellAccess.cpp.

◆ size()

int exahype2::CellAccess::size ( ) const

◆ toString()

std::string exahype2::CellAccess::toString ( ) const

Field Documentation

◆ _haloSize

const int exahype2::CellAccess::_haloSize
private

Definition at line 69 of file CellAccess.h.

◆ _numberOfAuxiliaryVariables

const int exahype2::CellAccess::_numberOfAuxiliaryVariables
private

Definition at line 71 of file CellAccess.h.

◆ _numberOfDoFsPerAxisInPatch

const int exahype2::CellAccess::_numberOfDoFsPerAxisInPatch
private

Definition at line 72 of file CellAccess.h.

◆ _QIn

const double* __restrict__ exahype2::CellAccess::_QIn
private

Definition at line 68 of file CellAccess.h.

◆ _unknowns


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