![]() |
NLMech
0.1.0
|
Collection of methods and database related to reading. More...
Data Structures | |
| class | MshReader |
| A class to read Gmsh (msh) mesh files. 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::Point3 > *nodes, std::vector< double > *volumes) |
| Reads mesh data into node file and element file. More... | |
VTU specific functions | |
| void | readVtuFile (const std::string &filename, size_t dim, std::vector< util::Point3 > *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. More... | |
| void | readVtuFileNodes (const std::string &filename, size_t dim, std::vector< util::Point3 > *nodes, bool ref_config=false) |
| Reads nodal coordinates. More... | |
| bool | vtuHasPointData (const std::string &filename, const std::string &tag) |
| Checks if file has needed data. More... | |
| bool | vtuHasCellData (const std::string &filename, const std::string &tag) |
| Checks if file has needed data. More... | |
| std::vector< std::string > | readVtuFilePointTags (const std::string &filename) |
| Reads all point data tags. More... | |
| std::vector< std::string > | readVtuFileCellTags (const std::string &filename) |
| Reads all cell data tags. More... | |
| 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. More... | |
| void | readVtuFileRestart (const std::string &filename, std::vector< util::Point3 > *u, std::vector< util::Point3 > *v, const std::vector< util::Point3 > *X=nullptr) |
| Reads mesh data into node file and element file. More... | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< uint8_t > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< size_t > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< int > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< float > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< double > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< util::Point3 > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< util::SymMatrix3 > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFilePointData (const std::string &filename, const std::string &tag, std::vector< util::Matrix33 > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< float > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< double > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< util::Point3 > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< util::SymMatrix3 > *data) |
| Reads data of specified tag from the vtu file. More... | |
| bool | readVtuFileCellData (const std::string &filename, const std::string &tag, std::vector< util::Matrix33 > *data) |
| Reads data of specified tag from the vtu file. More... | |
MSH specific functions | |
| void | readMshFile (const std::string &filename, size_t dim, std::vector< util::Point3 > *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. More... | |
| void | readMshFileRestart (const std::string &filename, std::vector< util::Point3 > *u, std::vector< util::Point3 > *v, const std::vector< util::Point3 > *X=nullptr) |
| Reads mesh data into node file and element file. More... | |
| bool | readMshFilePointData (const std::string &filename, const std::string &tag, std::vector< double > *data) |
| Reads data of specified tag from the vtu file. More... | |
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::Point3 > * | 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 |
Referenced by fe::Mesh::createData().

| void rw::reader::readMshFile | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point3 > * | 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 |
Referenced by fe::Mesh::createData().

| 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 |
| void rw::reader::readMshFileRestart | ( | const std::string & | filename, |
| std::vector< util::Point3 > * | u, | ||
| std::vector< util::Point3 > * | v, | ||
| const std::vector< util::Point3 > * | 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) |
Referenced by tools::pp::Compute::Compute(), and model::FDModel< T >::restart().

| void rw::reader::readVtuFile | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point3 > * | 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 |
| 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 |
| 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 |
| bool rw::reader::readVtuFileCellData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::Matrix33 > * | 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 |
| bool rw::reader::readVtuFileCellData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::Point3 > * | 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 |
| 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 |
| 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 |
Referenced by fe::Mesh::createData().

| std::vector< std::string > rw::reader::readVtuFileCellTags | ( | const std::string & | filename | ) |
Reads all cell data tags.
| filename | Name of mesh file |
| void rw::reader::readVtuFileNodes | ( | const std::string & | filename, |
| size_t | dim, | ||
| std::vector< util::Point3 > * | 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 |
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 |
| 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 |
| 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 |
| 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 |
| 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 |
Referenced by tools::pp::Compute::Compute(), and fe::Mesh::createData().

| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::Matrix33 > * | 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 |
| bool rw::reader::readVtuFilePointData | ( | const std::string & | filename, |
| const std::string & | tag, | ||
| std::vector< util::Point3 > * | 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 |
| 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 |
| std::vector< std::string > rw::reader::readVtuFilePointTags | ( | const std::string & | filename | ) |
Reads all point data tags.
| filename | Name of mesh file |
| void rw::reader::readVtuFileRestart | ( | const std::string & | filename, |
| std::vector< util::Point3 > * | u, | ||
| std::vector< util::Point3 > * | v, | ||
| const std::vector< util::Point3 > * | 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) |
Referenced by tools::pp::Compute::Compute(), and model::FDModel< T >::restart().

| bool rw::reader::vtuHasCellData | ( | const std::string & | filename, |
| const std::string & | tag | ||
| ) |
Checks if file has needed data.
| filename | Name of mesh file |
| tag | Tag name of data |
| bool rw::reader::vtuHasPointData | ( | const std::string & | filename, |
| const std::string & | tag | ||
| ) |
Checks if file has needed data.
| filename | Name of mesh file |
| tag | Tag name of data |
Referenced by tools::pp::Compute::Compute().
