Wildmeshing Toolkit
|
#include <MshReader.hpp>
Public Member Functions | |
MshReader () | |
~MshReader () | |
std::shared_ptr< Mesh > | read (const std::filesystem::path &filename, const bool ignore_z_if_zero, const std::vector< std::string > &extra_facet_attributes={}) |
std::shared_ptr< Mesh > | read (const std::filesystem::path &filename, const int64_t embedded_dimension, const std::vector< std::vector< std::string >> &extra_attributes) |
std::shared_ptr< Mesh > | read (const std::filesystem::path &filename, const int64_t embedded_dimension=-1) |
Private Member Functions | |
const mshio::NodeBlock * | get_vertex_block (int DIM) const |
const mshio::ElementBlock * | get_simplex_element_block (int DIM) const |
size_t | get_num_vertices (int DIM) const |
size_t | get_num_simplex_elements (int DIM) const |
template<int DIM> | |
void | extract_vertices () |
template<int DIM> | |
void | extract_simplex_elements () |
template<int DIM> | |
void | extract () |
template<int DIM> | |
void | validate () |
int | get_mesh_dimension () const |
int | get_embedded_dimension () const |
std::shared_ptr< Mesh > | generate (const std::optional< std::vector< std::vector< std::string >>> &extra_attributes={}) |
template<int DIM> | |
auto | generateT () -> std::shared_ptr< wmtk::utils::mesh_type_from_dimension_t< DIM >> |
template<int DIM> | |
auto | construct () -> std::shared_ptr< wmtk::utils::mesh_type_from_dimension_t< DIM >> |
void | extract_element_attribute (wmtk::Mesh &m, const std::string &attr_name, PrimitiveType pt) |
template<> | |
void | validate () |
Private Attributes | |
mshio::MshSpec | m_spec |
int64_t | m_embedded_dimension |
Eigen::MatrixXd | V |
MatrixXl | S |
Static Private Attributes | |
static const int64_t | AUTO_EMBEDDED_DIMENSION = -2 |
Definition at line 14 of file MshReader.hpp.
|
default |
|
default |
|
private |
Definition at line 196 of file MshReader.cpp.
|
private |
Definition at line 23 of file MshReader.cpp.
|
private |
Definition at line 282 of file MshReader.cpp.
References wmtk::Mesh::create_accessor(), wmtk::Mesh::get_all(), wmtk::get_primitive_type_id(), get_simplex_element_block(), m_spec, wmtk::Mesh::register_attribute(), and wmtk::Mesh::top_simplex_type().
|
private |
Definition at line 166 of file MshReader.cpp.
References get_simplex_element_block(), get_vertex_block(), and S.
|
private |
Definition at line 128 of file MshReader.cpp.
References AUTO_EMBEDDED_DIMENSION, get_vertex_block(), m_embedded_dimension, and V.
|
private |
Definition at line 320 of file MshReader.cpp.
References wmtk::get_primitive_type_from_id(), wmtk::log_and_throw_error(), wmtk::mesh_utils::set_matrix_attribute(), and wmtk::Vertex.
Referenced by read().
|
private |
Definition at line 361 of file MshReader.cpp.
|
private |
Definition at line 119 of file MshReader.cpp.
References get_mesh_dimension(), and get_vertex_block().
Referenced by read().
|
private |
Definition at line 28 of file MshReader.cpp.
References get_num_simplex_elements().
Referenced by get_embedded_dimension(), and read().
|
private |
Definition at line 108 of file MshReader.cpp.
References get_simplex_element_block().
Referenced by get_mesh_dimension().
|
private |
Definition at line 98 of file MshReader.cpp.
References get_vertex_block().
|
private |
Definition at line 88 of file MshReader.cpp.
References m_spec.
Referenced by extract_element_attribute(), extract_simplex_elements(), and get_num_simplex_elements().
|
private |
Definition at line 78 of file MshReader.cpp.
References m_spec.
Referenced by extract_simplex_elements(), extract_vertices(), get_embedded_dimension(), and get_num_vertices().
std::shared_ptr< Mesh > wmtk::io::MshReader::read | ( | const std::filesystem::path & | filename, |
const bool | ignore_z_if_zero, | ||
const std::vector< std::string > & | extra_facet_attributes = {} |
||
) |
Definition at line 38 of file MshReader.cpp.
References AUTO_EMBEDDED_DIMENSION, generate(), get_mesh_dimension(), m_embedded_dimension, and m_spec.
Referenced by wmtk::io::read_mesh().
std::shared_ptr< Mesh > wmtk::io::MshReader::read | ( | const std::filesystem::path & | filename, |
const int64_t | embedded_dimension, | ||
const std::vector< std::vector< std::string >> & | extra_attributes | ||
) |
Definition at line 54 of file MshReader.cpp.
References generate(), get_embedded_dimension(), m_embedded_dimension, and m_spec.
std::shared_ptr< Mesh > wmtk::io::MshReader::read | ( | const std::filesystem::path & | filename, |
const int64_t | embedded_dimension = -1 |
||
) |
Definition at line 66 of file MshReader.cpp.
References generate(), get_embedded_dimension(), m_embedded_dimension, and m_spec.
|
private |
Definition at line 373 of file MshReader.cpp.
References wmtk::utils::exactinit(), wmtk::log_and_throw_error(), wmtk::logger(), S, V, and wmtk::utils::wmtk_orient3d().
|
private |
Definition at line 369 of file MshReader.cpp.
|
staticprivate |
Definition at line 94 of file MshReader.hpp.
Referenced by extract_vertices(), and read().
|
private |
Definition at line 88 of file MshReader.hpp.
Referenced by extract_vertices(), and read().
|
private |
Definition at line 87 of file MshReader.hpp.
Referenced by extract_element_attribute(), get_simplex_element_block(), get_vertex_block(), and read().
|
private |
Definition at line 92 of file MshReader.hpp.
Referenced by extract_simplex_elements(), and validate().
|
private |
Definition at line 91 of file MshReader.hpp.
Referenced by extract_vertices(), and validate().