Peano
Loading...
Searching...
No Matches
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

References DataRepository().

Referenced by DataRepository(), DataRepository(), getInstance(), operator=(), and operator=().

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

◆ DataRepository() [2/3]

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

References DataRepository().

Here is the call graph for this function:

◆ ~DataRepository()

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

Definition at line 85 of file DataRepository.cpp.

References _depthLevel.

◆ DataRepository() [3/3]

benchmarks::exahype2::kernelbenchmarks::DataRepository::DataRepository ( )
private

Definition at line 72 of file DataRepository.cpp.

References _depthLevel, and getFaceCardinality().

Here is the call graph for this function:

Member Function Documentation

◆ copyFacesFromDevice()

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

Definition at line 157 of file DataRepository.cpp.

References _depthLevel, and getFaceCardinality().

Here is the call graph for this function:

◆ copyFacesToDevice()

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

Definition at line 145 of file DataRepository.cpp.

References _depthLevel, and getFaceCardinality().

Here is the call 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 104 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 102 of file DataRepository.cpp.

References _depthLevel.

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

Here is the caller graph for this function:

◆ getCellQCardinality()

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

Definition at line 98 of file DataRepository.cpp.

◆ getCellQReconstructedCardinality()

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

Definition at line 100 of file DataRepository.cpp.

◆ getFaceCardinality()

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

Definition at line 96 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 )

Definition at line 127 of file DataRepository.cpp.

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

Here is the call graph for this function:

◆ getFaceQNew() [2/2]

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

Definition at line 116 of file DataRepository.cpp.

References _depthLevel.

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 136 of file DataRepository.cpp.

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

Here is the call graph for this function:

◆ getInstance()

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

Definition at line 91 of file DataRepository.cpp.

References DataRepository().

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

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

◆ operator=() [1/2]

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

References DataRepository().

Here is the call graph for this function:

◆ operator=() [2/2]

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

References cellSize, and DataRepository().

Here is the call graph for this function:

◆ celldata::FVSolverQ

friend struct celldata::FVSolverQ
friend

Definition at line 105 of file DataRepository.h.

References celldata::FVSolverQ.

Referenced by celldata::FVSolverQ.

◆ celldata::FVSolverQReconstructed

friend struct celldata::FVSolverQReconstructed
friend

Definition at line 106 of file DataRepository.h.

References celldata::FVSolverQReconstructed.

Referenced by celldata::FVSolverQReconstructed.

Field Documentation

◆ _depthLevel

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

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