dolfin.cpp.fem.adapt(*args)

Refine mesh uniformly

Refine mesh based on cell markers

Refine function space uniformly

Refine function space based on cell markers

Refine function space based on refined mesh

Arguments
function (Function)

The function that should be adapted

adapted_mesh (Mesh)

The new mesh

interpolate (bool)

Optional argument, default is true. If false, the function’s function space is adapted, but the values are not interpolated.

Returns
Function

Refine GenericFunction based on refined mesh

Refine mesh function<std::size_t> based on mesh

Refine Dirichlet bc based on refined mesh

Arguments
form (Form)

The form that should be adapted

adapted_mesh (Mesh)

The new mesh

Optional argument, default is true. If false, the form coefficients are not explicitly adapted, but pre-adapted coefficients will be transferred.

Returns
Form

Refine linear variational problem based on mesh

Refine nonlinear variational problem based on mesh

Arguments
ec (ErrorControl)

The error control object to be adapted

adapted_mesh (Mesh)

The new mesh

ErrorControl