Peano
benchmarks::exahype2::kernelbenchmarks::DataRepository Class Reference

A singleton repository to manage and provide access to grid cell and face data. More...

#include <DataRepository.h>

Collaboration diagram for benchmarks::exahype2::kernelbenchmarks::DataRepository:

Data Structures

struct  DepthLevel
 
struct  Indexing
 Provides helper functions for calculating linearized array indices from geometric cell positions. More...
 

Public Member Functions

 DataRepository (const DataRepository &)=delete
 
DataRepositoryoperator= (const DataRepository &)=delete
 
 DataRepository (DataRepository &&)=delete
 
DataRepositoryoperator= (DataRepository &&)=delete
 
 ~DataRepository ()
 
double * getCellQ (int index)
 
double * getCellQ (const tarch::la::Vector< DIMENSIONS, double > &cellCentre, const tarch::la::Vector< DIMENSIONS, double > &cellSize)
 
double * getFaceQNew (int index, int axis)
 
double * getFaceQNew (const tarch::la::Vector< DIMENSIONS, double > &cellCentre, const tarch::la::Vector< DIMENSIONS, double > &cellSize, int axis)
 
double * getFaceQNewDevice (const tarch::la::Vector< DIMENSIONS, double > &cellCentre, const tarch::la::Vector< DIMENSIONS, double > &cellSize, int axis)
 
void copyFacesToDevice ()
 
void copyFacesFromDevice ()
 
int getFaceCardinality ()
 
int getCellQReconstructedCardinality ()
 
int getCellQCardinality ()
 

Static Public Member Functions

static DataRepositorygetInstance ()
 

Private Types

using CellQ = std::array< double, celldata::FVSolverQ::Cardinality >
 
using FaceQNew = std::array< double, facedata::FVSolverQNew::Cardinality >
 

Private Member Functions

 DataRepository ()
 

Private Attributes

DepthLevel _depthLevel
 

Friends

struct celldata::FVSolverQ
 
struct celldata::FVSolverQReconstructed
 

Detailed Description

A singleton repository to manage and provide access to grid cell and face data.

This class holds the memory for all cell-local and face-local data arrays (Q, QReconstructed, etc.) for the entire grid. It uses a keying system based on cell position and refinement depth to uniquely identify and retrieve data for any given cell.

Definition at line 26 of file DataRepository.h.

Member Typedef Documentation

◆ CellQ

using benchmarks::exahype2::kernelbenchmarks::DataRepository::CellQ = std::array<double, celldata::FVSolverQ::Cardinality>
private

Definition at line 108 of file DataRepository.h.

◆ FaceQNew

using benchmarks::exahype2::kernelbenchmarks::DataRepository::FaceQNew = std::array<double, facedata::FVSolverQNew::Cardinality>
private

Definition at line 109 of file DataRepository.h.

Constructor & Destructor Documentation

◆ DataRepository() [1/3]

benchmarks::exahype2::kernelbenchmarks::DataRepository::DataRepository ( const DataRepository )
delete

◆ DataRepository() [2/3]

benchmarks::exahype2::kernelbenchmarks::DataRepository::DataRepository ( DataRepository &&  )
delete

◆ ~DataRepository()

benchmarks::exahype2::kernelbenchmarks::DataRepository::~DataRepository ( )

◆ DataRepository() [3/3]

Member Function Documentation

◆ copyFacesFromDevice()

void benchmarks::exahype2::kernelbenchmarks::DataRepository::copyFacesFromDevice ( )

Definition at line 156 of file DataRepository.cpp.

References _depthLevel, benchmarks::exahype2::kernelbenchmarks::DataRepository::DepthLevel::faces, benchmarks::exahype2::kernelbenchmarks::DataRepository::DepthLevel::facesDevice, and getFaceCardinality().

Referenced by main().

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

◆ copyFacesToDevice()

void benchmarks::exahype2::kernelbenchmarks::DataRepository::copyFacesToDevice ( )

Definition at line 144 of file DataRepository.cpp.

References _depthLevel, benchmarks::exahype2::kernelbenchmarks::DataRepository::DepthLevel::faces, benchmarks::exahype2::kernelbenchmarks::DataRepository::DepthLevel::facesDevice, and getFaceCardinality().

