Wildmeshing Toolkit
Loading...
Searching...
No Matches
Mesh_construction.cpp
Go to the documentation of this file.
1
2#include <numeric>
3#include "Mesh.hpp"
4
7
8#include "Primitive.hpp"
9
10namespace wmtk {
11
13 : m_attribute_manager(std::move(other.m_attribute_manager))
14 , m_multi_mesh_manager(std::move(other.m_multi_mesh_manager))
15 , m_top_cell_dimension(other.m_top_cell_dimension)
16 , m_is_free(other.m_is_free)
17{
18 m_flag_handles = std::move(other.m_flag_handles);
19}
20
21
23{
24 m_attribute_manager = std::move(other.m_attribute_manager);
25 m_multi_mesh_manager = std::move(other.m_multi_mesh_manager);
26 m_flag_handles = std::move(other.m_flag_handles);
27 m_top_cell_dimension = other.m_top_cell_dimension;
28 m_is_free = other.m_is_free;
29
30 return *this;
31}
32
33Mesh::Mesh(const int64_t& dimension)
34 : Mesh(dimension, dimension)
35{}
36
37Mesh::Mesh(const int64_t& dimension, const int64_t& max_primitive_type_id)
38 : m_attribute_manager(max_primitive_type_id + 1)
39 , m_multi_mesh_manager(max_primitive_type_id + 1)
40 , m_top_cell_dimension(dimension)
41{
42 m_flag_handles.reserve(max_primitive_type_id + 1);
43 for (int64_t j = 0; j <= max_primitive_type_id; ++j) {
44 m_flag_handles.emplace_back(
45 register_attribute_typed<char>("flags", get_primitive_type_from_id(j), 1, false, 0));
46 }
47}
48
49
54} // namespace wmtk
bool m_is_free
Definition Mesh.hpp:834
Mesh(const int64_t &dimension)
std::vector< TypedAttributeHandle< char > > m_flag_handles
0x1 == true = simplex is active (simplex exists) all flag default to 0
Definition Mesh.hpp:852
multimesh::MultiMeshManager m_multi_mesh_manager
Definition Mesh.hpp:829
Mesh & operator=(const Mesh &other)=delete
int64_t m_top_cell_dimension
Definition Mesh.hpp:831
attribute::AttributeManager m_attribute_manager
Definition Mesh.hpp:827
constexpr PrimitiveType get_primitive_type_from_id(int8_t id)
Get the primitive type corresponding to its unique integer id.