Exemple #1
0
 def abs(self, o, expr):
     if o.ufl_shape:
         indices = tuple(Index() for i in range(len(o.ufl_shape)))
         return ComponentTensor(MathFunction('abs', Indexed(expr, indices)),
                                indices)
     else:
         return MathFunction('abs', expr)
Exemple #2
0
 def bessel_y(self, o, nu, arg):
     return MathFunction(o._name, nu, arg)
Exemple #3
0
 def atan_2(self, o, y, x):
     return MathFunction("atan2", y, x)
Exemple #4
0
 def math_function(self, o, expr):
     return MathFunction(o._name, expr)