21 #ifndef __ERROR_CONTROL_H 22 #define __ERROR_CONTROL_H 27 #include <dolfin/common/Hierarchical.h> 28 #include <dolfin/common/Variable.h> 29 #include <dolfin/fem/LinearVariationalSolver.h> 39 class SpecialFacetFunction;
42 template <
typename T>
class MeshFunction;
75 std::shared_ptr<Form> L_star,
77 std::shared_ptr<Form> a_R_T,
78 std::shared_ptr<Form> L_R_T,
79 std::shared_ptr<Form> a_R_dT,
80 std::shared_ptr<Form> L_R_dT,
81 std::shared_ptr<Form> eta_T,
94 p_dual.
rename(
"dual_variational_solver");
115 const std::vector<std::shared_ptr<const DirichletBC> > bcs);
177 const std::vector<std::shared_ptr<const DirichletBC> > bcs);
187 const std::vector<std::shared_ptr<const DirichletBC> > bcs);
189 friend std::shared_ptr<ErrorControl>
191 std::shared_ptr<const Mesh> adapted_mesh,
192 bool adapt_coefficients);
196 void apply_bcs_to_extrapolation(
const std::vector<std::shared_ptr<const DirichletBC> > bcs);
199 std::shared_ptr<Form> _a_star;
200 std::shared_ptr<Form> _L_star;
203 std::shared_ptr<Form> _residual;
206 std::shared_ptr<Form> _a_R_T;
207 std::shared_ptr<Form> _L_R_T;
210 std::shared_ptr<Form> _a_R_dT;
211 std::shared_ptr<Form> _L_R_dT;
214 std::shared_ptr<Form> _eta_T;
217 std::shared_ptr<Function> _Ez_h;
222 std::shared_ptr<const FunctionSpace> _extrapolation_space;
223 std::shared_ptr<const FunctionSpace> _bubble_space;
224 std::shared_ptr<const FunctionSpace> _cone_space;
228 std::shared_ptr<Function> _cell_bubble;
229 std::shared_ptr<Function> _cell_cone;
230 std::shared_ptr<Function> _R_T;
231 std::shared_ptr<SpecialFacetFunction> _R_dT;
232 std::shared_ptr<Function> _Pi_E_z_h;
double residual(const GenericLinearOperator &A, const GenericVector &x, const GenericVector &b)
Compute residual ||Ax - b||.
Definition: solve.cpp:163
Common base class for DOLFIN variables.
Definition: Variable.h:35
Definition: Hierarchical.h:43
double estimate_error(const Function &u, const std::vector< std::shared_ptr< const DirichletBC > > bcs)
Definition: ErrorControl.cpp:96
static Parameters default_parameters()
Default parameter values.
Definition: LinearVariationalSolver.h:49
void add(std::string key)
Definition: Parameters.h:128
Definition: SpecialFacetFunction.h:41
void residual_representation(Function &R_T, SpecialFacetFunction &R_dT, const Function &u)
Definition: ErrorControl.cpp:243
void compute_facet_residual(SpecialFacetFunction &R_dT, const Function &u, const Function &R_T)
Definition: ErrorControl.cpp:336
void rename(std::string key)
Rename parameter set.
Definition: Parameters.cpp:55
static Parameters default_parameters()
Default parameter values.
Definition: ErrorControl.h:88
ErrorControl(std::shared_ptr< Form > a_star, std::shared_ptr< Form > L_star, std::shared_ptr< Form > residual, std::shared_ptr< Form > a_R_T, std::shared_ptr< Form > L_R_T, std::shared_ptr< Form > a_R_dT, std::shared_ptr< Form > L_R_dT, std::shared_ptr< Form > eta_T, bool is_linear)
Definition: ErrorControl.cpp:55
Definition: Parameters.h:94
Definition: Function.h:65
void compute_cell_residual(Function &R_T, const Function &u)
Definition: ErrorControl.cpp:260
(Goal-oriented) Error Control class.
Definition: ErrorControl.h:50
void compute_extrapolation(const Function &z, const std::vector< std::shared_ptr< const DirichletBC > > bcs)
Definition: ErrorControl.cpp:161
~ErrorControl()
Destructor.
Definition: ErrorControl.h:85
void compute_indicators(MeshFunction< double > &indicators, const Function &u)
Definition: ErrorControl.cpp:176
friend std::shared_ptr< ErrorControl > adapt(const ErrorControl &ec, std::shared_ptr< const Mesh > adapted_mesh, bool adapt_coefficients)
void compute_dual(Function &z, const std::vector< std::shared_ptr< const DirichletBC > > bcs)
Definition: ErrorControl.cpp:130