Wildmeshing Toolkit
wmtk::components::multimesh::NamedMultiMesh Class Reference

#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::jsonget_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...
 
Meshget_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
 
Meshroot ()
 
const Meshroot () const
 
std::map< std::string, const Mesh & > all_meshes () const
 
std::string get_name (const Mesh &m) const
 

Private Attributes

std::shared_ptr< Meshm_root
 
std::unique_ptr< Nodem_name_root
 

Detailed Description

Definition at line 16 of file NamedMultiMesh.hpp.

Constructor & Destructor Documentation

◆ NamedMultiMesh() [1/6]

wmtk::components::multimesh::NamedMultiMesh::NamedMultiMesh ( )

Definition at line 222 of file NamedMultiMesh.cpp.

◆ NamedMultiMesh() [2/6]

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().

Here is the call graph for this function:

◆ NamedMultiMesh() [3/6]

wmtk::components::multimesh::NamedMultiMesh::NamedMultiMesh ( Mesh m,
const nlohmann::json root_name 
)
explicit

Definition at line 105 of file NamedMultiMesh.cpp.

References root_name(), set_mesh(), and set_names().

Here is the call graph for this function:

◆ NamedMultiMesh() [4/6]

wmtk::components::multimesh::NamedMultiMesh::NamedMultiMesh ( Mesh m,
const std::string &  root_name 
)
explicit

Definition at line 95 of file NamedMultiMesh.cpp.

References root_name(), set_mesh(), and set_name().

Here is the call graph for this function:

◆ NamedMultiMesh() [5/6]

template<size_t N>
wmtk::components::multimesh::NamedMultiMesh::NamedMultiMesh ( Mesh m,
const char  name[N] 
)
inlineexplicit

Definition at line 26 of file NamedMultiMesh.hpp.

◆ NamedMultiMesh() [6/6]

wmtk::components::multimesh::NamedMultiMesh::NamedMultiMesh ( const NamedMultiMesh o)

Definition at line 234 of file NamedMultiMesh.cpp.

◆ ~NamedMultiMesh()

wmtk::components::multimesh::NamedMultiMesh::~NamedMultiMesh ( )
default

Member Function Documentation

◆ all_meshes()

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.

Here is the call graph for this function:

◆ append_child_mesh_names()

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().

Here is the call graph for this function:

◆ get_id() [1/2]

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().

Here is the call graph for this function:

◆ get_id() [2/2]

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().

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

◆ get_mesh()

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().

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

◆ get_name()

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().

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

◆ get_names_json()

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().

Here is the caller graph for this function:

◆ has_mesh()

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().

Here is the call graph for this function:

◆ name()

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().

Here is the call graph for this function:

◆ operator=()

auto wmtk::components::multimesh::NamedMultiMesh::operator= ( const NamedMultiMesh o) -> NamedMultiMesh&

Definition at line 228 of file NamedMultiMesh.cpp.

References m_root.

◆ root() [1/2]

Mesh& wmtk::components::multimesh::NamedMultiMesh::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().

Here is the caller graph for this function:

◆ root() [2/2]

const Mesh& wmtk::components::multimesh::NamedMultiMesh::root ( ) const
inline

Definition at line 54 of file NamedMultiMesh.hpp.

References m_root.

◆ root_name()

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().

Here is the caller graph for this function:

◆ set_mesh()

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().

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

◆ set_name()

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().

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

◆ set_names()

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().

Here is the caller graph for this function:

◆ set_root()

void wmtk::components::multimesh::NamedMultiMesh::set_root ( Mesh m)

Definition at line 111 of file NamedMultiMesh.cpp.

References m_root.

Referenced by set_mesh().

Here is the caller graph for this function:

Member Data Documentation

◆ m_name_root

std::unique_ptr<Node> wmtk::components::multimesh::NamedMultiMesh::m_name_root
private

◆ m_root

std::shared_ptr<Mesh> wmtk::components::multimesh::NamedMultiMesh::m_root
private

Definition at line 64 of file NamedMultiMesh.hpp.

Referenced by all_meshes(), get_id(), get_mesh(), operator=(), root(), and set_root().


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