LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
annulus_triag_mesh_builder.h
1#ifndef THESIS_MESH_ANNULUS_TRIAG_MESH_BUILDER_H
2#define THESIS_MESH_ANNULUS_TRIAG_MESH_BUILDER_H
3
9#define _USE_MATH_DEFINES
10
11#include <lf/mesh/mesh.h>
12#include <lf/mesh/utils/structured_mesh_builder.h>
13
14namespace projects::ipdg_stokes {
15
16namespace mesh {
17
29 public:
36 std::unique_ptr<lf::mesh::MeshFactory> mesh_factory)
37 : inner_radius_(0.25),
41 center_point_(Eigen::Vector2d::Zero()),
42 mesh_factory_(std::move(mesh_factory)) {
43 // Nothing to do here
44 }
45
50 void setInnerRadius(double r) { inner_radius_ = r; }
51
56 void setOuterRadius(double r) { outer_radius_ = r; }
57
63 void setCenterPoint(double x, double y) { center_point_ << x, y; }
64
70
76
82 std::shared_ptr<lf::mesh::Mesh> Build();
83
84 private:
89 Eigen::Vector2d center_point_;
90 std::unique_ptr<lf::mesh::MeshFactory> mesh_factory_;
91};
92
93} // end namespace mesh
94
95} // end namespace projects::ipdg_stokes
96
97#endif // THESIS_MESH_ANNULUS_TRIAG_MESH_BUILDER_H
A mesh builder for disks with a hole in the middle.
void setNumAngularCells(lf::base::size_type n)
Set the number of cells in the angular direction.
void setOuterRadius(double r)
Set the radius of the disk.
std::shared_ptr< lf::mesh::Mesh > Build()
Build the mesh.
std::unique_ptr< lf::mesh::MeshFactory > mesh_factory_
void setCenterPoint(double x, double y)
Set the location of the center.
void setNumRadialCells(lf::base::size_type n)
Set the number of cells in the radial direction.
AnnulusTriagMeshBuilder(std::unique_ptr< lf::mesh::MeshFactory > mesh_factory)
Constructor.
unsigned int size_type
general type for variables related to size of arrays
Definition: base.h:24