ffc.errorcontrol package


ffc.errorcontrol.errorcontrol module

This module provides compilation of forms required for goal-oriented error control

ffc.errorcontrol.errorcontrol.compile_with_error_control(forms, object_names, reserved_objects, prefix, parameters)[source]

Compile forms and additionally generate and compile forms required for performing goal-oriented error control

For linear problems, the input forms should be a bilinear form (a) and a linear form (L) specifying the variational problem and additionally a linear form (M) specifying the goal functional.

For nonlinear problems, the input should be linear form (F) and a functional (M) specifying the goal functional.


forms (tuple)
Three (linear case) or two (nonlinear case) forms specifying the primal problem and the goal
object_names (dict)
Map from object ids to object names
reserved_names (dict)
Map from reserved object names to object ids
prefix (string)
Basename of header file
parameters (dict)
Parameters for form compilation

ffc.errorcontrol.errorcontrolgenerators module

This module provides an abstract ErrorControlGenerator class for generating forms required for goal-oriented error control and a realization of this: UFLErrorControlGenerator for handling pure UFL forms.

class ffc.errorcontrol.errorcontrolgenerators.ErrorControlGenerator(module, F, M, u)[source]

Bases: object


Generate and return (bilinear, linear) forms defining linear variational problem for the strong cell residual


Generate and return (bilinear, linear) forms defining linear dual variational problem


Generate and return functional defining error estimate


Generate and return linear form defining error indicators


Generate and return (bilinear, linear) forms defining linear variational problem for the strong facet residual(s)


Utility function for generating all (8) forms required for error control in addition to the primal forms


Initialize specific data


Return primal forms in order (bilinear, linear, functional)

class ffc.errorcontrol.errorcontrolgenerators.UFLErrorControlGenerator(F, M, u)[source]

Bases: ffc.errorcontrol.errorcontrolgenerators.ErrorControlGenerator

This class provides a realization of ErrorControlGenerator for use with pure UFL forms


Extract required objects for defining error control forms. This will be stored, reused and in particular named.

Module contents

This module contains functionality for working with automated goal-oriented error control. In particular it offers the following function:

compile_with_error_control - Compile forms and generate error control forms