dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #22857
Re: Dealing with incomplete UFL finite elements
On 27 April 2011 19:07, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
> I'm starting here a new thread on how to deal with the recent change in
> UFL that has broken a good number of DOLFIN demos. The previous thread
> meandered and got side-tracked.
>
> The framework in we need to operate is:
>
> A. UFL will not allow forms to be modified post-construction.
>
> B. It should be relatively easy to replace ufl.Coefficients in a form
> and return a new form.
>
> C. The issue with replacing ufl.Coefficients is that we lose DOLFIN data
> (like the eval() functions) associated with the removed coefficients.
>
>
> I'll kick off with the obvious solution:
>
> 1. Require that all DOLFIN Expressions are associated with a
> ufl.FiniteElement.
>
> Other solutions?
>
> Garth
>
2. At the stage when ffc calls ufl.preprocess, or even in ufl.preprocess,
let the preprocessed form contain ufl Coefficients with new elements in
place of the dolfin.Expressions. This is similar to the replacements done
for renumbering of Coefficients, and could either be done simultaneously or
as an additional step. The original Form and Expression objects will be
untouched, and the preprocessed form will be fine.
Martin
Follow ups
References