Logo
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ on Travis-CI Feel++ on Twitter Feel++ on YouTube Feel++ community
 All Classes Files Functions Variables Typedefs Pages
Feel::ErrorBase< Dim, Order > Class Template Reference

#include <error.hpp>

Detailed Description

template<int Dim, int Order>
class Feel::ErrorBase< Dim, Order >

Provides abstract interface to error calculations

Template Parameters
Dimdimension of space

Public Types

typedef bases< Lagrange< Order,
Scalar > > 
basis_type
 the basis type of our approximation space
 
typedef Simplex< Dim > convex_type
 geometry entities type composing the mesh, here Simplex in Dimension Dim of Order 1
 
typedef space_type::element_type element_type
 an element type of the approximation function space
 
typedef boost::shared_ptr
< mesh_type
mesh_ptrtype
 mesh shared_ptr<> type
 
typedef Mesh< convex_typemesh_type
 mesh type
 
typedef boost::shared_ptr
< space_type
space_ptrtype
 the approximation function space type (shared_ptr<> type)
 
typedef FunctionSpace
< mesh_type, basis_type
space_type
 the approximation function space type
 

Public Member Functions

element_type error_project (const space_ptrtype &Xh, const element_type &T)
 
element_type error_project (const space_ptrtype &Xh, const element_type &T, const double &val)
 
element_type exact_project (const space_ptrtype &Xh)
 
element_type exact_project (const space_ptrtype &Xh, const double &val)
 
element_type grad_error_project (const space_ptrtype &Xh, const element_type &T)
 
element_type grad_error_project (const space_ptrtype &Xh, const element_type &T, const double &val)
 
element_type grad_exact_project (const space_ptrtype &Xh)
 
element_type grad_exact_project (const space_ptrtype &Xh, const double &val)
 
double H1_error (const space_ptrtype &Xh, const element_type &T) const
 
double H1_error (const space_ptrtype &Xh, const element_type &T, const double &values) const
 
double L2_error (const space_ptrtype &Xh, const element_type &T) const
 
double L2_error (const space_ptrtype &Xh, const element_type &T, const double &values) const
 
void print () const
 
element_type rhs_project (const space_ptrtype &Xh)
 
element_type rhs_project (const space_ptrtype &Xh, const double &val)
 
Constructors, destructor
 ErrorBase (po::variables_map const &vm, std::string const &prefix)
 
 ErrorBase (std::string const &name, std::string const &params)
 
 ErrorBase (ErrorBase const &e)
 
ErrorBaseoperator= (ErrorBase const &e)
 
virtual ~ErrorBase ()
 
Accessors
bool computedrhs () const
 
bool convergence () const
 
int numberOfConvergenceSteps () const
 
std::vector< symbol > getVars () const
 
std::vector< symbol > getParams () const
 
std::string getExactSolution () const
 
std::string getExactRhs () const
 
ex getRhs () const
 
ex getRhs (const double &value) const
 
ex getRhs (const std::vector< double > &values) const
 
ex getSolution () const
 
ex getSolution (const double &value) const
 
ex getSolution (const std::vector< double > &values) const
 

Protected Attributes

ex exact
 
bool M_convergence
 
int M_convergence_max
 
std::string M_exact
 name of the exact solution
 
std::string M_exact_params
 name of the exact solution parameters
 
std::string M_rhs
 name of the rhs
 
bool M_rhs_computed
 
std::vector< symbol > parameters
 
ex rhs
 
std::vector< symbol > vars
 

Mutators

typedef boost::function< ex(ex
u, std::vector< symbol > vars,
std::vector< symbol > p)> 
t_edp_type
 
typedef boost::function< ex(ex
u, std::vector< symbol > vars)> 
edp_type
 
void setParams (std::string params)
 set the parameters string
 
void setComputedRhs (bool doComputeRhs)
 set the rhs_computed flag
 
void setConvergence (bool doConvergence)
 set the convergence flag
 
void setnumberOfConvergenceSteps (int n)
 set the convergence interations
 
void setSolution (std::string const &expression="", std::string const &p="")
 
void setRhs (std::string const &expression="")
 
void setRhs (t_edp_type *edp)
 
void setRhs (edp_type *edp)
 

Member Function Documentation

template<int Dim, int Order>
bool Feel::ErrorBase< Dim, Order >::computedrhs ( ) const
inline
Returns
the computedrhs flag
template<int Dim, int Order>
bool Feel::ErrorBase< Dim, Order >::convergence ( ) const
inline
Returns
the convergence flag
template<int Dim, int Order>
std::string Feel::ErrorBase< Dim, Order >::getExactRhs ( ) const
inline
Returns
GiNaC rhs
template<int Dim, int Order>
std::string Feel::ErrorBase< Dim, Order >::getExactSolution ( ) const
inline
Returns
GiNaC exact solution
template<int Dim, int Order>
std::vector<symbol> Feel::ErrorBase< Dim, Order >::getParams ( ) const
inline
Returns
the real spaceadditional parameters GiNaC symbols
template<int Dim, int Order>
ex Feel::ErrorBase< Dim, Order >::getRhs ( ) const
inline
Returns
GiNaC rhs
template<int Dim, int Order>
ex Feel::ErrorBase< Dim, Order >::getRhs ( const double &  value) const
inline
Returns
GiNaC rhs
template<int Dim, int Order>
ex Feel::ErrorBase< Dim, Order >::getRhs ( const std::vector< double > &  values) const
inline
Returns
GiNaC rhs
template<int Dim, int Order>
ex Feel::ErrorBase< Dim, Order >::getSolution ( ) const
inline
Returns
GiNaC exact solution
template<int Dim, int Order>
ex Feel::ErrorBase< Dim, Order >::getSolution ( const double &  value) const
inline
Returns
GiNaC exact solution
template<int Dim, int Order>
ex Feel::ErrorBase< Dim, Order >::getSolution ( const std::vector< double > &  values) const
inline
Returns
GiNaC exact solution
template<int Dim, int Order>
std::vector<symbol> Feel::ErrorBase< Dim, Order >::getVars ( ) const
inline
Returns
the real space variables GiNaC symbols
template<int Dim, int Order>
int Feel::ErrorBase< Dim, Order >::numberOfConvergenceSteps ( ) const
inline
Returns
the number of convergence steps

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