I am trying to imply the following body force on a cube. But the code gives me an error for what I have scripted. Is there something wrong with what I have written? Is there a more efficient/ correct way?
r1 = 5.0/6.0-DOLFIN_EPS;
if x[0] >= r1:
f= Expression(("0.0", "0.0", "-10*exp(2*x[2]+x[1])"))
else:
f= Expression(("0.0", "0.0", "0.0"))