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... | |
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... | |
Typedefs | |
template<class R > | |
using | MeshFunctionReturnType = internal::VectorElement_t< internal::MeshFunctionReturnType_t< R > > |
Determine the type of objects returned by a MeshFunction. More... | |
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. More... | |
template<class T , class = typename std::enable_if< std::is_copy_constructible<T>::value>::type> | |
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!) More... | |
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 More... | |
template<class T , class = typename std::enable_if< std::is_copy_constructible<T>::value>::type> | |
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!) More... | |
template<class A , class B , class = std::enable_if_t<isMeshFunction<A> && isMeshFunction<B>>> | |
auto | operator+ (const A &a, const B &b) |
Add's two mesh functions. More... | |
template<class A , class B , class = std::enable_if_t<isMeshFunction<A> && isMeshFunction<B>>> | |
auto | operator- (const A &a, const B &b) |
Subtracts two mesh functions. More... | |
template<class A , class B , class = std::enable_if_t<isMeshFunction<A> && isMeshFunction<B>>> | |
auto | operator* (const A &a, const B &b) |
Multiply two mesh functions with each other. More... | |
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 More... | |
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 More... | |
AllCodimMeshDataSet< bool > | flagEntitiesOnBoundary (const std::shared_ptr< const Mesh > &mesh_p) |
flag entities of any co-dimension located on the boundary More... | |
Variables | |
template<class T , class R = void> | |
constexpr bool | isMeshFunction |
Determine whether a given type fulfills the concept MeshFunction. More... | |
Contains helper functions and classes that all operate on the interface classes defined in lf::mesh.
using lf::mesh::utils::MeshFunctionReturnType = typedef internal::VectorElement_t<internal::MeshFunctionReturnType_t<R> > |
Determine the type of objects returned by a MeshFunction.
R | The type of the mesh function (as defined in MeshFunction). |
Definition at line 80 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.
References lf::mesh::Entity::SubEntities().
Referenced by 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(), and lf::mesh::Entity::SubEntities().
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(), and lf::mesh::Entity::SubEntities().
Referenced by FisherKPP::assembleGalerkinMatrices(), projects::ipdg_stokes::assemble::buildSystemMatrixInOutFlow(), projects::ipdg_stokes::assemble::buildSystemMatrixNoFlow(), projects::ipdg_stokes::post_processing::DGnorm(), projects::dpg::flagEntitiesOnInflowBoundary(), projects::dpg::flagEntitiesOnOutflowBoundary(), projects::dpg::test::TestConververgencePrimalDPGAdaptedNormConvectionDiffusionDirichletBVP(), and projects::dpg::test::TestConververgencePrimalDPGConvectionDiffusionDirichletBVP().
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 118 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 92 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 108 of file codim_mesh_data_set.h.
auto operator* | ( | const A & | a, |
const B & | 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 729 of file mesh_function_binary.h.
auto operator+ | ( | const A & | a, |
const B & | 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 671 of file mesh_function_binary.h.
auto operator- | ( | const A & | a, |
const B & | 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 700 of file mesh_function_binary.h.
|
related |
Definition at line 17 of file print_info.cc.
|
related |
Definition at line 74 of file print_info.cc.
|
inlineconstexpr |
Determine whether a given type fulfills the concept MeshFunction.
T | The type to check |
R | If specified, check additionally, that the MeshFunction returns objects of type R |
Definition at line 70 of file mesh_function_traits.h.