18 class CheckpointReader;
95 const std::string& indexFileName,
105 static void release(
const std::string& indexFileName);
108 const std::string& indexFileName,
137 double* patchWithHalo
158 using Key = std::array<long long, Dimensions + 1>;
163 static std::map<std::string, std::unique_ptr<CheckpointReader>>
_instances;
187 const std::string& indexFileName,
static tarch::multicore::BooleanSemaphore _semaphore
std::vector< std::string > readIndexFile(const std::string &indexFileName, double timeStamp)
Files of the selected dataset in the index file.
const tarch::la::Vector< Dimensions, double > _domainSize
const std::string & getMetaData() const
Content of the meta-data block of the dataset's files, i.e.
static void release(const std::string &indexFileName)
Free the reader of an index file, if there is one.
std::vector< peano4::grid::GridControlEvent > _refinementEvents
std::map< Key, int > _patchIndex
const std::vector< peano4::grid::GridControlEvent > & getRefinementEvents() const
Refinement events which reconstruct the checkpoint's mesh.
static std::map< std::string, std::unique_ptr< CheckpointReader > > _instances
void readPatchFile(const std::string &fileName)
Key toKey(const tarch::la::Vector< Dimensions, double > &cellOffset, const tarch::la::Vector< Dimensions, double > &cellH) const
Level and integer index of a cell within the regular grid of its level.
void createRefinementEvents()
static tarch::logging::Log _log
static CheckpointReader & getInstance(const std::string &indexFileName, double timeStamp, int haloWidth, const tarch::la::Vector< Dimensions, double > &domainOffset, const tarch::la::Vector< Dimensions, double > &domainSize)
Reader of a checkpoint dataset.
std::vector< std::vector< double > > _patchData
double getTimeStamp() const
Time stamp of the dataset as given in the index file.
CheckpointReader(const std::string &indexFileName, double timeStamp, int haloWidth, const tarch::la::Vector< Dimensions, double > &domainOffset, const tarch::la::Vector< Dimensions, double > &domainSize)
int getNumberOfPatches() const
bool readPatch(const tarch::la::Vector< Dimensions, double > &cellCentre, const tarch::la::Vector< Dimensions, double > &cellH, int numberOfEntries, double *patchWithHalo) const
Copy the data of a cell's patch including its halo.
std::array< long long, Dimensions+1 > Key
Integer index of the cell per axis, followed by its level.
const tarch::la::Vector< Dimensions, double > _domainOffset
This file is part of the ExaHyPE 2 project within Peano 4.