Hello everybody,
I have a problem with the imposition of conditions when I activate the dolfin module. Specifically, in my script I have such conditions:
if (t1<(Day_after_surgery*86400)):
k_c=0
k_r=0
elif (t1>(Day_after_surgery*86400) and t1<((Day_after_surgery+42)*86400)):
k_r=0.0648/86400
k_c=0.00735/86400
from which I get this output:
UFL conditions cannot be evaluated as bool in a Python context.
Traceback (most recent call last):
File "/Users/lorenzomarta/Desktop/Script simulazioni/Test10/GBM_Besta_10.py", line 341, in <module>
if (t1<(Day_after_surgery*86400)): #pre-inizio terapia
File "/Applications/anaconda3/envs/fenicsproject/lib/python3.10/site-packages/ufl/conditional.py", line 46, in __bool__
error("UFL conditions cannot be evaluated as bool in a Python context.")
File "/Applications/anaconda3/envs/fenicsproject/lib/python3.10/site-packages/ufl/log.py", line 172, in error
raise self._exception_type(self._format_raw(*message))
ufl.log.UFLException: UFL conditions cannot be evaluated as bool in a Python context.
How could I solve?
Thanks in advance