Wildmeshing Toolkit
wmtk::TetMesh Class Reference

#include <TetMesh.hpp>

Inheritance diagram for wmtk::TetMesh:
[legend]
Collaboration diagram for wmtk::TetMesh:
[legend]

Classes

class  TetMeshOperationExecutor
 

Public Member Functions

 TetMesh ()
 
 ~TetMesh () override
 
 TetMesh (const TetMesh &o)=delete
 
 TetMesh (TetMesh &&o)
 
TetMeshoperator= (const TetMesh &o)=delete
 
TetMeshoperator= (TetMesh &&o)
 
Tuple switch_tuple (const Tuple &tuple, PrimitiveType type) const final override
 switch the orientation of the Tuple of the given dimension More...
 
bool is_ccw (const Tuple &tuple) const final override
 TODO this needs dimension? More...
 
bool is_boundary (PrimitiveType pt, const Tuple &tuple) const final override
 check if a simplex (encoded as a tuple/primitive pair) lies on a boundary or not More...
 
bool is_boundary_vertex (const Tuple &tuple) const
 
bool is_boundary_edge (const Tuple &tuple) const
 
bool is_boundary_face (const Tuple &tuple) const
 
bool is_valid (const Tuple &tuple) const final override
 check validity of tuple including its hash More...
 
void initialize (Eigen::Ref< const RowVectors4l > TV, Eigen::Ref< const RowVectors6l > TE, Eigen::Ref< const RowVectors4l > TF, Eigen::Ref< const RowVectors4l > TT, Eigen::Ref< const VectorXl > VT, Eigen::Ref< const VectorXl > ET, Eigen::Ref< const VectorXl > FT)
 
void initialize (Eigen::Ref< const RowVectors4l > T, bool is_free=false)
 
void initialize_free (int64_t count)
 
bool is_connectivity_valid () const final override
 
std::vector< std::vector< TypedAttributeHandle< int64_t > > > connectivity_attributes () const final override
 Returns a vector of vectors of attribute handles. More...
 
Tuple switch_vertex (const Tuple &tuple) const
 
Tuple switch_edge (const Tuple &tuple) const
 
Tuple switch_face (const Tuple &tuple) const
 
Tuple switch_tetrahedron (const Tuple &tuple) const
 
std::vector< Tupleorient_vertices (const Tuple &t) const override
 
Tuple vertex_tuple_from_id (int64_t id) const
 
Tuple edge_tuple_from_id (int64_t id) const
 
Tuple face_tuple_from_id (int64_t id) const
 
Tuple tet_tuple_from_id (int64_t id) const
 
bool is_boundary (const simplex::Simplex &tuple) const
 check if a simplex lies on a boundary or not More...
 
virtual bool is_boundary (PrimitiveType, const Tuple &tuple) const=0
 check if a simplex (encoded as a tuple/primitive pair) lies on a boundary or not More...
 
- Public Member Functions inherited from wmtk::MeshCRTP< TetMesh >
TetMeshderived ()
 CRTP utility to extract the derived type of this. More...
 
const TetMeshderived () const
 CRTP utility to extract the derived type of this with constnesss. More...
 
Tuple switch_tuple (const Tuple &tuple, PrimitiveType type) const override
 switch the orientation of the Tuple of the given dimension More...
 
Tuple switch_tuples (const Tuple &tuple, const ContainerType &op_sequence) const
 Performs a sequence of switch_tuple operations in the order specified in op_sequence. More...
 
Tuple switch_tuples (const Tuple &tuple, const std::initializer_list< PrimitiveType > &op_sequence) const
 annoying initializer list prototype to catch switch_tuples(t, {PV,PE}) More...
 
bool is_ccw (const Tuple &tuple) const override
 returns if a tuple is counterclockwise or not More...
 
bool is_boundary (PrimitiveType pt, const Tuple &tuple) const override
 returns if a simplex is on the boundary of hte mesh. For anything but dimension - 1 this checks if this is the face of any boundary dimension-1 facet More...
 
attribute::Accessor< T, TetMesh, Dim > create_accessor (const TypedAttributeHandle< T > &handle)
 constructs an accessor that is aware of the derived mesh's type More...
 
attribute::Accessor< T, TetMesh, Dim > create_accessor (const attribute::MeshAttributeHandle &handle)
 constructs a accessor that is aware of the derived mesh's type More...
 
const attribute::Accessor< T, TetMesh, Dim > create_const_accessor (const attribute::TypedAttributeHandle< T > &handle) const
 constructs a const accessor that is aware of the derived mesh's type More...
 
const attribute::Accessor< T, TetMesh, Dim > create_const_accessor (const attribute::MeshAttributeHandle &handle) const
 constructs a const accessor that is aware of the derived mesh's type More...
 
 Mesh (const int64_t &dimension)
 
 Mesh (const int64_t &dimension, const int64_t &max_primitive_type_id, PrimitiveType hash_type)
 
 Mesh (Mesh &&other)
 
 Mesh (const Mesh &other)=delete
 
- Public Member Functions inherited from wmtk::Mesh
int64_t top_cell_dimension () const
 
PrimitiveType top_simplex_type () const
 
bool is_free () const
 
std::map< std::string, const wmtk::utils::Hashable * > child_hashables () const override
 
