Wildmeshing Toolkit
get_attribute.hpp
Go to the documentation of this file.
1 #pragma once
2 #include <nlohmann/json.hpp>
4 
5 namespace wmtk {
6 class Mesh;
7 namespace components::multimesh {
8 class NamedMultiMesh;
9 class MeshCollection;
10 } // namespace components::multimesh
11 } // namespace wmtk
12 
14 namespace utils {
15 struct AttributeDescription;
16 //
17 // desires json that has
18 // * name (str for attribute name)
19 // * mesh (mesh path, mesh only only overload does not use this)
20 // * type (str double/int/char/rational
21 // * simplex (int, dimension attribute belongs to
22 // if type and simplex are missing code will search in lexicographical of (primitive_type, type)
23 // where double < int < char < rational for type
24 //
25 // this is somewhat redundant to wmtk::components::utils::get_attributes, but is designed around
26 // supporting multimesh paths.
27 
29  const NamedMultiMesh& mesh,
30  const AttributeDescription& description);
32  const MeshCollection& mesh,
33  const AttributeDescription& description);
35  const Mesh& mesh,
36  const AttributeDescription& description);
37 
38 } // namespace utils
39 } // namespace wmtk::components::multimesh
wmtk::attribute::MeshAttributeHandle get_attribute(const NamedMultiMesh &mesh, const AttributeDescription &description)
std::pair< std::shared_ptr< Mesh >, std::shared_ptr< Mesh > > multimesh(const MultiMeshType &type, Mesh &parent, std::shared_ptr< Mesh > child, const attribute::MeshAttributeHandle parent_position_handle, const std::string &tag_name, const int64_t tag_value, const int64_t primitive)
Definition: multimesh.cpp:15
Definition: Accessor.hpp:6