![]() |
kspaceFirstOrder3D-OMP
1.1
The C++ implementation of the k-wave toolbox for the time-domain simulation of acoustic wave fields in 3D
|
Class for HDF5 header. More...
#include <HDF5_File.h>

Public Types | |
| enum | THDF5_FileHeaderItems { hdf5_fhi_created_by = 0, hdf5_fhi_creation_date = 1, hdf5_fhi_file_description = 2, hdf5_fhi_major_version = 3, hdf5_fhi_minor_version = 4, hdf5_fhi_file_type = 5, hdf5_fhi_host_name = 6, hdf5_fhi_total_memory_consumption = 7, hdf5_fhi_peak_core_memory_consumption = 8, hdf5_fhi_total_execution_time = 9, hdf5_fhi_data_load_time = 10, hdf5_fhi_preprocessing_time = 11, hdf5_fhi_simulation_time = 12, hdf5_fhi_postprocessing_time = 13, hdf5_fhi_number_of_cores = 14 } |
| List of all header items. | |
| enum | THDF5_FileType { hdf5_ft_input = 0, hdf5_ft_output = 1, hdf5_ft_checkpoint = 2, hdf5_ft_unknown = 3 } |
| HDF5 file type. | |
| enum | THDF5_FileVersion { hdf5_fv_10 = 0, hdf5_fv_11 = 1, hdf5_fv_unknown = 2 } |
| HDF5 file version. | |
Public Member Functions | |
| THDF5_FileHeader () | |
| Constructor. More... | |
| THDF5_FileHeader (const THDF5_FileHeader &other) | |
| Copy constructor. More... | |
| ~THDF5_FileHeader () | |
| Destructor. More... | |
| void | ReadHeaderFromInputFile (THDF5_File &InputFile) |
| Read header from the input file. More... | |
| void | ReadHeaderFromOutputFile (THDF5_File &OutputFile) |
| Read Header from output file (necessary for checkpoint-restart). More... | |
| void | ReadHeaderFromCheckpointFile (THDF5_File &CheckpointFile) |
| Read Header from checkpoint file (necessary for checkpoint-restart). More... | |
| void | WriteHeaderToOutputFile (THDF5_File &OutputFile) |
| Write header to the output file. More... | |
| void | WriteHeaderToCheckpointFile (THDF5_File &CheckpointFile) |
| Write header to the output file. More... | |
| void | SetCodeName (const string &CodeName) |
| Set code name. More... | |
| void | SetActualCreationTime () |
| Set creation time. More... | |
| void | SetMajorFileVersion () |
| Set major file version. | |
| void | SetMinorFileVersion () |
| Set minor file version. | |
| THDF5_FileVersion | GetFileVersion () |
| Set major file version in a string. More... | |
| bool | CheckMajorFileVersion () |
| Check major file version. More... | |
| bool | CheckMinorFileVersion () |
| Check minor file version. More... | |
| THDF5_FileHeader::THDF5_FileType | GetFileType () |
| Get File type. More... | |
| void | SetFileType (const THDF5_FileHeader::THDF5_FileType FileType) |
| Set file type. More... | |
| void | SetHostName () |
| Set host name. More... | |
| void | SetMemoryConsumption (size_t TotalMemory) |
| Set memory consumption. More... | |
| void | SetExecutionTimes (const double TotalTime, const double LoadTime, const double PreProcessingTime, const double SimulationTime, const double PostprocessingTime) |
| Set execution times. More... | |
| void | GetExecutionTimes (double &TotalTime, double &LoadTime, double &PreProcessingTime, double &SimulationTime, double &PostprocessingTime) |
| Get execution times stored in the output file header. More... | |
| void | SetNumberOfCores () |
| Set number of cores. More... | |
Static Public Member Functions | |
| static string | GetCurrentHDF5_MajorVersion () |
| Get string version of current Major version. More... | |
| static string | GetCurrentHDF5_MinorVersion () |
| Get string version of current Minor version. More... | |
Private Member Functions | |
| void | PopulateHeaderFileMap () |
| Populate the map with the header items. More... | |
Private Attributes | |
|
map< THDF5_FileHeaderItems, string > | HDF5_FileHeaderValues |
| map for the header values. | |
|
map< THDF5_FileHeaderItems, string > | HDF5_FileHeaderNames |
| map for the header names. | |
Static Private Attributes | |
| static const string | HDF5_FileTypesNames [] = {"input","output", "checkpoint", "unknown"} |
| String representation of different file types. | |
| static const string | HDF5_MajorFileVersionsNames [] = {"1"} |
| String representations of Major file versions. | |
| static const string | HDF5_MinorFileVersionsNames [] = {"0","1"} |
| String representations of Major file versions. | |
This class manages all information that can be stored in the input output or checkpoint file.
Definition at line 749 of file HDF5_File.h.
| THDF5_FileHeader::THDF5_FileHeader | ( | ) |
Constructor.
Definition at line 1295 of file HDF5_File.cpp.