std::map< std::string, std::size_t > child_hashes () const override
 
 Mesh (const int64_t &dimension)
 
 Mesh (const int64_t &dimension, const int64_t &max_primitive_type_id, PrimitiveType hash_type)
 
 Mesh (Mesh &&other)
 
 Mesh (const Mesh &other)=delete
 
Meshoperator= (const Mesh &other)=delete
 
Meshoperator= (Mesh &&other)
 
virtual ~Mesh ()
 
void serialize (MeshWriter &writer, const Mesh *local_root=nullptr) const
 
std::vector< Tupleget_all (PrimitiveType type) const
 Generate a vector of Tuples from global vertex/edge/triangle/tetrahedron index. More...
 
std::vector< simplex::IdSimplexget_all_id_simplex (PrimitiveType type) const
 
simplex::IdSimplex get_id_simplex (const Tuple &tuple, PrimitiveType pt) const
 Retrieve the IdSimplex that is represented by the tuple and primitive type. More...
 
simplex::IdSimplex get_id_simplex (const simplex::Simplex &s) const
 
simplex::Simplex get_simplex (const simplex::IdSimplex &s) const
 Convert an IdSimplex into a Simplex. More...
 
Tuple get_tuple_from_id_simplex (const simplex::IdSimplex &s) const
 
virtual std::tuple< std::vector< std::vector< int64_t > >, std::vector< std::vector< int64_t > > > consolidate ()
 Consolidate the attributes, moving all valid simplexes at the beginning of the corresponding vector. More...
 
std::vector< attribute::MeshAttributeHandle::HandleVariantbuiltin_attributes () const
 
std::vector< attribute::MeshAttributeHandle::HandleVariantcustom_attributes () const
 
template<typename T >
attribute::MeshAttributeHandle register_attribute (const std::string &name, PrimitiveType type, int64_t size, bool replace=false, T default_value=T(0))
 
template<typename T >
attribute::TypedAttributeHandle< T > register_attribute_typed (const std::string &name, PrimitiveType type, int64_t size, bool replace=false, T default_value=T(0))
 
template<typename T >
bool has_attribute (const std::string &name, const PrimitiveType ptype) const
 
template<typename T >
attribute::MeshAttributeHandle get_attribute_handle (const std::string &name, const PrimitiveType ptype) const
 
template<typename T >
attribute::TypedAttributeHandle< T > get_attribute_handle_typed (const std::string &name, const PrimitiveType ptype) const
 
template<typename T , int D = Eigen::Dynamic>
attribute::Accessor< T, Mesh, D > create_accessor (const attribute::MeshAttributeHandle &handle)
 
template<typename T , int D = Eigen::Dynamic>
const attribute::Accessor< T, Mesh, D > create_const_accessor (const attribute::MeshAttributeHandle &handle) const
 
template<typename T , int D = Eigen::Dynamic>
attribute::Accessor< T, Mesh, D > create_accessor (const TypedAttributeHandle< T > &handle)
 
template<typename T , int D = Eigen::Dynamic>
const attribute::Accessor< T, Mesh, D > create_const_accessor (const TypedAttributeHandle< T > &handle) const
 
template<typename T >
int64_t get_attribute_dimension (const TypedAttributeHandle< T > &handle) const
 
template<typename T >
const T & get_attribute_default_value (const TypedAttributeHandle< T > &handle) const
 
template<typename T >
std::string get_attribute_name (const TypedAttributeHandle< T > &handle) const
 
std::string get_attribute_name (const attribute::MeshAttributeHandle::HandleVariant &handle) const
 
void clear_attributes (const std::vector< attribute::MeshAttributeHandle::HandleVariant > &keep_attributes)
 Remove all custom attributes besides the one passed in. More...
 
void clear_attributes ()
 
void clear_attributes (const std::vector< attribute::MeshAttributeHandle > &keep_attributes)
 
void delete_attribute (const attribute::MeshAttributeHandle &to_delete)
 
void delete_attribute (const attribute::MeshAttributeHandle::HandleVariant &to_delete)
 
multimesh::attribute::AttributeScopeHandle create_scope ()
 
template<typename Functor , typename... Args>
decltype(auto) parent_scope (Functor &&f, Args &&... args) const
 Evaluate the passed in function inside the parent scope. More...
 
const attribute::Accessor< char > get_flag_accessor (PrimitiveType type) const
 
const attribute::Accessor< char > get_const_flag_accessor (PrimitiveType type) const
 
bool operator== (const Mesh &other) const
 
void assert_capacity_valid () const
 
template<typename ContainerType >
Tuple switch_tuples (const Tuple &tuple, const ContainerType &op_sequence) const
 
Tuple switch_tuples (const Tuple &tuple, const std::initializer_list< PrimitiveType > &op_sequence) const
 
template<typename ContainerType >
Tuple switch_tuples_unsafe (const Tuple &tuple, const ContainerType &op_sequence) const
 
Tuple switch_tuples_unsafe (const Tuple &tuple, const std::initializer_list< PrimitiveType > &op_sequence) const
 
void set_capacities_from_flags ()
 
int64_t capacity (PrimitiveType type) const
 read in the m_capacities return the upper bound for the number of entities of the given dimension More...
 
