LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Public Member Functions | Private Attributes | List of all members
projects::ipdg_stokes::assemble::PiecewiseConstElementMatrixProvider Class Reference

Element matrix provider for the stokes system. More...

#include </home/nico/bildung/SemVI/thesis/lehrfempp/projects/ipdg_stokes/assemble/piecewise_const_element_matrix_provider.h>

Public Member Functions

 PiecewiseConstElementMatrixProvider (double sigma, const lf::mesh::utils::MeshDataSet< bool > &boundary, bool modified=false)
 Constructor. More...
 
Eigen::MatrixXd Eval (const lf::mesh::Entity &entity) const
 Compute the element matrix for some entity of a mesh. More...
 
bool isActive (const lf::mesh::Entity &entity) const
 All entities are regarded as active. More...
 

Private Attributes

const double sigma_
 
const lf::mesh::utils::MeshDataSet< bool > & boundary_
 
const bool modified_
 

Detailed Description

Element matrix provider for the stokes system.

As basis functions, the curl of the standard linear Lagrangian FEM hat functions is used in order to guarantee divergence-freeness of the solution.

Note
Currently, only triangular meshes are supported

The (global) bilinear form is given by

\[ (u, v) \mapsto \sum_{e \in \mathcal{E}(\mathcal{M})} \int_e\! \frac{\sigma}{|e|}\left[\!\left[ u \cdot \tau_e \right]\!\right] : \left[\!\left[ v \cdot \tau_e \right]\!\right] \,\mathrm{d}x \]

To enable local assembly of the system matrix, auxilary dofs are introduced on the edges of the mesh which are then forced to be equal to the jump of \(u\) over that edge. As we use Raviart-Thomas basis functions, the normal component of the function is continuous over the mesh edges. For this reason, the jump terms only consist of the jump in the tangential direction over an edge.

Definition at line 39 of file piecewise_const_element_matrix_provider.h.

Constructor & Destructor Documentation

◆ PiecewiseConstElementMatrixProvider()

projects::ipdg_stokes::assemble::PiecewiseConstElementMatrixProvider::PiecewiseConstElementMatrixProvider ( double  sigma,
const lf::mesh::utils::MeshDataSet< bool > &  boundary,
bool  modified = false 
)

Constructor.

Parameters
sigmaThe stabilization coefficient of the IPDG method
boundaryA MeshDataSet marking the boundary edges
modifiedIf true, the modified penalty term is used missing the scaling with 1/|e_n|

Definition at line 12 of file piecewise_const_element_matrix_provider.cc.

Member Function Documentation

◆ Eval()

Eigen::MatrixXd projects::ipdg_stokes::assemble::PiecewiseConstElementMatrixProvider::Eval ( const lf::mesh::Entity entity) const

Compute the element matrix for some entity of a mesh.

Parameters
entityThe mesh entity to compute the element matrix for
Returns
The 6 by 6 element matrix of the given entity
Note
This function only works for triangles

Definition at line 17 of file piecewise_const_element_matrix_provider.cc.

References boundary_, projects::ipdg_stokes::mesh::computeOutwardNormals(), lf::mesh::Entity::Geometry(), lf::geometry::Geometry::Global(), lf::uscalfe::FeLagrangeO1Tria< SCALAR >::GradientsReferenceShapeFunctions(), modified_, lf::base::RefEl::NodeCoords(), lf::mesh::Entity::RefEl(), sigma_, lf::mesh::Entity::SubEntities(), and lf::geometry::Volume().

◆ isActive()

bool projects::ipdg_stokes::assemble::PiecewiseConstElementMatrixProvider::isActive ( const lf::mesh::Entity entity) const
inline

All entities are regarded as active.

Definition at line 64 of file piecewise_const_element_matrix_provider.h.

Member Data Documentation

◆ boundary_

const lf::mesh::utils::MeshDataSet<bool>& projects::ipdg_stokes::assemble::PiecewiseConstElementMatrixProvider::boundary_
private

Definition at line 68 of file piecewise_const_element_matrix_provider.h.

Referenced by Eval().

◆ modified_

const bool projects::ipdg_stokes::assemble::PiecewiseConstElementMatrixProvider::modified_
private

Definition at line 69 of file piecewise_const_element_matrix_provider.h.

Referenced by Eval().

◆ sigma_

const double projects::ipdg_stokes::assemble::PiecewiseConstElementMatrixProvider::sigma_
private

Definition at line 67 of file piecewise_const_element_matrix_provider.h.

Referenced by Eval().


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