Peano
exahype2::CellFaceData< inType, outType > Struct Template Reference

Represents the faces of one cell, with a total of 2*Dim faces per cell For ADER QIn will contain the values, QOut would contain the fluxes The faces can still each be made to contain either only the values for the given cell, or those and the neighbours' values. More...

#include <CellFaceData.h>

Public Member Functions

 CellFaceData (inType *QIn_[2 *DIMENSIONS], const tarch::la::Vector< DIMENSIONS, double > &cellCentre_, const tarch::la::Vector< DIMENSIONS, double > &cellSize_, double t_, double dt_, outType *QOut_[2 *DIMENSIONS], tarch::MemoryLocation memoryLocation_=tarch::MemoryLocation::Heap, int targetDevice_=tarch::accelerator::Device::DefaultDevice)
 Construct patch data object for one single cell. More...
 
 CellFaceData (int numberOfCells_, tarch::MemoryLocation memoryLocation_=tarch::MemoryLocation::Heap, int targetDevice_=tarch::accelerator::Device::DefaultDevice)
 
 CellFaceData (const CellFaceData &copy)=delete
 
CellFaceDataoperator= (const CellFaceData &)=delete
 
 ~CellFaceData ()
 
std::string toString () const
 

Data Fields

inType *(* QIn )[2 *DIMENSIONS]
 QIn may not be const, as some kernels delete it straightaway once the input data has been handled. More...
 
tarch::la::Vector< DIMENSIONS, double > * cellCentre
 
tarch::la::Vector< DIMENSIONS, double > * cellSize
 
double * t
 
double * dt
 
int * id
 Id of underlying task. More...
 
const int numberOfCells
 As we store data as SoA, we have to know how big the actual arrays are. More...
 
const tarch::MemoryLocation memoryLocation
 We might want to allocate data on the heap or an accelerator, therefore we save the target device id. More...
 
const int targetDevice
 We might want to allocate data on an accelerator, therefore we save the target device id. More...
 
outType *(* QOut )[2 *DIMENSIONS]
 Out values. More...
 

Detailed Description

template<typename inType = double, typename outType = double>
struct exahype2::CellFaceData< inType, outType >

Represents the faces of one cell, with a total of 2*Dim faces per cell For ADER QIn will contain the values, QOut would contain the fluxes The faces can still each be made to contain either only the values for the given cell, or those and the neighbours' values.

Definition at line 20 of file CellFaceData.h.

Constructor & Destructor Documentation

◆ CellFaceData() [1/3]

template<typename inType , typename outType >
exahype2::CellFaceData< inType, outType >::CellFaceData ( inType *  QIn_[2 *DIMENSIONS],
const tarch::la::Vector< DIMENSIONS, double > &  cellCentre_,
const tarch::la::Vector< DIMENSIONS, double > &  cellSize_,
double  t_,
double  dt_,
outType *  QOut_[2 *DIMENSIONS],
tarch::MemoryLocation  memoryLocation_ = tarch::MemoryLocation::Heap,
int  targetDevice_ = tarch::accelerator::Device::DefaultDevice 
)

Construct patch data object for one single cell.

Usually, I do so only to be able to use the same kernels everywhere: Kernels accept CellFaceData, i.e. multiple patches. Even if we have only one cell, we thus wrap this cell's data into an instance of CellFaceData and pass it in. The id can be set to any dummy in this case, as we know which task has wrapped this single cell, i.e. we usually do not read it later.

Definition at line 99 of file CellFaceData.h.

References exahype2::CellFaceData< inType, outType >::cellCentre, exahype2::CellFaceData< inType, outType >::cellSize, exahype2::CellFaceData< inType, outType >::dt, exahype2::CellFaceData< inType, outType >::QIn, exahype2::CellFaceData< inType, outType >::QOut, and exahype2::CellFaceData< inType, outType >::t.

◆ CellFaceData() [2/3]

template<typename inType , typename outType >
exahype2::CellFaceData< inType, outType >::CellFaceData ( int  numberOfCells_,
tarch::MemoryLocation  memoryLocation_ = tarch::MemoryLocation::Heap,
int  targetDevice_ = tarch::accelerator::Device::DefaultDevice 
)

◆ CellFaceData() [3/3]

template<typename inType = double, typename outType = double>
exahype2::CellFaceData< inType, outType >::CellFaceData ( const CellFaceData< inType, outType > &  copy)
delete

◆ ~CellFaceData()

template<typename inType , typename outType >
exahype2::CellFaceData< inType, outType >::~CellFaceData

Definition at line 155 of file CellFaceData.h.

References cellSize, CSVConvert::dt, and acoustic::t.

Member Function Documentation

◆ operator=()

template<typename inType = double, typename outType = double>
CellFaceData& exahype2::CellFaceData< inType, outType >::operator= ( const CellFaceData< inType, outType > &  )
delete

◆ toString()

template<typename inType , typename outType >
std::string exahype2::CellFaceData< inType, outType >::toString

Definition at line 173 of file CellFaceData.h.

References cellSize, CSVConvert::dt, performance_testbed::msg, and acoustic::t.

Field Documentation

◆ cellCentre

template<typename inType = double, typename outType = double>
tarch::la::Vector<DIMENSIONS, double>* exahype2::CellFaceData< inType, outType >::cellCentre

◆ cellSize

template<typename inType = double, typename outType = double>
tarch::la::Vector<DIMENSIONS, double>* exahype2::CellFaceData< inType, outType >::cellSize

◆ dt

template<typename inType = double, typename outType = double>
double* exahype2::CellFaceData< inType, outType >::dt

◆ id

template<typename inType = double, typename outType = double>
int* exahype2::CellFaceData< inType, outType >::id

Id of underlying task.

Required when we fuse many enclave tasks and load them off to the GPU, as we have to know afterwards which outcome corresponds to which task.

Definition at line 37 of file CellFaceData.h.

◆ memoryLocation

template<typename inType = double, typename outType = double>
const tarch::MemoryLocation exahype2::CellFaceData< inType, outType >::memoryLocation

We might want to allocate data on the heap or an accelerator, therefore we save the target device id.

Definition at line 49 of file CellFaceData.h.

◆ numberOfCells

template<typename inType = double, typename outType = double>
const int exahype2::CellFaceData< inType, outType >::numberOfCells

As we store data as SoA, we have to know how big the actual arrays are.

Definition at line 43 of file CellFaceData.h.

◆ QIn

template<typename inType = double, typename outType = double>
inType*(* exahype2::CellFaceData< inType, outType >::QIn)[2 *DIMENSIONS]

QIn may not be const, as some kernels delete it straightaway once the input data has been handled.

Definition at line 25 of file CellFaceData.h.

Referenced by exahype2::CellFaceData< inType, outType >::CellFaceData(), firstTask(), initialTask(), variant1::runBenchmarks(), variant2::runBenchmarks(), variant3::runBenchmarks(), runKernels(), and secondTask().

◆ QOut

template<typename inType = double, typename outType = double>
outType*(* exahype2::CellFaceData< inType, outType >::QOut)[2 *DIMENSIONS]

◆ t

template<typename inType = double, typename outType = double>
double* exahype2::CellFaceData< inType, outType >::t

◆ targetDevice

template<typename inType = double, typename outType = double>
const int exahype2::CellFaceData< inType, outType >::targetDevice

We might want to allocate data on an accelerator, therefore we save the target device id.

Definition at line 55 of file CellFaceData.h.


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