|
LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Implements a MeshBuilder for a tensor product grid of a torus. More...
#include <lf/mesh/utils/torus_mesh_builder.h>
Public Member Functions | |
| TorusMeshBuilder (std::unique_ptr< mesh::MeshFactory > mesh_factory) | |
| Constructor: set factory object to be used by the builder. More... | |
| std::shared_ptr< mesh::Mesh > | Build () override |
| actual construction of the mesh More... | |
Public Member Functions inherited from lf::mesh::utils::StructuredMeshBuilder | |
| StructuredMeshBuilder (std::unique_ptr< mesh::MeshFactory > mesh_factory) | |
| virtual std::shared_ptr< mesh::Mesh > | Build ()=0 |
| Interface for the actual construction of the mesh. More... | |
| template<typename VECTOR > | |
| StructuredMeshBuilder & | setBottomLeftCorner (const VECTOR &blc) |
| StructuredMeshBuilder & | setBottomLeftCorner (double x0, double x1) |
| template<typename VECTOR > | |
| StructuredMeshBuilder & | setTopRightCorner (const VECTOR &&trc) |
| StructuredMeshBuilder & | setTopRightCorner (double x0, double x1) |
| StructuredMeshBuilder & | setNumXCells (size_type nxc) |
| StructuredMeshBuilder & | setNumYCells (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. More... | |
Private Member Functions | |
| size_type | VertexIndex (size_type i, size_type j) const |
| vertex index from grid position More... | |
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::MeshFactory > | mesh_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} |
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.
|
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_.
|
overridevirtual |
actual construction of the mesh
Implements lf::mesh::utils::StructuredMeshBuilder.
Definition at line 29 of file torus_mesh_builder.cc.
References lf::mesh::utils::StructuredMeshBuilder::bottom_left_corner_, lf::base::RefEl::kQuad(), Logger(), lf::mesh::utils::StructuredMeshBuilder::mesh_factory_, lf::mesh::utils::StructuredMeshBuilder::num_of_x_cells_, lf::mesh::utils::StructuredMeshBuilder::num_of_y_cells_, lf::mesh::utils::StructuredMeshBuilder::top_right_corner_, and VertexIndex().
|
static |
logger that is used by Build() to provide additional debug info.
Definition at line 23 of file torus_mesh_builder.cc.
References lf::base::InitLogger().
Referenced by Build().
|
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().