Ejemplo n.º 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)
Ejemplo n.º 2
0
 def bessel_y(self, o, nu, arg):
     return MathFunction(o._name, nu, arg)
Ejemplo n.º 3
0
 def atan_2(self, o, y, x):
     return MathFunction("atan2", y, x)
Ejemplo n.º 4
0
 def math_function(self, o, expr):
     return MathFunction(o._name, expr)