← Back to team overview

ufl team mailing list archive

Re: [Dolfin] [Branch ~ufl-core/ufl/main] Rev 1014: Add warnings to set_foo functions in finiteelement.py,

 

On 27 April 2011 16:48, Garth N. Wells <gnw20@xxxxxxxxx> wrote:

>
>
> On 27/04/11 15:43, Johan Hake wrote:
> > When is the element/cell set for a coefficient?
>
> It's decided by the form compiler, which does the setting by calling the
> UFL set_foo functions.
>


Does anyone outside the form compiler depend on the side effects of these
set_foo calls?

Will this modify f?
f = Expression("x[0]")
q = assemble(f*triangle.x[0]*dx)
That is, will it call set_foo on the original dolfin coefficients or the
replacement ufl coefficients made in preprocess?


Garth
>
>
> < If it is during code
> > generation we can add that process to preprocess or what ne it now has,
> > and the changes will only apply to the preprocessed form.
> >
> > Johan
>

That would make the scope of potential problems somewhat manageable.
In particular, there should be no side effects in user code.

Martin

References