HArD::Core2D
Hybrid Arbitrary Degree::Core 2D - Library to implement 2D schemes with edge and cell polynomials as unknowns
|
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 BasisEvaluation & | basisQuad () |
Return the basis evaluation. | |
Compute the L2-orthogonal projection of a function.
typedef boost::multi_array<FunctionValue, 2> HArDCore2D::Tests::L2Projection< BasisType >::BasisEvaluation |
typedef std::function<typename BasisType::FunctionValue(const Eigen::Vector2d &)> HArDCore2D::Tests::L2Projection< BasisType >::FunctionType |
typedef BasisType::FunctionValue HArDCore2D::Tests::L2Projection< BasisType >::FunctionValue |
|
inline |
Constructor.
basis | Basis for the space on which we project |
quad | Quadrature rule |
basis_quad | Evaluation of the basis at quadrature nodes |
|
inline |
Return the basis evaluation.
|
inline |
Compute the projection of a function.
|
inline |
Compute the error between the L2-orthogonal projection and the function.
|
inline |
Compute the squared L2-error between the L2-orthogonal projection and the function