bool is_boundary (const simplex::Simplex &tuple) const
 check if a simplex lies on a boundary or not More...
 
bool is_hash_valid (const Tuple &tuple, const attribute::Accessor< int64_t > &hash_accessor) const
 
bool is_hash_valid (const Tuple &tuple) const
 
bool is_removed (const Tuple &tuple) const
 
bool is_removed (const Tuple &tuple, PrimitiveType pt) const
 
bool is_valid (const simplex::Simplex &s) const
 Check if the cached id in a simplex is up-to-date. More...
 
bool is_multi_mesh_root () const
 return true if this mesh is the root of a multimesh tree More...
 
Meshget_multi_mesh_root ()
 returns a reference to the root of a multimesh tree More...
 
const Meshget_multi_mesh_root () const
 returns a const reference to the root of a multimesh tree More...
 
Meshget_multi_mesh_mesh (const std::vector< int64_t > &absolute_id)
 
const Meshget_multi_mesh_mesh (const std::vector< int64_t > &absolute_id) const
 
Meshget_multi_mesh_child_mesh (const std::vector< int64_t > &relative_id)
 
const Meshget_multi_mesh_child_mesh (const std::vector< int64_t > &relative_id) const
 
std::vector< std::shared_ptr< Mesh > > get_child_meshes () const
 returns the direct multimesh child meshes for the current mesh More...
 
std::vector< std::shared_ptr< Mesh > > get_all_child_meshes () const
 returns all multimesh child meshes More...
 
std::vector< std::shared_ptr< const Mesh > > get_all_meshes () const
 returns all meshes in multimesh More...
 
std::vector< int64_t > absolute_multi_mesh_id () const
 returns a unique identifier for this mesh within a single multimesh structure More...
 
void register_child_mesh (const std::shared_ptr< Mesh > &child_mesh_ptr, const std::vector< std::array< Tuple, 2 >> &map_tuples)
 register a mesh as the child of this mesh More...
 
void deregister_child_mesh (const std::shared_ptr< Mesh > &child_mesh_ptr)
 Deregister a child mesh. More...
 
std::vector< simplex::Simplexmap (const Mesh &other_mesh, const simplex::Simplex &my_simplex) const
 maps a simplex from this mesh to any other mesh More...
 
std::vector< simplex::Simplexmap (const Mesh &other_mesh, const std::vector< simplex::Simplex > &my_simplices) const
 
std::vector< simplex::Simplexlub_map (const Mesh &other_mesh, const simplex::Simplex &my_simplex) const
 maps a simplex from this mesh to any other mesh using LUB mesh as root More...
 
std::vector< simplex::Simplexlub_map (const Mesh &other_mesh, const std::vector< simplex::Simplex > &my_simplices) const
 
simplex::Simplex map_to_parent (const simplex::Simplex &my_simplex) const
 optimized map from a simplex from this mesh to its direct parent More...
 
simplex::Simplex map_to_root (const simplex::Simplex &my_simplex) const
 maps a simplex from this mesh to the root mesh More...
 
std::vector< simplex::Simplexmap_to_child (const Mesh &child_mesh, const simplex::Simplex &my_simplex) const
 optimized map fromsimplex from this mesh to one of its direct children More...
 
std::vector< Tuplemap_tuples (const Mesh &other_mesh, const simplex::Simplex &my_simplex) const
 maps a simplex from this mesh to any other mesh More...
 
std::vector< Tuplemap_tuples (const Mesh &other_mesh, PrimitiveType pt, const std::vector< Tuple > &my_simplices) const
 
std::vector< Tuplelub_map_tuples (const Mesh &other_mesh, const simplex::Simplex &my_simplex) const
 maps a simplex from this mesh to any other mesh using LUB mesh as root More...
 
std::vector< Tuplelub_map_tuples (const Mesh &other_mesh, PrimitiveType pt, const std::vector< Tuple > &my_simplices) const
 
Tuple map_to_parent_tuple (const simplex::Simplex &my_simplex) const
 optimized map from a simplex from this mesh to its direct parent More...
 
Tuple map_to_root_tuple (const simplex::Simplex &my_simplex) const
 maps a simplex from this mesh to the root mesh More...
 
std::vector< Tuplemap_to_child_tuples (const Mesh &child_mesh, const simplex::Simplex &my_simplex) const
 optimized map fromsimplex from this mesh to one of its direct children More...
 
bool can_map (const Mesh &other_mesh, const simplex::Simplex &my_simplex) const
 
void update_vertex_operation_hashes (const Tuple &vertex, attribute::Accessor< int64_t > &hash_accessor)
 wrapper function to update hashes (for parent mesh *this and its child meshes) after vertex operations More...
 
bool has_child_mesh_in_dimension (int64_t dimension) const
 returns if the mesh has a child mesh in the given dimension More...
 
bool has_child_mesh () const
 
bool is_from_same_multi_mesh_structure (const Mesh &other) const
 
template<typename T , int D>
auto create_accessor (const TypedAttributeHandle< T > &handle) -> attribute::Accessor< T, Mesh, D >
 
template<typename T , int D>
auto create_const_accessor (const TypedAttributeHandle< T > &handle) const -> const attribute::Accessor< T, Mesh, D >
 
