LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
lf::mesh::utils::StructuredMeshBuilder Class Referenceabstract

#include <lf/mesh/utils/structured_mesh_builder.h>

Inheritance diagram for lf::mesh::utils::StructuredMeshBuilder:
lf::mesh::utils::TPQuadMeshBuilder lf::mesh::utils::TPTriagMeshBuilder lf::mesh::utils::TorusMeshBuilder

Public Types

using size_type = mesh::Mesh::size_type
 
using dim_t = base::RefEl::dim_t
 

Public Member Functions

 StructuredMeshBuilder (std::unique_ptr< mesh::MeshFactory > mesh_factory)
 
virtual std::shared_ptr< mesh::MeshBuild ()=0
 Interface for the actual construction of the mesh.
 
Initialization methods
template<typename VECTOR >
StructuredMeshBuildersetBottomLeftCorner (const VECTOR &blc)
 
StructuredMeshBuildersetBottomLeftCorner (double x0, double x1)
 
template<typename VECTOR >
StructuredMeshBuildersetTopRightCorner (const VECTOR &&trc)
 
StructuredMeshBuildersetTopRightCorner (double x0, double x1)
 
StructuredMeshBuildersetNumXCells (size_type nxc)
 
StructuredMeshBuildersetNumYCells (size_type nyc)
 

Protected Attributes

std::unique_ptr< mesh::MeshFactorymesh_factory_
 
Eigen::Vector2d bottom_left_corner_
 
Eigen::Vector2d top_right_corner_
 
size_type num_of_x_cells_ {0}
 
size_type num_of_y_cells_ {0}
 

Detailed Description

@ brief Builder interface for creating structured meshes on rectangular domains

The design of the class complies with the builder pattern.

The geometry of the rectangular domain can be set by specifying the corners.

Definition at line 16 of file structured_mesh_builder.h.

Member Typedef Documentation

◆ dim_t

Definition at line 19 of file structured_mesh_builder.h.

◆ size_type

Definition at line 18 of file structured_mesh_builder.h.

Constructor & Destructor Documentation

◆ StructuredMeshBuilder()

lf::mesh::utils::StructuredMeshBuilder::StructuredMeshBuilder ( std::unique_ptr< mesh::MeshFactory > mesh_factory)
inlineexplicit

Definition at line 24 of file structured_mesh_builder.h.

References mesh_factory_.

Member Function Documentation

◆ Build()

virtual std::shared_ptr< mesh::Mesh > lf::mesh::utils::StructuredMeshBuilder::Build ( )
pure virtual

Interface for the actual construction of the mesh.

This method has to be implemented by derived classes

Returns
a shared pointer to the newly created mesh. This pointer can be copied freely and the mesh will exists until the last pointer to ceases to exist.

Implemented in lf::mesh::utils::TorusMeshBuilder, lf::mesh::utils::TPQuadMeshBuilder, and lf::mesh::utils::TPTriagMeshBuilder.

◆ setBottomLeftCorner() [1/2]

template<typename VECTOR >
StructuredMeshBuilder & lf::mesh::utils::StructuredMeshBuilder::setBottomLeftCorner ( const VECTOR & blc)
inline

◆ setBottomLeftCorner() [2/2]

StructuredMeshBuilder & lf::mesh::utils::StructuredMeshBuilder::setBottomLeftCorner ( double x0,
double x1 )
inline

Definition at line 41 of file structured_mesh_builder.h.

References bottom_left_corner_.

◆ setNumXCells()

StructuredMeshBuilder & lf::mesh::utils::StructuredMeshBuilder::setNumXCells ( size_type nxc)
inline

Definition at line 54 of file structured_mesh_builder.h.

References num_of_x_cells_.

◆ setNumYCells()

StructuredMeshBuilder & lf::mesh::utils::StructuredMeshBuilder::setNumYCells ( size_type nyc)
inline

Definition at line 58 of file structured_mesh_builder.h.

References num_of_y_cells_.

Referenced by lf::mesh::test_utils::GenerateHybrid2DTestMesh().

◆ setTopRightCorner() [1/2]

template<typename VECTOR >
StructuredMeshBuilder & lf::mesh::utils::StructuredMeshBuilder::setTopRightCorner ( const VECTOR && trc)
inline

Definition at line 46 of file structured_mesh_builder.h.

References top_right_corner_.

◆ setTopRightCorner() [2/2]

StructuredMeshBuilder & lf::mesh::utils::StructuredMeshBuilder::setTopRightCorner ( double x0,
double x1 )
inline

Definition at line 50 of file structured_mesh_builder.h.

References top_right_corner_.

Member Data Documentation

◆ bottom_left_corner_

Eigen::Vector2d lf::mesh::utils::StructuredMeshBuilder::bottom_left_corner_
protected

◆ mesh_factory_

std::unique_ptr<mesh::MeshFactory> lf::mesh::utils::StructuredMeshBuilder::mesh_factory_
protected

◆ num_of_x_cells_

size_type lf::mesh::utils::StructuredMeshBuilder::num_of_x_cells_ {0}
protected

◆ num_of_y_cells_

size_type lf::mesh::utils::StructuredMeshBuilder::num_of_y_cells_ {0}
protected

◆ top_right_corner_

Eigen::Vector2d lf::mesh::utils::StructuredMeshBuilder::top_right_corner_
protected

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