LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
|
Class which allows evaluation of the \( \text{sgn}_K \) function. More...
#include </home/nico/bildung/SemVI/thesis/lehrfempp/projects/dpg/dpg_tools.h>
Public Member Functions | |
PrescribedSignProvider ()=default | |
PrescribedSignProvider (const PrescribedSignProvider &)=delete | |
PrescribedSignProvider (PrescribedSignProvider &&) noexcept=default | |
PrescribedSignProvider & | operator= (const PrescribedSignProvider &)=delete |
PrescribedSignProvider & | operator= (PrescribedSignProvider &&) noexcept=default |
virtual | ~PrescribedSignProvider ()=default |
PrescribedSignProvider (std::shared_ptr< const lf::mesh::Mesh > mesh_ptr) | |
main constructor, initializes the \(\text{sgn}_K\) function for all cells \( K \) of the passed mesh More... | |
int | PrescribedSign (const lf::mesh::Entity &element, const lf::mesh::Entity &edge) const |
evaluates the the \( \text{sgn}_K \) function at the midpoint of the edge \( e \) of cell \( K \) More... | |
Private Member Functions | |
void | init () |
Private Attributes | |
std::shared_ptr< const lf::mesh::Mesh > | mesh_ptr_ |
std::shared_ptr< lf::mesh::utils::CodimMeshDataSet< int > > | maxElement_ptr_ |
Class which allows evaluation of the \( \text{sgn}_K \) function.
DPG formulations can involve the notion of prescribed edge normals \( n_e \). These can be represented by a unit vector field on the mesh skeleton that is normal to the edges and points outwards on the boundary. The prescribed edge normals are fully specified by the definition of a function \( \text{sgn}_K: K \rightarrow \{ -1,1 \} \) that distinguishes them from the outer normals \(n_K\) on each cell \( K \) of the mesh.
\[ \text{sgn}_K = \begin{cases} 1 & \text{if } n_K = n_e \\ -1 & \text{if } n_K = - n_e \end{cases} \]
This class provides an implementation of the \( \text{sgn}_K \) function that further guarantues that the function is constant on any edge \( e \) of \( \partial K \). In particular the function is specified fully on any cell \( K \) by evaluating it in all midpoints of the edges of \( K \).
Definition at line 81 of file dpg_tools.h.
|
default |
default constructors and destructors:
|
delete |
|
defaultnoexcept |
|
virtualdefault |
|
inlineexplicit |
main constructor, initializes the \(\text{sgn}_K\) function for all cells \( K \) of the passed mesh
mesh_ptr | underlying mesh |
Definition at line 98 of file dpg_tools.h.
References init().
|
private |
Initialization of the maxElement data set
Definition at line 127 of file dpg_tools.cc.
References lf::mesh::utils::CodimMeshDataSet< T >::DefinedOn(), maxElement_ptr_, mesh_ptr_, and lf::mesh::Entity::SubEntities().
Referenced by PrescribedSignProvider().
|
delete |
|
defaultnoexcept |
int projects::dpg::PrescribedSignProvider::PrescribedSign | ( | const lf::mesh::Entity & | element, |
const lf::mesh::Entity & | edge | ||
) | const |
evaluates the the \( \text{sgn}_K \) function at the midpoint of the edge \( e \) of cell \( K \)
element | the cell \( K \) on which the function is evauated |
edge | the edge \( e \subset \partial K \) for which the function is evaluated. |
Definition at line 143 of file dpg_tools.cc.
References lf::mesh::utils::CodimMeshDataSet< T >::DefinedOn(), maxElement_ptr_, and mesh_ptr_.
|
private |
a mesh dataset for edges. maxElement_ptr_(edge) equals the maximum entity index of a cell whose subentity edge is. We define the prescribed normal on that edge to be the outer normal of that cell with the bigger index.
Definition at line 135 of file dpg_tools.h.
Referenced by init(), and PrescribedSign().
|
private |
the underlying mesh
Definition at line 127 of file dpg_tools.h.
Referenced by init(), and PrescribedSign().