| THDF5_FileHeader::THDF5_FileHeader | ( | const THDF5_FileHeader & | other | ) |
| THDF5_FileHeader::~THDF5_FileHeader | ( | ) |
Destructor.
Definition at line 1319 of file HDF5_File.cpp.
|
inline |
Check major file version.
Definition at line 863 of file HDF5_File.h.

|
inline |
Check minor file version.
Definition at line 872 of file HDF5_File.h.

|
inlinestatic |
Get string version of current Major version.
Definition at line 829 of file HDF5_File.h.

|
inlinestatic |
Get string version of current Minor version.
Definition at line 839 of file HDF5_File.h.

| void THDF5_FileHeader::GetExecutionTimes | ( | double & | TotalTime, |
| double & | LoadTime, | ||
| double & | PreProcessingTime, | ||
| double & | SimulationTime, | ||
| double & | PostprocessingTime | ||
| ) |
Get execution times stored in the output file header
| [out] | TotalTime | |
| [out] | LoadTime | |
| [out] | PreProcessingTime | |
| [out] | SimulationTime | |
| [out] | PostprocessingTime |
Definition at line 1668 of file HDF5_File.cpp.

| THDF5_FileHeader::THDF5_FileType THDF5_FileHeader::GetFileType | ( | ) |
Get File type.
Definition at line 1514 of file HDF5_File.cpp.

| THDF5_FileHeader::THDF5_FileVersion THDF5_FileHeader::GetFileVersion | ( | ) |
Get File Version an enum
Definition at line 1543 of file HDF5_File.cpp.
|
private |
Create map with names for the header.
Definition at line 1705 of file HDF5_File.cpp.

| void THDF5_FileHeader::ReadHeaderFromCheckpointFile | ( | THDF5_File & | CheckpointFile | ) |
Read the file header form the checkpoint file. We need the header to verify the file version and type
| [in] | CheckpointFile |
Definition at line 1413 of file HDF5_File.cpp.


| void THDF5_FileHeader::ReadHeaderFromInputFile | ( | THDF5_File & | InputFile | ) |
Read header from the input file.
| [in] | InputFile | - Input file to read from |
Definition at line 1332 of file HDF5_File.cpp.

| void THDF5_FileHeader::ReadHeaderFromOutputFile | ( | THDF5_File & | OutputFile | ) |
Read header from output file (necessary for checkpoint-restart). Read only execution times (the others are read from the input file, or calculated based on the very last leg of the simulation). This function is called only if checkpoint-restart is enabled.
| [in] | OutputFile |
Definition at line 1374 of file HDF5_File.cpp.


| void THDF5_FileHeader::SetActualCreationTime | ( | ) |
Set actual date and time.
Definition at line 1565 of file HDF5_File.cpp.

|
inline |
Set code name to the header.
| CodeName | - code version |
Definition at line 816 of file HDF5_File.h.

| void THDF5_FileHeader::SetExecutionTimes | ( | const double | TotalTime, |
| const double | LoadTime, | ||
| const double | PreProcessingTime, | ||
| const double | SimulationTime, | ||
| const double | PostprocessingTime | ||
| ) |
Set execution times in file header.
| [in] | TotalTime | |
| [in] | LoadTime | |
| [in] | PreProcessingTime | |
| [in] | SimulationTime | |
| [in] | PostprocessingTime |
Definition at line 1634 of file HDF5_File.cpp.

| void THDF5_FileHeader::SetFileType | ( | const THDF5_FileHeader::THDF5_FileType | FileType | ) |
Set file type.
| [in] | FileType |
Definition at line 1532 of file HDF5_File.cpp.

| void THDF5_FileHeader::SetHostName | ( | ) |
Set Host name.
Definition at line 1586 of file HDF5_File.cpp.

| void THDF5_FileHeader::SetMemoryConsumption | ( | size_t | TotalMemory | ) |
Set memory consumption.
| [in] | TotalMemory |
Definition at line 1613 of file HDF5_File.cpp.


| void THDF5_FileHeader::SetNumberOfCores | ( | ) |
Set Number of cores.
Definition at line 1686 of file HDF5_File.cpp.


| void THDF5_FileHeader::WriteHeaderToCheckpointFile | ( | THDF5_File & | CheckpointFile | ) |
Write header to the output file (only a subset of all possible fields are written).
| [in] | CheckpointFile |
Definition at line 1473 of file HDF5_File.cpp.


| void THDF5_FileHeader::WriteHeaderToOutputFile | ( | THDF5_File & | OutputFile | ) |
Write header into the output file.
| [in] | OutputFile |
Definition at line 1451 of file HDF5_File.cpp.

