PolyFEM
|
#include <MeshNodes.hpp>
Public Member Functions | |
MeshNodes (const Mesh &mesh, const bool has_poly, const bool connect_nodes, const int max_nodes_per_edge, const int max_nodes_per_face, const int max_nodes_per_cell=0) | |
int | n_nodes () const |
int | node_id_from_vertex (int v) |
int | node_id_from_edge (int e) |
int | node_id_from_face (int f) |
int | node_id_from_cell (int c) |
int | node_id_from_primitive (int primitive_id) |
std::vector< int > | node_ids_from_edge (const Navigation::Index &index, const int n_new_nodes) |
std::vector< int > | node_ids_from_face (const Navigation::Index &index, const int n_new_nodes) |
std::vector< int > | node_ids_from_edge (const Navigation3D::Index &index, const int n_new_nodes) |
std::vector< int > | node_ids_from_face (const Navigation3D::Index &index, const int n_new_nodes) |
std::vector< int > | node_ids_from_cell (const Navigation3D::Index &index, const int n_new_nodes) |
int | primitive_from_vertex (int v) const |
int | primitive_from_edge (int e) const |
int | primitive_from_face (int f) const |
int | primitive_from_cell (int c) const |
bool | is_vertex_node (int i) const |
bool | is_edge_node (int i) const |
bool | is_face_node (int i) const |
bool | is_cell_node (int i) const |
int | num_vertex_nodes () const |
int | num_edge_nodes () const |
int | num_face_nodes () const |
int | num_cell_nodes () const |
int | vertex_from_node_id (int node_id) const |
int | edge_from_node_id (int node_id) const |
int | face_from_node_id (int node_id) const |
int | cell_from_node_id (int node_id) const |
const std::vector< int > & | primitive_to_node () const |
const std::vector< int > & | node_to_primitive_gid () const |
const std::vector< int > & | node_to_primitive () const |
const std::vector< int > & | in_ordered_vertices () const |
RowVectorNd | node_position (int node_id) const |
bool | is_boundary (int node_id) const |
bool | is_primitive_boundary (int primitive) const |
bool | is_interface (int node_id) const |
bool | is_primitive_interface (int primitive) const |
bool | is_boundary_or_interface (const int node_id) const |
std::vector< int > | boundary_nodes () const |
Private Member Functions | |
int | count_nonnegative_nodes (int start_i, int end_i) const |
Private Attributes | |
const Mesh & | mesh_ |
const bool | connect_nodes_ |
const int | edge_offset_ |
const int | face_offset_ |
const int | cell_offset_ |
const int | max_nodes_per_edge_ |
const int | max_nodes_per_face_ |
const int | max_nodes_per_cell_ |
std::vector< int > | primitive_to_node_ |
std::vector< int > | node_to_primitive_ |
std::vector< int > | node_to_primitive_gid_ |
Eigen::MatrixXd | nodes_ |
std::vector< bool > | is_boundary_ |
std::vector< bool > | is_interface_ |
std::vector< int > | in_ordered_vertices_ |
Definition at line 17 of file MeshNodes.hpp.
polyfem::mesh::MeshNodes::MeshNodes | ( | const Mesh & | mesh, |
const bool | has_poly, | ||
const bool | connect_nodes, | ||
const int | max_nodes_per_edge, | ||
const int | max_nodes_per_face, | ||
const int | max_nodes_per_cell = 0 |
||
) |
Definition at line 65 of file MeshNodes.cpp.
References cell_offset_, polyfem::mesh::Mesh::dimension(), edge_offset_, face_offset_, is_boundary(), is_boundary_, polyfem::mesh::Mesh::is_boundary_edge(), polyfem::mesh::Mesh::is_boundary_face(), polyfem::mesh::Mesh::is_boundary_vertex(), is_interface_, polyfem::mesh::Mesh::is_volume(), polyfem::mesh::Mesh::n_cells(), polyfem::mesh::Mesh::n_edges(), polyfem::mesh::Mesh::n_faces(), n_nodes(), polyfem::mesh::Mesh::n_vertices(), nodes_, and primitive_to_node_.
std::vector< int > polyfem::mesh::MeshNodes::boundary_nodes | ( | ) | const |
Definition at line 603 of file MeshNodes.cpp.
References is_boundary_, n_nodes(), and primitive_to_node_.
int polyfem::mesh::MeshNodes::cell_from_node_id | ( | int | node_id | ) | const |
Definition at line 594 of file MeshNodes.cpp.
References cell_offset_, n_nodes(), and node_to_primitive_.
|
private |
Definition at line 618 of file MeshNodes.cpp.
References primitive_to_node_.
Referenced by num_cell_nodes(), num_edge_nodes(), num_face_nodes(), and num_vertex_nodes().
int polyfem::mesh::MeshNodes::edge_from_node_id | ( | int | node_id | ) | const |
Definition at line 580 of file MeshNodes.cpp.
References edge_offset_, face_offset_, and node_to_primitive_.
int polyfem::mesh::MeshNodes::face_from_node_id | ( | int | node_id | ) | const |
Definition at line 587 of file MeshNodes.cpp.
References cell_offset_, face_offset_, and node_to_primitive_.
|
inline |
Definition at line 64 of file MeshNodes.hpp.
References in_ordered_vertices_.
|
inline |
Definition at line 70 of file MeshNodes.hpp.
References is_boundary_, and node_to_primitive_.
Referenced by is_boundary_or_interface(), and MeshNodes().
|
inline |
Definition at line 78 of file MeshNodes.hpp.
References is_boundary(), and is_interface().
|
inline |
Definition at line 48 of file MeshNodes.hpp.
References cell_offset_.
|
inline |
Definition at line 46 of file MeshNodes.hpp.
References edge_offset_, and face_offset_.
|
inline |
Definition at line 47 of file MeshNodes.hpp.
References cell_offset_, and face_offset_.
|
inline |
Definition at line 74 of file MeshNodes.hpp.
References is_interface_, and node_to_primitive_.
Referenced by is_boundary_or_interface().
|
inline |
Definition at line 71 of file MeshNodes.hpp.
References is_boundary_.
|
inline |
Definition at line 75 of file MeshNodes.hpp.
References is_interface_.
|
inline |
Definition at line 45 of file MeshNodes.hpp.
References edge_offset_.
|
inline |
Definition at line 23 of file MeshNodes.hpp.
References node_to_primitive_.
Referenced by boundary_nodes(), polyfem::basis::SplineBasis2d::build_bases(), polyfem::basis::SplineBasis3d::build_bases(), cell_from_node_id(), MeshNodes(), node_id_from_primitive(), node_ids_from_cell(), node_ids_from_edge(), node_ids_from_edge(), node_ids_from_face(), node_ids_from_face(), and num_cell_nodes().
int polyfem::mesh::MeshNodes::node_id_from_cell | ( | int | c | ) |
Definition at line 566 of file MeshNodes.cpp.
References cell_offset_, max_nodes_per_cell_, and node_id_from_primitive().
Referenced by node_ids_from_cell().
int polyfem::mesh::MeshNodes::node_id_from_edge | ( | int | e | ) |
Definition at line 556 of file MeshNodes.cpp.
References edge_offset_, max_nodes_per_edge_, and node_id_from_primitive().
int polyfem::mesh::MeshNodes::node_id_from_face | ( | int | f | ) |
Definition at line 561 of file MeshNodes.cpp.
References face_offset_, max_nodes_per_face_, and node_id_from_primitive().
int polyfem::mesh::MeshNodes::node_id_from_primitive | ( | int | primitive_id | ) |
Definition at line 157 of file MeshNodes.cpp.
References polyfem::mesh::Mesh::cell_barycenter(), cell_offset_, connect_nodes_, polyfem::mesh::Mesh::edge_barycenter(), edge_offset_, polyfem::mesh::Mesh::face_barycenter(), face_offset_, in_ordered_vertices_, mesh_, n_nodes(), node_to_primitive_, node_to_primitive_gid_, nodes_, polyfem::mesh::Mesh::point(), and primitive_to_node_.
Referenced by node_id_from_cell(), node_id_from_edge(), node_id_from_face(), and node_id_from_vertex().
int polyfem::mesh::MeshNodes::node_id_from_vertex | ( | int | v | ) |
Definition at line 551 of file MeshNodes.cpp.
References node_id_from_primitive().
std::vector< int > polyfem::mesh::MeshNodes::node_ids_from_cell | ( | const Navigation3D::Index & | index, |
const int | n_new_nodes | ||
) |
Definition at line 464 of file MeshNodes.cpp.
References polyfem::mesh::Mesh3D::cell_node(), cell_offset_, connect_nodes_, polyfem::mesh::Navigation3D::Index::element, in_ordered_vertices_, polyfem::mesh::Mesh::is_simplex(), max_nodes_per_cell_, mesh_, n_nodes(), node_id_from_cell(), node_to_primitive_, node_to_primitive_gid_, nodes_, and primitive_to_node_.
std::vector< int > polyfem::mesh::MeshNodes::node_ids_from_edge | ( | const Navigation3D::Index & | index, |
const int | n_new_nodes | ||
) |
Definition at line 258 of file MeshNodes.cpp.
References polyfem::mesh::Navigation3D::Index::edge, polyfem::mesh::Mesh3D::edge_node(), edge_offset_, in_ordered_vertices_, max_nodes_per_edge_, mesh_, n_nodes(), node_position(), node_to_primitive_, node_to_primitive_gid_, nodes_, and primitive_to_node_.
std::vector< int > polyfem::mesh::MeshNodes::node_ids_from_edge | ( | const Navigation::Index & | index, |
const int | n_new_nodes | ||
) |
Definition at line 180 of file MeshNodes.cpp.
References connect_nodes_, polyfem::mesh::Navigation::Index::edge, polyfem::mesh::Mesh2D::edge_node(), edge_offset_, polyfem::mesh::Navigation::Index::face, in_ordered_vertices_, polyfem::mesh::Mesh::is_boundary_edge(), max_nodes_per_edge_, mesh_, n_nodes(), node_position(), node_to_primitive_, node_to_primitive_gid_, nodes_, primitive_to_node_, and polyfem::mesh::Mesh2D::switch_face().
std::vector< int > polyfem::mesh::MeshNodes::node_ids_from_face | ( | const Navigation3D::Index & | index, |
const int | n_new_nodes | ||
) |
Definition at line 366 of file MeshNodes.cpp.
References connect_nodes_, polyfem::mesh::Navigation3D::Index::element, polyfem::mesh::Navigation3D::Index::face, polyfem::mesh::Mesh3D::face_node(), face_offset_, in_ordered_vertices_, polyfem::mesh::Mesh::is_boundary_face(), polyfem::mesh::Mesh::is_simplex(), max_nodes_per_face_, mesh_, n_nodes(), node_to_primitive_, node_to_primitive_gid_, nodes_, primitive_to_node_, and polyfem::mesh::Mesh3D::switch_element().
std::vector< int > polyfem::mesh::MeshNodes::node_ids_from_face | ( | const Navigation::Index & | index, |
const int | n_new_nodes | ||
) |
Definition at line 313 of file MeshNodes.cpp.
References connect_nodes_, polyfem::mesh::Navigation::Index::face, polyfem::mesh::Mesh2D::face_node(), face_offset_, in_ordered_vertices_, polyfem::mesh::Mesh::is_simplex(), max_nodes_per_face_, mesh_, n_nodes(), node_to_primitive_, node_to_primitive_gid_, nodes_, and primitive_to_node_.
|
inline |
Definition at line 67 of file MeshNodes.hpp.
References node_to_primitive_, and nodes_.
Referenced by node_ids_from_edge(), and node_ids_from_edge().
|
inline |
Definition at line 63 of file MeshNodes.hpp.
References node_to_primitive_.
|
inline |
Definition at line 62 of file MeshNodes.hpp.
References node_to_primitive_gid_.
|
inline |
Definition at line 53 of file MeshNodes.hpp.
References cell_offset_, count_nonnegative_nodes(), and n_nodes().
|
inline |
Definition at line 51 of file MeshNodes.hpp.
References count_nonnegative_nodes(), edge_offset_, and face_offset_.
|
inline |
Definition at line 52 of file MeshNodes.hpp.
References cell_offset_, count_nonnegative_nodes(), and face_offset_.
|
inline |
Definition at line 50 of file MeshNodes.hpp.
References count_nonnegative_nodes(), and edge_offset_.
|
inline |
Definition at line 43 of file MeshNodes.hpp.
References cell_offset_.
|
inline |
Definition at line 41 of file MeshNodes.hpp.
References edge_offset_.
|
inline |
Definition at line 42 of file MeshNodes.hpp.
References face_offset_.
|
inline |
Definition at line 40 of file MeshNodes.hpp.
|
inline |
Definition at line 61 of file MeshNodes.hpp.
References primitive_to_node_.
int polyfem::mesh::MeshNodes::vertex_from_node_id | ( | int | node_id | ) | const |
Definition at line 573 of file MeshNodes.cpp.
References edge_offset_, and node_to_primitive_.
|
private |
Definition at line 91 of file MeshNodes.hpp.
Referenced by cell_from_node_id(), face_from_node_id(), is_cell_node(), is_face_node(), MeshNodes(), node_id_from_cell(), node_id_from_primitive(), node_ids_from_cell(), num_cell_nodes(), num_face_nodes(), and primitive_from_cell().
|
private |
Definition at line 87 of file MeshNodes.hpp.
Referenced by node_id_from_primitive(), node_ids_from_cell(), node_ids_from_edge(), node_ids_from_face(), and node_ids_from_face().
|
private |
Definition at line 89 of file MeshNodes.hpp.
Referenced by edge_from_node_id(), is_edge_node(), is_vertex_node(), MeshNodes(), node_id_from_edge(), node_id_from_primitive(), node_ids_from_edge(), node_ids_from_edge(), num_edge_nodes(), num_vertex_nodes(), primitive_from_edge(), and vertex_from_node_id().
|
private |
Definition at line 90 of file MeshNodes.hpp.
Referenced by edge_from_node_id(), face_from_node_id(), is_edge_node(), is_face_node(), MeshNodes(), node_id_from_face(), node_id_from_primitive(), node_ids_from_face(), node_ids_from_face(), num_edge_nodes(), num_face_nodes(), and primitive_from_face().
|
private |
Definition at line 108 of file MeshNodes.hpp.
Referenced by in_ordered_vertices(), node_id_from_primitive(), node_ids_from_cell(), node_ids_from_edge(), node_ids_from_edge(), node_ids_from_face(), and node_ids_from_face().
|
private |
Definition at line 104 of file MeshNodes.hpp.
Referenced by boundary_nodes(), is_boundary(), is_primitive_boundary(), and MeshNodes().
|
private |
Definition at line 105 of file MeshNodes.hpp.
Referenced by is_interface(), is_primitive_interface(), and MeshNodes().
|
private |
Definition at line 95 of file MeshNodes.hpp.
Referenced by node_id_from_cell(), and node_ids_from_cell().
|
private |
Definition at line 93 of file MeshNodes.hpp.
Referenced by node_id_from_edge(), node_ids_from_edge(), and node_ids_from_edge().
|
private |
Definition at line 94 of file MeshNodes.hpp.
Referenced by node_id_from_face(), node_ids_from_face(), and node_ids_from_face().
|
private |
Definition at line 86 of file MeshNodes.hpp.
Referenced by node_id_from_primitive(), node_ids_from_cell(), node_ids_from_edge(), node_ids_from_edge(), node_ids_from_face(), and node_ids_from_face().
|
private |
Definition at line 99 of file MeshNodes.hpp.
Referenced by cell_from_node_id(), edge_from_node_id(), face_from_node_id(), is_boundary(), is_interface(), n_nodes(), node_id_from_primitive(), node_ids_from_cell(), node_ids_from_edge(), node_ids_from_edge(), node_ids_from_face(), node_ids_from_face(), node_position(), node_to_primitive(), and vertex_from_node_id().
|
private |
Definition at line 100 of file MeshNodes.hpp.
Referenced by node_id_from_primitive(), node_ids_from_cell(), node_ids_from_edge(), node_ids_from_edge(), node_ids_from_face(), node_ids_from_face(), and node_to_primitive_gid().
|
private |
Definition at line 103 of file MeshNodes.hpp.
Referenced by MeshNodes(), node_id_from_primitive(), node_ids_from_cell(), node_ids_from_edge(), node_ids_from_edge(), node_ids_from_face(), node_ids_from_face(), and node_position().
|
private |
Definition at line 98 of file MeshNodes.hpp.
Referenced by boundary_nodes(), count_nonnegative_nodes(), MeshNodes(), node_id_from_primitive(), node_ids_from_cell(), node_ids_from_edge(), node_ids_from_edge(), node_ids_from_face(), node_ids_from_face(), and primitive_to_node().