Wildmeshing Toolkit
|
#include <NamedMultiMesh.hpp>
Classes | |
struct | Node |
Public Member Functions | |
NamedMultiMesh () | |
NamedMultiMesh (Mesh &m, const std::string_view &root_name) | |
NamedMultiMesh (Mesh &m, const nlohmann::json &root_name) | |
NamedMultiMesh (Mesh &m, const std::string &root_name) | |
template<size_t N> | |
NamedMultiMesh (Mesh &m, const char name[N]) | |
NamedMultiMesh (const NamedMultiMesh &) | |
~NamedMultiMesh () | |
auto | operator= (const NamedMultiMesh &) -> NamedMultiMesh & |
void | set_name (const std::string_view &root_name="") |
sets just the name of the root mesh, keeping child names the same More... | |
void | set_names (const nlohmann::json &js) |
void | set_root (Mesh &m) |
void | append_child_mesh_names (const Mesh &parent, const NamedMultiMesh &o) |
std::unique_ptr< nlohmann::json > | get_names_json () const |
std::string_view | root_name () const |
std::string | name (const std::vector< int64_t > &id) const |
void | set_mesh (Mesh &m) |
Navigates to the root of the multimesh. More... | |
Mesh & | get_mesh (const std::string_view &path) const |
bool | has_mesh (const std::string_view &path) const |
std::vector< int64_t > | get_id (const std::string_view &path) const |
std::vector< int64_t > | get_id (const Mesh &m) const |
Mesh & | root () |
const Mesh & | root () const |
std::map< std::string, const Mesh & > | all_meshes () const |
std::string | get_name (const Mesh &m) const |
Private Attributes | |
std::shared_ptr< Mesh > | m_root |
std::unique_ptr< Node > | m_name_root |
Definition at line 16 of file NamedMultiMesh.hpp.
wmtk::components::multimesh::NamedMultiMesh::NamedMultiMesh | ( | ) |
Definition at line 222 of file NamedMultiMesh.cpp.
wmtk::components::multimesh::NamedMultiMesh::NamedMultiMesh | ( | Mesh & | m, |
const std::string_view & | root_name | ||
) |
Definition at line 100 of file NamedMultiMesh.cpp.
References root_name(), set_mesh(), and set_name().
|
explicit |
Definition at line 105 of file NamedMultiMesh.cpp.
References root_name(), set_mesh(), and set_names().
|
explicit |
Definition at line 95 of file NamedMultiMesh.cpp.
References root_name(), set_mesh(), and set_name().
|
inlineexplicit |
Definition at line 26 of file NamedMultiMesh.hpp.
wmtk::components::multimesh::NamedMultiMesh::NamedMultiMesh | ( | const NamedMultiMesh & | o | ) |
Definition at line 234 of file NamedMultiMesh.cpp.
|
default |
std::map< std::string, const Mesh & > wmtk::components::multimesh::NamedMultiMesh::all_meshes | ( | ) | const |
Definition at line 250 of file NamedMultiMesh.cpp.
References get_name(), and m_root.
void wmtk::components::multimesh::NamedMultiMesh::append_child_mesh_names | ( | const Mesh & | parent, |
const NamedMultiMesh & | o | ||
) |
Definition at line 267 of file NamedMultiMesh.cpp.
References wmtk::Mesh::absolute_multi_mesh_id(), get_id(), wmtk::components::multimesh::NamedMultiMesh::Node::m_children, m_name_root, wmtk::multimesh::MultiMeshManager::relative_id(), root(), and wmtk::components::multimesh::NamedMultiMesh::Node::update_child_names().
std::vector< int64_t > wmtk::components::multimesh::NamedMultiMesh::get_id | ( | const Mesh & | m | ) | const |
Definition at line 173 of file NamedMultiMesh.cpp.
References wmtk::Mesh::absolute_multi_mesh_id(), m_root, and wmtk::multimesh::MultiMeshManager::relative_id().
auto wmtk::components::multimesh::NamedMultiMesh::get_id | ( | const std::string_view & | path | ) | const |
Definition at line 148 of file NamedMultiMesh.cpp.
References wmtk::components::multimesh::NamedMultiMesh::Node::m_child_indexer, wmtk::components::multimesh::NamedMultiMesh::Node::m_children, wmtk::components::multimesh::NamedMultiMesh::Node::name, and wmtk::components::multimesh::internal::split_path().
Referenced by append_child_mesh_names(), get_mesh(), get_name(), and TEST_CASE().
Mesh & wmtk::components::multimesh::NamedMultiMesh::get_mesh | ( | const std::string_view & | path | ) | const |
Definition at line 123 of file NamedMultiMesh.cpp.
References get_id(), and m_root.
Referenced by wmtk::components::multimesh::utils::get_attribute(), wmtk::components::multimesh::MeshCollection::get_mesh(), and TEST_CASE().
std::string wmtk::components::multimesh::NamedMultiMesh::get_name | ( | const Mesh & | m | ) | const |
Definition at line 259 of file NamedMultiMesh.cpp.
References get_id(), and m_name_root.
Referenced by all_meshes().
std::unique_ptr< nlohmann::json > wmtk::components::multimesh::NamedMultiMesh::get_names_json | ( | ) | const |
Definition at line 240 of file NamedMultiMesh.cpp.
References m_name_root.
Referenced by wmtk::components::output::output().
bool wmtk::components::multimesh::NamedMultiMesh::has_mesh | ( | const std::string_view & | path | ) | const |
Definition at line 128 of file NamedMultiMesh.cpp.
References wmtk::components::multimesh::NamedMultiMesh::Node::m_child_indexer, wmtk::components::multimesh::NamedMultiMesh::Node::m_children, m_name_root, wmtk::components::multimesh::NamedMultiMesh::Node::name, and wmtk::components::multimesh::internal::split_path().
std::string wmtk::components::multimesh::NamedMultiMesh::name | ( | const std::vector< int64_t > & | id | ) | const |
Definition at line 210 of file NamedMultiMesh.cpp.
References wmtk::components::multimesh::NamedMultiMesh::Node::m_children, m_name_root, wmtk::components::multimesh::NamedMultiMesh::Node::name, and root_name().
auto wmtk::components::multimesh::NamedMultiMesh::operator= | ( | const NamedMultiMesh & | o | ) | -> NamedMultiMesh& |
Definition at line 228 of file NamedMultiMesh.cpp.
References m_root.
|
inline |
Definition at line 53 of file NamedMultiMesh.hpp.
References m_root.
Referenced by append_child_mesh_names(), wmtk::components::output::output(), and TEST_CASE().
|
inline |
Definition at line 54 of file NamedMultiMesh.hpp.
References m_root.
std::string_view wmtk::components::multimesh::NamedMultiMesh::root_name | ( | ) | const |
Definition at line 204 of file NamedMultiMesh.cpp.
References m_name_root.
Referenced by name(), NamedMultiMesh(), and set_name().
void wmtk::components::multimesh::NamedMultiMesh::set_mesh | ( | Mesh & | m | ) |
Navigates to the root of the multimesh.
Definition at line 116 of file NamedMultiMesh.cpp.
References set_root().
Referenced by wmtk::components::input::input(), NamedMultiMesh(), and TEST_CASE().
void wmtk::components::multimesh::NamedMultiMesh::set_name | ( | const std::string_view & | root_name = "" | ) |
sets just the name of the root mesh, keeping child names the same
Definition at line 181 of file NamedMultiMesh.cpp.
References root_name(), and set_names().
Referenced by NamedMultiMesh(), and TEST_CASE().
void wmtk::components::multimesh::NamedMultiMesh::set_names | ( | const nlohmann::json & | js | ) |
Definition at line 185 of file NamedMultiMesh.cpp.
References m_name_root.
Referenced by wmtk::components::input::input(), NamedMultiMesh(), set_name(), and TEST_CASE().
void wmtk::components::multimesh::NamedMultiMesh::set_root | ( | Mesh & | m | ) |
Definition at line 111 of file NamedMultiMesh.cpp.
References m_root.
Referenced by set_mesh().
|
private |
Definition at line 65 of file NamedMultiMesh.hpp.
Referenced by append_child_mesh_names(), get_name(), get_names_json(), has_mesh(), name(), root_name(), and set_names().
|
private |
Definition at line 64 of file NamedMultiMesh.hpp.
Referenced by all_meshes(), get_id(), get_mesh(), operator=(), root(), and set_root().