LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Public Member Functions | Private Attributes | List of all members
projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder Class Reference

A mesh builder for disks with a hole in the middle. More...

#include </home/nico/bildung/SemVI/thesis/lehrfempp/projects/ipdg_stokes/mesh/annulus_triag_mesh_builder.h>

Public Member Functions

 AnnulusTriagMeshBuilder (std::unique_ptr< lf::mesh::MeshFactory > mesh_factory)
 Constructor. More...
 
void setInnerRadius (double r)
 
void setOuterRadius (double r)
 Set the radius of the disk. More...
 
void setCenterPoint (double x, double y)
 Set the location of the center. More...
 
void setNumRadialCells (lf::base::size_type n)
 Set the number of cells in the radial direction. More...
 
void setNumAngularCells (lf::base::size_type n)
 Set the number of cells in the angular direction. More...
 
std::shared_ptr< lf::mesh::MeshBuild ()
 Build the mesh. More...
 

Private Attributes

double inner_radius_
 
double outer_radius_
 
lf::base::size_type num_radial_cells_
 
lf::base::size_type num_angular_cells_
 
Eigen::Vector2d center_point_
 
std::unique_ptr< lf::mesh::MeshFactorymesh_factory_
 

Detailed Description

A mesh builder for disks with a hole in the middle.

The diameter of the hole is controlled by the value passed to setInnerRadius(r) while the diameter of the disk is controlled by the value passed to setOutrRadius(r). The position of the center can be controlled by setting setCenterPoint(x, y). The inner radius defaults to 0.25 while the outer radius defaults to 1. The center is at the origin by default.

Definition at line 28 of file annulus_triag_mesh_builder.h.

Constructor & Destructor Documentation

◆ AnnulusTriagMeshBuilder()

projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::AnnulusTriagMeshBuilder ( std::unique_ptr< lf::mesh::MeshFactory mesh_factory)
inlineexplicit

Constructor.

Parameters
mesh_factoryA unique pointer to a mesh factory object used for the assembly of the mesh

Definition at line 35 of file annulus_triag_mesh_builder.h.

Member Function Documentation

◆ Build()

std::shared_ptr< lf::mesh::Mesh > projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::Build ( )

Build the mesh.

Returns
A shared pointer to a mesh in the form of a disk with a hole in the middle

Definition at line 13 of file annulus_triag_mesh_builder.cc.

References inner_radius_, lf::base::RefEl::kTria(), mesh_factory_, num_angular_cells_, num_radial_cells_, and outer_radius_.

◆ setCenterPoint()

void projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::setCenterPoint ( double  x,
double  y 
)
inline

Set the location of the center.

Parameters
xThe x coordinate of the new center of the annulus
yThe y coordinate of the new center of the annulus

Definition at line 63 of file annulus_triag_mesh_builder.h.

References center_point_.

◆ setInnerRadius()

void projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::setInnerRadius ( double  r)
inline

@breif Sets the radius of the hole

Parameters
rThe radius of the hole

Definition at line 50 of file annulus_triag_mesh_builder.h.

References inner_radius_.

◆ setNumAngularCells()

void projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::setNumAngularCells ( lf::base::size_type  n)
inline

Set the number of cells in the angular direction.

Parameters
nThe nummber of cells in the angular direction

Definition at line 75 of file annulus_triag_mesh_builder.h.

References num_angular_cells_.

◆ setNumRadialCells()

void projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::setNumRadialCells ( lf::base::size_type  n)
inline

Set the number of cells in the radial direction.

Parameters
nThe number of cells in the radial direction

Definition at line 69 of file annulus_triag_mesh_builder.h.

References num_radial_cells_.

◆ setOuterRadius()

void projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::setOuterRadius ( double  r)
inline

Set the radius of the disk.

Parameters
rThe radius of the disk

Definition at line 56 of file annulus_triag_mesh_builder.h.

References outer_radius_.

Member Data Documentation

◆ center_point_

Eigen::Vector2d projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::center_point_
private

Definition at line 89 of file annulus_triag_mesh_builder.h.

Referenced by setCenterPoint().

◆ inner_radius_

double projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::inner_radius_
private

Definition at line 85 of file annulus_triag_mesh_builder.h.

Referenced by Build(), and setInnerRadius().

◆ mesh_factory_

std::unique_ptr<lf::mesh::MeshFactory> projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::mesh_factory_
private

Definition at line 90 of file annulus_triag_mesh_builder.h.

Referenced by Build().

◆ num_angular_cells_

lf::base::size_type projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::num_angular_cells_
private

Definition at line 88 of file annulus_triag_mesh_builder.h.

Referenced by Build(), and setNumAngularCells().

◆ num_radial_cells_

lf::base::size_type projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::num_radial_cells_
private

Definition at line 87 of file annulus_triag_mesh_builder.h.

Referenced by Build(), and setNumRadialCells().

◆ outer_radius_

double projects::ipdg_stokes::mesh::AnnulusTriagMeshBuilder::outer_radius_
private

Definition at line 86 of file annulus_triag_mesh_builder.h.

Referenced by Build(), and setOuterRadius().


The documentation for this class was generated from the following files: