|
IFEM
90A354
|
Write data to a HDF5 file. More...
#include <HDF5Writer.h>


Public Member Functions | |
| HDF5Writer (const std::string &name, const ProcessAdm &adm, bool append=false) | |
| The constructor opens a named HDF5-file. More... | |
| virtual | ~HDF5Writer () |
| Empty destructor. | |
| virtual int | getLastTimeLevel () |
| Returns the last time level stored in the HDF5 file. | |
| virtual void | openFile (int level) |
| Opens the file at a given time level. More... | |
| virtual void | closeFile (int level) |
| Closes the file. More... | |
| virtual void | writeVector (int level, const DataEntry &entry) |
| Writes a vector to file. More... | |
| virtual void | writeSIM (int level, double time, const DataEntry &entry, bool geometryUpdated, const std::string &prefix) |
| Writes data from a SIM to file. More... | |
| virtual void | writeNodalForces (int level, const DataEntry &entry) |
| Writes nodal forces to file. More... | |
| virtual void | writeKnotspan (int level, const DataEntry &entry, const std::string &prefix) |
| Writes knot span field to file. More... | |
| virtual void | writeBasis (int level, const DataEntry &entry, const std::string &prefix) |
| Writes a basis to file. More... | |
| virtual bool | writeTimeInfo (int level, double time) |
| Writes time stepping info to file. More... | |
| virtual bool | writeLog (const std::string &data, const std::string &name) |
| Write a log to output file. More... | |
Public Member Functions inherited from DataWriter | |
| virtual | ~DataWriter () |
| Empty destructor. | |
| const std::string & | getName () const |
| Returns the name of the file. | |
Public Member Functions inherited from HDF5Base | |
| HDF5Base (const std::string &name, const ProcessAdm &adm) | |
| The constructor opens a named HDF5-file. More... | |
| virtual | ~HDF5Base () |
| The destructor closes the file. | |
Additional Inherited Members | |
Protected Member Functions inherited from DataWriter | |
| DataWriter (const std::string &name, const ProcessAdm &adm, const char *defaultExt=nullptr) | |
| Protected constructor as this is a purely virtual class. | |
Protected Member Functions inherited from HDF5Base | |
| bool | openFile (unsigned int flag) |
| Opens the HDF5 file. More... | |
| void | closeFile () |
| Closes the HDF5 file. | |
Protected Attributes inherited from DataWriter | |
| std::string | m_name |
| File name. | |
| int | m_size |
| Number of MPI nodes (processors) | |
| int | m_rank |
| MPI rank (processor ID) | |
Protected Attributes inherited from HDF5Base | |
| std::string | m_hdf5_name |
| The file name of the HDF5 file. | |
Write data to a HDF5 file.
The HDF5 writer writes data to a HDF5 file. It supports parallel I/O.
| HDF5Writer::HDF5Writer | ( | const std::string & | name, |
| const ProcessAdm & | adm, | ||
| bool | append = false |
||
| ) |
The constructor opens a named HDF5-file.
| [in] | name | The name (without extension) of the data file |
| [in] | adm | The process administrator |
| [in] | append | Whether to append to or overwrite an existing file |
References DataWriter::m_name.
|
virtual |
|
virtual |
Opens the file at a given time level.
| [in] | level | The requested time level |
Implements DataWriter.
References HDF5_SANITY_LIMIT, DataWriter::m_name, and HDF5Base::openFile().
|
virtual |
Writes a basis to file.
| [in] | level | The time level to write the basis at |
| [in] | entry | The DataEntry describing the basis |
| [in] | prefix | Prefix for basis |
Implements DataWriter.
References SIMbase::getName(), DataExporter::L2G_NODE, and DataExporter::REDUNDANT.
Referenced by writeSIM().
|
virtual |
Writes knot span field to file.
| [in] | level | The time level to write the data at |
| [in] | entry | The DataEntry describing the field |
| [in] | prefix | Prefix for field |
Implements DataWriter.
References utl::matrix< T >::cols(), SIMbase::extractPatchElmRes(), utl::matrix< T >::fillRow(), SIMbase::getLocalPatchIndex(), SIMbase::getName(), SIMbase::getNoPatches(), SIMadmin::getProcessAdm(), ProcessAdm::getProcId(), utl::matrix< T >::getRow(), ProcessAdm::isParallel(), utl::vector< T >::ptr(), and utl::vector< T >::size().
|
virtual |
|
virtual |
Writes nodal forces to file.
| [in] | level | The time level to write the data at |
| [in] | entry | The DataEntry describing the data to write |
Implements DataWriter.
References GlbForceVec::getForce(), SIMbase::getNodeCoord(), DataWriter::m_rank, utl::vector< T >::ptr(), GlbForceVec::size(), and utl::vector< T >::size().
|
virtual |
Writes data from a SIM to file.
| [in] | level | The time level to write the data at |
| [in] | time | Current time |
| [in] | entry | The DataEntry describing the data to write |
| [in] | geometryUpdated | Whether or not geometries should be written |
| [in] | prefix | Field name prefix |
If prefix is non-empty and we are asked to dump secondary solutions, we assume they come from different projections
Implements DataWriter.
References utl::vector< T >::begin(), utl::matrix< T >::cols(), ProcessAdm::dd, SIMoptions::eig, DataExporter::EIGENMODES, DataExporter::ELEMENT_MASK, utl::vector< T >::empty(), ASMbase::empty(), SIMbase::evalSecondarySolution(), ASMbase::evalSolution(), SIMbase::extractPatchElmRes(), SIMbase::extractPatchSolution(), SIMbase::fieldProjections(), IntegrandBase::getField1Name(), IntegrandBase::getField2Name(), SIMbase::getLocalPatchIndex(), IntegrandBase::getMode(), SIMbase::getName(), NormBase::getName(), SIMbase::getNoBasis(), ASMbase::getNoElms(), ASMbase::getNoFields(), NormBase::getNoFields(), IntegrandBase::getNoFields(), ASMbase::getNoNodes(), SIMbase::getNoPatches(), SIMbase::getNormIntegrand(), SIMbase::getPatch(), SIMbase::getProblem(), SIMadmin::getProcessAdm(), ProcessAdm::getProcId(), utl::matrix< T >::getRow(), DataExporter::GRID, NormBase::hasElementContributions(), ASMbase::inActive(), ASMbase::isElementActive(), DomainDecomposition::isPartitioned(), DataExporter::L2G_NODE, DataWriter::m_rank, SIMbase::mixedProblem(), DataExporter::NORMS, SIMadmin::opt, DataExporter::PRIMARY, SIMoptions::project, utl::vector< T >::ptr(), DataExporter::REDUNDANT, utl::vector< T >::resize(), utl::RETAIN, utl::matrix< T >::rows(), DataExporter::SECONDARY, utl::vector< T >::size(), utl::matrixBase< T >::size(), IntegrandBase::suppressOutput(), and writeBasis().
|
virtual |
Writes time stepping info to file.
| [in] | level | The time level to write the info at |
| [in] | time | Current time |
Implements DataWriter.
References DataWriter::m_rank.
|
virtual |
Writes a vector to file.
| [in] | level | The time level to write the vector at |
| [in] | entry | The DataEntry describing the vector |
Implements DataWriter.
References utl::vector< T >::ptr(), DataExporter::REDUNDANT, and utl::vector< T >::size().