33 #ifndef MATRIXCONTAINER_H
34 #define MATRIXCONTAINER_H
59 ux_sgx,uy_sgy, uz_sgz,
60 ux_shifted, uy_shifted, uz_shifted,
62 dxudxn , dyudyn , dzudzn,
63 dxudxn_sgx, dyudyn_sgy, dzudzn_sgz,
65 rhox, rhoy, rhoz, rho0,
66 dt_rho0_sgx, dt_rho0_sgy, dt_rho0_sgz,
68 p0_source_input, sensor_mask_index, sensor_mask_corners,
69 ddx_k_shift_pos, ddy_k_shift_pos, ddz_k_shift_pos,
70 ddx_k_shift_neg, ddy_k_shift_neg, ddz_k_shift_neg,
71 x_shift_neg_r, y_shift_neg_r, z_shift_neg_r,
72 pml_x_sgx, pml_y_sgy, pml_z_sgz,
73 pml_x , pml_y , pml_z,
75 absorb_tau, absorb_eta, absorb_nabla1, absorb_nabla2, BonA,
77 ux_source_input, uy_source_input, uz_source_input,
80 u_source_index, p_source_index, transducer_source_input,
84 p_sensor_raw, p_sensor_rms, p_sensor_max, p_sensor_min,
85 p_sensor_max_all, p_sensor_min_all,
86 ux_sensor_raw, uy_sensor_raw, uz_sensor_raw,
88 ux_shifted_sensor_raw, uy_shifted_sensor_raw, uz_shifted_sensor_raw,
89 ux_sensor_rms, uy_sensor_rms, uz_sensor_rms,
90 ux_sensor_max, uy_sensor_max, uz_sensor_max,
91 ux_sensor_min, uy_sensor_min, uz_sensor_min,
92 ux_sensor_max_all, uy_sensor_max_all, uz_sensor_max_all,
93 ux_sensor_min_all, uy_sensor_min_all, uz_sensor_min_all,
97 Temp_1_RS3D, Temp_2_RS3D, Temp_3_RS3D,
98 FFT_X_temp, FFT_Y_temp, FFT_Z_temp, FFT_shift_temp
239 template <
typename T>
264 const string HDF5MatrixName,
340 const char * HDF5_DatasetName,
342 float * BufferToReuse = NULL);
TMatrixRecord & GetMatrixRecord(const TMatrixID MatrixID)
Get matrix record (data and information).
bool LoadData
Is the matrix content loaded from the HDF5 file.
void AddStreamsIntoContainer(TMatrixContainer &MatrixContainer)
Create all streams in container (no file manipulation).
void StoreDataIntoCheckpointHDF5File(THDF5_File &HDF5_File)
Store selected matrices into the checkpoint file.
TReductionOperator
How to aggregate data.
Abstract base class, the common ancestor defining the common interface and allowing derived classes t...
TMatrixRecordContainer MatrixContainer
Map holding the container.
bool empty() const
Is the container empty?
bool empty() const
Is the container empty?
TOutputStreamContainer()
Constructor.
The header file containing the class for real matrices.
void FreeAllStreams()
Free all streams - destroy them.
virtual ~TMatrixContainer()
Destructor.
size_t size() const
Get size of the container.
The header file containing the particle velocity matrix.
TMatrixRecord & operator[](const TMatrixID MatrixID)
operator [].
bool Checkpoint
Is the matrix necessary to be preserver when checkpoint is enabled.
TMatrixDataType MatrixDataType
Matrix data type.
void FreeAllMatrices()
Free all matrices - destroy them.
map< TMatrixID, TBaseOutputHDF5Stream * > TOutputStreamMap
Output stream map.
TMatrixRecord & operator=(const TMatrixRecord &src)
operator =
The header file of classes responsible for storing output quantities into the output HDF5 file...
map< TMatrixID, TMatrixRecord > TMatrixRecordContainer
Datatype for map associating the matrix ID enum and matrix record.
The header file containing the class for 64b integer matrices.
TBaseOutputHDF5Stream * CreateNewOutputStream(TMatrixContainer &MatrixContainer, const TMatrixID SampledMatrixID, const char *HDF5_DatasetName, const TBaseOutputHDF5Stream::TReductionOperator ReductionOp, float *BufferToReuse=NULL)
TMatrixID
Matrix identifers of all matrices in the k-space code.
void SampleStreams()
Sample all streams.
void LoadDataFromInputHDF5File(THDF5_File &HDF5_File)
Load all matrices from the HDF5 file.
The header file storing names of all variables.
string HDF5MatrixName
HDF5 matrix name.
void ReopenStreams()
Reopen streams after checkpoint file (datasets).
TOutputStreamContainer & operator=(TOutputStreamContainer &)
Operator = not allowed for public.
The header file containing the structure with 3D dimension sizes.
Abstract base class for output data streams (sampled data).
Class implementing the matrix container.
TBaseMatrix * MatrixPtr
Pointer to the matrix object.
TMatrixContainer()
Constructor.
The header file with the class for complex matrices.
TDimensionSizes DimensionSizes
Matrix dimension sizes.
A structure storing details about the matrix. The matrix container stores this structures.
TMatrixContainer & operator=(const TMatrixContainer &src)
Operator = is not allowed for public.
TOutputStreamMap OutputStreamContainer
Map with output streams.
void SetAllValues(TBaseMatrix *MatrixPtr, const TMatrixDataType MatrixDataType, const TDimensionSizes DimensionSizes, const bool LoadData, const bool Checkpoint, const string HDF5MatrixName)
Set all values of the record.
void CheckpointStreams()
Checkpoint streams.
TMatrixDataType
All possible types of the matrix.
virtual ~TOutputStreamContainer()
Destructor.
The header file containing the base class for single precisions floating point numbers (floats) ...
TBaseOutputHDF5Stream & operator[](const TMatrixID MatrixID)
Operator [].
void CreateStreams()
Create all streams - opens the datasets.
T & GetMatrix(const TMatrixID MatrixID)
Get the matrix with a specific type from the container.
void AddMatricesIntoContainer()
Set all matrices recored - populate the container.
void LoadDataFromCheckpointHDF5File(THDF5_File &HDF5_File)
Load all matrices from the HDF5 file.
size_t size() const
Get number of matrices in the container.
void PrintErrorAndThrowException(const char *FMT, const string HDF5MatrixName, const char *File, const int Line)
Print error and throw an exception.
void CloseStreams()
Close all streams.
TMatrixRecord()
Default constructor.
A container for output streams.
The header file of the common ancestor of all matrix classes. A pure abstract class.
void CreateAllObjects()
Create instances of all objects in the container.
Class wrapping the HDF5 routines.
Structure with 4D dimension sizes (3 in space and 1 in time).
void PostProcessStreams()
Post-process all streams and flush them to the file.
The header file containing the class that implements 3D FFT using the FFTW interface.