Referenced by main().

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

◆ getCellQ() [1/2]

double * benchmarks::exahype2::kernelbenchmarks::DataRepository::getCellQ ( const tarch::la::Vector< DIMENSIONS, double > &  cellCentre,
const tarch::la::Vector< DIMENSIONS, double > &  cellSize 
)

Definition at line 103 of file DataRepository.cpp.

References cellSize, and getCellQ().

Here is the call graph for this function:

◆ getCellQ() [2/2]

double * benchmarks::exahype2::kernelbenchmarks::DataRepository::getCellQ ( int  index)

Definition at line 101 of file DataRepository.cpp.

References _depthLevel, and benchmarks::exahype2::kernelbenchmarks::DataRepository::DepthLevel::Q.

Referenced by applyInitialConditions(), getCellQ(), main(), plotGrid(), and projectPatchOntoFaces().

Here is the caller graph for this function:

◆ getCellQCardinality()

int benchmarks::exahype2::kernelbenchmarks::DataRepository::getCellQCardinality ( )

Definition at line 97 of file DataRepository.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ getCellQReconstructedCardinality()

int benchmarks::exahype2::kernelbenchmarks::DataRepository::getCellQReconstructedCardinality ( )

Definition at line 99 of file DataRepository.cpp.

Referenced by main().

Here is the caller graph for this function:

◆ getFaceCardinality()

int benchmarks::exahype2::kernelbenchmarks::DataRepository::getFaceCardinality ( )

Definition at line 95 of file DataRepository.cpp.

Referenced by copyFacesFromDevice(), copyFacesToDevice(), DataRepository(), and getFaceQNewDevice().

Here is the caller graph for this function:

◆ getFaceQNew() [1/2]

double * benchmarks::exahype2::kernelbenchmarks::DataRepository::getFaceQNew ( const tarch::la::Vector< DIMENSIONS, double > &  cellCentre,
const tarch::la::Vector< DIMENSIONS, double > &  cellSize,
int  axis 
)

◆ getFaceQNew() [2/2]

double * benchmarks::exahype2::kernelbenchmarks::DataRepository::getFaceQNew ( int  index,
int  axis 
)

Definition at line 115 of file DataRepository.cpp.

References _depthLevel, and benchmarks::exahype2::kernelbenchmarks::DataRepository::DepthLevel::faces.

Referenced by applyBoundaryConditionsToAxis(), and projectPatchOntoFaces().

Here is the caller graph for this function:

◆ getFaceQNewDevice()

double * benchmarks::exahype2::kernelbenchmarks::DataRepository::getFaceQNewDevice ( const tarch::la::Vector< DIMENSIONS, double > &  cellCentre,
const tarch::la::Vector< DIMENSIONS, double > &  cellSize,
int  axis 
)

Definition at line 135 of file DataRepository.cpp.

References _depthLevel, cellSize, benchmarks::exahype2::kernelbenchmarks::DataRepository::DepthLevel::facesDevice, getFaceCardinality(), and benchmarks::exahype2::kernelbenchmarks::DataRepository::Indexing::getFaceIndex().

Referenced by main().

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

◆ getInstance()

DataRepository & benchmarks::exahype2::kernelbenchmarks::DataRepository::getInstance ( )
static

Definition at line 90 of file DataRepository.cpp.

Referenced by applyBoundaryConditionsToAxis(), applyInitialConditions(), main(), plotGrid(), and projectPatchOntoFaces().

Here is the caller graph for this function:

◆ operator=() [1/2]

DataRepository& benchmarks::exahype2::kernelbenchmarks::DataRepository::operator= ( const DataRepository )
delete

◆ operator=() [2/2]

DataRepository& benchmarks::exahype2::kernelbenchmarks::DataRepository::operator= ( DataRepository &&  )
delete

Friends And Related Function Documentation

◆ celldata::FVSolverQ

friend struct celldata::FVSolverQ
friend

Definition at line 105 of file DataRepository.h.

◆ celldata::FVSolverQReconstructed

friend struct celldata::FVSolverQReconstructed
friend

Definition at line 106 of file DataRepository.h.

Field Documentation

◆ _depthLevel

DepthLevel benchmarks::exahype2::kernelbenchmarks::DataRepository::_depthLevel
private

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