PolyFEM
Loading...
Searching...
No Matches
polyfem::mesh::Mesh3DStorage Class Reference

Topology of a conforming 3D mesh (used by CMesh3D), stored as flat arrays indexed by entity id. More...

#include <Mesh3DStorage.hpp>

Collaboration diagram for polyfem::mesh::Mesh3DStorage:
[legend]

Public Member Functions

int n_vertices () const
 
int n_edges () const
 
int n_faces () const
 
int n_cells () const
 
int EV (const int k, const int e) const
 
int FV (const int k, const int f) const
 
int FE (const int k, const int f) const
 
int HF (const int k, const int c) const
 
int FH (const int k, const int f) const
 
int FHi (const int k, const int f) const
 
void append (const Mesh3DStorage &other)
 Appends the input topology of other (shifting its ids).
 
size_t memory () const
 Bytes allocated by the storage.
 

Public Attributes

MeshType type = MeshType::HYB
 
Eigen::MatrixXd points
 Vertex positions, 3 x #vertices.
 
JaggedArray< uint32_t > vertex_vs
 
JaggedArray< uint32_t > vertex_es
 
JaggedArray< uint32_t > vertex_fs
 
JaggedArray< uint32_t > vertex_hs
 
std::vector< uint8_t > vertex_boundary
 
std::vector< std::array< uint32_t, 2 > > edge_vs
 
JaggedArray< uint32_t > edge_fs
 
JaggedArray< uint32_t > edge_hs
 
std::vector< uint8_t > edge_boundary
 
JaggedArray< uint32_t > face_vs
 
JaggedArray< uint32_t > face_es
 
JaggedArray< uint32_t > face_hs
 
JaggedArray< uint16_t > face_hs_slot
 
std::vector< uint8_t > face_boundary
 
JaggedArray< uint32_t > cell_vs
 navigation order (see above)
 
JaggedArray< uint32_t > cell_input_vs
 input order (rows may be empty)
 
JaggedArray< uint32_t > cell_es
 
JaggedArray< uint32_t > cell_fs
 
JaggedArray< uint8_t > cell_fs_flag
 
std::vector< uint8_t > cell_hex
 
std::vector< std::array< double, 3 > > cell_kernel
 A point from which the cell is star-shaped.
 

Detailed Description

Topology of a conforming 3D mesh (used by CMesh3D), stored as flat arrays indexed by entity id.

The input topology is: points, face_vs (vertices of each face, in order around it), cell_fs and cell_fs_flag (faces of each cell and whether each one is oriented inward), cell_hex, cell_input_vs and cell_kernel (and cell_vs for the HEX type). MeshProcessing3D::build_connectivity derives everything else:

  • edges sorted by (min, max) vertex id, edge_vs = (min, max);
  • face_es[f][j] = edge (face_vs[f][j], face_vs[f][j + 1]);
  • cell_vs: hexes in navigation order (a face, then the opposite vertices), other cells sorted; cell_es sorted;
  • every incidence list (vertex_*, edge_fs/hs, face_hs) sorted by id, vertex_vs[v][k] being the other vertex of the edge vertex_es[v][k];
  • the boundary flags. Face ids are the creation order and are never renumbered.

Definition at line 163 of file Mesh3DStorage.hpp.

Member Function Documentation

◆ append()

void Mesh3DStorage::append ( const Mesh3DStorage &  other)

Appends the input topology of other (shifting its ids).

The connectivity must then be rebuilt (Navigation3D::prepare_mesh).

Definition at line 1395 of file MeshProcessing3D.cpp.

References polyfem::mesh::JaggedArray< T >::append(), cell_fs, cell_fs_flag, cell_hex, cell_input_vs, cell_kernel, cell_vs, face_boundary, face_vs, polyfem::mesh::HYB, n_faces(), n_vertices(), points, and type.

Referenced by polyfem::mesh::CMesh3D::append().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ EV()

int polyfem::mesh::Mesh3DStorage::EV ( const int  k,
const int  e 
) const
inline

Definition at line 200 of file Mesh3DStorage.hpp.

References edge_vs.

◆ FE()

int polyfem::mesh::Mesh3DStorage::FE ( const int  k,
const int  f 
) const
inline

Definition at line 202 of file Mesh3DStorage.hpp.

References face_es.

◆ FH()

int polyfem::mesh::Mesh3DStorage::FH ( const int  k,
const int  f 
) const
inline

Definition at line 204 of file Mesh3DStorage.hpp.

References face_hs, and polyfem::mesh::JaggedArray< T >::row_size().

Here is the call graph for this function:

◆ FHi()

int polyfem::mesh::Mesh3DStorage::FHi ( const int  k,
const int  f 
) const
inline

Definition at line 205 of file Mesh3DStorage.hpp.

References face_hs, face_hs_slot, and polyfem::mesh::JaggedArray< T >::row_size().

