LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Private Member Functions | List of all members
lf::mesh::utils::TorusMeshBuilder Class Reference

Implements a MeshBuilder for a tensor product grid of a torus. More...

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

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

Public Member Functions

 TorusMeshBuilder (std::unique_ptr< mesh::MeshFactory > mesh_factory)
 Constructor: set factory object to be used by the builder.
 
std::shared_ptr< mesh::MeshBuild () override
 actual construction of the mesh
 
- Public Member Functions inherited from lf::mesh::utils::StructuredMeshBuilder
 StructuredMeshBuilder (std::unique_ptr< mesh::MeshFactory > mesh_factory)
 
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)
 

Static Public Member Functions

static std::shared_ptr< spdlog::logger > & Logger ()
 logger that is used by Build() to provide additional debug info.
 

Private Member Functions

size_type VertexIndex (size_type i, size_type j) const
 vertex index from grid position
 

Additional Inherited Members

- Public Types inherited from lf::mesh::utils::StructuredMeshBuilder
using size_type = mesh::Mesh::size_type
 
using dim_t = base::RefEl::dim_t
 
- Protected Attributes inherited from lf::mesh::utils::StructuredMeshBuilder
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

Implements a MeshBuilder for a tensor product grid of a torus.

The torus is built from a tensor product mesh covering a rectangle with opposite sides identified. The major radius of the torus is proportional to the rectangle's width (x-axis), the minor radius is proportional to the rectangle's height (y-axis). The parametrization is described here: https://en.wikipedia.org/wiki/Torus#Geometry

Definition at line 27 of file torus_mesh_builder.h.

Constructor & Destructor Documentation

◆ TorusMeshBuilder()

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

Constructor: set factory object to be used by the builder.

Definition at line 32 of file torus_mesh_builder.h.

References lf::mesh::utils::StructuredMeshBuilder::mesh_factory_.

Member Function Documentation

◆ Build()

std::shared_ptr< mesh::Mesh > lf::mesh::utils::TorusMeshBuilder::Build ( )
overridevirtual

◆ Logger()

std::shared_ptr< spdlog::logger > & lf::mesh::utils::TorusMeshBuilder::Logger ( )
static

logger that is used by Build() to provide additional debug info.

Definition at line 21 of file torus_mesh_builder.cc.

References lf::base::InitLogger().

Referenced by Build().

◆ VertexIndex()

size_type lf::mesh::utils::TorusMeshBuilder::VertexIndex ( size_type i,
size_type j ) const
inlineprivate

vertex index from grid position

Definition at line 48 of file torus_mesh_builder.h.

References lf::mesh::utils::StructuredMeshBuilder::num_of_x_cells_.

Referenced by Build().


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