LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
mesh_interface.h
1
8#ifndef INCGb86b0c9cb0fd48da931a1f24421b8842
9#define INCGb86b0c9cb0fd48da931a1f24421b8842
10
11#include <lf/base/base.h>
12
13#include "entity.h"
14
15namespace lf::mesh {
73class Mesh {
74 protected:
75 Mesh() = default;
76 Mesh(const Mesh&) = default;
77 Mesh(Mesh&&) = default;
78 Mesh& operator=(const Mesh&) = default;
79 Mesh& operator=(Mesh&&) = default;
80
81 public:
92 [[nodiscard]] virtual unsigned DimMesh() const = 0;
93
98 [[nodiscard]] virtual unsigned DimWorld() const = 0;
99
132 [[nodiscard]] virtual std::span<const Entity* const> Entities(
133 unsigned codim) const = 0;
134
142 [[nodiscard]] virtual size_type NumEntities(unsigned codim) const = 0;
143
149 [[nodiscard]] virtual size_type NumEntities(
150 lf::base::RefEl ref_el_type) const = 0;
151
173 [[nodiscard]] virtual size_type Index(const Entity& e) const = 0;
174
195 [[nodiscard]] virtual const mesh::Entity* EntityByIndex(
196 dim_t codim, base::glb_idx_t index) const = 0;
197
203 [[nodiscard]] virtual bool Contains(const Entity& e) const = 0;
204
208 virtual ~Mesh() = default;
209};
210
211} // namespace lf::mesh
212
213#endif // INCGb86b0c9cb0fd48da931a1f24421b8842
Represents a reference element with all its properties.
Definition ref_el.h:109
Interface class representing a topological entity in a cellular complex
Definition entity.h:42
Abstract interface for objects representing a single mesh.
Mesh(Mesh &&)=default
virtual bool Contains(const Entity &e) const =0
Check if the given entity is a part of this mesh.
lf::base::size_type size_type
Mesh(const Mesh &)=default
virtual const mesh::Entity * EntityByIndex(dim_t codim, base::glb_idx_t index) const =0
Method for accessing an entity through its index.
virtual size_type NumEntities(lf::base::RefEl ref_el_type) const =0
Tells number of entities of a particular topological/geometric type.
virtual ~Mesh()=default
virtual destructor
lf::base::dim_t dim_t
Mesh()=default
virtual unsigned DimWorld() const =0
The dimension of the Euclidean space in which the mesh is embedded.
virtual std::span< const Entity *const > Entities(unsigned codim) const =0
All entities of a given codimension.
virtual size_type NumEntities(unsigned codim) const =0
The number of Entities that have the given codimension.
virtual unsigned DimMesh() const =0
The dimension of the manifold described by the mesh, or equivalently the maximum dimension of the ref...
Mesh & operator=(const Mesh &)=default
Mesh & operator=(Mesh &&)=default
virtual size_type Index(const Entity &e) const =0
Acess to the index of a mesh entity of any co-dimension.
unsigned int size_type
general type for variables related to size of arrays
Definition types.h:20
unsigned int dim_t
type for dimensions and co-dimensions and numbers derived from them
Definition types.h:32
unsigned int glb_idx_t
type for global index of mesh entities (nodes, edges, cells)
Definition types.h:24
Defines a set of interface classes that define a mesh manager and provides mesh-related tools that bu...
Definition entity.cc:5