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 <vtkWriter.h>
Public Member Functions | |
VtkWriter (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, const std::vector< util::Point > *u=nullptr) |
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 | |
vtkSmartPointer< vtkXMLUnstructuredGridWriter > | d_writer_p |
XML unstructured grid writer. | |
vtkSmartPointer< vtkUnstructuredGrid > | d_grid_p |
Unstructured grid. | |
std::string | d_compressType |
compression_type Specify the compressor (if any) | |
A vtk writer for simple point data and complex fem mesh data.
Definition at line 28 of file vtkWriter.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 22 of file vtkWriter.cpp.
References d_writer_p.
void rw::writer::VtkWriter::addTimeStep | ( | const double & | timestep | ) |
Writes the time step to the file.
timestep | Current time step of the simulation |
Definition at line 268 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 225 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 240 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 288 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 298 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 49 of file vtkWriter.cpp.
References util::vtk_map_element_to_num_nodes.
void rw::writer::VtkWriter::appendNodes | ( | const std::vector< util::Point > * | nodes, |
const std::vector< util::Point > * | u = nullptr |
||
) |
Writes the nodes to the file.
nodes | Reference positions of the nodes |
u | Nodal displacements |
Definition at line 32 of file vtkWriter.cpp.
References util::Point::d_x, util::Point::d_y, and util::Point::d_z.
void rw::writer::VtkWriter::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 159 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 143 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 127 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 111 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 95 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 175 of file vtkWriter.cpp.
void rw::writer::VtkWriter::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 197 of file vtkWriter.cpp.
void rw::writer::VtkWriter::close | ( | ) |
Closes the file and store it to the hard disk.
Definition at line 277 of file vtkWriter.cpp.
|
private |
compression_type Specify the compressor (if any)
Definition at line 194 of file vtkWriter.h.
|
private |
Unstructured grid.
Definition at line 191 of file vtkWriter.h.
|
private |
XML unstructured grid writer.
Definition at line 188 of file vtkWriter.h.
Referenced by VtkWriter().