Stores and reads data from a file.
More...
#include <DataExporter.h>
|
|
virtual | ~DataWriter () |
| | Empty destructor.
|
| |
|
virtual int | getLastTimeLevel ()=0 |
| | Returns the last time level stored in file.
|
| |
| virtual void | openFile (int level)=0 |
| | Opens the file at a given time level. More...
|
| |
| virtual void | closeFile (int level)=0 |
| | Closes the file. More...
|
| |
| virtual void | writeVector (int level, const DataEntry &entry)=0 |
| | Writes a vector to file. More...
|
| |
| virtual void | writeSIM (int level, double time, const DataEntry &entry, bool geometryUpdated, const std::string &prefix)=0 |
| | Writes data from a SIM object to file. More...
|
| |
| virtual void | writeNodalForces (int level, const DataEntry &entry)=0 |
| | Writes nodal forces to file. More...
|
| |
| virtual void | writeKnotspan (int level, const DataEntry &entry, const std::string &prefix)=0 |
| | Writes a knotspan field to file. More...
|
| |
| virtual void | writeBasis (int level, const DataEntry &entry, const std::string &prefix)=0 |
| | Write a basis to file. More...
|
| |
| virtual bool | writeTimeInfo (int level, double time)=0 |
| | Writes time stepping info to file. More...
|
| |
| virtual bool | writeLog (const std::string &data, const std::string &name)=0 |
| | Write a log to output file. More...
|
| |
|
const std::string & | getName () const |
| | Returns the name of the file.
|
| |
|
|
| DataWriter (const std::string &name, const ProcessAdm &adm, const char *defaultExt=nullptr) |
| | Protected constructor as this is a purely virtual class.
|
| |
|
|
std::string | m_name |
| | File name.
|
| |
|
int | m_size |
| | Number of MPI nodes (processors)
|
| |
|
int | m_rank |
| | MPI rank (processor ID)
|
| |
Stores and reads data from a file.
A DataWriter is a backend for the DataExporter, they abstract different file formats.
◆ closeFile()
| virtual void DataWriter::closeFile |
( |
int |
level | ) |
|
|
pure virtual |
Closes the file.
- Parameters
-
| [in] | level | Level we just wrote to the file |
Implemented in HDF5Writer.
◆ openFile()
| virtual void DataWriter::openFile |
( |
int |
level | ) |
|
|
pure virtual |
Opens the file at a given time level.
- Parameters
-
| [in] | level | The requested time level |
Implemented in HDF5Writer.
◆ writeBasis()
| virtual void DataWriter::writeBasis |
( |
int |
level, |
|
|
const DataEntry & |
entry, |
|
|
const std::string & |
prefix |
|
) |
| |
|
pure virtual |
Write a basis to file.
- Parameters
-
| [in] | level | The time level to write the basis at |
| [in] | entry | The DataEntry describing the basis |
| [in] | prefix | Prefix for basis |
Implemented in HDF5Writer.
◆ writeKnotspan()
| virtual void DataWriter::writeKnotspan |
( |
int |
level, |
|
|
const DataEntry & |
entry, |
|
|
const std::string & |
prefix |
|
) |
| |
|
pure virtual |
Writes a knotspan field to file.
- Parameters
-
| [in] | level | The time level to write the data at |
| [in] | entry | The DataEntry describing the field |
| [in] | prefix | Prefix for field |
Implemented in HDF5Writer.
◆ writeLog()
| virtual bool DataWriter::writeLog |
( |
const std::string & |
data, |
|
|
const std::string & |
name |
|
) |
| |
|
pure virtual |
Write a log to output file.
- Parameters
-
| data | Text to write |
| name | Name of log |
Implemented in HDF5Writer.
◆ writeNodalForces()
| virtual void DataWriter::writeNodalForces |
( |
int |
level, |
|
|
const DataEntry & |
entry |
|
) |
| |
|
pure virtual |
Writes nodal forces to file.
- Parameters
-
| [in] | level | The time level to write the data at |
| [in] | entry | The DataEntry describing the vector |
Implemented in HDF5Writer.
◆ writeSIM()
| virtual void DataWriter::writeSIM |
( |
int |
level, |
|
|
double |
time, |
|
|
const DataEntry & |
entry, |
|
|
bool |
geometryUpdated, |
|
|
const std::string & |
prefix |
|
) |
| |
|
pure virtual |
Writes data from a SIM object to file.
- Parameters
-
| [in] | level | The time level to write the data at |
| [in] | time | Current time |
| [in] | entry | The DataEntry describing the vector |
| [in] | geometryUpdated | Whether or not geometries should be written |
| [in] | prefix | Field name prefix |
Implemented in HDF5Writer.
◆ writeTimeInfo()
| virtual bool DataWriter::writeTimeInfo |
( |
int |
level, |
|
|
double |
time |
|
) |
| |
|
pure virtual |
Writes time stepping info to file.
- Parameters
-
| [in] | level | The time level to write the info at |
| [in] | time | Current time |
Implemented in HDF5Writer.
◆ writeVector()
| virtual void DataWriter::writeVector |
( |
int |
level, |
|
|
const DataEntry & |
entry |
|
) |
| |
|
pure virtual |
Writes a vector to file.
- Parameters
-
| [in] | level | The time level to write the vector at |
| [in] | entry | The DataEntry describing the vector |
Implemented in HDF5Writer.
The documentation for this class was generated from the following files: