PlasCom2  1.0
XPACC Multi-physics simluation application
pcpp::io::hdf5 Namespace Reference

Classes

class  base
 
struct  configuration
 

Functions

int FileInfo (const std::string &hdfFileName, pcpp::io::simfileinfo &fileInfo, std::ostream &messageStream)
 
int FileInfo (const std::string &hdfFileName, pcpp::io::simfileinfo &fileInfo, fixtures::CommunicatorType &inComm, std::ostream &messageStream)
 
template<typename GridType >
int ReadGrid (hid_t parentGroupID, const configuration &hdfConfig, const std::string &gridName, GridType &gridData, fixtures::CommunicatorType &inComm, std::ostream &messageStream)
 
template<typename GridType >
int ParallelReadBlockStructuredGrid (const std::string &gridName, const std::string &parentGroupName, GridType &gridData, configuration &hdfConfig, const std::string &hdfFileName, fixtures::CommunicatorType &gridComm, std::ostream &messageStream)
 
template<typename GridType >
int WriteGrid (const GridType &inGrid, const std::string &gridName, const std::string &parentPath, base &hdfFile)
 
template<typename GridType >
int ReadGrid (GridType &inGrid, const std::string &gridPath, base &hdfFile, bool reverseRead=true)
 
template<typename StateType >
int WriteStateAttributes (const StateType &inState, const char attributeLocation, const std::string &filePath, base &hdfFile)
 Writes state data matching attributeLocation into HDF5 attributes at filePath. More...
 
template<typename StateType >
int ReadStateAttributes (StateType &inState, const char attributeLocation, const std::string &filePath, base &hdfFile)
 Reads state data matching attributeLocation into HDF5 attributes at filePath. More...
 
template<typename StateType >
int WriteStateNodeData (const StateType &inState, const std::vector< size_t > &gridSizes, const std::vector< size_t > &partitionSizes, const std::vector< size_t > &partitionStarts, const std::vector< size_t > &bufferSizes, const std::vector< size_t > &partitionBufferStarts, const std::string &filePath, base &hdfFile)
 
template<typename StateType >
int ReadStateNodeData (StateType &inState, const std::vector< size_t > &gridSizes, const std::vector< size_t > &partitionSizes, const std::vector< size_t > &partitionStarts, const std::vector< size_t > &bufferSizes, const std::vector< size_t > &partitionBufferStarts, const std::string &filePath, base &hdfFile, bool reverseRead=true)
 
int PlasCom2FileInfo (pcpp::io::hdf5::base &hdf5File, simfileinfo &fileInfo, std::ostream &messageStream)
 
template<typename GridType >
int FetchGridData (GridType &inGrid, const std::string &gridName, const std::string &gridFileName, std::ostream &messageStream)
 
template<typename StateType , typename GridType >
int FetchStateData (const std::string &fileName, const std::string &domainName, GridType &inGrid, StateType &inState, std::ostream &messageStream)
 
int LegacyFileInfo (hid_t rootGroupID, simfileinfo &fileInfo, std::ostream &messageStream)
 
int LegacyFileInfo (pcpp::io::hdf5::base &hdf5File, simfileinfo &fileInfo, std::ostream &messageStream)
 

Function Documentation

◆ FetchGridData()

int pcpp::io::hdf5::FetchGridData ( GridType &  inGrid,
const std::string &  gridName,
const std::string &  gridFileName,
std::ostream &  messageStream 
)

Definition at line 1746 of file PCPPHDF5.H.

References base::Close(), FileInfo(), simfileinfo::formatBits, pcpp::io::HASGEOMETRY, pcpp::io::ISLEGACY, base::Open(), CommunicatorObject::Rank(), and ReadGrid().

Referenced by application::ConfigureSimulation(), and TestPlasCom2Input().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FetchStateData()

int pcpp::io::hdf5::FetchStateData ( const std::string &  fileName,
const std::string &  domainName,
GridType &  inGrid,
StateType &  inState,
std::ostream &  messageStream 
)
Todo:
fix hard-coded grid name in pcpp hdf5 state fetch

Definition at line 1816 of file PCPPHDF5.H.

References bufferSizes, base::Close(), simulation::state::ConvertLegacyState(), base::Exists(), FileInfo(), simfileinfo::formatBits, gridSizes, pcpp::io::HASSIMULATION, pcpp::io::ISLEGACY, numPoints, base::Open(), CommunicatorObject::Rank(), ReadStateAttributes(), and ReadStateNodeData().

Referenced by application::RunPlasCom2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FileInfo() [1/2]

int FileInfo ( const std::string &  hdfFileName,
pcpp::io::simfileinfo fileInfo,
std::ostream &  messageStream 
)

◆ FileInfo() [2/2]

int FileInfo ( const std::string &  hdfFileName,
pcpp::io::simfileinfo fileInfo,
fixtures::CommunicatorType inComm,
std::ostream &  messageStream 
)

Definition at line 666 of file PCPPHDF5.C.

References CommunicatorObject::Check(), FileInfo(), CommunicatorObject::Rank(), CommunicatorObject::SetErr(), and CommunicatorObject::StreamBroadCast().

Here is the call graph for this function:

◆ LegacyFileInfo() [1/2]

◆ LegacyFileInfo() [2/2]

◆ ParallelReadBlockStructuredGrid()

