HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
HArDCore2D::Tests::L2Projection< BasisType > Class Template Reference

Compute the L2-orthogonal projection of a function. More...

#include <l2projection.hpp>

Public Types

typedef BasisType::FunctionValue FunctionValue
 
typedef boost::multi_array< FunctionValue, 2 > BasisEvaluation
 
typedef std::function< typename BasisType::FunctionValue(const Eigen::Vector2d &)> FunctionType
 

Public Member Functions

 L2Projection (const BasisType &basis, QuadratureRule &quad, const BasisEvaluation &basis_quad)
 Constructor.
 
Eigen::VectorXd compute (const FunctionType &f) const
 Compute the projection of a function.
 
double squared_error (const FunctionType &f, const Eigen::VectorXd &f_dofs) const
 
double error (const FunctionType &f, const Eigen::VectorXd &f_dofs) const
 Compute the error between the L2-orthogonal projection and the function.
 
const BasisEvaluationbasisQuad ()
 Return the basis evaluation.
 

Detailed Description

template<typename BasisType>
class HArDCore2D::Tests::L2Projection< BasisType >

Compute the L2-orthogonal projection of a function.

Member Typedef Documentation

◆ BasisEvaluation

template<typename BasisType >
typedef boost::multi_array<FunctionValue, 2> HArDCore2D::Tests::L2Projection< BasisType >::BasisEvaluation

◆ FunctionType

template<typename BasisType >
typedef std::function<typename BasisType::FunctionValue(const Eigen::Vector2d &)> HArDCore2D::Tests::L2Projection< BasisType >::FunctionType

◆ FunctionValue

template<typename BasisType >
typedef BasisType::FunctionValue HArDCore2D::Tests::L2Projection< BasisType >::FunctionValue

Constructor & Destructor Documentation

◆ L2Projection()

template<typename BasisType >
HArDCore2D::Tests::L2Projection< BasisType >::L2Projection ( const BasisType &  basis,
QuadratureRule quad,
const BasisEvaluation basis_quad 
)
inline

Constructor.

Parameters
basisBasis for the space on which we project
quadQuadrature rule
basis_quadEvaluation of the basis at quadrature nodes

Member Function Documentation

◆ basisQuad()

template<typename BasisType >
const BasisEvaluation & HArDCore2D::Tests::L2Projection< BasisType >::basisQuad ( )
inline

Return the basis evaluation.

◆ compute()

template<typename BasisType >
Eigen::VectorXd HArDCore2D::Tests::L2Projection< BasisType >::compute ( const FunctionType f) const
inline

Compute the projection of a function.

◆ error()

template<typename BasisType >
double HArDCore2D::Tests::L2Projection< BasisType >::error ( const FunctionType f,
const Eigen::VectorXd &  f_dofs 
) const
inline

Compute the error between the L2-orthogonal projection and the function.

◆ squared_error()

template<typename BasisType >
double HArDCore2D::Tests::L2Projection< BasisType >::squared_error ( const FunctionType f,
const Eigen::VectorXd &  f_dofs 
) const
inline

Compute the squared L2-error between the L2-orthogonal projection and the function


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