ValueError: UFL conditions cannot be evaluated as bool in a Python context

Please note that post do not meet the requirements of being:

  1. Complete with information making the problem reproducible
  2. Any context of your error, except the error message as the title, with no traceback
  3. No formatting of the code (use 3x` encapsulation), ie.
# Add code here

If further posts are made without complying to these rules, they will be locked and removed.

Please modify your post to conform to the guidelines above.
See for instance:

for a list of examples.

1 Like