Here is the call graph for this function:

◆ FV()

int polyfem::mesh::Mesh3DStorage::FV ( const int  k,
const int  f 
) const
inline

Definition at line 201 of file Mesh3DStorage.hpp.

References face_vs.

◆ HF()

int polyfem::mesh::Mesh3DStorage::HF ( const int  k,
const int  c 
) const
inline

Definition at line 203 of file Mesh3DStorage.hpp.

References cell_fs.

◆ memory()

size_t Mesh3DStorage::memory ( ) const

Bytes allocated by the storage.

Definition at line 1418 of file MeshProcessing3D.cpp.

References cell_es, cell_fs, cell_fs_flag, cell_hex, cell_input_vs, cell_kernel, cell_vs, edge_boundary, edge_fs, edge_hs, edge_vs, face_boundary, face_es, face_hs, face_hs_slot, face_vs, polyfem::mesh::JaggedArray< T >::memory(), points, vertex_boundary, vertex_es, vertex_fs, vertex_hs, and vertex_vs.

Here is the call graph for this function:

◆ n_cells()

int polyfem::mesh::Mesh3DStorage::n_cells ( ) const
inline

Definition at line 197 of file Mesh3DStorage.hpp.

References cell_fs, and polyfem::mesh::JaggedArray< T >::size().

Referenced by polyfem::mesh::MeshProcessing3D::build_connectivity(), polyfem::mesh::CMesh3D::compute_elements_tag(), polyfem::mesh::MeshProcessing3D::ele_subdivison_levels(), polyfem::mesh::MeshProcessing3D::global_orientation_hexes(), polyfem::mesh::CMesh3D::n_cells(), polyfem::mesh::MeshProcessing3D::orient_volume_mesh(), and polyfem::mesh::MeshProcessing3D::reorder_hex_mesh_propogation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ n_edges()

int polyfem::mesh::Mesh3DStorage::n_edges ( ) const
inline

Definition at line 195 of file Mesh3DStorage.hpp.

References edge_vs.

Referenced by polyfem::mesh::MeshProcessing3D::build_connectivity(), polyfem::mesh::CMesh3D::compute_elements_tag(), polyfem::mesh::CMesh3D::n_edges(), and polyfem::mesh::CMesh3D::refine().

Here is the caller graph for this function:

◆ n_faces()

int polyfem::mesh::Mesh3DStorage::n_faces ( ) const
inline

Definition at line 196 of file Mesh3DStorage.hpp.

References face_vs, and polyfem::mesh::JaggedArray< T >::size().

Referenced by append(), polyfem::mesh::MeshProcessing3D::build_connectivity(), polyfem::mesh::CMesh3D::compute_elements_tag(), polyfem::mesh::CMesh3D::n_faces(), polyfem::mesh::MeshProcessing3D::orient_surface_mesh(), polyfem::mesh::MeshProcessing3D::orient_volume_mesh(), polyfem::mesh::CMesh3D::refine(), and polyfem::mesh::CMesh3D::remove_elements().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ n_vertices()

int polyfem::mesh::Mesh3DStorage::n_vertices ( ) const
inline

Definition at line 194 of file Mesh3DStorage.hpp.

References points.

Referenced by append(), polyfem::mesh::MeshProcessing3D::build_connectivity(), polyfem::mesh::CMesh3D::compute_elements_tag(), and polyfem::mesh::MeshProcessing3D::orient_volume_mesh().

Here is the caller graph for this function:

Member Data Documentation

◆ cell_es

JaggedArray<uint32_t> polyfem::mesh::Mesh3DStorage::cell_es

◆ cell_fs

◆ cell_fs_flag

◆ cell_hex

◆ cell_input_vs

JaggedArray<uint32_t> polyfem::mesh::Mesh3DStorage::cell_input_vs

◆ cell_kernel

◆ cell_vs

◆ edge_boundary

std::vector<uint8_t> polyfem::mesh::Mesh3DStorage::edge_boundary

◆ edge_fs

◆ edge_hs

◆ edge_vs

◆ face_boundary

◆ face_es

◆ face_hs

◆ face_hs_slot

JaggedArray<uint16_t> polyfem::mesh::Mesh3DStorage::face_hs_slot

Definition at line 182 of file Mesh3DStorage.hpp.

Referenced by FHi(), and memory().

◆ face_vs

◆ points

◆ type

◆ vertex_boundary

◆ vertex_es

JaggedArray<uint32_t> polyfem::mesh::Mesh3DStorage::vertex_es

◆ vertex_fs

JaggedArray<uint32_t> polyfem::mesh::Mesh3DStorage::vertex_fs

◆ vertex_hs

◆ vertex_vs

JaggedArray<uint32_t> polyfem::mesh::Mesh3DStorage::vertex_vs

The documentation for this class was generated from the following files: