Go to the documentation of this file.
20 #ifndef LIBMESH_EXACT_ERROR_ESTIMATOR_H
21 #define LIBMESH_EXACT_ERROR_ESTIMATOR_H
24 #include "libmesh/error_estimator.h"
25 #include "libmesh/function_base.h"
26 #include "libmesh/vector_value.h"
27 #include "libmesh/tensor_value.h"
101 const std::string & sys_name,
102 const std::string & unknown_name);
124 const std::string & sys_name,
125 const std::string & unknown_name);
147 const std::string & sys_name,
148 const std::string & unknown_name);
183 bool estimate_parent_error =
false)
override;
235 const std::string & var_name,
255 #endif // LIBMESH_EXACT_ERROR_ESTIMATOR_H
GradientFunctionPointer _exact_deriv
Function pointer to user-provided function which computes the exact derivative of the solution.
Manages consistently variables, degrees of freedom, and coefficient vectors.
void attach_reference_solution(EquationSystems *es_fine)
Attach function similar to system.h which allows the user to attach a second EquationSystems object w...
std::vector< std::unique_ptr< FunctionBase< Gradient > > > _exact_derivs
User-provided functors which compute the exact derivative of the solution for each system.
Gradient(* GradientFunctionPointer)(const Point &p, const Parameters ¶meters, const std::string &sys_name, const std::string &unknown_name)
Attach an arbitrary function which computes the exact gradient of the solution at any point.
ErrorEstimatorType
Defines an enum for the different types of error estimators which are available.
void extra_quadrature_order(const int extraorder)
Increases or decreases the order of the quadrature rule used for numerical integration.
This class provides function-like objects for data distributed over a mesh.
Number(* ValueFunctionPointer)(const Point &p, const Parameters &Parameters, const std::string &sys_name, const std::string &unknown_name)
Attach an arbitrary function which computes the exact value of the solution at any point.
This class holds functions that will estimate the error in a finite element solution on a given mesh.
The libMesh namespace provides an interface to certain functionality in the library.
void attach_exact_deriv(unsigned int sys_num, FunctionBase< Gradient > *g)
Clone and attach an arbitrary functor which computes the exact gradient of the system sys_num solutio...
This class forms the foundation from which generic finite elements may be derived.
std::vector< std::unique_ptr< FunctionBase< Tensor > > > _exact_hessians
User-provided functors which compute the exact hessians of the solution for each system.
int _extra_order
Extra order to use for quadrature rule.
ValueFunctionPointer _exact_value
Function pointer to user-provided function which computes the exact value of the solution.
ExactErrorEstimator()
Constructor.
ExactErrorEstimator & operator=(const ExactErrorEstimator &)=delete
virtual void estimate_error(const System &system, ErrorVector &error_per_cell, const NumericVector< Number > *solution_vector=nullptr, bool estimate_parent_error=false) override
This function uses the exact solution function to estimate the error on each cell.
Real find_squared_element_error(const System &system, const std::string &var_name, const Elem *elem, const DenseVector< Number > &Uelem, FEBase *fe, MeshFunction *fine_values) const
Helper method for calculating on each element.
virtual ErrorEstimatorType type() const override
FEGenericBase< Real > FEBase
virtual ~ExactErrorEstimator()=default
A Point defines a location in LIBMESH_DIM dimensional Real space.
The ErrorVector is a specialization of the StatisticsVector for error data computed on a finite eleme...
EquationSystems * _equation_systems_fine
Constant pointer to the EquationSystems object containing a fine grid solution.
void attach_exact_hessians(std::vector< FunctionBase< Tensor > * > h)
Clone and attach arbitrary functors which compute the exact second derivatives of the EquationSystems...
Gradient gptr(const Point &p, const Parameters &, const std::string &libmesh_dbg_var(sys_name), const std::string &unknown_name)
void attach_exact_hessian(unsigned int sys_num, FunctionBase< Tensor > *h)
Clone and attach an arbitrary functor which computes the exact second derivatives of the system sys_n...
This is the EquationSystems class.
std::vector< std::unique_ptr< FunctionBase< Number > > > _exact_values
User-provided functors which compute the exact value of the solution for each system.
HessianFunctionPointer _exact_hessian
Function pointer to user-provided function which computes the exact hessian of the solution.
NumberVectorValue Gradient
void clear_functors()
Helper method for cleanup.
void attach_exact_value(unsigned int sys_num, FunctionBase< Number > *f)
Clone and attach an arbitrary functor which computes the exact value of the system sys_num solution a...
This class implements an "error estimator" based on the difference between the approximate and exact ...
This is the base class from which all geometric element types are derived.
void attach_exact_values(std::vector< FunctionBase< Number > * > f)
Clone and attach arbitrary functors which compute the exact values of the EquationSystems' solutions ...
void attach_exact_derivs(std::vector< FunctionBase< Gradient > * > g)
Clone and attach arbitrary functors which compute the exact gradients of the EquationSystems' solutio...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Number fptr(const Point &p, const Parameters &, const std::string &libmesh_dbg_var(sys_name), const std::string &unknown_name)
Tensor(* HessianFunctionPointer)(const Point &p, const Parameters ¶meters, const std::string &sys_name, const std::string &unknown_name)
Attach an arbitrary function which computes the exact second derivatives of the solution at any point...
This class provides the ability to map between arbitrary, user-defined strings and several data types...
Defines a dense vector for use in Finite Element-type computations.