LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Classes | Functions
projects::ipdg_stokes::post_processing Namespace Reference

Classes

class  MeshFunctionVelocity
 A MeshFunction returning the velocity computed from the basis function coefficients of a vector potential. More...
 

Functions

template<typename T , typename SCALAR_COEFF >
 MeshFunctionVelocity (std::shared_ptr< T >, const Eigen::Matrix< SCALAR_COEFF, Eigen::Dynamic, 1 > &) -> MeshFunctionVelocity< typename T::Scalar, SCALAR_COEFF >
 
template<typename MF , typename QR_SELECTOR >
double L2norm (const std::shared_ptr< const lf::mesh::Mesh > &mesh, const MF &f, const QR_SELECTOR &qr_selector)
 Compute the \(L^2\)-norm of a vector valued function over a mesh. More...
 
template<typename MF_F , typename MF_GRAD , typename QR_SELECTOR >
double DGnorm (const std::shared_ptr< const lf::mesh::Mesh > &mesh, const MF_F &f, const MF_GRAD &f_grad, const QR_SELECTOR &qr_selector)
 Compute the DG-norm of a vector valued function over a mesh. More...
 
lf::mesh::utils::CodimMeshDataSet< double > extractBasisFunctionCoefficients (const std::shared_ptr< const lf::mesh::Mesh > &mesh, const lf::assemble::DofHandler &dofh, const Eigen::VectorXd &solution)
 Extract the basis function coefficients from the solution vector. More...
 
lf::mesh::utils::CodimMeshDataSet< Eigen::Vector2d > extractVelocity (const std::shared_ptr< const lf::mesh::Mesh > &mesh, const lf::assemble::DofHandler &dofh, const Eigen::VectorXd &solution)
 Extract the flow velocity on cells from the solution vector. More...
 

Function Documentation

◆ DGnorm()

template<typename MF_F , typename MF_GRAD , typename QR_SELECTOR >
double projects::ipdg_stokes::post_processing::DGnorm ( const std::shared_ptr< const lf::mesh::Mesh > &  mesh,
const MF_F &  f,
const MF_GRAD &  f_grad,
const QR_SELECTOR &  qr_selector 
)

Compute the DG-norm of a vector valued function over a mesh.

Template Parameters
MF_FThe type of mesh function to take the norm from
MF_GRADThe type of the gradient of the mesh function to take the norm from
QR_SELECTORThe type of the qr_selector parameter
Parameters
meshThe mesh over which the function is defined
fThe function to take the norm from
f_gradThe gradient of the function to take the norm from
qr_selectorA function giving the quadrature rule to use for a given element
Returns
The DG-norm of the function over the mesh

This functoin computes the following formula

\[ ||f||_{1,h}^2 = \sum_{K\in\mathcal{M}} \int_K\! ||\nabla f(x)||^2 \,\mathrm{d}x + \sum_{e\in\mathcal{E}(\mathcal{M})} \int_e\! \frac{1}{|e|}||\left[\!\left[ f(x) \otimes n \right]\!\right]||^2 \,\mathrm{d}x \]

Definition at line 68 of file norms.h.

References projects::ipdg_stokes::mesh::computeOutwardNormals(), lf::mesh::utils::flagEntitiesOnBoundary(), lf::fe::IntegrateMeshFunction(), lf::mesh::positive, and lf::geometry::Volume().

◆ extractBasisFunctionCoefficients()

lf::mesh::utils::CodimMeshDataSet< double > projects::ipdg_stokes::post_processing::extractBasisFunctionCoefficients ( const std::shared_ptr< const lf::mesh::Mesh > &  mesh,
const lf::assemble::DofHandler dofh,
const Eigen::VectorXd &  solution 
)

Extract the basis function coefficients from the solution vector.

Parameters
meshA shared pointer to the corresponding mesh
dofhThe DOF handler for the used FE space
solutionThe solution vector obtained from solving the PDE
Returns
A mesh data set mapping nodes of the mesh to the basis function coefficient associated with them

Definition at line 8 of file solution_to_mesh_data_set.cc.

References lf::assemble::DofHandler::GlobalDofIndices().

◆ extractVelocity()

lf::mesh::utils::CodimMeshDataSet< Eigen::Vector2d > projects::ipdg_stokes::post_processing::extractVelocity ( const std::shared_ptr< const lf::mesh::Mesh > &  mesh,
const lf::assemble::DofHandler dofh,
const Eigen::VectorXd &  solution 
)

Extract the flow velocity on cells from the solution vector.

Parameters
meshA shared pointer to the corresponding mesh
dofhThe DOF handler for the used FE space
solutionThe solution vector obtained from solving the PDE
Returns
A mesh data set mapping cells of the mesh to the flow velocity on them

Definition at line 18 of file solution_to_mesh_data_set.cc.

References lf::assemble::DofHandler::GlobalDofIndices(), and lf::uscalfe::FeLagrangeO1Tria< SCALAR >::GradientsReferenceShapeFunctions().

◆ L2norm()

template<typename MF , typename QR_SELECTOR >
double projects::ipdg_stokes::post_processing::L2norm ( const std::shared_ptr< const lf::mesh::Mesh > &  mesh,
const MF &  f,
const QR_SELECTOR &  qr_selector 
)

Compute the \(L^2\)-norm of a vector valued function over a mesh.

Template Parameters
MFThe type of mesh function to take the norm from
QR_SELECTORThe type of the qr_selector parameter
Parameters
meshThe mesh over which the function is defined
fThe function to take the norm from
qr_selectorA function giving the quadrature rule to use for a given element
Returns
The \(L^2\)-norm of the function over the mesh

This function computes the value of the following formula

\[ ||f||_0^2 = \sum_{K\in\mathcal{M}} \int_K\! ||f(x)||^2 \,\mathrm{d}x \]

Definition at line 40 of file norms.h.

References lf::fe::IntegrateMeshFunction().

◆ MeshFunctionVelocity()

template<typename T , typename SCALAR_COEFF >
projects::ipdg_stokes::post_processing::MeshFunctionVelocity ( std::shared_ptr< T >  ,
const Eigen::Matrix< SCALAR_COEFF, Eigen::Dynamic, 1 > &   
) -> MeshFunctionVelocity< typename T::Scalar, SCALAR_COEFF >