LehrFEM++ 1.0.0
A simple Finite Element Library for teaching
Functions
projects::dpg::test Namespace Reference

Functions

template<typename SOLFUNC , typename SOLGRAD , typename ALPHAFUNC , typename BETAFUNC , typename FFUNC , typename GFUNC >
energy_vector TestConververgencePrimalDPGConvectionDiffusionDirichletBVP (size_type reflevels, SOLFUNC solution, SOLGRAD sol_grad, ALPHAFUNC alpha, BETAFUNC beta, FFUNC f, GFUNC g, int degree_p, int enrichement, lf::base::RefEl ref_el)
 Examines the convergence behaviour of the primal DPG method for a pure Dirichlet convection-diffusion BVP. More...
 
template<typename SOLFUNC , typename SOLGRAD , typename ALPHAFUNC , typename BETAFUNC , typename FFUNC , typename GFUNC >
energy_vector TestConververgencePrimalDPGAdaptedNormConvectionDiffusionDirichletBVP (size_type reflevels, SOLFUNC solution, SOLGRAD sol_grad, ALPHAFUNC alpha, BETAFUNC beta, FFUNC f, GFUNC g, int degree_p, int enrichement, lf::base::RefEl ref_el)
 Examines the convergence behaviour of the primal DPG method for a pure Dirichlet convection-diffusion BVP, using and adpated test space norm. More...
 

Function Documentation

◆ TestConververgencePrimalDPGAdaptedNormConvectionDiffusionDirichletBVP()

template<typename SOLFUNC , typename SOLGRAD , typename ALPHAFUNC , typename BETAFUNC , typename FFUNC , typename GFUNC >
energy_vector projects::dpg::test::TestConververgencePrimalDPGAdaptedNormConvectionDiffusionDirichletBVP ( size_type  reflevels,
SOLFUNC  solution,
SOLGRAD  sol_grad,
ALPHAFUNC  alpha,
BETAFUNC  beta,
FFUNC  f,
GFUNC  g,
int  degree_p,
int  enrichement,
lf::base::RefEl  ref_el 
)

Examines the convergence behaviour of the primal DPG method for a pure Dirichlet convection-diffusion BVP, using and adpated test space norm.

Parameters
reflevelsthe number of mesh refinements
solutionexact solution
sol_gradgradient of the exact solution
alphascalar-valued diffusion coefficient of the BVP
betaadvection field of the BVP
fsource function of the BVP
gDirichlet data of the BVP
degree_ppolynomial degree of the u-part of the DPG approximation
enrichementvalue of \( \Delta p \), s.t. \( r = p + \Delta p \) is the polynomial degree of enriched test space
ref_eltype of reference element for the tensor-product mesh
Returns
a vector containing for each refinement level the number of degrees of freedom (f the trial space), the H1 error of the solution and the value of the DPG error estimator.

Tests the convergence behaviour of the primal DPG method on a tensor product mesh based on uniform refinement. The method uses an adapted test space norm.

Definition at line 57 of file primal_dpg_adapted_norm.h.

References projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddConvectionElementMatrixProvider(), projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddDiffusionElementMatrixProvider(), projects::dpg::ProductUniformFESpaceFactory< SCALAR >::AddFluxComponent(), projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddFluxElementMatrixProvider(), projects::dpg::ProductUniformFESpaceFactory< SCALAR >::AddH1Component(), projects::dpg::ProductUniformFESpaceFactory< SCALAR >::AddL2Component(), projects::dpg::ProductElementVectorProviderBuilder< SCALAR >::AddLoadElementVectorProvider(), projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::Build(), projects::dpg::ProductElementVectorProviderBuilder< SCALAR >::Build(), projects::dpg::ProductUniformFESpaceFactory< SCALAR >::Build(), lf::mesh::utils::TPQuadMeshBuilder::Build(), lf::mesh::utils::TPTriagMeshBuilder::Build(), projects::dpg::ElementErrorEstimators(), projects::dpg::EvalPosteriorError(), lf::mesh::utils::flagEntitiesOnBoundary(), lf::refinement::GenerateMeshHierarchyByUniformRefinemnt(), lf::fe::IntegrateMeshFunction(), lf::base::RefEl::kQuad(), lf::base::RefEl::kTria(), lf::fe::MeshFunctionFE(), lf::fe::MeshFunctionGradFE(), lf::refinement::MeshHierarchy::PrintInfo(), lf::mesh::utils::StructuredMeshBuilder::setBottomLeftCorner(), and lf::mesh::utils::StructuredMeshBuilder::setNumYCells().