template<typename T , int D>
auto create_accessor (const attribute::MeshAttributeHandle &handle) -> attribute::Accessor< T, Mesh, D >
 
template<typename T , int D>
auto create_const_accessor (const attribute::MeshAttributeHandle &handle) const -> const attribute::Accessor< T, Mesh, D >
 
- Public Member Functions inherited from wmtk::utils::MerkleTreeInteriorNode
std::map< std::string, std::size_t > child_hashes () const override
 
- Public Member Functions inherited from wmtk::utils::Hashable
 Hashable ()
 
 Hashable (const Hashable &)
 
 Hashable (Hashable &&)
 
Hashableoperator= (const Hashable &)
 
Hashableoperator= (Hashable &&)
 
virtual ~Hashable ()
 
virtual std::size_t hash () const
 

Protected Member Functions

void make_cached_accessors ()
 
int64_t id (const Tuple &tuple, PrimitiveType type) const
 
int64_t id_vertex (const Tuple &tuple) const
 
int64_t id_edge (const Tuple &tuple) const
 
int64_t id_face (const Tuple &tuple) const
 
int64_t id_tet (const Tuple &tuple) const
 
Tuple tuple_from_id (const PrimitiveType type, const int64_t gid) const final override
 internal function that returns the tuple of requested type, and has the global index cid More...
 
Tuple tuple_from_global_ids (int64_t tid, int64_t fid, int64_t eid, int64_t vid) const
 
- Protected Member Functions inherited from wmtk::MeshCRTP< TetMesh >
int64_t id (const Tuple &tuple, PrimitiveType type) const
 Returns the id of a simplex encoded in a tuple. More...
 
int64_t id (const simplex::Simplex &s) const final override
 variant of id that can cache internally held values More...
 
int64_t id (const Tuple &tuple, PrimitiveType type) const
 return the global id of the Tuple of the given dimension More...
 
int64_t id (const simplex::NavigatableSimplex &s) const
 
int64_t id (const simplex::IdSimplex &s) const
 
virtual int64_t id (const simplex::Simplex &s) const =0
 Forwarding version of id on simplices that does id caching. More...
 