int pcpp::io::hdf5::ParallelReadBlockStructuredGrid ( const std::string &  gridName,
const std::string &  parentGroupName,
GridType &  gridData,
configuration hdfConfig,
const std::string &  hdfFileName,
fixtures::CommunicatorType gridComm,
std::ostream &  messageStream 
)

Definition at line 1089 of file PCPPHDF5.H.

References CommunicatorObject::Comm().

Here is the call graph for this function:

◆ PlasCom2FileInfo()

◆ ReadGrid() [1/2]

int pcpp::io::hdf5::ReadGrid ( hid_t  parentGroupID,
const configuration hdfConfig,
const std::string &  gridName,
GridType &  gridData,
fixtures::CommunicatorType inComm,
std::ostream &  messageStream 
)

Definition at line 927 of file PCPPHDF5.H.

References configuration::collectiveMode, and numPoints.

Referenced by FetchGridData(), plascom2::io::hdf5::ReadSingle(), plascom2::io::hdf5::ReadSingleState(), TestHDF5GridIO(), and TestHDF5PBSGridIO().

Here is the caller graph for this function:

◆ ReadGrid() [2/2]

int pcpp::io::hdf5::ReadGrid ( GridType &  inGrid,
const std::string &  gridPath,
base hdfFile,
bool  reverseRead = true 
)

Definition at line 1255 of file PCPPHDF5.H.

References bufferSize, apptools::DumpContents(), base::Exists(), CommunicatorObject::Rank(), base::ReadAttribute(), and base::ReadHyperSlab().

Here is the call graph for this function:

◆ ReadStateAttributes()

int pcpp::io::hdf5::ReadStateAttributes ( StateType &  inState,
const char  attributeLocation,
const std::string &  filePath,
base hdfFile 
)

Reads state data matching attributeLocation into HDF5 attributes at filePath.

Loops through state metadata to find data items with location of attributeLocation and reads each from an HDF5 attribute (if it exists) at the filePath within the given HDF5 file.

Check data size against attribute dataspace and toss an error on mismatch

Definition at line 1466 of file PCPPHDF5.H.

References metadata::dsize, base::Exists(), metadata::loc, metadata::name, metadata::ncomp, and base::ReadAttribute().

Referenced by FetchStateData(), plascom2::io::hdf5::ReadSingle(), plascom2::io::hdf5::ReadSingleState(), and TestHDF5PBSGridIO().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadStateNodeData()

int pcpp::io::hdf5::ReadStateNodeData ( StateType &  inState,
const std::vector< size_t > &  gridSizes,
const std::vector< size_t > &  partitionSizes,
const std::vector< size_t > &  partitionStarts,
const std::vector< size_t > &  bufferSizes,
const std::vector< size_t > &  partitionBufferStarts,
const std::string &  filePath,
base hdfFile,
bool  reverseRead = true 
)
Todo:
bring this back as an object-local message [mtc]

Definition at line 1629 of file PCPPHDF5.H.

References metadata::dsize, base::Exists(), metadata::loc, metadata::name, metadata::ncomp, numPointsBuffer, PlasCom2FileInfo(), and base::ReadHyperSlab().

Referenced by FetchStateData(), plascom2::io::hdf5::ReadSingle(), plascom2::io::hdf5::ReadSingleState(), and TestHDF5PBSGridIO().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteGrid()

int pcpp::io::hdf5::WriteGrid ( const GridType &  inGrid,
const std::string &  gridName,
const std::string &  parentPath,
base hdfFile 
)

Definition at line 1131 of file PCPPHDF5.H.

References bufferSize, base::CreateAttribute(), base::CreateGroup(), base::Exists(), sizeextent::InitSimple(), and base::WriteHyperSlab().

Referenced by plascom2::io::hdf5::OutputSingle(), TestGrid_RectilinearMetric(), TestHDF5GridIO(), TestHDF5PBSGridIO(), and TestPlasCom2Output().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteStateAttributes()

int pcpp::io::hdf5::WriteStateAttributes ( const StateType &  inState,
const char  attributeLocation,
const std::string &  filePath,
base hdfFile 
)

Writes state data matching attributeLocation into HDF5 attributes at filePath.

Loops through state metadata to find data items with location of attributeLocation and writes each to an HDF5 attribute at the filePath within the given HDF5 file.

Definition at line 1411 of file PCPPHDF5.H.

References base::CreateAttribute(), metadata::dsize, base::Exists(), metadata::loc, metadata::name, and metadata::ncomp.

Referenced by plascom2::io::hdf5::OutputSingle(), TestHDF5PBSGridIO(), and TestPlasCom2Output().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WriteStateNodeData()

int pcpp::io::hdf5::WriteStateNodeData ( const StateType &  inState,
const std::vector< size_t > &  gridSizes,
const std::vector< size_t > &  partitionSizes,
const std::vector< size_t > &  partitionStarts,
const std::vector< size_t > &  bufferSizes,
const std::vector< size_t > &  partitionBufferStarts,
const std::string &  filePath,
base hdfFile 
)

Definition at line 1516 of file PCPPHDF5.H.

References metadata::dsize, base::Exists(), metadata::loc, metadata::name, metadata::ncomp, numPointsBuffer, base::OpenGroup(), and base::WriteHyperSlab().

Referenced by plascom2::io::hdf5::OutputSingle(), TestHDF5PBSGridIO(), and TestPlasCom2Output().

Here is the call graph for this function:
Here is the caller graph for this function: