コード例 #1
0
ファイル: ufl2gem.py プロジェクト: tj-sun/tsfc
 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)
コード例 #2
0
ファイル: ufl2gem.py プロジェクト: tj-sun/tsfc
 def bessel_y(self, o, nu, arg):
     return MathFunction(o._name, nu, arg)
コード例 #3
0
ファイル: ufl2gem.py プロジェクト: tj-sun/tsfc
 def atan_2(self, o, y, x):
     return MathFunction("atan2", y, x)
コード例 #4
0
ファイル: ufl2gem.py プロジェクト: tj-sun/tsfc
 def math_function(self, o, expr):
     return MathFunction(o._name, expr)