![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Collection of methods and database related to reading. More...
Data Structures | |
| class | MshReader |
| A class to read Gmsh (msh) mesh files. More... | |
| class | VtkParticleReader |
| A vtk writer for simple point data and complex fem mesh data. More... | |
| class | VtkReader |
| A class to read VTK (.vtu) mesh files. More... | |
Functions | |
CSV specific functions | |
| void | readCsvFile (const std::string &filename, size_t dim, std::vector< util::Point > *nodes, std::vector< double > *volumes) |
| Reads mesh data into node file and element file. | |
| void | readParticleCsvFile (const std::string &filename, size_t dim, std::vector< util::Point > *nodes, std::vector< double > *rads, std::vector< size_t > *zones) |
| Reads particles center location, radius, and zone id. | |
| void | readParticleCsvFile (const std::string &filename, size_t dim, std::vector< util::Point > *nodes, std::vector< double > *rads, const size_t &zone) |
| Reads particles center location, radius, and zone id. | |
| void | readParticleWithOrientCsvFile (const std::string &filename, size_t dim, std::vector< util::Point > *nodes, std::vector< double > *rads, std::vector< double > *orients, const size_t &zone) |
| Reads particles center location, radius, and zone id. In this case, file also provides initial orientation of particles. | |
VTU specific functions | |
| void | readVtuFile (const std::string &filename, size_t dim, std::vector< util::Point > *nodes, size_t &element_type, size_t &num_elem, std::vector< size_t > *enc, std::vector< std::vector< size_t > > *nec, std::vector< double > *volumes, bool is_fd=false) |
| Reads mesh data into node file and element file. | |
| void | readVtuFileNodes (const std::string &filename, size_t dim, std::vector< util::Point > *nodes, bool ref_config=false) |
| Reads nodal coordinates. | |
| void | readVtuFileCells (const std::string &filename, size_t dim, size_t &element_type, size_t &num_elem, std::vector< size_t > *enc, std::vector< std::vector< size_t > > *nec) |
| Reads cell data, i.e. element-node connectivity and node-element connectivity. | |
| void | readVtuFileRestart (const std::string &filename, std::vector< util::Point > *u, std::vector< util::Point > *v, const std::vector< util::Point > *X=nullptr) |
| Reads mesh data into node file and element file. | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< uint8_t > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< size_t > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< int > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< float > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< double > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< util::Point > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< util::SymMatrix3 > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< util::Matrix3 > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< float > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< double > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< util::Point > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< util::SymMatrix3 > *data) |
| Reads data of specified tag from the vtu file. | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< util::Matrix3 > *data) |
| Reads data of specified tag from the vtu file. | |
MSH specific functions | |
| void | readMshFile (const std::string &filename, size_t dim, std::vector< util::Point > *nodes, size_t &element_type, size_t &num_elem, std::vector< size_t > *enc, std::vector< std::vector< size_t > > *nec, std::vector< double > *volumes, bool is_fd=false) |
| Reads mesh data into node file and element file. | |
| void | readMshFileRestart (const std::string &filename, std::vector< util::Point > *u, std::vector< util::Point > *v, const std::vector< util::Point > *X=nullptr) |
| Reads mesh data into node file and element file. | |
| bool | readMshFilePointData (const std::string &filename, const std::string &tag, std::vector< double > *data) |
| Reads data of specified tag from the vtu file. | |
| void | readMshFileCells (const std::string &filename, size_t dim, size_t &element_type, size_t &num_elem, std::vector< size_t > *enc, std::vector< std::vector< size_t > > *nec) |
| Reads cell data, i.e. element-node connectivity and node-element connectivity. | |
Collection of methods and database related to reading.
This namespace provides methods and data members specific to reading of the mesh data. The .csv, .vtu and .msh formats are read.
| void rw::reader::readCsvFile | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point > * | nodes, | ||
| std::vector< double > * | volumes | ||
| ) |
Reads mesh data into node file and element file.
| filename | Name of mesh file |
| dim | Dimension |
| nodes | Vector of nodes data |
| volumes | Vector holding volume of the nodes |
Definition at line 18 of file reader.cpp.
Referenced by mesh::Mesh::createData().
| void rw::reader::readMshFile | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point > * | nodes, | ||
| size_t & | element_type, | ||
| size_t & | num_elem, | ||
| std::vector< size_t > * | enc, | ||
| std::vector< std::vector< size_t > > * | nec, | ||
| std::vector< double > * | volumes, | ||
| bool | is_fd = false |
||
| ) |
Reads mesh data into node file and element file.
| filename | Name of mesh file |
| dim | Dimension |
| nodes | Vector of nodes data |
| element_type | Type of element |
| num_elem | Number of elements |
| enc | Vector holding element-node connectivity |
| nec | Vector holding node-element connectivity |
| volumes | Vector holding volume of the nodes |
| is_fd | Flag indicating if this mesh is for finite_difference simulation |
Definition at line 356 of file reader.cpp.
Referenced by mesh::Mesh::createData().
| void rw::reader::readMshFileCells | ( | const std::string & | filename, |
| size_t | dim, | ||
| size_t & | element_type, | ||
| size_t & | num_elem, | ||
| std::vector< size_t > * | enc, | ||
| std::vector< std::vector< size_t > > * | nec | ||
| ) |
Reads cell data, i.e. element-node connectivity and node-element connectivity.
| filename | Name of mesh file |
| dim | Dimension |
| element_type | Type of element |
| num_elem | Number of elements |
| enc | Element-node connectivity |
| nec | Node-element connectivity |
Definition at line 407 of file reader.cpp.
Referenced by mesh::Mesh::readElementData().
| bool rw::reader::readMshFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< double > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 396 of file reader.cpp.
| void rw::reader::readMshFileRestart | ( | const std::string & | filename, |
| std::vector< util::Point > * | u, | ||
| std::vector< util::Point > * | v, | ||
| const std::vector< util::Point > * | X = nullptr |
||
| ) |
Reads mesh data into node file and element file.
| filename | Name of mesh file |
| u | Pointer to vector of nodal displacement |
| v | Pointer to vector of nodal velocity |
| X | Pointer to vector of nodal reference position (Optional) |
Definition at line 368 of file reader.cpp.
| void rw::reader::readParticleCsvFile | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point > * | nodes, | ||
| std::vector< double > * | rads, | ||
| const size_t & | zone | ||
| ) |
Reads particles center location, radius, and zone id.
| filename | Name of mesh file |
| dim | Dimension |
| nodes | Vector of center locations |
| rads | Vector of radius |
| zone | Only reads particle with this zone |
Definition at line 82 of file reader.cpp.
| void rw::reader::readParticleCsvFile | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point > * | nodes, | ||
| std::vector< double > * | rads, | ||
| std::vector< size_t > * | zones | ||
| ) |
Reads particles center location, radius, and zone id.
| filename | Name of mesh file |
| dim | Dimension |
| nodes | Vector of center locations |
| rads | Vector of radius |
| zones | Vector zone ids |
Definition at line 61 of file reader.cpp.
| void rw::reader::readParticleWithOrientCsvFile | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point > * | nodes, | ||
| std::vector< double > * | rads, | ||
| std::vector< double > * | orients, | ||
| const size_t & | zone | ||
| ) |
Reads particles center location, radius, and zone id. In this case, file also provides initial orientation of particles.
| filename | Name of mesh file |
| dim | Dimension |
| nodes | Vector of center locations |
| rads | Vector of radius |
| orients | Vector of orientation of particles |
| zone | Only reads particle with this zone |
Definition at line 103 of file reader.cpp.
| void rw::reader::readVtuFile | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point > * | nodes, | ||
| size_t & | element_type, | ||
| size_t & | num_elem, | ||
| std::vector< size_t > * | enc, | ||
| std::vector< std::vector< size_t > > * | nec, | ||
| std::vector< double > * | volumes, | ||
| bool | is_fd = false |
||
| ) |
Reads mesh data into node file and element file.
| filename | Name of mesh file |
| dim | Dimension |
| nodes | Vector of nodes data |
| element_type | Type of element |
| num_elem | Number of elements |
| enc | Vector holding element-node connectivity |
| nec | Vector holding node-element connectivity |
| volumes | Vector holding volume of the nodes |
| is_fd | Flag indicating if this mesh is for finite_difference simulation |
Definition at line 127 of file reader.cpp.
| bool rw::reader::readVtuFileCellData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< double > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 312 of file reader.cpp.
| bool rw::reader::readVtuFileCellData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< float > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 301 of file reader.cpp.
| bool rw::reader::readVtuFileCellData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::Matrix3 > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 345 of file reader.cpp.
| bool rw::reader::readVtuFileCellData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::Point > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 323 of file reader.cpp.
| bool rw::reader::readVtuFileCellData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::SymMatrix3 > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 334 of file reader.cpp.
| void rw::reader::readVtuFileCells | ( | const std::string & | filename, |
| size_t | dim, | ||
| size_t & | element_type, | ||
| size_t & | num_elem, | ||
| std::vector< size_t > * | enc, | ||
| std::vector< std::vector< size_t > > * | nec | ||
| ) |
Reads cell data, i.e. element-node connectivity and node-element connectivity.
| filename | Name of mesh file |
| dim | Dimension |
| element_type | Type of element |
| num_elem | Number of elements |
| enc | Element-node connectivity |
| nec | Node-element connectivity |
Definition at line 172 of file reader.cpp.
Referenced by mesh::Mesh::createData(), and mesh::Mesh::readElementData().
| void rw::reader::readVtuFileNodes | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point > * | nodes, | ||
| bool | ref_config = false |
||
| ) |
Reads nodal coordinates.
| filename | Name of mesh file |
| dim | Dimension |
| nodes | Vector of nodes data |
| ref_config | Flag which specifies if we need to subtract the displacement from nodes obtained from vtu file to get reference position of nodes |
Definition at line 139 of file reader.cpp.
Referenced by mesh::Mesh::createData().
| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< double > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 257 of file reader.cpp.
| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< float > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 246 of file reader.cpp.
| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< int > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 235 of file reader.cpp.
| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< size_t > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 224 of file reader.cpp.
| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< uint8_t > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 213 of file reader.cpp.
Referenced by mesh::Mesh::createData().
| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::Matrix3 > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 290 of file reader.cpp.
| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::Point > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 268 of file reader.cpp.
| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::SymMatrix3 > * | data | ||
| ) |
Reads data of specified tag from the vtu file.
| filename | Name of mesh file |
| tag | Name of point data to be read from .vtu file |
| data | Pointer to vector of point data |
Definition at line 279 of file reader.cpp.
| void rw::reader::readVtuFileRestart | ( | const std::string & | filename, |
| std::vector< util::Point > * | u, | ||
| std::vector< util::Point > * | v, | ||
| const std::vector< util::Point > * | X = nullptr |
||
| ) |
Reads mesh data into node file and element file.
| filename | Name of mesh file |
| u | Pointer to vector of nodal displacement |
| v | Pointer to vector of nodal velocity |
| X | Pointer to vector of nodal reference position (Optional) |
Definition at line 185 of file reader.cpp.