![]() |
PeriDEM 0.2.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. Currently, .csv, .vtu and .msh files are supported.
| 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 16 of file reader.cpp.
Referenced by fe::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 351 of file reader.cpp.
Referenced by fe::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 401 of file reader.cpp.
Referenced by fe::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 390 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 363 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 80 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 59 of file reader.cpp.
Referenced by model::DEMModel::createParticlesFromFile().
| 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 101 of file reader.cpp.
Referenced by model::DEMModel::createParticlesFromFile().
| 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 125 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 307 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 296 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 340 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 318 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 329 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 168 of file reader.cpp.
Referenced by fe::Mesh::createData(), and fe::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 137 of file reader.cpp.
Referenced by fe::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 252 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 241 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 230 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 219 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 208 of file reader.cpp.
Referenced by fe::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 285 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 263 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 274 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 181 of file reader.cpp.