int64_t id_virtual (const Tuple &tuple, PrimitiveType type) const final override
 internal utility for overriding the mesh class's id function without having the final override block the derived class's override (we can't have Mesh::id be virtual, MeshCRTP<Derived>::id final override, and TriMesh::id. More...
 
Tuple tuple_from_id (const PrimitiveType type, const int64_t gid) const override
 internal function that returns the tuple of requested type, and has the global index cid More...
 
- Protected Member Functions inherited from wmtk::Mesh
attribute::Accessor< char > get_flag_accessor (PrimitiveType type)
 
simplex::NavigatableSimplex simplex_from_id (const PrimitiveType type, const int64_t gid) const
 
std::vector< std::vector< int64_t > > simplices_to_gids (const std::vector< std::vector< simplex::Simplex >> &simplices) const
 
void reserve_attributes_to_fit ()
 reserve space for all attributes data types for all dimensional simplices More...
 
void reserve_attributes (PrimitiveType type, int64_t size)
 
void reserve_attributes (int64_t dimension, int64_t size)
 
void set_capacities (std::vector< int64_t > capacities)
 
void reserve_more_attributes (PrimitiveType type, int64_t size)
 
void reserve_more_attributes (const std::vector< int64_t > &sizes)
 
void guarantee_more_attributes (PrimitiveType type, int64_t size)
 
void guarantee_more_attributes (const std::vector< int64_t > &sizes)
 
void guarantee_at_least_attributes (PrimitiveType type, int64_t size)
 
void guarantee_at_least_attributes (const std::vector< int64_t > &sizes)
 
std::vector< int64_t > request_simplex_indices (PrimitiveType type, int64_t count)
 
bool is_removed (int64_t index) const
 
bool is_removed (int64_t index, PrimitiveType pt) const
 
attribute::AttributeScopeHandle create_single_mesh_scope ()
 
int64_t id (const Tuple &tuple, PrimitiveType type) const
 return the global id of the Tuple of the given dimension More...
 
int64_t id (const simplex::NavigatableSimplex &s) const
 
int64_t id (const simplex::IdSimplex &s) const
 

Protected Attributes

TypedAttributeHandle< int64_t > m_vt_handle
 
TypedAttributeHandle< int64_t > m_et_handle
 
TypedAttributeHandle< int64_t > m_ft_handle
 
TypedAttributeHandle< int64_t > m_tv_handle
 
TypedAttributeHandle< int64_t > m_te_handle
 
TypedAttributeHandle< int64_t > m_tf_handle
 
TypedAttributeHandle< int64_t > m_tt_handle
 
std::unique_ptr< attribute::Accessor< int64_t, TetMesh > > m_vt_accessor
 
std::unique_ptr< attribute::Accessor< int64_t, TetMesh > > m_et_accessor
 
std::unique_ptr< attribute::Accessor< int64_t, TetMesh > > m_ft_accessor
 
std::unique_ptr< attribute::Accessor< int64_t, TetMesh > > m_tv_accessor
 
std::unique_ptr< attribute::Accessor< int64_t, TetMesh > > m_te_accessor
 
std::unique_ptr< attribute::Accessor< int64_t, TetMesh > > m_tf_accessor
 
std::unique_ptr< attribute::Accessor< int64_t, TetMesh > > m_tt_accessor
 
- Protected Attributes inherited from wmtk::Mesh
attribute::AttributeManager m_attribute_manager
 
multimesh::MultiMeshManager m_multi_mesh_manager
 
int64_t m_top_cell_dimension = -1
 
bool m_is_free = false
 

Friends

class MeshCRTP< TetMesh >
 
class operations::utils::MultiMeshEdgeSplitFunctor
 
class operations::utils::MultiMeshEdgeCollapseFunctor
 
class operations::utils::UpdateEdgeOperationMultiMeshMapFunctor
 
template<typename U , typename MeshType , int Dim>
class attribute::Accessor
 

Additional Inherited Members

- Static Protected Member Functions inherited from wmtk::Mesh
template<typename T , typename MeshType >
static auto & get_index_access (attribute::Accessor< T, MeshType > &attr)
 
template<typename T , typename MeshType >
static auto & get_index_access (const attribute::Accessor< T, MeshType > &attr)
 

Detailed Description

Definition at line 13 of file TetMesh.hpp.

Constructor & Destructor Documentation

◆ TetMesh() [1/3]

wmtk::TetMesh::TetMesh ( )

Definition at line 18 of file TetMesh.cpp.

References wmtk::Edge, make_cached_accessors(), wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.

Here is the call graph for this function:

◆ ~TetMesh()

wmtk::TetMesh::~TetMesh ( )
overridedefault

◆ TetMesh() [2/3]

wmtk::TetMesh::TetMesh ( const TetMesh o)
delete

◆ TetMesh() [3/3]

wmtk::TetMesh::TetMesh ( TetMesh &&  o)

Definition at line 36 of file TetMesh.cpp.

References m_et_handle, m_ft_handle, m_te_handle, m_tf_handle, m_tt_handle, m_tv_handle, m_vt_handle, and make_cached_accessors().

Here is the call graph for this function:

Member Function Documentation

◆ connectivity_attributes()

std::vector< std::vector< TypedAttributeHandle< int64_t > > > wmtk::TetMesh::connectivity_attributes ( ) const
finaloverridevirtual

Returns a vector of vectors of attribute handles.

The first index denotes the type of simplex pointed by the attribute (i.e. the index type). As an example, the FV relationship points to vertices so it should be returned in the slot [0].

Implements wmtk::Mesh.

Definition at line 528 of file TetMesh.cpp.

References m_et_handle, m_ft_handle, m_te_handle, m_tf_handle, m_tt_handle, m_tv_handle, and m_vt_handle.

◆ edge_tuple_from_id()

Tuple wmtk::TetMesh::edge_tuple_from_id ( int64_t  id) const

Definition at line 176 of file TetMesh.cpp.

References wmtk::autogen::tet_mesh::auto_3d_table_complete_edge, wmtk::MeshCRTP< TetMesh >::id(), is_ccw(), is_valid(), m_et_accessor, and m_te_accessor.

Referenced by tuple_from_id().

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

◆ face_tuple_from_id()

Tuple wmtk::TetMesh::face_tuple_from_id ( int64_t  id) const

Definition at line 201 of file TetMesh.cpp.

References wmtk::autogen::tet_mesh::auto_3d_table_complete_face, wmtk::MeshCRTP< TetMesh >::id(), is_ccw(), is_valid(), m_ft_accessor, and m_tf_accessor.

Referenced by tuple_from_id().

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

◆ id()

int64_t wmtk::TetMesh::id ( const Tuple tuple,
PrimitiveType  type 
) const
inlineprotected

◆ id_edge()

int64_t wmtk::TetMesh::id_edge ( const Tuple tuple) const
inlineprotected

Definition at line 71 of file TetMesh.hpp.

References wmtk::Edge, and wmtk::MeshCRTP< TetMesh >::id().

Referenced by wmtk::operations::utils::UpdateEdgeOperationMultiMeshMapFunctor::update_ear_replacement().

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

◆ id_face()

int64_t wmtk::TetMesh::id_face ( const Tuple tuple) const
inlineprotected

Definition at line 72 of file TetMesh.hpp.

References wmtk::MeshCRTP< TetMesh >::id(), and wmtk::Triangle.

Here is the call graph for this function:

◆ id_tet()

int64_t wmtk::TetMesh::id_tet ( const Tuple tuple) const
inlineprotected

Definition at line 73 of file TetMesh.hpp.

References wmtk::MeshCRTP< TetMesh >::id(), and wmtk::Tetrahedron.

Referenced by wmtk::TetMesh::TetMeshOperationExecutor::get_incident_tets_and_faces().

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

◆ id_vertex()

int64_t wmtk::TetMesh::id_vertex ( const Tuple tuple) const
inlineprotected

Definition at line 70 of file TetMesh.hpp.

References wmtk::MeshCRTP< TetMesh >::id(), and wmtk::Vertex.

Referenced by wmtk::operations::utils::UpdateEdgeOperationMultiMeshMapFunctor::update_ear_replacement().

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

◆ initialize() [1/2]

void wmtk::TetMesh::initialize ( Eigen::Ref< const RowVectors4l T,
bool  is_free = false 
)

Definition at line 136 of file TetMesh.cpp.

References initialize(), wmtk::Mesh::is_free(), wmtk::Mesh::m_is_free, and wmtk::tetmesh_topology_initialization().

Here is the call graph for this function:

◆ initialize() [2/2]

void wmtk::TetMesh::initialize ( Eigen::Ref< const RowVectors4l TV,
Eigen::Ref< const RowVectors6l TE,
Eigen::Ref< const RowVectors4l TF,
Eigen::Ref< const RowVectors4l TT,
Eigen::Ref< const VectorXl VT,
Eigen::Ref< const VectorXl ET,
Eigen::Ref< const VectorXl FT 
)

Definition at line 78 of file TetMesh.cpp.

References wmtk::Mesh::capacity(), wmtk::Edge, wmtk::Mesh::get_flag_accessor(), wmtk::attribute::Accessor< T, MeshType, Dim >::index_access(), m_et_handle, m_ft_handle, m_te_handle, m_tf_handle, m_tt_handle, m_tv_handle, m_vt_handle, wmtk::attribute::CachingAccessor< T, Dim >::scalar_attribute(), wmtk::Mesh::set_capacities(), wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.

Referenced by wmtk::components::multimesh::axis_aligned_fusion(), wmtk::components::internal::MultiMeshFromTag::compute_substructure_mesh(), initialize(), and initialize_free().

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

◆ initialize_free()

void wmtk::TetMesh::initialize_free ( int64_t  count)

Definition at line 145 of file TetMesh.cpp.

References initialize().

Referenced by wmtk::components::internal::MultiMeshFromTag::create_substructure_soup().

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

◆ is_boundary() [1/3]

bool wmtk::Mesh::is_boundary

check if a simplex lies on a boundary or not

Parameters
simplex
Returns
true if this simplex lies on the boundary of the mesh
false otherwise

Definition at line 423 of file Mesh.cpp.

Referenced by is_boundary_vertex().

Here is the caller graph for this function:

◆ is_boundary() [2/3]

bool wmtk::TetMesh::is_boundary ( PrimitiveType  ,
const Tuple tuple 
) const
finaloverridevirtual

check if a simplex (encoded as a tuple/primitive pair) lies on a boundary or not

Parameters
simplex
Returns
true if this simplex lies on the boundary of the mesh
false otherwise

Implements wmtk::Mesh.

Definition at line 367 of file TetMesh.cpp.

References wmtk::Edge, is_boundary_edge(), is_boundary_face(), is_boundary_vertex(), wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.

Referenced by wmtk::simplex::link_condition().

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

◆ is_boundary() [3/3]

virtual bool wmtk::Mesh::is_boundary

check if a simplex (encoded as a tuple/primitive pair) lies on a boundary or not

Parameters
simplex
Returns
true if this simplex lies on the boundary of the mesh
false otherwise

◆ is_boundary_edge()

bool wmtk::TetMesh::is_boundary_edge ( const Tuple tuple) const

Definition at line 388 of file TetMesh.cpp.

References wmtk::simplex::cofaces_single_dimension_iterable(), wmtk::simplex::Simplex::edge(), is_boundary_face(), and wmtk::Triangle.

Referenced by is_boundary(), and wmtk::simplex::link_condition().

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

◆ is_boundary_face()

bool wmtk::TetMesh::is_boundary_face ( const Tuple tuple) const

Definition at line 382 of file TetMesh.cpp.

References wmtk::attribute::Accessor< T, MeshType, Dim >::const_vector_attribute(), wmtk::Tuple::m_local_fid, and m_tt_handle.

Referenced by wmtk::TetMesh::TetMeshOperationExecutor::get_incident_tets_and_faces(), is_boundary(), is_boundary_edge(), and switch_tuple().

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

◆ is_boundary_vertex()

bool wmtk::TetMesh::is_boundary_vertex ( const Tuple tuple) const

Definition at line 400 of file TetMesh.cpp.

References is_boundary(), wmtk::simplex::open_star(), wmtk::simplex::SimplexCollection::simplex_vector(), wmtk::Triangle, and wmtk::simplex::Simplex::vertex().

Referenced by is_boundary(), and wmtk::simplex::link_condition().

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

◆ is_ccw()

bool wmtk::TetMesh::is_ccw ( const Tuple tuple) const
finaloverridevirtual

TODO this needs dimension?

Parameters
m
Returns
true if the Tuple is oriented counter-clockwise
false

Implements wmtk::Mesh.

Definition at line 328 of file TetMesh.cpp.

References wmtk::autogen::tet_mesh::is_ccw(), and is_valid().

Referenced by edge_tuple_from_id(), face_tuple_from_id(), tet_tuple_from_id(), and vertex_tuple_from_id().

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

◆ is_connectivity_valid()

bool wmtk::TetMesh::is_connectivity_valid ( ) const
finaloverridevirtual

Implements wmtk::Mesh.

Definition at line 414 of file TetMesh.cpp.

References wmtk::Mesh::capacity(), wmtk::attribute::CachingAccessor< T, Dim >::const_scalar_attribute(), wmtk::attribute::CachingAccessor< T, Dim >::const_vector_attribute(), wmtk::Edge, wmtk::Mesh::get_flag_accessor(), wmtk::attribute::Accessor< T, MeshType, Dim >::index_access(), wmtk::logger(), m_et_handle, m_ft_handle, m_te_handle, m_tf_handle, m_tt_handle, m_tv_handle, m_vt_handle, wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.

Referenced by wmtk::components::internal::MultiMeshFromTag::compute_substructure_mesh(), and is_valid().

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

◆ is_valid()

bool wmtk::TetMesh::is_valid ( const Tuple tuple) const
finaloverridevirtual

check validity of tuple including its hash

Parameters
tuplethe tuple to be checked
typeonly the top cell dimension, other validity follows with assumption of manifoldness. 2->triangle, 3->tetrahedron
Returns
true if is valid
false

Reimplemented from wmtk::Mesh.

Definition at line 334 of file TetMesh.cpp.

References is_connectivity_valid(), wmtk::Mesh::is_valid(), wmtk::logger(), wmtk::Tuple::m_global_cid, wmtk::Tuple::m_local_eid, wmtk::Tuple::m_local_fid, wmtk::Tuple::m_local_vid, and wmtk::autogen::tet_mesh::tuple_is_valid_for_ccw().

Referenced by edge_tuple_from_id(), face_tuple_from_id(), is_ccw(), wmtk::operations::utils::UpdateEdgeOperationMultiMeshMapFunctor::operator()(), switch_tuple(), tet_tuple_from_id(), and vertex_tuple_from_id().

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

◆ make_cached_accessors()

void wmtk::TetMesh::make_cached_accessors ( )
protected

Definition at line 65 of file TetMesh.cpp.

References m_et_accessor, m_et_handle, m_ft_accessor, m_ft_handle, m_te_accessor, m_te_handle, m_tf_accessor, m_tf_handle, m_tt_accessor, m_tt_handle, m_tv_accessor, m_tv_handle, m_vt_accessor, and m_vt_handle.

Referenced by operator=(), and TetMesh().

Here is the caller graph for this function:

◆ operator=() [1/2]

TetMesh& wmtk::TetMesh::operator= ( const TetMesh o)
delete

◆ operator=() [2/2]

TetMesh & wmtk::TetMesh::operator= ( TetMesh &&  o)

Definition at line 49 of file TetMesh.cpp.

References m_et_handle, m_ft_handle, m_te_handle, m_tf_handle, m_tt_handle, m_tv_handle, m_vt_handle, make_cached_accessors(), and wmtk::Mesh::operator=().

Here is the call graph for this function:

◆ orient_vertices()

std::vector< Tuple > wmtk::TetMesh::orient_vertices ( const Tuple t) const
overridevirtual

Implements wmtk::Mesh.

Definition at line 575 of file TetMesh.cpp.

References wmtk::Tuple::m_global_cid.

Referenced by wmtk::SimplexInversionInvariant< T >::after().

Here is the caller graph for this function:

◆ switch_edge()

Tuple wmtk::TetMesh::switch_edge ( const Tuple tuple) const
inline

Definition at line 117 of file TetMesh.hpp.

References wmtk::Edge, and switch_tuple().

Here is the call graph for this function:

◆ switch_face()

Tuple wmtk::TetMesh::switch_face ( const Tuple tuple) const
inline

Definition at line 121 of file TetMesh.hpp.

References switch_tuple(), and wmtk::Triangle.

Referenced by wmtk::TetMesh::TetMeshOperationExecutor::get_incident_tets_and_faces(), and wmtk::simplex::open_star().

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

◆ switch_tetrahedron()

Tuple wmtk::TetMesh::switch_tetrahedron ( const Tuple tuple) const
inline

Definition at line 125 of file TetMesh.hpp.

References switch_tuple(), and wmtk::Tetrahedron.

Referenced by wmtk::TetMesh::TetMeshOperationExecutor::get_incident_tets_and_faces().

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

◆ switch_tuple()

Tuple wmtk::TetMesh::switch_tuple ( const Tuple tuple,
PrimitiveType  type 
) const
finaloverridevirtual

switch the orientation of the Tuple of the given dimension

Note
this is not doen in place. Return a new Tuple of the switched state
Parameters
m
typed-0 -> switch vertex d-1 -> switch edge d-2 -> switch face d-3 -> switch tetrahedron

Implements wmtk::Mesh.

Definition at line 264 of file TetMesh.cpp.

References wmtk::Edge, wmtk::MeshCRTP< TetMesh >::id(), is_boundary_face(), is_valid(), wmtk::autogen::tet_mesh::local_switch_tuple(), wmtk::Tuple::m_local_fid, m_te_accessor, m_tf_accessor, m_tt_accessor, m_tv_accessor, wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.

Referenced by wmtk::operations::tet_mesh::EdgeOperationData::input_endpoints(), wmtk::simplex::link_condition(), switch_edge(), switch_face(), switch_tetrahedron(), and switch_vertex().

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

◆ switch_vertex()

Tuple wmtk::TetMesh::switch_vertex ( const Tuple tuple) const
inline

Definition at line 113 of file TetMesh.hpp.

References switch_tuple(), and wmtk::Vertex.

Referenced by wmtk::simplex::link(), wmtk::simplex::link_condition_closed_tetmesh(), and wmtk::simplex::link_single_dimension().

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

◆ tet_tuple_from_id()

Tuple wmtk::TetMesh::tet_tuple_from_id ( int64_t  id) const

Definition at line 226 of file TetMesh.cpp.

References wmtk::autogen::tet_mesh::auto_3d_table_complete_vertex, is_ccw(), and is_valid().

Referenced by tuple_from_id().

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

◆ tuple_from_global_ids()

Tuple wmtk::TetMesh::tuple_from_global_ids ( int64_t  tid,
int64_t  fid,
int64_t  eid,
int64_t  vid 
) const
protected

Definition at line 544 of file TetMesh.cpp.

References m_te_accessor, m_tf_accessor, and m_tv_accessor.

Referenced by wmtk::operations::utils::UpdateEdgeOperationMultiMeshMapFunctor::operator()(), and wmtk::operations::utils::UpdateEdgeOperationMultiMeshMapFunctor::update_ear_replacement().

Here is the caller graph for this function:

◆ tuple_from_id()

Tuple wmtk::TetMesh::tuple_from_id ( const PrimitiveType  type,
const int64_t  gid 
) const
finaloverrideprotectedvirtual

internal function that returns the tuple of requested type, and has the global index cid

Parameters
gid
Returns
Tuple

Implements wmtk::Mesh.

Definition at line 238 of file TetMesh.cpp.

References wmtk::Edge, edge_tuple_from_id(), face_tuple_from_id(), tet_tuple_from_id(), wmtk::Tetrahedron, wmtk::Triangle, wmtk::Vertex, and vertex_tuple_from_id().

Here is the call graph for this function:

◆ vertex_tuple_from_id()

Tuple wmtk::TetMesh::vertex_tuple_from_id ( int64_t  id) const

Definition at line 152 of file TetMesh.cpp.

References wmtk::autogen::tet_mesh::auto_3d_table_complete_vertex, wmtk::MeshCRTP< TetMesh >::id(), is_ccw(), is_valid(), m_tv_accessor, and m_vt_accessor.

Referenced by tuple_from_id().

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

Friends And Related Function Documentation

◆ attribute::Accessor

template<typename U , typename MeshType , int Dim>
friend class attribute::Accessor
friend

Definition at line 21 of file TetMesh.hpp.

◆ MeshCRTP< TetMesh >

friend class MeshCRTP< TetMesh >
friend

Definition at line 130 of file TetMesh.hpp.

◆ operations::utils::MultiMeshEdgeCollapseFunctor

Definition at line 18 of file TetMesh.hpp.

◆ operations::utils::MultiMeshEdgeSplitFunctor

Definition at line 17 of file TetMesh.hpp.

◆ operations::utils::UpdateEdgeOperationMultiMeshMapFunctor

Definition at line 19 of file TetMesh.hpp.

Member Data Documentation

◆ m_et_accessor

std::unique_ptr<attribute::Accessor<int64_t, TetMesh> > wmtk::TetMesh::m_et_accessor
protected

Definition at line 98 of file TetMesh.hpp.

Referenced by edge_tuple_from_id(), and make_cached_accessors().

◆ m_et_handle

TypedAttributeHandle<int64_t> wmtk::TetMesh::m_et_handle
protected

◆ m_ft_accessor

std::unique_ptr<attribute::Accessor<int64_t, TetMesh> > wmtk::TetMesh::m_ft_accessor
protected

Definition at line 99 of file TetMesh.hpp.

Referenced by face_tuple_from_id(), and make_cached_accessors().

◆ m_ft_handle

TypedAttributeHandle<int64_t> wmtk::TetMesh::m_ft_handle
protected

◆ m_te_accessor

std::unique_ptr<attribute::Accessor<int64_t, TetMesh> > wmtk::TetMesh::m_te_accessor
protected

◆ m_te_handle

TypedAttributeHandle<int64_t> wmtk::TetMesh::m_te_handle
protected

◆ m_tf_accessor

std::unique_ptr<attribute::Accessor<int64_t, TetMesh> > wmtk::TetMesh::m_tf_accessor
protected

◆ m_tf_handle

TypedAttributeHandle<int64_t> wmtk::TetMesh::m_tf_handle
protected

◆ m_tt_accessor

std::unique_ptr<attribute::Accessor<int64_t, TetMesh> > wmtk::TetMesh::m_tt_accessor
protected

Definition at line 104 of file TetMesh.hpp.

Referenced by make_cached_accessors(), and switch_tuple().

◆ m_tt_handle

TypedAttributeHandle<int64_t> wmtk::TetMesh::m_tt_handle
protected

◆ m_tv_accessor

std::unique_ptr<attribute::Accessor<int64_t, TetMesh> > wmtk::TetMesh::m_tv_accessor
protected

◆ m_tv_handle

TypedAttributeHandle<int64_t> wmtk::TetMesh::m_tv_handle
protected

◆ m_vt_accessor

std::unique_ptr<attribute::Accessor<int64_t, TetMesh> > wmtk::TetMesh::m_vt_accessor
protected

Definition at line 97 of file TetMesh.hpp.

Referenced by make_cached_accessors(), and vertex_tuple_from_id().

◆ m_vt_handle

TypedAttributeHandle<int64_t> wmtk::TetMesh::m_vt_handle
protected

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