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 )

◆ ~CellAccess()

exahype2::CellAccess::~CellAccess ( )
default

Member Function Documentation

◆ centre()

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

Definition at line 79 of file CellAccess.cpp.

References _QIn.

◆ 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.

References _haloSize, _numberOfAuxiliaryVariables, _numberOfDoFsPerAxisInPatch, _QIn, and _unknowns.

◆ 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.

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

◆ _numberOfAuxiliaryVariables

const int exahype2::CellAccess::_numberOfAuxiliaryVariables
private

Definition at line 71 of file CellAccess.h.

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

◆ _numberOfDoFsPerAxisInPatch

const int exahype2::CellAccess::_numberOfDoFsPerAxisInPatch
private

Definition at line 72 of file CellAccess.h.

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

◆ _QIn

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

Definition at line 68 of file CellAccess.h.

Referenced by CellAccess(), centre(), and operator()().

◆ _unknowns

const int exahype2::CellAccess::_unknowns
private

Definition at line 70 of file CellAccess.h.

Referenced by exahype2.solvers.aderdg.ADERDG.ADERDG::__str__(), exahype2.solvers.fv.FV.FV::__str__(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::__str__(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::__str__(), exahype2.solvers.aderdg.ADERDG.ADERDG::_init_dictionary_with_default_parameters(), exahype2.solvers.fv.FV.FV::_init_dictionary_with_default_parameters(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::_init_dictionary_with_default_parameters(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::_init_dictionary_with_default_parameters(), peano4.visualisation.output.Visualiser.PatchFileData::apply_renderer_to_data(), CellAccess(), peano4.visualisation.output.Visualiser.PatchFileData::copy_data_from_parser_object(), SBH.FD4SolverWithLimiter::create_action_sets(), SBH.FD4SolverWithoutLimiter::create_action_sets(), api.solvers.CollocatedLowOrderDiscretisation.AssemblePetscMatrix::get_constructor_body(), operator()(), size(), exahype2.solvers.aderdg.ADERDG.ADERDG::unknowns(), exahype2.solvers.fv.FV.FV::unknowns(), exahype2.solvers.fv.FV.FV::unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::unknowns(), exahype2.solvers.rkdg.RungeKuttaDG.RungeKuttaDG::unknowns(), exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::unknowns(), and exahype2.solvers.rkfd.CellCenteredFiniteDifferences.CellCenteredFiniteDifferences::unknowns().


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