60 :
BaseOutputStream(file, datasetName, sourceMatrix, reductionOp, bufferToReuse),
178 #pragma omp parallel for simd 188 #pragma omp parallel for simd 198 #pragma omp parallel for simd virtual void create()
Create a HDF5 stream and allocate data for it.
hid_t openDataset(const hid_t parentGroup, MatrixName &datasetName)
Open a dataset at a specified place in the file tree.
Calculate root mean square.
The class for real matrices.
virtual void freeMemory()
Free memory.
WholeDomainOutputStream()=delete
Default constructor not allowed.
size_t getCompressionLevel() const
Get compression level.
std::string mRootObjectName
HDF5 group/dataset in the output file where to store data in.
hid_t getRootGroup() const
Get handle to the root group of the file.
const ReduceOperator mReduceOp
Reduction operator.
void writeCuboidToHyperSlab(const hid_t dataset, const DimensionSizes &hyperslabPosition, const DimensionSizes &cuboidPosition, const DimensionSizes &cuboidSize, const DimensionSizes &matrixDimensions, const float *matrixData)
Write a cuboid selected within the matrixData into a hyperslab.
hid_t mDataset
Handle to a HDF5 dataset.
Class storing all parameters of the simulation.
virtual void allocateMemory()
Allocate memory using proper memory alignment.
size_t mSampledTimeStep
Time step to store (N/A for aggregated).
virtual void postProcess()
Apply post-processing on the buffer and flush it to the file.
Store actual data (time series).
virtual size_t size() const
Size of the matrix.
virtual void flushBufferToFile()
Flush the buffer to the file.
The header file containing the parameters of the simulation.
void writeMatrixDomainType(const hid_t parentGroup, MatrixName &datasetName, const MatrixDomainType &matrixDomainType)
Write matrix data type into the dataset at a specified place in the file tree.
void closeDataset(const hid_t dataset)
Close dataset.
size_t nt
Number of time steps (for time series datasets).
void writeMatrixDataType(const hid_t parentGroup, MatrixName &datasetName, const MatrixDataType &matrixDataType)
Write matrix data type into the dataset at a specified place in the file tree.
size_t getSamplingStartTimeIndex() const
Get start time index when sensor data collection begins.
Class wrapping the HDF5 routines.
virtual void checkpoint()
Checkpoint the stream and close.
size_t mBufferSize
Buffer size.
void writeHyperSlab(const hid_t dataset, const DimensionSizes &position, const DimensionSizes &size, const T *data)
Write a hyperslab into the dataset.
const std::string MatrixName
Datatype for matrix names.
Structure with 4D dimension sizes (3 in space and 1 in time).
The matrix is stored in floating point 32b wide format.
Hdf5File & mFile
Handle to HDF5 output file.
virtual void close()
Close stream (apply post-processing if necessary, flush data and close).
size_t ny
Number of elements in the y direction.
size_t getTimeIndex() const
Get actual simulation time step.
const RealMatrix & mSourceMatrix
Source matrix to be sampled.
float * mStoreBuffer
Temporary buffer for store - only if Buffer Reuse = false!
virtual void postProcess()
Apply post-processing on the buffer and flush it to the file.
ReduceOperator
How to aggregate data.
virtual float * getData()
Get raw data out of the class (for direct kernel access).
void readCompleteDataset(const hid_t parentGroup, MatrixName &datasetName, const DimensionSizes &dimensionSizes, T *data)
Read data from the dataset at a specified place in the file tree.
virtual ~WholeDomainOutputStream()
Destructor.
size_t nx
Number of elements in the x direction.
static Parameters & getInstance()
Get instance of the singleton class.
virtual void reopen()
Reopen the output stream after restart and reload data.
virtual const DimensionSizes & getDimensionSizes() const
Get dimension sizes of the matrix.
The header file of the class saving whole RealMatrix into the output HDF5 file, e.g. p_max_all.
hid_t createDataset(const hid_t parentGroup, MatrixName &datasetName, const DimensionSizes &dimensionSizes, const DimensionSizes &chunkSizes, const MatrixDataType matrixDataType, const size_t compressionLevel)
Create a float HDF5 dataset at a specified place in the file tree (3D/4D).
Abstract base class for output data streams (sampled data).
virtual void sample()
Sample data into buffer and apply reduction, or flush to disk (no sensor mask here).
The matrix is defined on real domain.
bool mBufferReuse
if true, the container reuses another matrix as scratch place, e.g. Temp_1_RS3D, Temp_2_RS3D, Temp_3_RS3D.