PolyFEM
|
#include <CMesh3D.hpp>
Public Member Functions | |
CMesh3D ()=default | |
virtual | ~CMesh3D ()=default |
CMesh3D (CMesh3D &&)=default | |
CMesh3D & | operator= (CMesh3D &&)=default |
CMesh3D (const CMesh3D &)=default | |
CMesh3D & | operator= (const CMesh3D &)=default |
bool | is_conforming () const override |
if the mesh is conforming | |
void | refine (const int n_refinement, const double t) override |
refine the mesh | |
int | n_cells () const override |
number of cells | |
int | n_faces () const override |
number of faces | |
int | n_edges () const override |
number of edges | |
int | n_vertices () const override |
number of vertices | |
int | n_face_vertices (const int f_id) const override |
number of vertices of a face | |
int | n_cell_vertices (const int c_id) const override |
number of vertices of a cell | |
int | n_cell_edges (const int c_id) const override |
int | n_cell_faces (const int c_id) const override |
int | cell_vertex (const int c_id, const int lv_id) const override |
id of the vertex of a cell | |
int | cell_face (const int c_id, const int lf_id) const override |
int | cell_edge (const int c_id, const int le_id) const override |
int | face_vertex (const int f_id, const int lv_id) const override |
id of the face vertex | |
int | edge_vertex (const int e_id, const int lv_id) const override |
id of the edge vertex | |
void | elements_boxes (std::vector< std::array< Eigen::Vector3d, 2 > > &boxes) const override |
constructs a box around every element (3d cell, 2d face) | |
void | barycentric_coords (const RowVectorNd &p, const int el_id, Eigen::MatrixXd &coord) const override |
constructs barycentric coodiantes for a point p. | |
bool | is_boundary_vertex (const int vertex_global_id) const override |
is vertex boundary | |
bool | is_boundary_edge (const int edge_global_id) const override |
is edge boundary | |
bool | is_boundary_face (const int face_global_id) const override |
is face boundary | |
bool | is_boundary_element (const int element_global_id) const override |
is cell boundary | |
bool | save (const std::string &path) const override |
bool | build_from_matrices (const Eigen::MatrixXd &V, const Eigen::MatrixXi &F) override |
build a mesh from matrices | |
void | attach_higher_order_nodes (const Eigen::MatrixXd &V, const std::vector< std::vector< int > > &nodes) override |
attach high order nodes | |
void | normalize () override |
normalize the mesh | |
double | quad_area (const int gid) const override |
area of a quad face of an hex mesh | |
void | compute_elements_tag () override |
compute element types, see ElementType | |
RowVectorNd | kernel (const int cell_id) const override |
RowVectorNd | point (const int vertex_id) const override |
point coordinates | |
void | set_point (const int global_index, const RowVectorNd &p) override |
Set the point. | |
RowVectorNd | edge_barycenter (const int e) const override |
edge barycenter | |
RowVectorNd | face_barycenter (const int f) const override |
face barycenter | |
RowVectorNd | cell_barycenter (const int c) const override |
cell barycenter | |
void | bounding_box (RowVectorNd &min, RowVectorNd &max) const override |
computes the bbox of the mesh | |
Navigation3D::Index | get_index_from_element (int hi, int lf, int lv) const override |
Navigation3D::Index | get_index_from_element (int hi) const override |
Navigation3D::Index | get_index_from_element_edge (int hi, int v0, int v1) const override |
Navigation3D::Index | get_index_from_element_face (int hi, int v0, int v1, int v2) const override |
std::vector< uint32_t > | vertex_neighs (const int v_gid) const override |
std::vector< uint32_t > | edge_neighs (const int e_gid) const override |
Navigation3D::Index | switch_vertex (Navigation3D::Index idx) const override |
Navigation3D::Index | switch_edge (Navigation3D::Index idx) const override |
Navigation3D::Index | switch_face (Navigation3D::Index idx) const override |
Navigation3D::Index | switch_element (Navigation3D::Index idx) const override |
Navigation3D::Index | next_around_edge (Navigation3D::Index idx) const override |
Navigation3D::Index | next_around_face (Navigation3D::Index idx) const override |
void | get_vertex_elements_neighs (const int v_id, std::vector< int > &ids) const override |
void | get_edge_elements_neighs (const int e_id, std::vector< int > &ids) const override |
void | compute_boundary_ids (const std::function< int(const size_t, const std::vector< int > &, const RowVectorNd &, bool)> &marker) override |
computes boundary selections based on a function | |
void | compute_body_ids (const std::function< int(const size_t, const std::vector< int > &, const RowVectorNd &)> &marker) override |
computes boundary selections based on a function | |
Mesh3DStorage & | mesh_storge () |
void | append (const Mesh &mesh) override |
appends a new mesh to the end of this | |
std::unique_ptr< Mesh > | copy () const override |
Create a copy of the mesh. | |
Public Member Functions inherited from polyfem::mesh::Mesh3D | |
Mesh3D ()=default | |
virtual | ~Mesh3D ()=default |
Mesh3D (Mesh3D &&)=default | |
Mesh3D & | operator= (Mesh3D &&)=default |
Mesh3D (const Mesh3D &)=default | |
Mesh3D & | operator= (const Mesh3D &)=default |
bool | is_volume () const override |
checks if mesh is volume | |
void | elements_boxes (std::vector< std::array< Eigen::Vector3d, 2 > > &boxes) const override |
constructs a box around every element (3d cell, 2d face) | |
void | barycentric_coords (const RowVectorNd &p, const int el_id, Eigen::MatrixXd &coord) const override |
constructs barycentric coodiantes for a point p. | |
void | compute_cell_jacobian (const int el_id, const Eigen::MatrixXd &reference_map, Eigen::MatrixXd &jacobian) const |
double | tri_area (const int gid) const override |
area of a tri face of a tet mesh | |
std::pair< RowVectorNd, int > | edge_node (const Navigation3D::Index &index, const int n_new_nodes, const int i) const |
std::pair< RowVectorNd, int > | face_node (const Navigation3D::Index &index, const int n_new_nodes, const int i, const int j) const |
std::pair< RowVectorNd, int > | cell_node (const Navigation3D::Index &index, const int n_new_nodes, const int i, const int j, const int k) const |
void | get_edges (Eigen::MatrixXd &p0, Eigen::MatrixXd &p1) const override |
Get all the edges. | |
void | get_edges (Eigen::MatrixXd &p0, Eigen::MatrixXd &p1, const std::vector< bool > &valid_elements) const override |
Get all the edges according to valid_elements selection. | |
void | to_face_functions (std::array< std::function< Navigation3D::Index(Navigation3D::Index)>, 6 > &to_face) const |
void | to_vertex_functions (std::array< std::function< Navigation3D::Index(Navigation3D::Index)>, 8 > &to_vertex) const |
void | to_edge_functions (std::array< std::function< Navigation3D::Index(Navigation3D::Index)>, 12 > &to_edge) const |
std::array< int, 8 > | get_ordered_vertices_from_hex (const int element_index) const |
virtual std::array< int, 4 > | get_ordered_vertices_from_tet (const int element_index) const |
void | compute_element_barycenters (Eigen::MatrixXd &barycenters) const override |
utility for 2d/3d. | |
Public Member Functions inherited from polyfem::mesh::Mesh | |
virtual | ~Mesh ()=default |
Destroy the Mesh object. | |
Mesh (Mesh &&)=default | |
Construct a new Mesh object. | |
Mesh & | operator= (Mesh &&)=default |
Copy constructor. | |
Mesh (const Mesh &)=default | |
Construct a new Mesh object. | |
Mesh & | operator= (const Mesh &)=default |
int | dimension () const |
utily for dimension | |
int | n_elements () const |
utitlity to return the number of elements, cells or faces in 3d and 2d | |
int | n_boundary_elements () const |
utitlity to return the number of boundary elements, faces or edges in 3d and 2d | |
int | element_vertex (const int el_id, const int lv_id) const |
id of the vertex of a element | |
std::vector< int > | element_vertices (const int el_id) const |
list of vids of an element | |
int | boundary_element_vertex (const int primitive_id, const int lv_id) const |
const Eigen::MatrixXi & | orders () const |
order of each element | |
bool | is_rational () const |
check if curved mesh has rational polynomials elements | |
void | set_is_rational (const bool in_is_rational) |
Set the is rational object. | |
virtual void | update_elements_tag () |
Update elements types. | |
virtual double | edge_length (const int gid) const |
edge length | |
void | edge_barycenters (Eigen::MatrixXd &barycenters) const |
all edges barycenters | |
void | face_barycenters (Eigen::MatrixXd &barycenters) const |
all face barycenters | |
void | cell_barycenters (Eigen::MatrixXd &barycenters) const |
all cells barycenters | |
bool | is_spline_compatible (const int el_id) const |
checks if element is spline compatible | |
bool | is_cube (const int el_id) const |
checks if element is cube compatible | |
bool | is_polytope (const int el_id) const |
checks if element is polygon compatible | |
bool | is_simplex (const int el_id) const |
checks if element is simples compatible | |
const std::vector< ElementType > & | elements_tag () const |
Returns the elements types. | |
void | set_tag (const int el, const ElementType type) |
changes the element type | |
void | compute_node_ids (const std::function< int(const size_t, const RowVectorNd &, bool)> &marker) |
computes boundary selections based on a function | |
virtual void | load_boundary_ids (const std::string &path) |
loads the boundary selections for a file | |
virtual void | set_boundary_ids (const std::vector< int > &boundary_ids) |
Set the boundary selection from a vector. | |
virtual void | set_body_ids (const std::vector< int > &body_ids) |
Set the volume sections. | |
virtual int | get_default_boundary_id (const int primitive) const |
Get the default boundary selection of an element (face in 3d, edge in 2d) | |
virtual int | get_boundary_id (const int primitive) const |
Get the boundary selection of an element (face in 3d, edge in 2d) | |
virtual int | get_node_id (const int node_id) const |
Get the boundary selection of a node. | |
void | update_nodes (const Eigen::VectorXi &in_node_to_node) |
Update the node ids to reorder them. | |
virtual int | get_body_id (const int primitive) const |
Get the volume selection of an element (cell in 3d, face in 2d) | |
virtual const std::vector< int > & | get_body_ids () const |
Get the volume selection of all elements (cells in 3d, faces in 2d) | |
bool | has_node_ids () const |
checks if points selections are available | |
bool | has_boundary_ids () const |
checks if surface selections are available | |
virtual bool | has_body_ids () const |
checks if volumes selections are available | |
const std::vector< double > & | cell_weights (const int cell_index) const |
weights for rational polynomial meshes | |
void | set_cell_weights (const std::vector< std::vector< double > > &in_cell_weights) |
Set the cell weights for rational polynomial meshes. | |
virtual void | prepare_mesh () |
method used to finalize the mesh. | |
bool | has_poly () const |
checks if the mesh has polytopes | |
bool | is_simplicial () const |
checks if the mesh is simplicial | |
bool | is_linear () const |
check if the mesh is linear | |
std::vector< std::pair< int, int > > | edges () const |
list of sorted edges. | |
std::vector< std::vector< int > > | faces () const |
list of sorted faces. | |
std::unordered_map< std::pair< int, int >, size_t, polyfem::utils::HashPair > | edges_to_ids () const |
map from edge (pair of v id) to the id of the edge | |
std::unordered_map< std::vector< int >, size_t, polyfem::utils::HashVector > | faces_to_ids () const |
map from face (tuple of v id) to the id of the face | |
const Eigen::VectorXi & | in_ordered_vertices () const |
Order of the input vertices. | |
const Eigen::MatrixXi & | in_ordered_edges () const |
Order of the input edges. | |
const Eigen::MatrixXi & | in_ordered_faces () const |
Order of the input edges. | |
void | append (const std::unique_ptr< Mesh > &mesh) |
appends a new mesh to the end of this, utility that takes pointer, calls other one | |
void | apply_affine_transformation (const MatrixNd &A, const VectorNd &b) |
Apply an affine transformation \(Ax+b\) to the vertex positions \(x\). | |
Static Public Member Functions | |
static void | geomesh_2_mesh_storage (const GEO::Mesh &gm, Mesh3DStorage &m) |
Static Public Member Functions inherited from polyfem::mesh::Mesh | |
static std::unique_ptr< Mesh > | create (const std::string &path, const bool non_conforming=false) |
factory to build the proper mesh | |
static std::unique_ptr< Mesh > | create (GEO::Mesh &M, const bool non_conforming=false) |
factory to build the proper mesh | |
static std::unique_ptr< Mesh > | create (const Eigen::MatrixXd &vertices, const Eigen::MatrixXi &cells, const bool non_conforming=false) |
factory to build the proper mesh | |
static std::unique_ptr< Mesh > | create (const int dim, const bool non_conforming=false) |
factory to build the proper empty mesh | |
Protected Member Functions | |
bool | load (const std::string &path) override |
loads a mesh from the path | |
bool | load (const GEO::Mesh &M) override |
loads a mesh from a geo mesh | |
Protected Member Functions inherited from polyfem::mesh::Mesh | |
Mesh ()=default | |
Construct a new Mesh object. | |
Private Attributes | |
Mesh3DStorage | mesh_ |
Additional Inherited Members | |
Protected Attributes inherited from polyfem::mesh::Mesh | |
std::vector< ElementType > | elements_tag_ |
list of element types | |
std::vector< int > | node_ids_ |
list of node labels | |
std::vector< int > | boundary_ids_ |
list of surface labels | |
std::vector< int > | body_ids_ |
list of volume labels | |
Eigen::MatrixXi | orders_ |
list of geometry orders, one per cell | |
bool | is_rational_ = false |
stores if the mesh is rational | |
std::vector< EdgeNodes > | edge_nodes_ |
high-order nodes associates to edges | |
std::vector< FaceNodes > | face_nodes_ |
high-order nodes associates to faces | |
std::vector< CellNodes > | cell_nodes_ |
high-order nodes associates to cells | |
std::vector< std::vector< double > > | cell_weights_ |
weights associates to cells for rational polynomail meshes | |
Eigen::VectorXi | in_ordered_vertices_ |
Order of the input vertices. | |
Eigen::MatrixXi | in_ordered_edges_ |
Order of the input edges. | |
Eigen::MatrixXi | in_ordered_faces_ |
Order of the input faces, TODO: change to std::vector of Eigen::Vector. | |
Definition at line 18 of file CMesh3D.hpp.
|
default |
|
virtualdefault |
|
default |
|
default |
|
overridevirtual |
appends a new mesh to the end of this
[in] | mesh | to append |
Reimplemented from polyfem::mesh::Mesh.
Definition at line 1599 of file CMesh3D.cpp.
References polyfem::mesh::Mesh::append(), polyfem::mesh::Mesh3DStorage::append(), compute_elements_tag(), mesh_, and polyfem::mesh::Navigation3D::prepare_mesh().
|
overridevirtual |
attach high order nodes
[in] | V | nodes |
[in] | nodes | list of nodes per element |
Implements polyfem::mesh::Mesh.
Definition at line 512 of file CMesh3D.cpp.
References polyfem::mesh::Mesh::cell_nodes_, cell_vertex(), polyfem::mesh::Navigation3D::Index::edge, polyfem::mesh::Mesh::edge_nodes_, polyfem::mesh::Navigation3D::Index::element, polyfem::mesh::Navigation3D::Index::face, polyfem::mesh::Mesh::face_nodes_, face_vertex(), polyfem::mesh::Mesh::faces(), get_index_from_element(), n_cells(), n_edges(), n_faces(), next_around_face(), polyfem::mesh::Mesh::orders_, switch_edge(), switch_face(), switch_vertex(), V, and polyfem::mesh::Navigation3D::Index::vertex.
|
overridevirtual |
constructs barycentric coodiantes for a point p.
WARNING works only for simplices
[in] | p | query point |
[in] | el_id | element id |
[out] | coord | matrix containing the barycentric coodinates |
Implements polyfem::mesh::Mesh.
Definition at line 1585 of file CMesh3D.cpp.
References polyfem::mesh::Mesh3D::get_ordered_vertices_from_tet(), polyfem::mesh::Mesh::is_simplex(), and point().
|
overridevirtual |
computes the bbox of the mesh
[out] | min | min coodiante |
[out] | max | max coodiante |
Implements polyfem::mesh::Mesh.
Definition at line 1015 of file CMesh3D.cpp.
References mesh_, polyfem::mesh::Mesh3DStorage::points, and V.
Referenced by normalize().
|
overridevirtual |
build a mesh from matrices
[in] | V | vertices |
[in] | F | connectivity |
Implements polyfem::mesh::Mesh.
Definition at line 469 of file CMesh3D.cpp.
References polyfem::mesh::Mesh::cell_nodes_, polyfem::mesh::Mesh::edge_nodes_, polyfem::F, polyfem::mesh::Mesh::face_nodes_, load(), and V.
|
overridevirtual |
cell barycenter
[in] | c | global cell index |
Implements polyfem::mesh::Mesh.
Definition at line 1508 of file CMesh3D.cpp.
References polyfem::mesh::Mesh3DStorage::elements, mesh_, n_cell_vertices(), n_vertices(), and point().
Referenced by compute_body_ids(), and load().
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 43 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::elements, and mesh_.
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 42 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::elements, and mesh_.
|
inlineoverridevirtual |
id of the vertex of a cell
[in] | f_id | global cell id |
[in] | lv_id | local vertex id |
Implements polyfem::mesh::Mesh.
Definition at line 41 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::elements, and mesh_.
Referenced by attach_higher_order_nodes(), and elements_boxes().
|
overridevirtual |
computes boundary selections based on a function
[in] | marker | lambda function that takes the id and barycenter and returns an integer |
Implements polyfem::mesh::Mesh.
Definition at line 1228 of file CMesh3D.cpp.
References polyfem::mesh::Mesh::body_ids_, cell_barycenter(), polyfem::mesh::Mesh::element_vertices(), and polyfem::mesh::Mesh::n_elements().
|
overridevirtual |
computes boundary selections based on a function
[in] | marker | lambda function that takes the id, the list of vertices, the barycenter, and true/false if the element is on the boundary and returns an integer |
Implements polyfem::mesh::Mesh.
Definition at line 1210 of file CMesh3D.cpp.
References polyfem::mesh::Mesh::boundary_ids_, face_barycenter(), face_vertex(), is_boundary_face(), n_face_vertices(), and n_faces().
|
overridevirtual |
compute element types, see ElementType
Implements polyfem::mesh::Mesh.
Definition at line 1264 of file CMesh3D.cpp.
References polyfem::mesh::BOUNDARY_POLYTOPE, polyfem::mesh::Mesh3DStorage::edges, polyfem::mesh::Mesh3DStorage::elements, polyfem::mesh::Mesh::elements_tag_, polyfem::mesh::Mesh3DStorage::faces, polyfem::mesh::INTERFACE_CUBE, polyfem::mesh::INTERIOR_POLYTOPE, mesh_, polyfem::mesh::MULTI_SINGULAR_BOUNDARY_CUBE, polyfem::mesh::MULTI_SINGULAR_INTERIOR_CUBE, polyfem::mesh::REGULAR_BOUNDARY_CUBE, polyfem::mesh::REGULAR_INTERIOR_CUBE, polyfem::mesh::SIMPLE_SINGULAR_BOUNDARY_CUBE, polyfem::mesh::SIMPLE_SINGULAR_INTERIOR_CUBE, polyfem::mesh::SIMPLEX, and polyfem::mesh::Mesh3DStorage::vertices.
Referenced by append(), load(), load(), and refine().
|
overridevirtual |
Create a copy of the mesh.
Implements polyfem::mesh::Mesh.
Definition at line 1611 of file CMesh3D.cpp.
|
overridevirtual |
edge barycenter
[in] | e | global edge index |
Implements polyfem::mesh::Mesh.
Definition at line 1487 of file CMesh3D.cpp.
References polyfem::mesh::Mesh3DStorage::edges, mesh_, and point().
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 84 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::edges, and mesh_.
|
inlineoverridevirtual |
id of the edge vertex
[in] | e_id | global edge id |
[in] | lv_id | local vertex index |
Implements polyfem::mesh::Mesh.
Definition at line 45 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::edges, and mesh_.
|
overridevirtual |
constructs a box around every element (3d cell, 2d face)
[out] | boxes | axis aligned bounding boxes |
Implements polyfem::mesh::Mesh.
Definition at line 1563 of file CMesh3D.cpp.
References cell_vertex(), n_cell_vertices(), polyfem::mesh::Mesh::n_elements(), and point().
|
overridevirtual |
face barycenter
[in] | f | global face index |
Implements polyfem::mesh::Mesh.
Definition at line 1494 of file CMesh3D.cpp.
References polyfem::mesh::Mesh3DStorage::faces, mesh_, n_face_vertices(), n_vertices(), and point().
Referenced by compute_boundary_ids().
|
inlineoverridevirtual |
id of the face vertex
[in] | f_id | global face id |
[in] | lv_id | local vertex index |
Implements polyfem::mesh::Mesh.
Definition at line 44 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::faces, and mesh_.
Referenced by attach_higher_order_nodes(), and compute_boundary_ids().
|
static |
Definition at line 1522 of file CMesh3D.cpp.
References polyfem::mesh::MeshProcessing3D::build_connectivity(), polyfem::mesh::Mesh3DStorage::edges, polyfem::mesh::Mesh3DStorage::faces, polyfem::mesh::H_SUR, polyfem::mesh::Vertex::id, polyfem::mesh::Mesh3DStorage::points, polyfem::mesh::QUA, polyfem::mesh::TRI, polyfem::mesh::Mesh3DStorage::type, polyfem::mesh::Vertex::v, and polyfem::mesh::Mesh3DStorage::vertices.
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 101 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::edges, and mesh_.
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 78 of file CMesh3D.hpp.
References polyfem::mesh::Navigation3D::get_index_from_element_face(), and mesh_.
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 77 of file CMesh3D.hpp.
References polyfem::mesh::Navigation3D::get_index_from_element_face(), and mesh_.
Referenced by attach_higher_order_nodes().
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 80 of file CMesh3D.hpp.
References polyfem::mesh::Navigation3D::get_index_from_element_edge(), and mesh_.
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 81 of file CMesh3D.hpp.
References polyfem::mesh::Navigation3D::get_index_from_element_tri(), and mesh_.
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 96 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Mesh3DStorage::vertices.
|
inlineoverridevirtual |
is edge boundary
[in] | edge_global_id | global edge id |
Implements polyfem::mesh::Mesh.
Definition at line 51 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::edges, and mesh_.
|
overridevirtual |
is cell boundary
[in] | element_global_id | global cell id |
Implements polyfem::mesh::Mesh.
Definition at line 1189 of file CMesh3D.cpp.
References polyfem::mesh::Mesh3DStorage::elements, is_boundary_face(), is_boundary_vertex(), and mesh_.
|
inlineoverridevirtual |
is face boundary
[in] | face_global_id | global face id |
Implements polyfem::mesh::Mesh.
Definition at line 52 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::faces, and mesh_.
Referenced by compute_boundary_ids(), and is_boundary_element().
|
inlineoverridevirtual |
is vertex boundary
[in] | vertex_global_id | global vertex id |
Implements polyfem::mesh::Mesh.
Definition at line 50 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Mesh3DStorage::vertices.
Referenced by is_boundary_element().
|
inlineoverridevirtual |
if the mesh is conforming
Implements polyfem::mesh::Mesh.
Definition at line 28 of file CMesh3D.hpp.
|
overridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 1257 of file CMesh3D.cpp.
References polyfem::mesh::Mesh3DStorage::elements, and mesh_.
|
overrideprotectedvirtual |
loads a mesh from a geo mesh
[in] | M | geo mesh |
Implements polyfem::mesh::Mesh.
Definition at line 204 of file CMesh3D.cpp.
References polyfem::mesh::Mesh::cell_nodes_, compute_elements_tag(), polyfem::mesh::Mesh::edge_nodes_, polyfem::mesh::Mesh3DStorage::elements, polyfem::mesh::Mesh::face_nodes_, polyfem::mesh::Mesh3DStorage::faces, polyfem::mesh::Element::fs, polyfem::mesh::Element::fs_flag, polyfem::mesh::Element::hex, polyfem::mesh::HEX, polyfem::mesh::HYB, polyfem::mesh::Vertex::id, polyfem::mesh::Face::id, polyfem::mesh::Element::id, mesh_, polyfem::mesh::Mesh3DStorage::points, polyfem::mesh::Navigation3D::prepare_mesh(), polyfem::mesh::TET, polyfem::mesh::Mesh3DStorage::type, polyfem::mesh::Element::v_in_Kernel, polyfem::mesh::Mesh3DStorage::vertices, polyfem::mesh::Face::vs, and polyfem::mesh::Element::vs.
|
overrideprotectedvirtual |
loads a mesh from the path
[in] | path | file location |
Implements polyfem::mesh::Mesh.
Definition at line 80 of file CMesh3D.cpp.
References cell_barycenter(), polyfem::mesh::Mesh::cell_nodes_, compute_elements_tag(), polyfem::mesh::Mesh::edge_nodes_, polyfem::mesh::Mesh3DStorage::elements, polyfem::utils::StringUtils::endswith(), polyfem::mesh::Mesh::face_nodes_, polyfem::mesh::Mesh3DStorage::faces, polyfem::mesh::find(), polyfem::mesh::Element::fs, polyfem::mesh::Element::fs_flag, polyfem::mesh::Vertex::id, polyfem::mesh::Face::id, polyfem::mesh::Element::id, load(), mesh_, n_cells(), polyfem::mesh::Mesh3DStorage::points, polyfem::mesh::Navigation3D::prepare_mesh(), polyfem::mesh::Mesh3DStorage::vertices, polyfem::mesh::Face::vs, polyfem::mesh::Element::vs, x, y, and z.
Referenced by build_from_matrices(), and load().
|
inline |
Definition at line 114 of file CMesh3D.hpp.
References mesh_.
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 39 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::elements, and mesh_.
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 40 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::elements, and mesh_.
|
inlineoverridevirtual |
number of vertices of a cell
[in] | c_id | global cell id (face for 2d meshes) |
Implements polyfem::mesh::Mesh.
Definition at line 38 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::elements, and mesh_.
Referenced by cell_barycenter(), and elements_boxes().
|
inlineoverridevirtual |
number of cells
Implements polyfem::mesh::Mesh.
Definition at line 32 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::elements, and mesh_.
Referenced by attach_higher_order_nodes(), load(), and normalize().
|
inlineoverridevirtual |
number of edges
Implements polyfem::mesh::Mesh.
Definition at line 34 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::edges, and mesh_.
Referenced by attach_higher_order_nodes().
|
inlineoverridevirtual |
number of vertices of a face
[in] | f_id | global face id |
Implements polyfem::mesh::Mesh.
Definition at line 37 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::faces, and mesh_.
Referenced by compute_boundary_ids(), face_barycenter(), and quad_area().
|
inlineoverridevirtual |
number of faces
Implements polyfem::mesh::Mesh.
Definition at line 33 of file CMesh3D.hpp.
References polyfem::mesh::Mesh3DStorage::faces, and mesh_.
Referenced by attach_higher_order_nodes(), and compute_boundary_ids().
|
inlineoverridevirtual |
number of vertices
Implements polyfem::mesh::Mesh.
Definition at line 35 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Mesh3DStorage::points.
Referenced by cell_barycenter(), face_barycenter(), quad_area(), and refine().
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 93 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Navigation3D::next_around_3Dedge().
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 94 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Navigation3D::next_around_2Dface().
Referenced by attach_higher_order_nodes().
|
overridevirtual |
normalize the mesh
Implements polyfem::mesh::Mesh.
Definition at line 1022 of file CMesh3D.cpp.
References bounding_box(), polyfem::mesh::Mesh::cell_nodes_, polyfem::mesh::Mesh::edge_nodes_, polyfem::mesh::Mesh3DStorage::elements, polyfem::mesh::Mesh::face_nodes_, polyfem::mesh::Mesh3D::get_edges(), polyfem::logger(), mesh_, n_cells(), polyfem::mesh::Mesh3DStorage::points, V, and val.
|
overridevirtual |
point coordinates
[in] | global_index | global vertex index |
Implements polyfem::mesh::Mesh.
Definition at line 1251 of file CMesh3D.cpp.
References mesh_, and polyfem::mesh::Mesh3DStorage::points.
Referenced by barycentric_coords(), cell_barycenter(), edge_barycenter(), elements_boxes(), face_barycenter(), and quad_area().
|
overridevirtual |
area of a quad face of an hex mesh
[in] | gid | global face id |
Reimplemented from polyfem::mesh::Mesh.
Definition at line 1466 of file CMesh3D.cpp.
References polyfem::mesh::Mesh3DStorage::faces, mesh_, n_face_vertices(), n_vertices(), and point().
|
overridevirtual |
refine the mesh
[in] | n_refinement | number of refinements |
[in] | t | position of the refinement location (0.5 for standard refinement) |
Implements polyfem::mesh::Mesh.
Definition at line 19 of file CMesh3D.cpp.
References polyfem::mesh::BOUNDARY_POLYTOPE, compute_elements_tag(), polyfem::mesh::Mesh3DStorage::edges, polyfem::mesh::Mesh3DStorage::elements, polyfem::mesh::Mesh::elements_tag(), polyfem::mesh::Mesh3DStorage::faces, polyfem::mesh::Mesh::in_ordered_edges_, polyfem::mesh::Mesh::in_ordered_faces_, polyfem::mesh::Mesh::in_ordered_vertices_, polyfem::mesh::INTERIOR_POLYTOPE, mesh_, n_vertices(), polyfem::mesh::Mesh::orders_, polyfem::mesh::Navigation3D::prepare_mesh(), polyfem::mesh::MeshProcessing3D::refine_catmul_clark_polar(), polyfem::mesh::MeshProcessing3D::refine_red_refinement_tet(), polyfem::mesh::TET, and polyfem::mesh::Mesh3DStorage::type.
|
overridevirtual |
Implements polyfem::mesh::Mesh.
Definition at line 416 of file CMesh3D.cpp.
References polyfem::mesh::Mesh3DStorage::elements, polyfem::utils::StringUtils::endswith(), polyfem::mesh::Mesh3DStorage::faces, mesh_, polyfem::mesh::Mesh3DStorage::points, and polyfem::mesh::to_geogram_mesh().
|
overridevirtual |
Set the point.
[in] | global_index | global vertex index |
[in] | p | value |
Implements polyfem::mesh::Mesh.
Definition at line 1240 of file CMesh3D.cpp.
References mesh_, polyfem::mesh::Mesh3DStorage::points, and polyfem::mesh::Mesh3DStorage::vertices.
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 88 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Navigation3D::switch_edge().
Referenced by attach_higher_order_nodes().
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 90 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Navigation3D::switch_element().
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 89 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Navigation3D::switch_face().
Referenced by attach_higher_order_nodes().
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 87 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Navigation3D::switch_vertex().
Referenced by attach_higher_order_nodes().
|
inlineoverridevirtual |
Implements polyfem::mesh::Mesh3D.
Definition at line 83 of file CMesh3D.hpp.
References mesh_, and polyfem::mesh::Mesh3DStorage::vertices.
|
private |
Definition at line 130 of file CMesh3D.hpp.
Referenced by append(), bounding_box(), cell_barycenter(), cell_edge(), cell_face(), cell_vertex(), compute_elements_tag(), edge_barycenter(), edge_neighs(), edge_vertex(), face_barycenter(), face_vertex(), get_edge_elements_neighs(), get_index_from_element(), get_index_from_element(), get_index_from_element_edge(), get_index_from_element_face(), get_vertex_elements_neighs(), is_boundary_edge(), is_boundary_element(), is_boundary_face(), is_boundary_vertex(), kernel(), load(), load(), mesh_storge(), n_cell_edges(), n_cell_faces(), n_cell_vertices(), n_cells(), n_edges(), n_face_vertices(), n_faces(), n_vertices(), next_around_edge(), next_around_face(), normalize(), point(), quad_area(), refine(), save(), set_point(), switch_edge(), switch_element(), switch_face(), switch_vertex(), and vertex_neighs().