|
PolyFEM
|
Abstract mesh class to capture 2d/3d conforming and non-conforming meshes. More...
#include <Mesh.hpp>
Classes | |
| class | CellNodes |
| Class to store the high-order cells nodes. More... | |
| class | EdgeNodes |
| Class to store the high-order edge nodes. More... | |
| class | FaceNodes |
| Class to store the high-order face nodes. More... | |
Public Member Functions | |
| MeshData | to_mesh_data () const |
| Capture the complete runtime mesh in the canonical, format-independent representation. | |
| virtual std::unique_ptr< Mesh > | copy () const =0 |
| Create a copy of the mesh. | |
| std::vector< MeshWithID > | split () const |
| Split the mesh according to its per-element geometry IDs. | |
| 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 |
| virtual void | refine (const int n_refinement, const double t)=0 |
| refine the mesh | |
| virtual bool | is_volume () const =0 |
| checks if mesh is volume | |
| int | dimension () const |
| utily for dimension | |
| virtual bool | is_conforming () const =0 |
| if the mesh is conforming | |
| 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 | |
| virtual int | n_cells () const =0 |
| number of cells | |
| virtual int | n_faces () const =0 |
| number of faces | |
| virtual int | n_edges () const =0 |
| number of edges | |
| virtual int | n_vertices () const =0 |
| number of vertices | |
| virtual int | n_face_vertices (const int f_id) const =0 |
| number of vertices of a face | |
| virtual int | n_cell_vertices (const int c_id) const =0 |
| number of vertices of a cell | |
| virtual int | edge_vertex (const int e_id, const int lv_id) const =0 |
| id of the edge vertex | |
| virtual int | face_vertex (const int f_id, const int lv_id) const =0 |
| id of the face vertex | |
| virtual int | cell_vertex (const int f_id, const int lv_id) const =0 |
| id of the vertex of a cell | |
| 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 |
| virtual bool | is_boundary_vertex (const int vertex_global_id) const =0 |
| is vertex boundary | |
| virtual bool | is_boundary_edge (const int edge_global_id) const =0 |
| is edge boundary | |
| virtual bool | is_boundary_face (const int face_global_id) const =0 |
| is face boundary | |
| virtual bool | is_boundary_element (const int element_global_id) const =0 |
| is cell boundary | |
| virtual void | attach_higher_order_nodes (const Eigen::MatrixXd &V, const std::vector< std::vector< int > > &nodes)=0 |
| attach high order nodes | |
| 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 | normalize ()=0 |
| normalize the mesh | |
| virtual void | compute_elements_tag ()=0 |
| compute element types, see ElementType | |
| virtual void | update_elements_tag () |
| Update elements types. | |
| virtual double | edge_length (const int gid) const |
| edge length | |
| virtual double | quad_area (const int gid) const |
| area of a quad face of an hex mesh | |
| virtual double | tri_area (const int gid) const |
| area of a tri face of a tet mesh | |
| virtual RowVectorNd | point (const int global_index) const =0 |
| point coordinates | |
| virtual void | set_point (const int global_index, const RowVectorNd &p)=0 |
| Set the point. | |
| virtual RowVectorNd | edge_barycenter (const int e) const =0 |
| edge barycenter | |
| virtual RowVectorNd | face_barycenter (const int f) const =0 |
| face barycenter | |
| virtual RowVectorNd | cell_barycenter (const int c) const =0 |
| cell barycenter | |
| 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 | |
| virtual void | compute_element_barycenters (Eigen::MatrixXd &barycenters) const =0 |
| utility for 2d/3d. | |
| virtual void | elements_boxes (std::vector< std::array< Eigen::Vector3d, 2 > > &boxes) const =0 |
| constructs a box around every element (3d cell, 2d face) | |
| virtual void | barycentric_coords (const RowVectorNd &p, const int el_id, Eigen::MatrixXd &coord) const =0 |
| constructs barycentric coodiantes for a point p. | |
| virtual void | bounding_box (RowVectorNd &min, RowVectorNd &max) const =0 |
| computes the bbox of the mesh | |
| 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 simplex | |
| bool | is_prism (const int el_id) const |
| checks if element is a prism | |
| bool | is_pyramid (const int el_id) const |
| checks if element is a pyramid | |
| 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 | compute_boundary_ids (const std::function< int(const size_t, const std::vector< int > &, const RowVectorNd &, bool)> &marker)=0 |
| computes boundary selections based on a function | |
| virtual void | compute_body_ids (const std::function< int(const size_t, const std::vector< int > &, const RowVectorNd &)> &marker)=0 |
| computes boundary selections based on a function | |
| 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. | |
| 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) | |
| void | set_geometry_ids (const std::vector< int > &geometry_ids) |
| Set the geometry selection, one ID per element. | |
| int | get_geometry_id (const int element) const |
| Get the geometry ID of an element. The default geometry is 0. | |
| const std::vector< int > & | get_geometry_ids () const |
| bool | has_geometry_ids () const |
| 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 | |
| virtual void | get_edges (Eigen::MatrixXd &p0, Eigen::MatrixXd &p1) const =0 |
| Get all the edges. | |
| virtual void | get_edges (Eigen::MatrixXd &p0, Eigen::MatrixXd &p1, const std::vector< bool > &valid_elements) const =0 |
| Get all the edges according to valid_elements selection. | |
| 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 | has_prism () const |
| checks if the mesh has prisms | |
| bool | has_pyramids () const |
| checks if the mesh has pyramids | |
| 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. | |
| virtual void | append (const Mesh &mesh) |
| appends a new mesh to the end of this | |
| void | append (const std::unique_ptr< Mesh > &mesh) |
| appends a new mesh to the end of this, utility that takes pointer, calls other one | |
| virtual void | apply_affine_transformation (const MatrixNd &A, const VectorNd &b) |
| Apply an affine transformation \(Ax+b\) to the vertex positions \(x\) (and to every other stored position, e.g. | |
Static Public Member Functions | |
| static std::unique_ptr< Mesh > | create (MeshData data, bool non_conforming=false) |
| Construct a runtime mesh from format-independent decoded data. | |
Protected Member Functions | |
| Mesh ()=default | |
| Construct a new Mesh object. | |
| virtual void | remove_elements (const std::vector< bool > &keep)=0 |
| Remove all top-dimensional elements whose mask entry is false. | |
| void | filter_element_data (const std::vector< bool > &keep) |
| void | clear_higher_order_data () |
| void | clear_data_lost_by_refinement () |
| Drop the labels and the higher-order geometry before a conforming refinement. | |
| void | transform_higher_order_data (const MatrixNd &A, const VectorNd &b) |
Protected Attributes | |
| std::vector< ElementType > | elements_tag_ |
| list of element types | |
| std::vector< int > | node_ids_ |
| list of node labels, one per vertex | |
| std::vector< int > | boundary_ids_ |
| list of surface labels | |
| std::vector< int > | body_ids_ |
| list of volume labels | |
| std::vector< int > | geometry_ids_ |
| list of geometry labels, one per top-dimensional element | |
| 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 | |
| bool | has_explicit_polyhedral_topology_ = false |
| Whether the source MeshData supplied explicit face/cell incidence. | |
| Eigen::MatrixXd | higher_order_nodes_ |
| Canonical connectivity is retained because the runtime edge/face caches do not preserve the original per-element high-order node ordering. | |
| std::vector< std::vector< int > > | higher_order_connectivity_ |
| 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. | |
Private Member Functions | |
| bool | build_from_data (const MeshData &data) |
| Import all topology and metadata from MeshData. | |
| virtual bool | build_topology (const MeshData &data)=0 |
| Construct only the dimension-specific topology. | |
Abstract mesh class to capture 2d/3d conforming and non-conforming meshes.
Entities are vertices, edges, faces and (3D) cells, each numbered 0..n-1. The elements are the top-dimensional entities (faces in 2D, cells in 3D) and the boundary elements are one dimension lower (edges in 2D, faces in 3D). Navigation goes through the Index types of Navigation (2D) and Navigation3D (3D).
Implementations: CMesh2D/CMesh3D (conforming, any polygon/polyhedron) and NCMesh2D/NCMesh3D (simplices with hanging nodes, for adaptive refinement). Build one with Mesh::create(MeshData); the entity numbering of each implementation is documented on its class.
Besides the topology, a mesh stores per-entity labels:
Contracts: prepare_mesh() must be called after modifying the topology and before building bases; refine() and append() keep the labels consistent as documented on them.
|
protecteddefault |
Construct a new Mesh object.
|
virtualdefault |
Destroy the Mesh object.
|
virtual |
appends a new mesh to the end of this
| [in] | mesh | to append |
Reimplemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Definition at line 474 of file Mesh.cpp.
References polyfem::utils::append_rows(), body_ids_, boundary_ids_, cell_nodes_, cell_weights_, dimension(), edge_nodes_, elements_tag_, entries, face_nodes_, geometry_ids_, get_boundary_id(), get_default_boundary_id(), has_body_ids(), has_boundary_ids(), has_explicit_polyhedral_topology_, has_geometry_ids(), higher_order_connectivity_, higher_order_nodes_, in_ordered_edges_, in_ordered_faces_, in_ordered_vertices_, is_rational_, is_volume(), polyfem::log_and_throw_error(), n_boundary_elements(), n_cells(), n_edges(), n_elements(), n_faces(), n_vertices(), node_ids_, orders_, and source.
Referenced by polyfem::mesh::CMesh2D::append(), polyfem::mesh::NCMesh2D::append(), polyfem::mesh::CMesh3D::append(), polyfem::mesh::NCMesh3D::append(), and append().
|
inline |
|
virtual |
Apply an affine transformation \(Ax+b\) to the vertex positions \(x\) (and to every other stored position, e.g.
higher-order nodes and polyhedra kernels).
| [in] | A | Multiplicative matrix component of transformation |
| [in] | b | Additive translation component of transformation |
Reimplemented in polyfem::mesh::CMesh3D.
Definition at line 687 of file Mesh.cpp.
References cell_nodes_, edge_nodes_, face_nodes_, n_vertices(), point, set_point(), and transform_higher_order_data().
Referenced by polyfem::mesh::CMesh3D::apply_affine_transformation().
|
pure virtual |
attach high order nodes
| [in] | V | nodes |
| [in] | nodes | list of nodes per element |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by build_from_data().
|
pure virtual |
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 |
Implemented in polyfem::mesh::Mesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::Mesh3D.
Referenced by polyfem::io::OutGeometryData::build_grid().
|
inline |
Definition at line 258 of file Mesh.hpp.
References edge_vertex(), face_vertex(), and is_volume().
Referenced by to_mesh_data().
|
pure virtual |
computes the bbox of the mesh
| [out] | min | min coodiante |
| [out] | max | max coodiante |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by polyfem::mesh::GeometryLoader::apply_geometry_selection(), polyfem::varform::BilaplacianVarForm::assemble_rhs(), polyfem::varform::ElasticVarForm::assemble_rhs(), polyfem::varform::FluidVarForm::assemble_rhs(), polyfem::varform::GrowthElasticVarForm::assemble_rhs(), polyfem::varform::OperatorSplittingVarForm::assemble_rhs(), polyfem::varform::ScalarVarForm::assemble_rhs(), polyfem::varform::ThermoElasticVarForm::assemble_rhs(), polyfem::io::OutGeometryData::build_grid(), polyfem::solver::PeriodicBoundaryLagrangianForm::build_mapping(), polyfem::solver::OperatorSplittingSolver::initialize_mesh(), and polyfem::solver::LinearFilter::LinearFilter().
|
private |
Import all topology and metadata from MeshData.
Definition at line 206 of file Mesh.cpp.
References attach_higher_order_nodes(), polyfem::mesh::MeshData::body_ids, polyfem::mesh::MeshData::boundary_elements, polyfem::mesh::MeshData::boundary_ids, build_topology(), compute_boundary_ids(), dimension(), edge_vertex(), polyfem::mesh::MeshData::elements, face_vertex(), polyfem::mesh::MeshData::geometry_ids, get_default_boundary_id(), has_explicit_polyhedral_topology_, polyfem::mesh::MeshData::has_polyhedral_topology(), polyfem::mesh::MeshData::higher_order_connectivity, higher_order_connectivity_, polyfem::mesh::MeshData::higher_order_nodes, higher_order_nodes_, polyfem::mesh::MeshData::higher_order_weights, in_ordered_edges_, in_ordered_faces_, in_ordered_vertices_, is_conforming(), polyfem::logger(), n_edges(), n_face_vertices(), n_faces(), n_vertices(), polyfem::mesh::MeshData::node_ids, node_ids_, set_body_ids(), set_cell_weights(), set_geometry_ids(), set_is_rational(), polyfem::mesh::MeshData::vertices, and weights.
|
privatepure virtual |
Construct only the dimension-specific topology.
Metadata is applied by build_from_data after edge/face indices exist.
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by build_from_data().
|
pure virtual |
cell barycenter
| [in] | c | global cell index |
Implemented in polyfem::mesh::CMesh3D, polyfem::mesh::NCMesh3D, and polyfem::mesh::Mesh2D.
Referenced by cell_barycenters(), polyfem::mesh::Mesh3D::cell_node(), polyfem::solver::ElasticVariableToSimulation::inverse_eval(), and polyfem::mesh::MeshNodes::node_id_from_primitive().
| void polyfem::mesh::Mesh::cell_barycenters | ( | Eigen::MatrixXd & | barycenters | ) | const |
all cells barycenters
| [out] | barycenters |
Definition at line 329 of file Mesh.cpp.
References cell_barycenter(), dimension(), and n_cells().
Referenced by polyfem::mesh::Mesh3D::compute_element_barycenters(), and polyfem::solver::LinearFilter::LinearFilter().
|
pure virtual |
id of the vertex of a cell
| [in] | f_id | global cell id |
| [in] | lv_id | local vertex id |
Implemented in polyfem::mesh::CMesh3D, polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, and polyfem::mesh::NCMesh3D.
Referenced by polyfem::solver::OperatorSplittingSolver::advection_PIC(), element_vertex(), polyfem::mesh::Mesh3D::elements_boxes(), polyfem::solver::OperatorSplittingSolver::initialize_mesh(), polyfem::refinement::APriori::p_refine(), and polyfem::io::MshWriter::write().
|
inline |
weights for rational polynomial meshes
| [in] | cell_index | index of the cell |
Definition at line 586 of file Mesh.hpp.
References cell_weights_.
|
protected |
Drop the labels and the higher-order geometry before a conforming refinement.
Definition at line 702 of file Mesh.cpp.
References body_ids_, boundary_ids_, cell_nodes_, clear_higher_order_data(), edge_nodes_, face_nodes_, geometry_ids_, node_ids_, and orders_.
Referenced by polyfem::mesh::CMesh2D::refine(), and polyfem::mesh::CMesh3D::refine().
|
protected |
Definition at line 715 of file Mesh.cpp.
References cell_weights_, higher_order_connectivity_, higher_order_nodes_, and is_rational_.
Referenced by clear_data_lost_by_refinement(), polyfem::mesh::NCMesh2D::refine(), and polyfem::mesh::NCMesh3D::refine().
|
pure virtual |
computes boundary selections based on a function
| [in] | marker | lambda function that takes the id and barycenter and returns an integer |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
|
pure virtual |
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 |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by build_from_data().
|
pure virtual |
utility for 2d/3d.
In 2d it returns face_barycenters, in 3d it returns cell_barycenters
| [out] | barycenters | the barycenters |
Implemented in polyfem::mesh::Mesh2D, and polyfem::mesh::Mesh3D.
Referenced by polyfem::mesh::GeometryLoader::apply_geometry_selection().
|
pure virtual |
compute element types, see ElementType
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
| void polyfem::mesh::Mesh::compute_node_ids | ( | const std::function< int(const size_t, const RowVectorNd &, bool)> & | marker | ) |
computes boundary selections based on a function
| [in] | marker | lambda function that takes the node id, the position, and true/false if the element is on the boundary and returns an integer |
Definition at line 380 of file Mesh.cpp.
References is_boundary_vertex(), n_vertices(), node_ids_, and point.
|
pure virtual |
Create a copy of the mesh.
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by polyfem::varform::NavierStokesFSIVarForm::load_mesh(), and split().
|
static |
Construct a runtime mesh from format-independent decoded data.
Definition at line 83 of file Mesh.cpp.
References polyfem::mesh::MeshData::dimension(), polyfem::log_and_throw_error(), and polyfem::mesh::MeshData::validate().
Referenced by polyfem::mesh::MeshLoader::load_fem(), and polyfem::State::set_mesh().
|
inline |
utily for dimension
Definition at line 171 of file Mesh.hpp.
References is_volume().
Referenced by append(), polyfem::io::Evaluator::average_grad_based_function(), polyfem::varform::NavierStokesFSIVarForm::build_basis(), polyfem::varform::FluidVarForm::build_basis(), polyfem::varform::GrowthElasticVarForm::build_basis(), polyfem::varform::IncompressibleElasticVarForm::build_basis(), polyfem::varform::NonlinearElasticVarForm::build_basis(), polyfem::varform::OperatorSplittingVarForm::build_basis(), polyfem::varform::ThermoElasticVarForm::build_basis(), polyfem::varform::NonlinearElasticVarForm::build_collision_mesh(), polyfem::varform::GrowthElasticVarForm::build_displacement_boundary(), polyfem::varform::ThermoElasticVarForm::build_displacement_boundary(), polyfem::varform::ElasticVarForm::build_elastic_basis(), build_from_data(), polyfem::io::OutGeometryData::build_high_order_vis_mesh(), polyfem::solver::PeriodicBoundaryLagrangianForm::build_mapping(), polyfem::varform::NavierStokesFSIVarForm::build_mesh_displacement_boundary(), polyfem::varform::VarForm::build_polygonal_basis(), polyfem::io::OutGeometryData::build_vis_mesh(), polyfem::DiffCache::cache_transient(), cell_barycenters(), polyfem::io::OutStatsData::compute_errors(), polyfem::solver::HomogenizedDispGradForm::compute_reduced_adjoint_rhs(), polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), polyfem::io::Evaluator::compute_stress_at_quadrature_points(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::assembler::GenericTensorProblem::dirichlet_bc(), polyfem::problem::ElasticProblem::dirichlet_bc(), polyfem::problem::TorsionElasticProblem::dirichlet_bc(), polyfem::problem::DoubleTorsionElasticProblem::dirichlet_bc(), polyfem::problem::ElasticProblemZeroBC::dirichlet_bc(), polyfem::problem::WalkProblem::dirichlet_bc(), polyfem::problem::PointBasedTensorProblem::dirichlet_bc(), polyfem::assembler::GenericTensorProblem::dirichlet_nodal_value(), polyfem::solver::AdjointTools::dJ_dirichlet_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_du_step(), polyfem::solver::AdjointTools::dJ_friction_transient_adjoint_term(), polyfem::solver::AdjointTools::dJ_periodic_shape_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_homogenization_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_static_adjoint_term(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), edge_barycenters(), face_barycenters(), polyfem::solver::BodyForceDerivative::force_shape_derivative(), polyfem::solver::OperatorSplittingSolver::initialize_mesh(), polyfem::solver::AdjointTools::integrate_objective(), polyfem::io::Evaluator::interpolate_at_local_vals(), polyfem::io::Evaluator::interpolate_at_local_vals(), polyfem::io::Evaluator::interpolate_function(), polyfem::varform::ElasticVarForm::load_mesh(), polyfem::varform::FluidVarForm::load_mesh(), polyfem::varform::GrowthElasticVarForm::load_mesh(), polyfem::varform::IncompressibleElasticVarForm::load_mesh(), polyfem::varform::OperatorSplittingVarForm::load_mesh(), polyfem::varform::ThermoElasticVarForm::load_mesh(), polyfem::solver::AdjointTools::map_node_to_primitive_order(), polyfem::solver::AdjointTools::map_primitive_to_node_order(), polyfem::io::Evaluator::mark_flipped_cells(), polyfem::mesh::MeshNodes::MeshNodes(), polyfem::assembler::GenericTensorProblem::neumann_bc(), polyfem::problem::ElasticCantileverExact::neumann_bc(), polyfem::problem::PointBasedTensorProblem::neumann_bc(), polyfem::assembler::GenericTensorProblem::neumann_nodal_value(), polyfem::varform::DifferentiableVarForm::periodic_tile_offsets(), polyfem::varform::internal::sample_scalar_field(), polyfem::io::OutStatsData::save_json(), polyfem::io::OutGeometryData::save_points(), polyfem::io::OutGeometryData::save_volume(), polyfem::varform::DifferentiableVarForm::set_vertex_positions(), to_mesh_data(), and polyfem::io::MshWriter::write().
|
pure virtual |
edge barycenter
| [in] | e | global edge index |
Implemented in polyfem::mesh::CMesh3D, polyfem::mesh::NCMesh3D, polyfem::mesh::CMesh2D, and polyfem::mesh::NCMesh2D.
Referenced by edge_barycenters(), and polyfem::mesh::MeshNodes::node_id_from_primitive().
| void polyfem::mesh::Mesh::edge_barycenters | ( | Eigen::MatrixXd & | barycenters | ) | const |
all edges barycenters
| [out] | barycenters |
Definition at line 311 of file Mesh.cpp.
References dimension(), edge_barycenter(), and n_edges().
|
inlinevirtual |
edge length
| [in] | gid | global edge id |
Reimplemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, and polyfem::mesh::NCMesh3D.
Definition at line 324 of file Mesh.hpp.
Referenced by polyfem::utils::BoundarySampler::quadrature_for_polygon_edge(), polyfem::utils::BoundarySampler::quadrature_for_quad_edge(), and polyfem::utils::BoundarySampler::quadrature_for_tri_edge().
|
pure virtual |
id of the edge vertex
| [in] | e_id | global edge id |
| [in] | lv_id | local vertex index |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by boundary_element_vertex(), build_from_data(), edges(), edges_to_ids(), polyfem::mesh::Mesh2D::get_edges(), polyfem::mesh::Mesh3D::get_edges(), and polyfem::mesh::Mesh3D::get_edges().
| std::vector< std::pair< int, int > > polyfem::mesh::Mesh::edges | ( | ) | const |
list of sorted edges.
Used to map to input vertices
Definition at line 407 of file Mesh.cpp.
References edge_vertex(), and n_edges().
| std::unordered_map< std::pair< int, int >, size_t, HashPair > polyfem::mesh::Mesh::edges_to_ids | ( | ) | const |
map from edge (pair of v id) to the id of the edge
Definition at line 439 of file Mesh.cpp.
References edge_vertex(), and n_edges().
|
inline |
id of the vertex of a element
| [in] | el_id | global element id |
| [in] | lv_id | local vertex id |
Definition at line 240 of file Mesh.hpp.
References cell_vertex(), face_vertex(), and is_volume().
Referenced by element_vertices(), and to_mesh_data().
|
inline |
list of vids of an element
| [in] | el_id | global element id |
Definition at line 249 of file Mesh.hpp.
References element_vertex(), and n_cell_vertices().
Referenced by polyfem::mesh::GeometryLoader::apply_geometry_selection(), polyfem::mesh::CMesh2D::compute_body_ids(), polyfem::mesh::NCMesh2D::compute_body_ids(), polyfem::mesh::CMesh3D::compute_body_ids(), and polyfem::mesh::NCMesh3D::compute_body_ids().
|
pure virtual |
constructs a box around every element (3d cell, 2d face)
| [out] | boxes | axis aligned bounding boxes |
Implemented in polyfem::mesh::Mesh2D, and polyfem::mesh::Mesh3D.
Referenced by polyfem::io::OutGeometryData::build_grid().
|
inline |
Returns the elements types.
Definition at line 444 of file Mesh.hpp.
References elements_tag_.
Referenced by polyfem::io::OutStatsData::compute_mesh_stats(), polyfem::io::OutStatsData::count_flipped_elements(), and polyfem::mesh::CMesh3D::refine().
|
pure virtual |
face barycenter
| [in] | f | global face index |
Implemented in polyfem::mesh::CMesh3D, polyfem::mesh::NCMesh3D, and polyfem::mesh::Mesh2D.
Referenced by face_barycenters(), polyfem::io::Evaluator::interpolate_boundary_function(), and polyfem::mesh::MeshNodes::node_id_from_primitive().
| void polyfem::mesh::Mesh::face_barycenters | ( | Eigen::MatrixXd & | barycenters | ) | const |
all face barycenters
| [out] | barycenters |
Definition at line 320 of file Mesh.cpp.
References dimension(), face_barycenter(), and n_faces().
Referenced by polyfem::mesh::Mesh2D::compute_element_barycenters(), and polyfem::solver::LinearFilter::LinearFilter().
|
pure virtual |
id of the face vertex
| [in] | f_id | global face id |
| [in] | lv_id | local vertex index |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by boundary_element_vertex(), polyfem::basis::BarycentricBasis2d::build_bases(), build_from_data(), polyfem::mesh::compute_mesh_interface(), element_vertex(), polyfem::io::OutGeometryData::extract_boundary_mesh_2d_sampled(), faces(), faces_to_ids(), polyfem::refinement::APriori::p_refine(), to_mesh_data(), and polyfem::mesh::Mesh3D::tri_area().
| std::vector< std::vector< int > > polyfem::mesh::Mesh::faces | ( | ) | const |
list of sorted faces.
Used to map to input vertices
Definition at line 423 of file Mesh.cpp.
References face_vertex(), n_face_vertices(), and n_faces().
Referenced by polyfem::mesh::CMesh3D::attach_higher_order_nodes().
| std::unordered_map< std::vector< int >, size_t, HashVector > polyfem::mesh::Mesh::faces_to_ids | ( | ) | const |
map from face (tuple of v id) to the id of the face
Definition at line 455 of file Mesh.cpp.
References face_vertex(), n_face_vertices(), and n_faces().
|
protected |
Definition at line 49 of file Mesh.cpp.
References body_ids_, cell_weights_, elements_tag_, geometry_ids_, higher_order_connectivity_, and orders_.
Referenced by polyfem::mesh::CMesh2D::remove_elements(), polyfem::mesh::NCMesh2D::remove_elements(), polyfem::mesh::CMesh3D::remove_elements(), and polyfem::mesh::NCMesh3D::remove_elements().
|
inlinevirtual |
Get the volume selection of an element (cell in 3d, face in 2d)
| [in] | primitive | element id |
Reimplemented in polyfem::mesh::NCMesh2D, and polyfem::mesh::NCMesh3D.
Definition at line 521 of file Mesh.hpp.
References body_ids_, and has_body_ids().
Referenced by polyfem::mesh::GeometryLoader::apply_geometry_selection(), polyfem::varform::VarForm::assign_discr_orders(), polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), polyfem::compute_volume_node_ids(), polyfem::solver::AdjointTools::dJ_du_step(), polyfem::assembler::GenericTensorProblem::initial_acceleration(), polyfem::assembler::GenericTensorProblem::initial_solution(), polyfem::assembler::GenericScalarProblem::initial_solution(), polyfem::assembler::GenericTensorProblem::initial_velocity(), polyfem::solver::AdjointTools::integrate_objective(), polyfem::varform::ElasticVarForm::load_mesh(), polyfem::varform::GrowthElasticVarForm::load_mesh(), polyfem::varform::ThermoElasticVarForm::load_mesh(), polyfem::solver::PerBody2PerElem::PerBody2PerElem(), polyfem::solver::PerBody2PerNode::PerBody2PerNode(), polyfem::assembler::GenericTensorProblem::rhs(), polyfem::assembler::GenericScalarProblem::rhs(), and polyfem::select_interior_nodes().
|
inlinevirtual |
Get the volume selection of all elements (cells in 3d, faces in 2d)
Definition at line 530 of file Mesh.hpp.
References body_ids_.
Referenced by polyfem::io::MshWriter::write().
|
inlinevirtual |
Get the boundary selection of an element (face in 3d, edge in 2d)
| [in] | primitive | element id |
Reimplemented in polyfem::mesh::NCMesh2D, and polyfem::mesh::NCMesh3D.
Definition at line 499 of file Mesh.hpp.
References boundary_ids_, get_default_boundary_id(), and has_boundary_ids().
Referenced by append(), polyfem::solver::DirichletBoundaryVariableToSimulation::build_boundary_node_maps(), polyfem::assembler::RhsAssembler::compute_energy_hess(), polyfem::compute_surface_node_ids(), polyfem::assembler::GenericTensorProblem::dirichlet_bc(), polyfem::assembler::GenericScalarProblem::dirichlet_bc(), polyfem::problem::ElasticProblem::dirichlet_bc(), polyfem::problem::TorsionElasticProblem::dirichlet_bc(), polyfem::problem::DoubleTorsionElasticProblem::dirichlet_bc(), polyfem::problem::ElasticProblemZeroBC::dirichlet_bc(), polyfem::problem::WalkProblem::dirichlet_bc(), polyfem::problem::NodeProblem::dirichlet_bc(), polyfem::problem::PointBasedTensorProblem::dirichlet_bc(), polyfem::problem::ConstantVelocity::dirichlet_bc(), polyfem::problem::DrivenCavity::dirichlet_bc(), polyfem::problem::DrivenCavityC0::dirichlet_bc(), polyfem::problem::DrivenCavitySmooth::dirichlet_bc(), polyfem::problem::Flow::dirichlet_bc(), polyfem::problem::FlowWithObstacle::dirichlet_bc(), polyfem::problem::CornerFlow::dirichlet_bc(), polyfem::problem::Lshape::dirichlet_bc(), polyfem::problem::UnitFlowWithObstacle::dirichlet_bc(), polyfem::problem::StokesLawProblem::dirichlet_bc(), polyfem::problem::Airfoil::dirichlet_bc(), polyfem::assembler::RhsAssembler::lsq_bc(), polyfem::assembler::GenericTensorProblem::neumann_bc(), polyfem::assembler::GenericScalarProblem::neumann_bc(), polyfem::problem::ElasticCantileverExact::neumann_bc(), polyfem::problem::NodeProblem::neumann_bc(), polyfem::problem::PointBasedTensorProblem::neumann_bc(), polyfem::assembler::GenericTensorProblem::pressure_bc(), polyfem::assembler::RhsAssembler::sample_bc(), polyfem::io::OutGeometryData::save_surface(), and polyfem::select_boundary_nodes().
|
inlinevirtual |
Get the default boundary selection of an element (face in 3d, edge in 2d)
| [in] | primitive | element id |
Definition at line 487 of file Mesh.hpp.
References is_boundary_edge(), is_boundary_face(), and is_volume().
Referenced by append(), polyfem::mesh::NCMesh2D::append(), polyfem::mesh::NCMesh3D::append(), build_from_data(), get_boundary_id(), polyfem::mesh::NCMesh2D::get_boundary_id(), polyfem::mesh::NCMesh3D::get_boundary_id(), polyfem::mesh::CMesh2D::remove_elements(), polyfem::mesh::NCMesh2D::remove_elements(), polyfem::mesh::CMesh3D::remove_elements(), and polyfem::mesh::NCMesh3D::remove_elements().
|
pure virtual |
Get all the edges.
| [out] | p0 | edge first vertex |
| [out] | p1 | edge second vertex |
Implemented in polyfem::mesh::Mesh2D, and polyfem::mesh::Mesh3D.
Referenced by polyfem::io::OutStatsData::compute_mesh_size(), and polyfem::solver::OperatorSplittingSolver::initialize_hashtable().
|
pure virtual |
Get all the edges according to valid_elements selection.
| [out] | p0 | edge first vertex |
| [out] | p1 | edge second vertex |
| [in] | valid_elements | flag to compute the edge |
Implemented in polyfem::mesh::Mesh2D, and polyfem::mesh::Mesh3D.
|
inline |
Get the geometry ID of an element. The default geometry is 0.
Definition at line 543 of file Mesh.hpp.
References geometry_ids_, and has_geometry_ids().
Referenced by split().
|
inline |
Definition at line 548 of file Mesh.hpp.
References geometry_ids_.
|
inlinevirtual |
Get the boundary selection of a node.
| [in] | node_id | vertex id (FE spaces read the ids of their nodes through MeshNodes::node_tag) |
Definition at line 509 of file Mesh.hpp.
References node_ids_.
Referenced by polyfem::mesh::MeshNodes::finalize().
|
inlinevirtual |
checks if volumes selections are available
Definition at line 561 of file Mesh.hpp.
References body_ids_.
Referenced by append(), polyfem::mesh::NCMesh2D::append(), polyfem::mesh::NCMesh3D::append(), get_body_id(), to_mesh_data(), polyfem::mesh::NCMesh2D::update_labels_after_refinement(), and polyfem::mesh::NCMesh3D::update_labels_after_refinement().
|
inline |
checks if surface selections are available
Definition at line 557 of file Mesh.hpp.
References boundary_ids_.
Referenced by append(), polyfem::mesh::NCMesh2D::append(), polyfem::mesh::NCMesh3D::append(), get_boundary_id(), polyfem::mesh::NCMesh2D::get_boundary_id(), polyfem::mesh::NCMesh3D::get_boundary_id(), polyfem::mesh::CMesh2D::remove_elements(), polyfem::mesh::NCMesh2D::remove_elements(), polyfem::mesh::CMesh3D::remove_elements(), polyfem::mesh::NCMesh3D::remove_elements(), to_mesh_data(), polyfem::mesh::NCMesh2D::update_labels_after_refinement(), and polyfem::mesh::NCMesh3D::update_labels_after_refinement().
|
inline |
Definition at line 549 of file Mesh.hpp.
References geometry_ids_.
Referenced by append(), get_geometry_id(), and to_mesh_data().
|
inline |
checks if points selections are available
Definition at line 553 of file Mesh.hpp.
References node_ids_.
Referenced by polyfem::mesh::MeshNodes::finalize(), and to_mesh_data().
|
inline |
checks if the mesh has polytopes
Definition at line 599 of file Mesh.hpp.
References is_polytope(), and n_elements().
Referenced by polyfem::varform::VarForm::build_fe_space(), polyfem::varform::VarForm::build_node_mapping(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::io::OutGeometryData::extract_boundary_mesh_2d_sampled(), polyfem::io::OutGeometryData::extract_boundary_mesh_sampled(), and to_mesh_data().
|
inline |
checks if the mesh has prisms
Definition at line 613 of file Mesh.hpp.
References is_prism(), and n_elements().
Referenced by polyfem::varform::VarForm::export_options().
|
inline |
checks if the mesh has pyramids
Definition at line 627 of file Mesh.hpp.
References is_pyramid(), and n_elements().
|
inline |
Order of the input edges.
Definition at line 682 of file Mesh.hpp.
References in_ordered_edges_.
Referenced by polyfem::varform::VarForm::build_node_mapping().
|
inline |
Order of the input edges.
Definition at line 686 of file Mesh.hpp.
References in_ordered_faces_.
Referenced by polyfem::varform::VarForm::build_node_mapping().
|
inline |
Order of the input vertices.
Definition at line 678 of file Mesh.hpp.
References in_ordered_vertices_.
Referenced by polyfem::varform::VarForm::build_node_mapping().
|
pure virtual |
is edge boundary
| [in] | edge_global_id | global edge id |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by polyfem::mesh::compute_mesh_interface(), get_default_boundary_id(), polyfem::mesh::MeshNodes::MeshNodes(), and polyfem::mesh::MeshNodes::node_ids_from_edge().
|
pure virtual |
is cell boundary
| [in] | element_global_id | global cell id |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by polyfem::io::OutGeometryData::build_vis_mesh(), polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::Evaluator::interpolate_function(), and polyfem::io::Evaluator::mark_flipped_cells().
|
pure virtual |
is face boundary
| [in] | face_global_id | global face id |
Implemented in polyfem::mesh::Mesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by polyfem::mesh::compute_mesh_interface(), get_default_boundary_id(), polyfem::io::Evaluator::interpolate_boundary_function(), polyfem::mesh::MeshNodes::MeshNodes(), polyfem::mesh::MeshNodes::node_ids_from_face(), and polyfem::mesh::MeshNodes::node_ids_from_face().
|
pure virtual |
is vertex boundary
| [in] | vertex_global_id | global vertex id |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by compute_node_ids(), and polyfem::mesh::MeshNodes::MeshNodes().
|
pure virtual |
if the mesh is conforming
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by build_from_data(), polyfem::varform::VarForm::build_node_mapping(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::io::OutGeometryData::extract_boundary_mesh_sampled(), and polyfem::varform::NavierStokesFSIVarForm::load_mesh().
| bool polyfem::mesh::Mesh::is_cube | ( | const int | el_id | ) | const |
checks if element is cube compatible
| [in] | el_id | element id |
Definition at line 361 of file Mesh.cpp.
References elements_tag_, polyfem::mesh::INTERFACE_CUBE, 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, and polyfem::mesh::SIMPLE_SINGULAR_INTERIOR_CUBE.
Referenced by polyfem::io::Evaluator::average_grad_based_function(), polyfem::io::OutGeometryData::build_high_order_vis_mesh(), polyfem::io::OutGeometryData::build_vis_mesh(), polyfem::mesh::Mesh3D::cell_node(), polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_stress_at_quadrature_points(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::io::OutGeometryData::extract_boundary_mesh_2d_sampled(), polyfem::io::OutGeometryData::extract_boundary_mesh_sampled(), polyfem::mesh::Mesh3D::face_node(), polyfem::mesh::CMesh2D::face_node(), polyfem::mesh::Mesh3D::get_ordered_vertices_from_hex(), polyfem::basis::LagrangeBasis3d::hex_face_local_nodes(), polyfem::io::Evaluator::interpolate_boundary_function(), polyfem::io::Evaluator::interpolate_function(), polyfem::io::Evaluator::mark_flipped_cells(), polyfem::mesh::MeshNodes::node_ids_from_cell(), polyfem::basis::LagrangeBasis2d::quad_edge_local_nodes(), and to_mesh_data().
|
inline |
check if the mesh is linear
Definition at line 655 of file Mesh.hpp.
References orders_.
Referenced by polyfem::varform::VarForm::export_options().
| bool polyfem::mesh::Mesh::is_polytope | ( | const int | el_id | ) | const |
checks if element is polygon compatible
| [in] | el_id | element id |
Definition at line 374 of file Mesh.cpp.
References polyfem::mesh::BOUNDARY_POLYTOPE, elements_tag_, and polyfem::mesh::INTERIOR_POLYTOPE.
Referenced by polyfem::basis::PolygonalBasis2d::build_bases(), polyfem::basis::PolygonalBasis3d::build_bases(), polyfem::basis::SplineBasis2d::build_bases(), polyfem::basis::SplineBasis3d::build_bases(), polyfem::basis::BarycentricBasis2d::build_bases(), polyfem::io::OutGeometryData::build_high_order_vis_mesh(), polyfem::basis::PolygonalBasis3d::compute_integral_constraints(), polyfem::basis::PolygonalBasis2d::compute_integral_constraints(), polyfem::io::OutStatsData::compute_mesh_size(), polyfem::io::OutStatsData::count_flipped_elements(), and has_poly().
| bool polyfem::mesh::Mesh::is_prism | ( | const int | el_id | ) | const |
checks if element is a prism
| [in] | el_id | element id |
Definition at line 397 of file Mesh.cpp.
References elements_tag_, and polyfem::mesh::PRISM.
Referenced by polyfem::varform::VarForm::assign_discr_orders(), polyfem::io::Evaluator::average_grad_based_function(), polyfem::io::OutGeometryData::build_high_order_vis_mesh(), polyfem::io::OutGeometryData::build_vis_mesh(), polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_stress_at_quadrature_points(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::io::OutGeometryData::extract_boundary_mesh_sampled(), polyfem::mesh::Mesh3D::face_node(), polyfem::mesh::Mesh3D::face_node(), polyfem::mesh::Mesh3D::get_ordered_vertices_from_prism(), has_prism(), polyfem::io::Evaluator::interpolate_boundary_function(), polyfem::io::Evaluator::interpolate_function(), polyfem::io::Evaluator::mark_flipped_cells(), polyfem::mesh::MeshNodes::node_ids_from_cell(), polyfem::mesh::MeshNodes::node_ids_from_face(), polyfem::mesh::MeshNodes::node_ids_from_face(), and polyfem::basis::LagrangeBasis3d::prism_face_local_nodes().
| bool polyfem::mesh::Mesh::is_pyramid | ( | const int | el_id | ) | const |
checks if element is a pyramid
| [in] | el_id | element id |
Definition at line 402 of file Mesh.cpp.
References elements_tag_, and polyfem::mesh::PYRAMID.
Referenced by polyfem::varform::VarForm::assign_discr_orders(), polyfem::io::Evaluator::average_grad_based_function(), polyfem::io::OutGeometryData::build_high_order_vis_mesh(), polyfem::io::OutGeometryData::build_vis_mesh(), polyfem::mesh::Mesh3D::cell_node(), polyfem::io::Evaluator::check_scalar_value(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_stress_at_quadrature_points(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::io::OutGeometryData::extract_boundary_mesh_sampled(), polyfem::mesh::Mesh3D::face_node(), has_pyramids(), polyfem::io::Evaluator::interpolate_boundary_function(), polyfem::io::Evaluator::interpolate_function(), polyfem::io::Evaluator::mark_flipped_cells(), polyfem::mesh::MeshNodes::node_ids_from_cell(), polyfem::mesh::MeshNodes::node_ids_from_face(), and polyfem::basis::LagrangeBasis3d::pyramid_face_local_nodes().
|
inline |
check if curved mesh has rational polynomials elements
Definition at line 305 of file Mesh.hpp.
References is_rational_.
| bool polyfem::mesh::Mesh::is_simplex | ( | const int | el_id | ) | const |
checks if element is simplex
| [in] | el_id | element id |
Definition at line 392 of file Mesh.cpp.
References elements_tag_, and polyfem::mesh::SIMPLEX.
Referenced by polyfem::varform::VarForm::assign_discr_orders(), polyfem::io::Evaluator::average_grad_based_function(), polyfem::mesh::Mesh2D::barycentric_coords(), polyfem::mesh::CMesh3D::barycentric_coords(), polyfem::mesh::Mesh3D::barycentric_coords(), polyfem::io::OutGeometryData::build_grid(), polyfem::io::OutGeometryData::build_high_order_vis_mesh(), polyfem::io::OutGeometryData::build_vis_mesh(), polyfem::mesh::Mesh3D::cell_node(), polyfem::io::Evaluator::check_scalar_value(), polyfem::mesh::Mesh3D::compute_cell_jacobian(), polyfem::mesh::Mesh2D::compute_face_jacobian(), polyfem::io::OutStatsData::compute_mesh_size(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::io::Evaluator::compute_stress_at_quadrature_points(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::io::OutGeometryData::extract_boundary_mesh_2d_sampled(), polyfem::io::OutGeometryData::extract_boundary_mesh_sampled(), polyfem::mesh::Mesh3D::face_node(), polyfem::mesh::CMesh2D::face_node(), polyfem::io::Evaluator::interpolate_boundary_function(), polyfem::io::Evaluator::interpolate_function(), is_simplicial(), polyfem::io::Evaluator::mark_flipped_cells(), polyfem::mesh::MeshNodes::node_ids_from_cell(), polyfem::mesh::MeshNodes::node_ids_from_face(), polyfem::mesh::MeshNodes::node_ids_from_face(), polyfem::refinement::APriori::p_refine(), polyfem::refinement::APriori::p_refine(), polyfem::mesh::CMesh2D::refine(), polyfem::basis::LagrangeBasis3d::tet_face_local_nodes(), to_mesh_data(), and polyfem::basis::LagrangeBasis2d::tri_edge_local_nodes().
|
inline |
checks if the mesh is simplicial
Definition at line 641 of file Mesh.hpp.
References is_simplex(), and n_elements().
Referenced by polyfem::io::OutGeometryData::extract_boundary_mesh().
| bool polyfem::mesh::Mesh::is_spline_compatible | ( | const int | el_id | ) | const |
checks if element is spline compatible
| [in] | el_id | element id |
Definition at line 341 of file Mesh.cpp.
References elements_tag_, is_volume(), polyfem::mesh::REGULAR_BOUNDARY_CUBE, and polyfem::mesh::REGULAR_INTERIOR_CUBE.
Referenced by polyfem::basis::SplineBasis2d::build_bases(), and polyfem::basis::SplineBasis3d::build_bases().
|
pure virtual |
checks if mesh is volume
Implemented in polyfem::mesh::Mesh2D, and polyfem::mesh::Mesh3D.
Referenced by append(), polyfem::assembler::RhsAssembler::assemble(), polyfem::varform::BilaplacianVarForm::assemble_mass_mat(), polyfem::varform::ElasticVarForm::assemble_mass_mat(), polyfem::varform::FluidVarForm::assemble_mass_mat(), polyfem::varform::GrowthElasticVarForm::assemble_mass_mat(), polyfem::varform::IncompressibleElasticVarForm::assemble_mass_mat(), polyfem::varform::NavierStokesFSIVarForm::assemble_mass_mat(), polyfem::varform::ScalarVarForm::assemble_mass_mat(), polyfem::varform::ThermoElasticVarForm::assemble_mass_mat(), polyfem::varform::BilaplacianVarForm::assemble_rhs(), polyfem::varform::ElasticVarForm::assemble_rhs(), polyfem::varform::FluidVarForm::assemble_rhs(), polyfem::varform::GrowthElasticVarForm::assemble_rhs(), polyfem::varform::OperatorSplittingVarForm::assemble_rhs(), polyfem::varform::ScalarVarForm::assemble_rhs(), polyfem::varform::ThermoElasticVarForm::assemble_rhs(), boundary_element_vertex(), polyfem::varform::NavierStokesFSIVarForm::build_basis(), polyfem::varform::BilaplacianVarForm::build_basis(), polyfem::varform::FluidVarForm::build_basis(), polyfem::varform::GrowthElasticVarForm::build_basis(), polyfem::varform::IncompressibleElasticVarForm::build_basis(), polyfem::varform::OperatorSplittingVarForm::build_basis(), polyfem::varform::ScalarVarForm::build_basis(), polyfem::varform::ThermoElasticVarForm::build_basis(), polyfem::varform::NonlinearElasticVarForm::build_collision_mesh(), polyfem::varform::ElasticVarForm::build_elastic_basis(), polyfem::varform::VarForm::build_fe_space(), polyfem::io::OutGeometryData::build_grid(), polyfem::io::OutGeometryData::build_high_order_vis_mesh(), polyfem::varform::VarForm::build_node_mapping(), polyfem::varform::VarForm::build_polygonal_basis(), polyfem::io::OutGeometryData::build_vis_boundary_mesh(), polyfem::io::OutGeometryData::build_vis_mesh(), polyfem::io::Evaluator::check_scalar_value(), polyfem::assembler::RhsAssembler::compute_energy(), polyfem::assembler::RhsAssembler::compute_energy_hess(), polyfem::io::OutStatsData::compute_errors(), polyfem::io::OutStatsData::compute_mesh_size(), polyfem::io::Evaluator::compute_scalar_value(), polyfem::solver::AdjointTools::compute_shape_derivative_functional_term(), polyfem::io::Evaluator::compute_stress_at_quadrature_points(), polyfem::io::Evaluator::compute_tensor_value(), polyfem::io::OutStatsData::count_flipped_elements(), dimension(), polyfem::solver::AdjointTools::dJ_du_step(), polyfem::solver::AdjointTools::dJ_shape_transient_adjoint_term(), element_vertex(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::io::OutGeometryData::extract_boundary_mesh_2d_sampled(), polyfem::io::OutGeometryData::extract_boundary_mesh_sampled(), polyfem::solver::BodyForceDerivative::force_shape_derivative(), get_default_boundary_id(), polyfem::problem::NodeValues::init(), polyfem::io::OutGeometryData::init_sampler(), polyfem::solver::AdjointTools::integrate_objective(), polyfem::io::Evaluator::interpolate_at_local_vals(), polyfem::io::Evaluator::interpolate_boundary_function(), polyfem::io::Evaluator::interpolate_function(), is_spline_compatible(), polyfem::solver::LinearFilter::LinearFilter(), polyfem::io::Evaluator::mark_flipped_cells(), polyfem::mesh::MeshNodes::MeshNodes(), n_boundary_elements(), n_elements(), polyfem::utils::BoundarySampler::normal_for_polygon_edge(), polyfem::refinement::APriori::p_refine(), polyfem::utils::BoundarySampler::quadrature_for_polygon_edge(), polyfem::utils::BoundarySampler::sample_polygon_edge(), polyfem::io::OutGeometryData::save_surface(), polyfem::io::OutGeometryData::save_volume(), polyfem::assembler::RhsAssembler::time_bc(), to_mesh_data(), and polyfem::io::MshWriter::write().
|
inline |
utitlity to return the number of boundary elements, faces or edges in 3d and 2d
Definition at line 186 of file Mesh.hpp.
References is_volume(), n_edges(), and n_faces().
Referenced by append(), set_boundary_ids(), and to_mesh_data().
|
pure virtual |
number of vertices of a cell
| [in] | c_id | global cell id (face for 2d meshes) |
Implemented in polyfem::mesh::Mesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by element_vertices(), polyfem::mesh::Mesh3D::elements_boxes(), to_mesh_data(), and polyfem::io::MshWriter::write().
|
pure virtual |
number of cells
Implemented in polyfem::mesh::Mesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by append(), cell_barycenters(), polyfem::mesh::compute_mesh_interface(), polyfem::mesh::MeshNodes::MeshNodes(), n_elements(), and polyfem::refinement::APriori::p_refine().
|
pure virtual |
number of edges
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by append(), build_from_data(), edge_barycenters(), edges(), edges_to_ids(), polyfem::mesh::Mesh2D::get_edges(), polyfem::mesh::Mesh3D::get_edges(), polyfem::problem::NodeValues::init(), polyfem::mesh::MeshNodes::MeshNodes(), and n_boundary_elements().
|
inline |
utitlity to return the number of elements, cells or faces in 3d and 2d
Definition at line 181 of file Mesh.hpp.
References is_volume(), n_cells(), and n_faces().
Referenced by append(), polyfem::mesh::GeometryLoader::apply_geometry_selection(), polyfem::solver::PerBody2PerElem::apply_jacobian(), polyfem::varform::VarForm::assign_discr_orders(), polyfem::basis::PolygonalBasis2d::build_bases(), polyfem::basis::PolygonalBasis3d::build_bases(), polyfem::basis::SplineBasis2d::build_bases(), polyfem::basis::SplineBasis3d::build_bases(), polyfem::basis::BarycentricBasis2d::build_bases(), polyfem::mesh::CMesh2D::compute_body_ids(), polyfem::mesh::CMesh3D::compute_body_ids(), polyfem::basis::PolygonalBasis3d::compute_integral_constraints(), polyfem::basis::PolygonalBasis2d::compute_integral_constraints(), polyfem::io::OutStatsData::compute_mesh_stats(), polyfem::io::Evaluator::compute_stress_at_quadrature_points(), polyfem::mesh::Mesh2D::elements_boxes(), polyfem::mesh::Mesh3D::elements_boxes(), polyfem::solver::PerBody2PerElem::eval(), has_poly(), has_prism(), has_pyramids(), polyfem::io::OutGeometryData::init_sampler(), polyfem::io::Evaluator::interpolate_boundary_function(), polyfem::solver::PerBody2PerElem::inverse_eval(), is_simplicial(), polyfem::varform::ElasticVarForm::load_mesh(), polyfem::varform::GrowthElasticVarForm::load_mesh(), polyfem::varform::ThermoElasticVarForm::load_mesh(), polyfem::refinement::APriori::p_refine(), polyfem::solver::PerBody2PerElem::PerBody2PerElem(), polyfem::solver::PerBody2PerNode::PerBody2PerNode(), polyfem::mesh::CMesh2D::refine(), polyfem::io::OutStatsData::save_json(), polyfem::io::OutGeometryData::save_surface(), polyfem::io::OutGeometryData::save_volume(), polyfem::io::OutGeometryData::save_wire(), set_body_ids(), set_geometry_ids(), polyfem::varform::NonlinearElasticTransientVarForm::solve_problem(), polyfem::varform::DifferentiableNonlinearElasticTransientVarForm::solve_problem(), split(), to_mesh_data(), and polyfem::io::MshWriter::write().
|
pure virtual |
number of vertices of a face
| [in] | f_id | global face id |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by polyfem::basis::BarycentricBasis2d::build_bases(), build_from_data(), polyfem::io::OutGeometryData::build_high_order_vis_mesh(), polyfem::basis::compute_epsilon(), polyfem::mesh::compute_mesh_interface(), polyfem::mesh::compute_mesh_interface(), polyfem::mesh::Mesh2D::elements_boxes(), polyfem::io::OutGeometryData::extract_boundary_mesh(), polyfem::io::OutGeometryData::extract_boundary_mesh_sampled(), polyfem::mesh::Mesh2D::face_barycenter(), polyfem::mesh::Mesh3D::face_node(), polyfem::mesh::Mesh3D::face_node(), faces(), faces_to_ids(), polyfem::mesh::Mesh2D::get_edges(), polyfem::mesh::Mesh3D::get_ordered_vertices_from_pyramid(), polyfem::mesh::Mesh2D::n_cell_vertices(), polyfem::mesh::MeshNodes::node_ids_from_face(), polyfem::mesh::MeshNodes::node_ids_from_face(), polyfem::basis::LagrangeBasis3d::prism_face_local_nodes(), polyfem::basis::LagrangeBasis3d::pyramid_face_local_nodes(), to_mesh_data(), and polyfem::mesh::Mesh3D::tri_area().
|
pure virtual |
number of faces
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by append(), build_from_data(), polyfem::mesh::compute_mesh_interface(), polyfem::io::OutGeometryData::extract_boundary_mesh(), face_barycenters(), faces(), faces_to_ids(), polyfem::problem::NodeValues::init(), polyfem::mesh::MeshNodes::MeshNodes(), n_boundary_elements(), n_elements(), polyfem::refinement::APriori::p_refine(), and to_mesh_data().
|
pure virtual |
number of vertices
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by append(), apply_affine_transformation(), build_from_data(), polyfem::varform::GrowthElasticVarForm::build_growth_basis(), compute_node_ids(), polyfem::mesh::Mesh2D::face_barycenter(), polyfem::varform::DifferentiableVarForm::get_vertices(), polyfem::solver::OperatorSplittingSolver::initialize_mesh(), polyfem::mesh::MeshNodes::MeshNodes(), polyfem::io::OutStatsData::save_json(), polyfem::varform::DifferentiableVarForm::set_vertex_positions(), to_mesh_data(), transform_higher_order_data(), polyfem::mesh::Mesh3D::tri_area(), and polyfem::io::MshWriter::write().
|
pure virtual |
normalize the mesh
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
|
inline |
order of each element
Definition at line 301 of file Mesh.hpp.
References orders_.
Referenced by polyfem::varform::VarForm::build_fe_space(), polyfem::varform::DifferentiableVarForm::n_boundary_samples(), and polyfem::io::OutStatsData::save_json().
|
pure virtual |
point coordinates
| [in] | global_index | global vertex index |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::NCMesh3D, and polyfem::mesh::CMesh3D.
Referenced by polyfem::solver::OperatorSplittingSolver::advection_PIC(), polyfem::basis::BarycentricBasis2d::build_bases(), polyfem::basis::compute_epsilon(), polyfem::mesh::compute_mesh_interface(), polyfem::mesh::compute_mesh_interface(), polyfem::io::OutGeometryData::extract_boundary_mesh_sampled(), polyfem::varform::DifferentiableVarForm::get_vertices(), polyfem::solver::OperatorSplittingSolver::initialize_mesh(), polyfem::mesh::MeshNodes::node_id_from_primitive(), polyfem::refinement::APriori::p_refine(), polyfem::refinement::APriori::p_refine(), and polyfem::io::MshWriter::write().
|
inlinevirtual |
method used to finalize the mesh.
It computes the cached stuff used in navigation
Reimplemented in polyfem::mesh::NCMesh2D, and polyfem::mesh::NCMesh3D.
|
inlinevirtual |
area of a quad face of an hex mesh
| [in] | gid | global face id |
Reimplemented in polyfem::mesh::CMesh3D.
Definition at line 333 of file Mesh.hpp.
Referenced by polyfem::utils::BoundarySampler::quadrature_for_prism_face(), polyfem::utils::BoundarySampler::quadrature_for_pyramid_face(), and polyfem::utils::BoundarySampler::quadrature_for_quad_face().
|
pure virtual |
refine the mesh
Conforming meshes drop the data that cannot follow the refinement: boundary, body, node and geometry ids and the higher-order geometry (callers recompute the labels they need, see GeometryLoader). Non-conforming meshes carry body and boundary ids to the children and drop node and geometry ids.
| [in] | n_refinement | number of refinements |
| [in] | t | position of the refinement location (0.5 for standard refinement) |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
|
protectedpure virtual |
Remove all top-dimensional elements whose mask entry is false.
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
|
inlinevirtual |
Set the volume sections.
| [in] | body_ids | vector of labels, one per element |
Reimplemented in polyfem::mesh::NCMesh2D, and polyfem::mesh::NCMesh3D.
Definition at line 477 of file Mesh.hpp.
References body_ids_, and n_elements().
Referenced by build_from_data(), polyfem::mesh::NCMesh2D::set_body_ids(), and polyfem::mesh::NCMesh3D::set_body_ids().
|
inlinevirtual |
Set the boundary selection from a vector.
| [in] | boundary_ids | vector one value per element |
Reimplemented in polyfem::mesh::NCMesh2D, and polyfem::mesh::NCMesh3D.
Definition at line 469 of file Mesh.hpp.
References boundary_ids_, and n_boundary_elements().
Referenced by polyfem::mesh::NCMesh2D::set_boundary_ids(), and polyfem::mesh::NCMesh3D::set_boundary_ids().
|
inline |
Set the cell weights for rational polynomial meshes.
| [in] | in_cell_weights | vector of vector containing the weights, one per cell |
Definition at line 590 of file Mesh.hpp.
References cell_weights_.
Referenced by build_from_data().
|
inline |
Set the geometry selection, one ID per element.
Definition at line 536 of file Mesh.hpp.
References geometry_ids_, and n_elements().
Referenced by polyfem::mesh::GeometryLoader::apply_geometry_selection(), and build_from_data().
|
inline |
Set the is rational object.
| [in] | in_is_rational | flag to enable/disable rational polynomials |
Definition at line 309 of file Mesh.hpp.
References is_rational_.
Referenced by build_from_data().
|
pure virtual |
Set the point.
| [in] | global_index | global vertex index |
| [in] | p | value |
Implemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, polyfem::mesh::CMesh3D, and polyfem::mesh::NCMesh3D.
Referenced by apply_affine_transformation(), and polyfem::varform::DifferentiableVarForm::set_vertex_positions().
|
inline |
changes the element type
| [in] | el | element id |
| [in] | type | type of the element |
Definition at line 449 of file Mesh.hpp.
References elements_tag_.
| std::vector< MeshWithID > polyfem::mesh::Mesh::split | ( | ) | const |
Split the mesh according to its per-element geometry IDs.
Definition at line 29 of file Mesh.cpp.
References copy(), get_geometry_id(), and n_elements().
Referenced by polyfem::varform::NavierStokesFSIVarForm::load_mesh().
| MeshData polyfem::mesh::Mesh::to_mesh_data | ( | ) | const |
Capture the complete runtime mesh in the canonical, format-independent representation.
Definition at line 103 of file Mesh.cpp.
References polyfem::mesh::MeshData::body_ids, body_ids_, boundary_element_vertex(), polyfem::mesh::MeshData::boundary_elements, polyfem::mesh::MeshData::boundary_ids, boundary_ids_, polyfem::mesh::MeshData::cell_face_orientations, polyfem::mesh::MeshData::cell_faces, polyfem::mesh::MeshData::cell_is_hex, polyfem::mesh::MeshData::cell_kernel_points, cell_weights_, dimension(), element_vertex(), face_vertex(), polyfem::mesh::MeshData::faces, polyfem::mesh::MeshData::geometry_ids, geometry_ids_, has_body_ids(), has_boundary_ids(), has_explicit_polyhedral_topology_, has_geometry_ids(), has_node_ids(), has_poly(), polyfem::mesh::MeshData::higher_order_connectivity, higher_order_connectivity_, polyfem::mesh::MeshData::higher_order_nodes, higher_order_nodes_, polyfem::mesh::MeshData::higher_order_weights, is_cube(), is_simplex(), is_volume(), polyfem::log_and_throw_error(), n_boundary_elements(), n_cell_vertices(), n_elements(), n_face_vertices(), n_faces(), n_vertices(), polyfem::mesh::MeshData::node_ids, node_ids_, point, polyfem::mesh::MeshData::validate(), polyfem::mesh::MeshData::vertices, and weights.
Referenced by polyfem::io::CheckpointWriter::write_mesh().
|
protected |
Definition at line 723 of file Mesh.cpp.
References higher_order_nodes_, and n_vertices().
Referenced by apply_affine_transformation(), polyfem::mesh::CMesh2D::normalize(), and polyfem::mesh::CMesh3D::normalize().
|
inlinevirtual |
area of a tri face of a tet mesh
| [in] | gid | global face id |
Reimplemented in polyfem::mesh::Mesh3D.
Definition at line 342 of file Mesh.hpp.
Referenced by polyfem::utils::BoundarySampler::quadrature_for_prism_face(), polyfem::utils::BoundarySampler::quadrature_for_pyramid_face(), and polyfem::utils::BoundarySampler::quadrature_for_tri_face().
|
inlinevirtual |
Update elements types.
Reimplemented in polyfem::mesh::CMesh2D, polyfem::mesh::NCMesh2D, and polyfem::mesh::NCMesh3D.
|
protected |
list of volume labels
Definition at line 724 of file Mesh.hpp.
Referenced by append(), polyfem::mesh::NCMesh2D::append(), polyfem::mesh::NCMesh3D::append(), clear_data_lost_by_refinement(), polyfem::mesh::CMesh2D::compute_body_ids(), polyfem::mesh::NCMesh2D::compute_body_ids(), polyfem::mesh::CMesh3D::compute_body_ids(), polyfem::mesh::NCMesh3D::compute_body_ids(), filter_element_data(), get_body_id(), get_body_ids(), has_body_ids(), set_body_ids(), to_mesh_data(), polyfem::mesh::NCMesh2D::update_labels_after_refinement(), and polyfem::mesh::NCMesh3D::update_labels_after_refinement().
|
protected |
list of surface labels
Definition at line 722 of file Mesh.hpp.
Referenced by append(), polyfem::mesh::NCMesh2D::append(), polyfem::mesh::NCMesh3D::append(), clear_data_lost_by_refinement(), polyfem::mesh::CMesh2D::compute_boundary_ids(), polyfem::mesh::NCMesh2D::compute_boundary_ids(), polyfem::mesh::CMesh3D::compute_boundary_ids(), polyfem::mesh::NCMesh3D::compute_boundary_ids(), get_boundary_id(), has_boundary_ids(), polyfem::mesh::CMesh2D::remove_elements(), polyfem::mesh::NCMesh2D::remove_elements(), polyfem::mesh::CMesh3D::remove_elements(), polyfem::mesh::NCMesh3D::remove_elements(), set_boundary_ids(), to_mesh_data(), polyfem::mesh::NCMesh2D::update_labels_after_refinement(), and polyfem::mesh::NCMesh3D::update_labels_after_refinement().
|
protected |
high-order nodes associates to cells
Definition at line 737 of file Mesh.hpp.
Referenced by append(), apply_affine_transformation(), polyfem::mesh::CMesh2D::attach_higher_order_nodes(), polyfem::mesh::CMesh3D::attach_higher_order_nodes(), polyfem::mesh::CMesh3D::build_storage_from_cells(), polyfem::mesh::CMesh2D::build_topology(), polyfem::mesh::CMesh3D::build_topology(), polyfem::mesh::Mesh3D::cell_node(), clear_data_lost_by_refinement(), polyfem::mesh::CMesh3D::normalize(), polyfem::mesh::CMesh2D::remove_elements(), and polyfem::mesh::CMesh3D::remove_elements().
|
protected |
weights associates to cells for rational polynomail meshes
Definition at line 739 of file Mesh.hpp.
Referenced by append(), cell_weights(), clear_higher_order_data(), filter_element_data(), set_cell_weights(), and to_mesh_data().
|
protected |
high-order nodes associates to edges
Definition at line 733 of file Mesh.hpp.
Referenced by append(), apply_affine_transformation(), polyfem::mesh::CMesh2D::attach_higher_order_nodes(), polyfem::mesh::CMesh3D::attach_higher_order_nodes(), polyfem::mesh::CMesh3D::build_storage_from_cells(), polyfem::mesh::CMesh2D::build_topology(), polyfem::mesh::CMesh3D::build_topology(), clear_data_lost_by_refinement(), polyfem::mesh::Mesh3D::edge_node(), polyfem::mesh::CMesh2D::edge_node(), polyfem::mesh::CMesh2D::normalize(), polyfem::mesh::CMesh3D::normalize(), polyfem::mesh::CMesh2D::remove_elements(), and polyfem::mesh::CMesh3D::remove_elements().
|
protected |
list of element types
Definition at line 718 of file Mesh.hpp.
Referenced by append(), polyfem::mesh::CMesh2D::compute_elements_tag(), polyfem::mesh::NCMesh2D::compute_elements_tag(), polyfem::mesh::CMesh3D::compute_elements_tag(), polyfem::mesh::NCMesh3D::compute_elements_tag(), elements_tag(), filter_element_data(), is_cube(), is_polytope(), is_prism(), is_pyramid(), is_simplex(), is_spline_compatible(), set_tag(), polyfem::mesh::CMesh2D::update_elements_tag(), polyfem::mesh::NCMesh2D::update_elements_tag(), and polyfem::mesh::NCMesh3D::update_elements_tag().
|
protected |
high-order nodes associates to faces
Definition at line 735 of file Mesh.hpp.
Referenced by append(), apply_affine_transformation(), polyfem::mesh::CMesh2D::attach_higher_order_nodes(), polyfem::mesh::CMesh3D::attach_higher_order_nodes(), polyfem::mesh::CMesh3D::build_storage_from_cells(), polyfem::mesh::CMesh2D::build_topology(), polyfem::mesh::CMesh3D::build_topology(), clear_data_lost_by_refinement(), polyfem::mesh::Mesh3D::face_node(), polyfem::mesh::Mesh3D::face_node(), polyfem::mesh::CMesh2D::face_node(), polyfem::mesh::CMesh2D::normalize(), polyfem::mesh::CMesh3D::normalize(), polyfem::mesh::CMesh2D::remove_elements(), and polyfem::mesh::CMesh3D::remove_elements().
|
protected |
list of geometry labels, one per top-dimensional element
Definition at line 726 of file Mesh.hpp.
Referenced by append(), clear_data_lost_by_refinement(), filter_element_data(), get_geometry_id(), get_geometry_ids(), has_geometry_ids(), set_geometry_ids(), to_mesh_data(), polyfem::mesh::NCMesh2D::update_labels_after_refinement(), and polyfem::mesh::NCMesh3D::update_labels_after_refinement().
|
protected |
Whether the source MeshData supplied explicit face/cell incidence.
This cannot be reconstructed from element tags alone (a tetrahedral-shaped polyhedron is otherwise indistinguishable from a simplex).
Definition at line 743 of file Mesh.hpp.
Referenced by append(), build_from_data(), and to_mesh_data().
|
protected |
Definition at line 747 of file Mesh.hpp.
Referenced by append(), build_from_data(), clear_higher_order_data(), filter_element_data(), and to_mesh_data().
|
protected |
Canonical connectivity is retained because the runtime edge/face caches do not preserve the original per-element high-order node ordering.
Definition at line 746 of file Mesh.hpp.
Referenced by append(), build_from_data(), clear_higher_order_data(), to_mesh_data(), and transform_higher_order_data().
|
protected |
Order of the input edges.
Definition at line 752 of file Mesh.hpp.
Referenced by append(), build_from_data(), in_ordered_edges(), polyfem::mesh::CMesh2D::refine(), polyfem::mesh::CMesh3D::refine(), polyfem::mesh::CMesh2D::remove_elements(), and polyfem::mesh::CMesh3D::remove_elements().
|
protected |
Order of the input faces, TODO: change to std::vector of Eigen::Vector.
Definition at line 754 of file Mesh.hpp.
Referenced by append(), build_from_data(), in_ordered_faces(), polyfem::mesh::CMesh2D::refine(), polyfem::mesh::CMesh3D::refine(), and polyfem::mesh::CMesh3D::remove_elements().
|
protected |
Order of the input vertices.
Definition at line 750 of file Mesh.hpp.
Referenced by append(), build_from_data(), in_ordered_vertices(), polyfem::mesh::CMesh2D::refine(), and polyfem::mesh::CMesh3D::refine().
|
protected |
stores if the mesh is rational
Definition at line 730 of file Mesh.hpp.
Referenced by append(), clear_higher_order_data(), is_rational(), and set_is_rational().
|
protected |
list of node labels, one per vertex
Definition at line 720 of file Mesh.hpp.
Referenced by append(), build_from_data(), clear_data_lost_by_refinement(), compute_node_ids(), get_node_id(), has_node_ids(), polyfem::mesh::NCMesh2D::remove_elements(), polyfem::mesh::NCMesh3D::remove_elements(), to_mesh_data(), polyfem::mesh::NCMesh2D::update_labels_after_refinement(), and polyfem::mesh::NCMesh3D::update_labels_after_refinement().
|
protected |
list of geometry orders, one per cell
Definition at line 728 of file Mesh.hpp.
Referenced by append(), polyfem::mesh::CMesh2D::attach_higher_order_nodes(), polyfem::mesh::CMesh3D::attach_higher_order_nodes(), polyfem::mesh::Mesh3D::cell_node(), clear_data_lost_by_refinement(), polyfem::mesh::Mesh3D::edge_node(), polyfem::mesh::CMesh2D::edge_node(), polyfem::mesh::Mesh3D::face_node(), polyfem::mesh::Mesh3D::face_node(), polyfem::mesh::CMesh2D::face_node(), filter_element_data(), is_linear(), and orders().