ErrorControl¶
-
class
dolfin.cpp.fem.
ErrorControl
¶ Bases:
dolfin.cpp.fem.HierarchicalErrorControl
,dolfin.cpp.common.Variable
(Goal-oriented) Error Control class. The notation used here follows the notation in “Automated goal-oriented error control I: stationary variational problems”, ME Rognes and A Logg, 2010-2011.
Friends:
adapt
.Create error control object
Parameters: - Form > a_star (std::shared_ptr<) – (
Form
) the bilinear form for the dual problem - Form > L_star (std::shared_ptr<) – (
Form
) the linear form for the dual problem - Form > residual (std::shared_ptr<) – (
Form
) a functional for the residual (error estimate) - Form > a_R_T (std::shared_ptr<) – (
Form
) the bilinear form for the strong cell residual problem - Form > L_R_T (std::shared_ptr<) – (
Form
) the linear form for the strong cell residual problem - Form > a_R_dT (std::shared_ptr<) – (
Form
) the bilinear form for the strong facet residual problem - Form > L_R_dT (std::shared_ptr<) – (
Form
) the linear form for the strong facet residual problem - Form > eta_T (std::shared_ptr<) – (
Form
) a linear form over DG_0 for error indicators - is_linear (bool) – (bool) true iff primal problem is linear
-
compute_cell_residual
()¶ Compute representation for the strong cell residual from the weak residual
Parameters: - & R_T (Function) – (
Function
) the strong cell residual (to be computed) - Function & u (const) – (
Function
) the primal approximation
Return type: void
- & R_T (Function) – (
-
compute_dual
()¶ Compute dual approximation defined by dual variational problem and dual boundary conditions given by homogenized primal boundary conditions.
Parameters: - & z (Function) – (
Function
) the dual approximation (to be computed) - std::vector< std::shared_ptr< const DirichletBC > > bcs (const) – (std::vector<DirichletBC>) the primal boundary conditions
Return type: void
- & z (Function) – (
-
compute_extrapolation
()¶ Compute extrapolation with boundary conditions
Parameters: - Function & z (const) – (
Function
) the extrapolated function (to be computed) - std::vector< std::shared_ptr< const DirichletBC > > bcs (const) – (std::vector<
DirichletBC
>) the dual boundary conditions
Return type: void
- Function & z (const) – (
-
compute_facet_residual
()¶ Compute representation for the strong facet residual from the weak residual and the strong cell residual
Parameters: - & R_dT (SpecialFacetFunction) – (
SpecialFacetFunction
) the strong facet residual (to be computed) - Function & u (const) – (
Function
) the primal approximation - Function & R_T (const) – (
Function
) the strong cell residual
Return type: void
- & R_dT (SpecialFacetFunction) – (
-
compute_indicators
()¶ Compute error indicators
Parameters: - double > & indicators (MeshFunction<) – (MeshFunction<double>) the error indicators (to be computed)
- Function & u (const) – (
Function
) the primal approximation
Return type: void
-
static
default_parameters
()¶
-
estimate_error
()¶ Estimate the error relative to the goal M of the discrete approximation ‘u’ relative to the variational formulation by evaluating the weak residual at an approximation to the dual solution.
Parameters: - Function & u (const) – (
Function
) the primal approximation - std::vector< std::shared_ptr< const DirichletBC > > bcs (const) – (std::vector<
DirichletBC
>) the primal boundary conditions
Return type: double
Returns: double error estimate
- Function & u (const) – (
-
residual_representation
()¶ Compute strong representation (strong cell and facet residuals) of the weak residual.
Parameters: - & R_T (Function) – (
Function
) the strong cell residual (to be computed) - & R_dT (SpecialFacetFunction) – (
SpecialFacetFunction
) the strong facet residual (to be computed) - Function & u (const) – (
Function
) the primal approximation
Return type: void
- & R_T (Function) – (
-
thisown
¶ The membership flag
- Form > a_star (std::shared_ptr<) – (