← Back to team overview

ufl team mailing list archive

Re: [Question #224154]: Support for "and" and "or"

 

Question #224154 on UFL changed:
https://answers.launchpad.net/ufl/+question/224154

Description changed to:
I wonder if it is possible to support "and" and "or" in conditional
statements?

from ufl import *
fe = FiniteElement("Lagrange", triangle, 1)
c = coefficient(fe)
expr = conditional(lt(c, 8) and gt(c,4), c, 0.0)

sympy overloads & and | for these operations.

Johan

-- 
You received this question notification because you are a member of UFL
Team, which is an answer contact for UFL.