LutzGross / esys-escript.github.io

Other
29 stars 13 forks source link

Is there a function for the cross product of two vectors? #25

Closed LutzGross closed 2 years ago

LutzGross commented 2 years ago

def cross(a,b): c=Vector(0., a.getFunctionSpace()) c[0]=a[1]b[2]-a[2]b[1] c[1]=a[0]b[2]-a[2]b[0] c[2]=a[0]b[1]-a[1]b[0] return c return c

LutzGross commented 2 years ago

yes there is now see https://github.com/esys-escript/esys-escript.github.io/commit/3bb39eed250a90ee1d2bbea0680a2d957d089e67