PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
A vtk writer for simple point data and complex fem mesh data. More...
#include <legacyVtkWriter.h>
Public Member Functions | |
LegacyVtkWriter (const std::string &filename, const std::string &compress_type="") | |
Constructor. | |
void | close () |
Closes the file and store it to the hard disk. | |
Mesh data | |
void | appendNodes (const std::vector< util::Point > *nodes) |
Writes the nodes to the file. | |
void | appendNodes (const std::vector< util::Point > *nodes, const std::vector< util::Point > *u) |
Writes the nodes to the file. | |
void | appendMesh (const std::vector< util::Point > *nodes, const size_t &element_type, const std::vector< size_t > *en_con, const std::vector< util::Point > *u=nullptr) |
Writes the mesh data to file. | |
Point data | |
void | appendPointData (const std::string &name, const std::vector< uint8_t > *data) |
Writes the scalar point data to the file. | |
void | appendPointData (const std::string &name, const std::vector< size_t > *data) |
Writes the scalar point data to the file. | |
void | appendPointData (const std::string &name, const std::vector< int > *data) |
Writes the scalar point data to the file. | |
void | appendPointData (const std::string &name, const std::vector< float > *data) |
Writes the scalar point data to the file. | |
void | appendPointData (const std::string &name, const std::vector< double > *data) |
Writes the scalar point data to the file. | |
void | appendPointData (const std::string &name, const std::vector< util::Point > *data) |
Writes the vector point data to the file. | |
void | appendPointData (const std::string &name, const std::vector< util::SymMatrix3 > *data) |
Writes the symmetric matrix data associated to nodes to the file. | |
Cell data | |
void | appendCellData (const std::string &name, const std::vector< float > *data) |
Writes the float data associated to cells to the file. | |
void | appendCellData (const std::string &name, const std::vector< util::SymMatrix3 > *data) |
Writes the symmetric matrix data associated to cells to the file. | |
Field data | |
void | appendFieldData (const std::string &name, const double &data) |
Writes the scalar field data to the file. | |
void | appendFieldData (const std::string &name, const float &data) |
Writes the scalar field data to the file. | |
void | addTimeStep (const double ×tep) |
Writes the time step to the file. | |
Private Attributes | |
std::string | d_filename |
filename | |
std::string | d_compressType |
compression_type Specify the compressor (if any) | |
std::ofstream | d_file |
vtk/vtu file | |
A vtk writer for simple point data and complex fem mesh data.
Definition at line 26 of file legacyVtkWriter.h.
|
explicit |
Constructor.
Creates and opens .vtu file of name given by filename. The file remains open till the close() function is invoked.
filename | Name of file which will be created |
compress_type | Compression method (optional) |
Definition at line 8 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::addTimeStep | ( | const double & | timestep | ) |
Writes the time step to the file.
timestep | Current time step of the simulation |
Definition at line 50 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendCellData | ( | const std::string & | name, |
const std::vector< float > * | data | ||
) |
Writes the float data associated to cells to the file.
name | Name of the data |
data | Vector containing the data |
Definition at line 44 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendCellData | ( | const std::string & | name, |
const std::vector< util::SymMatrix3 > * | data | ||
) |
Writes the symmetric matrix data associated to cells to the file.
name | Name of the data |
data | Vector containing the data |
Definition at line 47 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendFieldData | ( | const std::string & | name, |
const double & | data | ||
) |
Writes the scalar field data to the file.
name | Name of the data |
data | Value |
Definition at line 54 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendFieldData | ( | const std::string & | name, |
const float & | data | ||
) |
Writes the scalar field data to the file.
name | Name of the data |
data | Value |
Definition at line 57 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendMesh | ( | const std::vector< util::Point > * | nodes, |
const size_t & | element_type, | ||
const std::vector< size_t > * | en_con, | ||
const std::vector< util::Point > * | u = nullptr |
||
) |
Writes the mesh data to file.
nodes | Vector of nodal coordinates |
element_type | Type of element |
en_con | Vector of element-node connectivity |
u | Vector of nodal displacement |
Definition at line 18 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendNodes | ( | const std::vector< util::Point > * | nodes | ) |
Writes the nodes to the file.
nodes | Current positions of the nodes |
Definition at line 12 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendNodes | ( | const std::vector< util::Point > * | nodes, |
const std::vector< util::Point > * | u | ||
) |
Writes the nodes to the file.
nodes | Reference positions of the nodes |
u | Nodal displacements |
Definition at line 15 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendPointData | ( | const std::string & | name, |
const std::vector< double > * | data | ||
) |
Writes the scalar point data to the file.
name | Name of the data |
data | Vector containing the data |
Definition at line 35 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendPointData | ( | const std::string & | name, |
const std::vector< float > * | data | ||
) |
Writes the scalar point data to the file.
name | Name of the data |
data | Vector containing the data |
Definition at line 32 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendPointData | ( | const std::string & | name, |
const std::vector< int > * | data | ||
) |
Writes the scalar point data to the file.
name | Name of the data |
data | Vector containing the data |
Definition at line 29 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendPointData | ( | const std::string & | name, |
const std::vector< size_t > * | data | ||
) |
Writes the scalar point data to the file.
name | Name of the data |
data | Vector containing the data |
Definition at line 26 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendPointData | ( | const std::string & | name, |
const std::vector< uint8_t > * | data | ||
) |
Writes the scalar point data to the file.
name | Name of the data |
data | Vector containing the data |
Definition at line 23 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendPointData | ( | const std::string & | name, |
const std::vector< util::Point > * | data | ||
) |
Writes the vector point data to the file.
name | Name of the data |
data | Vector containing the data |
Definition at line 38 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::appendPointData | ( | const std::string & | name, |
const std::vector< util::SymMatrix3 > * | data | ||
) |
Writes the symmetric matrix data associated to nodes to the file.
name | Name of the data |
data | Vector containing the data |
Definition at line 41 of file legacyVtkWriter.cpp.
void rw::writer::LegacyVtkWriter::close | ( | ) |
Closes the file and store it to the hard disk.
Definition at line 52 of file legacyVtkWriter.cpp.
|
private |
compression_type Specify the compressor (if any)
Definition at line 195 of file legacyVtkWriter.h.
|
private |
vtk/vtu file
Definition at line 198 of file legacyVtkWriter.h.
|
private |
filename
Definition at line 192 of file legacyVtkWriter.h.