Wildmeshing Toolkit
from_tag.cpp
Go to the documentation of this file.
1 
2 #include <wmtk/Mesh.hpp>
6 
7 
9 
10 namespace {
11  std::shared_ptr<Mesh> from_tag(
14  const std::vector<wmtk::attribute::MeshAttributeHandle>& passed_attributes)
15 {
16  auto child_mesh =
18 
19  for (const auto& attr : passed_attributes) {
20  assert(attr.is_same_mesh(handle.mesh()));
21 
23  }
24  return child_mesh;
25 }
26 } // namespace
27 
28 std::shared_ptr<Mesh> from_tag(
30 
32 
33  const std::vector<wmtk::attribute::MeshAttributeHandle>& passed_attributes)
34 
35 {
36  // constness is annoying, but want to let rvalues get passed in?
38  return from_tag(h, tag_value, passed_attributes);
39 }
40 
41 } // namespace wmtk::components::multimesh
std::variant< char, int64_t, double, wmtk::Rational, std::tuple< char, wmtk::Rational, double > > ValueVariant
std::shared_ptr< Mesh > from_tag(const wmtk::attribute::MeshAttributeHandle &handle, const wmtk::attribute::MeshAttributeHandle::ValueVariant &tag_value, const std::vector< wmtk::attribute::MeshAttributeHandle > &passed_attributes)
Definition: from_tag.cpp:28
std::shared_ptr< Mesh > extract_and_register_child_mesh_from_tag(Mesh &m, const std::string &tag, const int64_t tag_value, const PrimitiveType pt, bool child_is_free)
extract a child mesh based on the given tag and tag value, and register it to the input (parent) mesh
wmtk::attribute::MeshAttributeHandle transfer_attribute(const wmtk::attribute::MeshAttributeHandle &original_handle, Mesh &m)