mesh-adaptation / goalie

Goal-oriented error estimation and mesh adaptation for finite element problems solved using Firedrake
Other
1 stars 1 forks source link

Avoid interpolation deprecation warning #105

Closed jwallwork23 closed 5 months ago

jwallwork23 commented 6 months ago

The following warning has started to appear in the test suite and we should follow its advice.

/home/firedrake/firedrake/src/firedrake/firedrake/interpolation.py:380: FutureWarning: The use of interpolate to perform the numerical interpolation is deprecated. This feature will be removed very shortly.

Instead, import interpolate from the firedrake.__future__ module to update the interpolation's behaviour to return the symbolic ufl.Interpolate object associated with this interpolation.

You can then assemble the resulting object to get the interpolated quantity of interest. For example,

  from firedrake.__future__ import interpolate
  ...

  assemble(interpolate(expr, V))

Alternatively, you can also perform other symbolic operations on interp, such as taking the derivative, and then assemble the resulting form.

warnings.warn("""The use of `interpolate` to perform the numerical interpolation is deprecated.