32 const auto& child = *cptr;
35 for (int64_t j = 0; j < child.top_cell_dimension(); ++j) {
43 for (
const auto& source_tuple : tups) {
44 const auto [source_mesh_base_tuple, target_mesh_base_tuple] =
46 if (source_mesh_base_tuple.is_null() || target_mesh_base_tuple.is_null()) {
47 if (source_mesh_base_tuple.is_null() && target_mesh_base_tuple.is_null()) {
50 "Map from parent {} to child {} on tuple {} (dim {}) fails on {} "
54 fmt::join(child.absolute_multi_mesh_id(),
","),
62 }
else if (!child.is_valid(target_mesh_base_tuple)) {
64 "Map from parent {} to child {} on tuple {} (dim {}) fails on {} -> "
67 fmt::join(child.absolute_multi_mesh_id(),
","),
87 if (parent_ptr ==
nullptr) {
91 const auto& parent = *parent_ptr;
97 const auto [source_mesh_base_tuple, target_mesh_base_tuple] =
99 if (source_mesh_base_tuple.is_null() || target_mesh_base_tuple.is_null()) {
101 "Map from child {} to parent {} on tuple {} (dim {}) has null entry {} -> "
104 fmt::join(parent.absolute_multi_mesh_id(),
","),
112 }
else if (!parent.is_valid(target_mesh_base_tuple)) {
114 "Map from child {} to parent {} on tuple {} (dim {}) fails on {} -> "
117 fmt::join(parent.absolute_multi_mesh_id(),
","),
167 "Map from child {0} to parent {1} on tuple {2} (dim {3}) fails on "
168 "switch(map({2}),{4}) = {5} != "
169 "map(switch({2},{4})) = {6} (dim {7} id {8} != {9})",
std::vector< int64_t > absolute_multi_mesh_id() const
returns a unique identifier for this mesh within a single multimesh structure
const attribute::Accessor< T, Mesh, D > create_const_accessor(const attribute::MeshAttributeHandle &handle) const
int64_t id(const Tuple &tuple, PrimitiveType type) const
return the global id of the Tuple of the given dimension
bool is_boundary(const simplex::Simplex &tuple) const
check if a simplex lies on a boundary or not
std::vector< Tuple > get_all(PrimitiveType type) const
Generate a vector of Tuples from global vertex/edge/triangle/tetrahedron index.
multimesh::MultiMeshManager m_multi_mesh_manager
int64_t top_cell_dimension() const
virtual Tuple switch_tuple(const Tuple &tuple, PrimitiveType type) const =0
switch the orientation of the Tuple of the given dimension
Tuple map_to_parent_tuple(const simplex::Simplex &my_simplex) const
optimized map from a simplex from this mesh to its direct parent
PrimitiveType top_simplex_type() const
std::vector< std::shared_ptr< Mesh > > get_child_meshes() const
returns the direct multimesh child meshes for the current mesh
std::vector< ChildData > m_children
TypedAttributeHandle< int64_t > map_to_parent_handle
bool check_child_switch_homomorphism(const Mesh &child) const
bool check_switch_homomorphism() const
MapValidator(const Mesh &m)
bool check_parent_map_attribute_valid() const
bool check_child_map_attributes_valid() const
static bool equal(const Mesh &m, const Simplex &s0, const Simplex &s1)
static std::string as_string(const Tuple &t)
std::tuple< Tuple, Tuple > read_tuple_map_attribute(const wmtk::attribute::Accessor< int64_t, MeshType > &accessor, const Tuple &source_tuple)
void top_dimension_cofaces_tuples(const PointMesh &mesh, const Simplex &simplex, SimplexCollection &collection)
std::vector< PrimitiveType > primitive_below(PrimitiveType pt, bool lower_to_upper)
std::string_view primitive_type_name(PrimitiveType t)
spdlog::logger & logger()
Retrieves the current logger.