17template <
int spacedim>
class Element;
18template <
int spacedim,
int topodim>
class FaceElement;
19template <
int dim>
class Node;
210 std::vector<Node<spacedim> *> nodes_;
211 std::vector<edge_ptr_t> edges_;
212 std::vector<face_ptr_t> faces_;
213 std::vector<Element<spacedim> *> elements_;
219 template <
typename T,
typename C>
T *add_entity(
T *
t,
C &
c);
222template <
int spacedim>
230 if (
i >= nodes_.size())
232 throw std::logic_error(
"Invalid index: " + std::to_string(
i) +
" not in [0, " +
233 std::to_string(nodes_.size()));
242 if (
i >= nodes_.size())
244 throw std::logic_error(
"Invalid index: " + std::to_string(
i) +
" not in [0, " +
245 std::to_string(nodes_.size()));
254 if (
i >= nodes_.size())
256 throw std::logic_error(
"Invalid index: " + std::to_string(
i) +
" not in [0, " +
257 std::to_string(elements_.size()));
263template <
int spacedim>
267 if (
i >= nodes_.size())
269 throw std::logic_error(
"Invalid index: " + std::to_string(
i) +
" not in [0, " +
270 std::to_string(elements_.size()));
276template <
int spacedim>
279 return edges_.begin();
282template <
int spacedim>
288template <
int spacedim>
292 return edges_.begin();
295template <
int spacedim>
302template <
int spacedim>
305 return faces_.begin();
310 return edges_.begin();
313template <
int spacedim>
324template <
int spacedim>
328 return faces_.begin();
333 return edges_.begin();
336template <
int spacedim>
357 return faces_.size();
Wraps the notion of an element.
Definition element.h:30
MeshConnectivity class stores the various connectivities for a mesh object.
Definition mesh_connectivity.h:21
Definition mesh_topology.h:36
void clear_topology_elements()
delete the elements of the topology
Definition mesh_topology.cpp:78
void reserve_n_faces(uint_t n)
reserve memory for n edges
Definition mesh_topology.h:348
std::vector< edge_ptr_t >::const_iterator const_edge_iterator
Definition mesh_topology.h:60
node_iterator nodes_end()
Definition mesh_topology.h:186
element_traits< Element< spacedim > >::cface_ptr_t cface_ptr_t
Definition mesh_topology.h:51
edge_ptr_t add_edge(edge_ptr_t edge)
add a new edge in the mesh and get back the pointer
void clear_topology_edges()
delete the edges of the topology
element_iterator elements_end()
Definition mesh_topology.h:192
uint_t n_edges() const
get the number of edges in the mesh
Definition mesh_topology.h:143
edge_ptr_t edge(uint_t i)
element_traits< Element< spacedim > >::cedge_ptr_t cedge_ptr_t
Definition mesh_topology.h:50
Element< spacedim > * add_element(Element< spacedim > *e)
add a new element in the mesh and get back the pointer
Definition mesh_topology.cpp:57
const_element_iterator elements_end() const
Definition mesh_topology.h:195
MeshTopology()
Constructor.
Definition mesh_topology.h:223
const_element_iterator elements_begin() const
Definition mesh_topology.h:194
element_iterator elements_begin()
Definition mesh_topology.h:191
std::vector< Element< spacedim > * >::const_iterator const_element_iterator
Definition mesh_topology.h:57
edge_iterator edges_begin()
Definition mesh_topology.h:277
std::vector< Element< spacedim > * >::iterator element_iterator
Definition mesh_topology.h:56
void clear_topology()
clear the topology
Definition mesh_topology.cpp:94
face_ptr_t face(uint_t f)
Definition mesh_topology.cpp:103
element_traits< Element< spacedim > >::face_ptr_t face_ptr_t
Definition mesh_topology.h:48
node_iterator nodes_begin()
Definition mesh_topology.h:185
const_node_iterator nodes_begin() const
Definition mesh_topology.h:188
void clear_topology_faces()
delete the faces of the topology
face_iterator faces_begin()
Definition mesh_topology.h:303
Node< spacedim > * node(uint_t i)
read/write access to the i-th node of the mesh
Definition mesh_topology.h:227
std::vector< face_ptr_t >::iterator face_iterator
Definition mesh_topology.h:62
std::vector< edge_ptr_t >::iterator edge_iterator
Definition mesh_topology.h:59
element_traits< Element< spacedim > >::edge_ptr_t edge_ptr_t
Definition mesh_topology.h:47
uint_t n_faces() const
get the number of edges in the mesh
Definition mesh_topology.h:355
Node< spacedim > * add_node(Node< spacedim > *n)
add a new node to the mesh and get back the pointer
Definition mesh_topology.cpp:52
std::vector< Node< spacedim > * >::const_iterator const_node_iterator
Definition mesh_topology.h:54
void reserve_n_nodes(uint_t n)
reserve memory for n nodes
Definition mesh_topology.h:68
face_ptr_t add_face(face_ptr_t face)
add a new face in the mesh and get back the pointer
void reserve_n_elements(uint_t n)
reserve memory for n elements
Definition mesh_topology.h:73
void clear_topology_nodes()
delete the nodes of the topology
Definition mesh_topology.cpp:62
std::vector< face_ptr_t >::const_iterator const_face_iterator
Definition mesh_topology.h:63
uint_t n_elements() const
get the number of elements in the mesh
Definition mesh_topology.h:138
void reserve_n_edges(uint_t n)
reserve memory for n edges
Definition mesh_topology.h:78
std::vector< Node< spacedim > * >::iterator node_iterator
Definition mesh_topology.h:53
const_node_iterator nodes_end() const
Definition mesh_topology.h:189
Element< spacedim > * element(uint_t i)
read/write access to the i-th element of the mesh
Definition mesh_topology.h:251
std::vector< MeshConnectivity >::iterator element_connectivity_iterator
Definition mesh_topology.h:45
uint_t n_nodes() const
get the number of nodes in the mesh
Definition mesh_topology.h:133
void faces(const MeshConnectivity &faces_idx, std::vector< cface_ptr_t > &faces_ptr) const
~MeshTopology()
Constructor.
Definition mesh_topology.cpp:50
face_iterator faces_end()
Definition mesh_topology.h:314
edge_iterator edges_end()
Definition mesh_topology.h:283
Wraps the notion of a node. A node is simply a point in dim-space that can hold dofs.
Definition node.h:24
OutT resolve(const std::string &name, const std::map< std::string, std::any > &input)
Definition std_map_utils.h:25
Definition bitrl_consts.h:14
std::size_t uint_t
uint_t
Definition bitrl_types.h:43
Definition element_traits.h:16