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);
184 bool estimate_parent_error =
false)
override;
236 const std::string & var_name,
256 #endif // LIBMESH_EXACT_ERROR_ESTIMATOR_H HessianFunctionPointer _exact_hessian
Function pointer to user-provided function which computes the exact hessian of the solution...
This is the EquationSystems class.
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 class provides the ability to map between arbitrary, user-defined strings and several data types...
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.
The ErrorVector is a specialization of the StatisticsVector for error data computed on a finite eleme...
ErrorEstimatorType
Defines an enum for the different types of error estimators which are available.
void attach_exact_hessians(std::vector< FunctionBase< Tensor > *> h)
Clone and attach arbitrary functors which compute the exact second derivatives of the EquationSystems...
ExactErrorEstimator()
Constructor.
This is the base class from which all geometric element types are derived.
void extra_quadrature_order(const int extraorder)
Increases or decreases the order of the quadrature rule used for numerical integration.
The libMesh namespace provides an interface to certain functionality in the library.
ValueFunctionPointer _exact_value
Function pointer to user-provided function which computes the exact value of the solution.
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...
std::vector< std::unique_ptr< FunctionBase< Gradient > > > _exact_derivs
User-provided functors which compute the exact derivative of the solution for each system...
Number fptr(const Point &p, const Parameters &, const std::string &libmesh_dbg_var(sys_name), const std::string &unknown_name)
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.
virtual ErrorEstimatorType type() const override
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...
virtual ~ExactErrorEstimator()=default
Manages consistently variables, degrees of freedom, and coefficient vectors.
NumberVectorValue Gradient
This class holds functions that will estimate the error in a finite element solution on a given mesh...
void clear_functors()
Helper method for cleanup.
FEGenericBase< Real > FEBase
void attach_exact_derivs(std::vector< FunctionBase< Gradient > *> g)
Clone and attach arbitrary functors which compute the exact gradients of the EquationSystems' solutio...
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...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
GradientFunctionPointer _exact_deriv
Function pointer to user-provided function which computes the exact derivative of the solution...
EquationSystems * _equation_systems_fine
Constant pointer to the EquationSystems object containing a fine grid solution.
This class implements an "error estimator" based on the difference between the approximate and exact ...
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...
Gradient gptr(const Point &p, const Parameters &, const std::string &libmesh_dbg_var(sys_name), const std::string &unknown_name)
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.
void attach_exact_values(std::vector< FunctionBase< Number > *> f)
Clone and attach arbitrary functors which compute the exact values of the EquationSystems' solutions ...
Defines a dense vector for use in Finite Element-type computations.
This class provides function-like objects for data distributed over a mesh.
void attach_reference_solution(EquationSystems *es_fine)
Attach function similar to system.h which allows the user to attach a second EquationSystems object w...
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...
A Point defines a location in LIBMESH_DIM dimensional Real space.
ExactErrorEstimator & operator=(const ExactErrorEstimator &)=delete
std::vector< std::unique_ptr< FunctionBase< Number > > > _exact_values
User-provided functors which compute the exact value of the solution for each system.
This class forms the foundation from which generic finite elements may be derived.