Question #133595 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/133595
Status: Open => Answered
Kristian B. Ølgaard proposed the following answer:
I'm not sure atan2 would help if the second argument is zero.
You need to use Conditional from UFL to define the if/else statement:
cond = conditional( eq(c0.dx(0), 0.0), 1.0, c0.dx(0) )
def anisotropic_tension(c0):
return cos(atan(c0.dx(1) / cond))
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to : [email protected]
Unsubscribe : https://launchpad.net/~dolfin
More help : https://help.launchpad.net/ListHelp