◆ TestConververgencePrimalDPGConvectionDiffusionDirichletBVP()

template<typename SOLFUNC , typename SOLGRAD , typename ALPHAFUNC , typename BETAFUNC , typename FFUNC , typename GFUNC >
energy_vector projects::dpg::test::TestConververgencePrimalDPGConvectionDiffusionDirichletBVP ( size_type  reflevels,
SOLFUNC  solution,
SOLGRAD  sol_grad,
ALPHAFUNC  alpha,
BETAFUNC  beta,
FFUNC  f,
GFUNC  g,
int  degree_p,
int  enrichement,
lf::base::RefEl  ref_el 
)

Examines the convergence behaviour of the primal DPG method for a pure Dirichlet convection-diffusion BVP.

Parameters
reflevelsthe number of mesh refinements
solutionexact solution
sol_gradgradient of the exact solution
alphascalar-valued diffusion coefficient of the BVP
betaadvection field of the BVP
fsource function of the BVP
gDirichlet data of the BVP
degree_ppolynomial degree of the u-part of the DPG approximation
enrichementvalue of \( \Delta p \), s.t. \( r = p + \Delta p \) is the polynomial degree of enriched test space
ref_eltype of reference element for the tensor-product mesh
Returns
a vector containing for each refinement level the number of degrees of freedom (f the trial space), the H1 error of the solution and the value of the DPG error estimator.

Tests the convergence behaviour of the primal DPG method on a tensor product mesh based on uniform refinement.

Definition at line 58 of file primal_dpg.h.

References projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddConvectionElementMatrixProvider(), projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddDiffusionElementMatrixProvider(), projects::dpg::ProductUniformFESpaceFactory< SCALAR >::AddFluxComponent(), projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddFluxElementMatrixProvider(), projects::dpg::ProductUniformFESpaceFactory< SCALAR >::AddH1Component(), projects::dpg::ProductUniformFESpaceFactory< SCALAR >::AddL2Component(), projects::dpg::ProductElementVectorProviderBuilder< SCALAR >::AddLoadElementVectorProvider(), projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::AddReactionElementMatrixProvider(), projects::dpg::ProductElementMatrixProviderBuilder< SCALAR >::Build(), projects::dpg::ProductElementVectorProviderBuilder< SCALAR >::Build(), projects::dpg::ProductUniformFESpaceFactory< SCALAR >::Build(), lf::mesh::utils::TPQuadMeshBuilder::Build(), lf::mesh::utils::TPTriagMeshBuilder::Build(), projects::dpg::ElementErrorEstimators(), projects::dpg::EvalPosteriorError(), lf::mesh::utils::flagEntitiesOnBoundary(), lf::refinement::GenerateMeshHierarchyByUniformRefinemnt(), lf::fe::IntegrateMeshFunction(), lf::base::RefEl::kQuad(), lf::base::RefEl::kTria(), lf::fe::MeshFunctionFE(), lf::fe::MeshFunctionGradFE(), lf::refinement::MeshHierarchy::PrintInfo(), lf::mesh::utils::StructuredMeshBuilder::setBottomLeftCorner(), and lf::mesh::utils::StructuredMeshBuilder::setNumYCells().