LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Contains helper functions and classes that all operate on the interface classes defined in lf::mesh. More...
Classes | |
class | AllCodimMeshDataSet |
Assigns to every entity(all codims) in a mesh a value of type T More... | |
class | CodimMeshDataSet |
A MeshDataSet that attaches data of type T to every entity of a mesh that has a specified codimension. More... | |
class | MeshDataSet |
Interface that specifies how data is stored with an entity. More... | |
struct | MeshFunctionAT |
Archetype for the MeshFunction concept. More... | |
class | MeshFunctionBinary |
A MeshFunction which combines two other mesh functions using a binary operator (advanced use). More... | |
class | MeshFunctionConstant |
A MeshFunction which takes the same constant value on the whole mesh. More... | |
class | MeshFunctionGlobal |
MeshFunction wrapper for a simple function of physical coordinates. More... | |
class | MeshFunctionUnary |
A mesh function representing another mesh function under a pointwise, unary operation. More... | |
class | StructuredMeshBuilder |
class | TorusMeshBuilder |
Implements a MeshBuilder for a tensor product grid of a torus. More... | |
class | TPQuadMeshBuilder |
Implements a Builder for a tensor product grid (with rectangular cells) More... | |
class | TPTriagMeshBuilder |
Implements a MeshBuilder that generates a triangular structured mesh. More... | |
Concepts | |
concept | MeshFunction |
A MeshFunction is a function object that can be evaluated at any point on the mesh. | |
Typedefs | |
template<class R > | |
using | MeshFunctionReturnType |
Determine the type of objects returned by a MeshFunction. | |
Functions | |
template<class T > | |
std::shared_ptr< AllCodimMeshDataSet< T > > | make_AllCodimMeshDataSet (const std::shared_ptr< const lf::mesh::Mesh > &mesh) |
Create a new AllCodimMeshDataSet and Default initialize the data. | |
template<std::copy_constructible T> | |
std::shared_ptr< AllCodimMeshDataSet< T > > | make_AllCodimMeshDataSet (const std::shared_ptr< const lf::mesh::Mesh > &mesh, T init_value) |
Create a new AllCodimMeshDataSet and initialize the data of every entity with the given value (T must be copyable!) | |
template<class T > | |
std::shared_ptr< CodimMeshDataSet< T > > | make_CodimMeshDataSet (const std::shared_ptr< const lf::mesh::Mesh > &mesh, base::dim_t codim) |
Create a new CodimMeshDataSet that attaches data of type T with every entity with codimension codim . The data is Default initialized | |
template<std::copy_constructible T> | |
std::shared_ptr< CodimMeshDataSet< T > > | make_CodimMeshDataSet (const std::shared_ptr< const Mesh > &mesh, base::dim_t codim, T init) |
Create a new CodimMeshDataSet that attaches data of type T with every entity with codimension codim . The data of every entity is initialized to the given value (T must be copyable!) | |
template<MeshFunction A, MeshFunction B> | |
auto | operator+ (const A &a, const B &b) -> MeshFunctionBinary< internal::OperatorAddition, A, B > |
Add's two mesh functions. | |
template<MeshFunction A, MeshFunction B> | |
auto | operator- (const A &a, const B &b) -> MeshFunctionBinary< internal::OperatorSubtraction, A, B > |
Subtracts two mesh functions. | |
template<MeshFunction A, MeshFunction B> | |
auto | operator* (const A &a, const B &b) -> MeshFunctionBinary< internal::OperatorMultiplication, A, B > |
Multiply two mesh functions with each other. | |
void | PrintInfo (std::ostream &o, const lf::mesh::Mesh &mesh, int ctrl) |
void | PrintInfo (std::ostream &stream, const lf::mesh::Entity &e, int output_ctrl) |
CodimMeshDataSet< lf::base::size_type > | CountNumSuperEntities (const std::shared_ptr< const Mesh > &mesh_p, lf::base::dim_t codim_sub, lf::base::dim_t codim_super) |
store number of adjacent super-entities | |
CodimMeshDataSet< bool > | flagEntitiesOnBoundary (const std::shared_ptr< const Mesh > &mesh_p, lf::base::dim_t codim) |
flag entities of a specific co-dimension located on the boundary | |
AllCodimMeshDataSet< bool > | flagEntitiesOnBoundary (const std::shared_ptr< const Mesh > &mesh_p) |
flag entities of any co-dimension located on the boundary | |
Contains helper functions and classes that all operate on the interface classes defined in lf::mesh.
using lf::mesh::utils::MeshFunctionReturnType |
Determine the type of objects returned by a MeshFunction.
R | The type of the mesh function (as defined in MeshFunction). |
Definition at line 202 of file mesh_function_traits.h.
CodimMeshDataSet< lf::base::size_type > lf::mesh::utils::CountNumSuperEntities | ( | const std::shared_ptr< const Mesh > & | mesh_p, |
lf::base::dim_t | codim_sub, | ||
lf::base::dim_t | codim_super ) |
store number of adjacent super-entities
mesh_p | reference to underlying mesh |
codim_sub | co-dimension of the queried entities |
codim_super | relative co-dimension (with positive sign) of super entities. |
For each entity of a given co-dimension, this function counts the number of adjacent super-entities of some smaller co-dimension.
If, for a 2D mesh we want to count the number of cells adjacent to edges, we have to specify codim_sub = 1, codim_super = 1!
If, for a 2D mesh you want to count the number of cells owning a node, specify codim_sub = 2 and codim_super = 2!
Definition at line 18 of file special_entity_sets.cc.
Referenced by flagEntitiesOnBoundary(), and flagEntitiesOnBoundary().
AllCodimMeshDataSet< bool > lf::mesh::utils::flagEntitiesOnBoundary | ( | const std::shared_ptr< const Mesh > & | mesh_p | ) |
flag entities of any co-dimension located on the boundary
mesh_p | shared pointer to the mesh whose boudnary entities should be flagged. |
Definition at line 64 of file special_entity_sets.cc.
References CountNumSuperEntities().
CodimMeshDataSet< bool > lf::mesh::utils::flagEntitiesOnBoundary | ( | const std::shared_ptr< const Mesh > & | mesh_p, |
lf::base::dim_t | codim ) |
flag entities of a specific co-dimension located on the boundary
mesh_p | shared pointer to the mesh whose boudnary entities should be flagged. |
codim | co-dimension of entities to be flagged, must be > 0. |
An entity of co-dimension 1 is located on the boundary, if it is adjacent to exactly 1 cell (= entity of co-dimension 0).
The boundary of a mesh is the set of all entities that are either entities of co-dimension 1 located on the boundary or sub-entities of those.
The implementation of this function relies on CountNumSuperEntities().
The following example code shows how to create a flag array for marking the boundary edges of a 2D mesh:
Definition at line 40 of file special_entity_sets.cc.
References CountNumSuperEntities().
std::shared_ptr< AllCodimMeshDataSet< T > > lf::mesh::utils::make_AllCodimMeshDataSet | ( | const std::shared_ptr< const lf::mesh::Mesh > & | mesh | ) |
Create a new AllCodimMeshDataSet and Default initialize the data.
mesh | The mesh that contains the entities. |
Definition at line 119 of file all_codim_mesh_data_set.h.
std::shared_ptr< AllCodimMeshDataSet< T > > lf::mesh::utils::make_AllCodimMeshDataSet | ( | const std::shared_ptr< const lf::mesh::Mesh > & | mesh, |
T | init_value ) |
Create a new AllCodimMeshDataSet and initialize the data of every entity with the given value (T
must be copyable!)
mesh | The mesh that contains the entities. |
init_value | The initial value that should be assigned to every entity. |
Definition at line 134 of file all_codim_mesh_data_set.h.
std::shared_ptr< CodimMeshDataSet< T > > lf::mesh::utils::make_CodimMeshDataSet | ( | const std::shared_ptr< const lf::mesh::Mesh > & | mesh, |
base::dim_t | codim ) |
Create a new CodimMeshDataSet that attaches data of type T
with every entity with codimension codim
. The data is Default initialized
mesh | The mesh that contains the entities. |
codim | The codimension of the entities whith which the data is stored. |
Definition at line 91 of file codim_mesh_data_set.h.
std::shared_ptr< CodimMeshDataSet< T > > lf::mesh::utils::make_CodimMeshDataSet | ( | const std::shared_ptr< const Mesh > & | mesh, |
base::dim_t | codim, | ||
T | init ) |
Create a new CodimMeshDataSet that attaches data of type T
with every entity with codimension codim
. The data of every entity is initialized to the given value (T
must be copyable!)
mesh | The mesh that contains the entities. |
codim | The codimension of the entities with which the data is stored. |
init | The initial value that should be assigned to every entity. |
Definition at line 106 of file codim_mesh_data_set.h.
auto operator* | ( | const A & | a, |
const B & | b ) -> MeshFunctionBinary<internal::OperatorMultiplication, A, B> |
Multiply two mesh functions with each other.
A | The type of the lhs MeshFunction |
B | The type of the rhs MeshFunction |
a | the lhs MeshFunction |
b | the rhs MeshFunction |
a*b
, i.e. a new mesh function which represents the pointwise product of a
and b
.A
and B
are Eigen::Matrix
valued, the resulting MeshFunction will also be Matrix/Vector valued and will represent the Matrix product of a
and b
.lf::uscalfe
namespace, it will not be found by Argument Dependent Lookup (ADL). You can get around this by explicitly importing the operator overload: using lf::uscalfe::operator*;
Definition at line 722 of file mesh_function_binary.h.
auto operator+ | ( | const A & | a, |
const B & | b ) -> MeshFunctionBinary<internal::OperatorAddition, A, B> |
Add's two mesh functions.
A | Type of the lhs MeshFunction |
B | Type of the rhs MeshFunction |
a | the lhs MeshFunction |
b | the rhs MeshFunction |
a + b
, i.e. a new mesh function which represents the pointwise addition of a
and b
a
and b
should produce the same type of values, e.g. both should be scalar valued or both matrix/vector/array valued.lf::uscalfe
namespace, it will not be found by Argument Dependent Lookup. You can get around this by explictly importing the operator overload: using lf::uscalfe::operator+;
Definition at line 664 of file mesh_function_binary.h.
auto operator- | ( | const A & | a, |
const B & | b ) -> MeshFunctionBinary<internal::OperatorSubtraction, A, B> |
Subtracts two mesh functions.
A | Type of the lhs MeshFunction |
B | Type of the rhs MeshFunction |
a | the lhs MeshFunction |
b | the rhs MeshFunction |
a - b
, i.e. a new mesh function which represents the pointwise difference of a
minus b
a
and b
should produce the same type of values, e.g. both should be scalar valued or both matrix/vector valued.lf::uscalfe
namespace, it will not be found by Argument Dependent Lookup (ADL). You can get around this by explicitly importing the operator overload: using lf::uscalfe::operator-;
Definition at line 693 of file mesh_function_binary.h.
|
related |
Definition at line 18 of file print_info.cc.
|
related |
Definition at line 74 of file print_info.cc.