← Back to team overview

ufl team mailing list archive

Re: control statements in UFL

 

This is now implemented in UFL, that is, the syntax is possible:
 a = conditional(gt(f, 0.0), 1.0, 0.0)

The left and right expressions are required to have the same shape
and free indices.

In the automatic differentiation I issue a warning if the condition
depends on what you differentiate w.r.t., but don't touch the condition
and simply differentiate the left and right expressions separately.

--
Martin


References