LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
mesh_factory.h
1
8#ifndef INCG5ac8f981f27e45d3b9d15fc9d52f7136
9#define INCG5ac8f981f27e45d3b9d15fc9d52f7136
10
11#include <lf/base/base.h>
12#include <lf/geometry/geometry.h>
13
14#include "mesh_interface.h"
15
16namespace lf::mesh {
17
26 protected:
27 MeshFactory() = default;
28 MeshFactory(const MeshFactory&) = default;
30 MeshFactory& operator=(const MeshFactory&) = default;
32
33 public:
35 using size_type = unsigned int;
36
40 using coord_t = Eigen::VectorXd;
41
43
47 [[nodiscard]] virtual dim_t DimWorld() const = 0;
48
52 [[nodiscard]] virtual dim_t DimMesh() const = 0;
53
61 // NOLINTNEXTLINE(modernize-use-nodiscard)
62 virtual size_type AddPoint(coord_t coord) = 0;
63
71 // NOLINTNEXTLINE(modernize-use-nodiscard)
73 std::unique_ptr<geometry::Geometry>&& geometry) = 0;
74
116 // NOLINTNEXTLINE(modernize-use-nodiscard)
118 base::RefEl ref_el, const std::span<const size_type>& nodes,
119 std::unique_ptr<geometry::Geometry>&& geometry) = 0;
120
129 [[nodiscard]] virtual std::shared_ptr<Mesh> Build() = 0;
130
132 virtual ~MeshFactory() = default;
133};
134
135} // namespace lf::mesh
136
137#endif // INCG5ac8f981f27e45d3b9d15fc9d52f7136
Represents a reference element with all its properties.
Definition ref_el.h:109
Interface class for initialization of a mesh object.
Eigen::VectorXd coord_t
Coordinate type of a point.
virtual size_type AddPoint(coord_t coord)=0
Add a point to the mesh.
virtual dim_t DimWorld() const =0
Return the Mesh::DimWorld() of the mesh that will be returned.
MeshFactory & operator=(const MeshFactory &)=default
MeshFactory(MeshFactory &&)=default
virtual ~MeshFactory()=default
Virtual destructor.
MeshFactory(const MeshFactory &)=default
virtual size_type AddPoint(std::unique_ptr< geometry::Geometry > &&geometry)=0
Add a point to the mesh.
virtual dim_t DimMesh() const =0
Return the Mesh::DimMesh() of the mesh that will be returned.
MeshFactory & operator=(MeshFactory &&)=default
virtual size_type AddEntity(base::RefEl ref_el, const std::span< const size_type > &nodes, std::unique_ptr< geometry::Geometry > &&geometry)=0
Add an an entity (codim>0) to the mesh.
unsigned int size_type
virtual std::shared_ptr< Mesh > Build()=0
Construct a mesh out of the specified nodes and elements.
unsigned int dim_t
type for dimensions and co-dimensions and numbers derived from them
Definition types.h:32
Defines a set of interface classes that define a mesh manager and provides mesh-related tools that bu...
Definition entity.cc:5