MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / inv

Function inv

src/OpenFOAM/primitives/Tensor/TensorI.H:614–630  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

612//- Return the inverse of a tensor given the determinant
613template<class Cmpt>
614inline Tensor<Cmpt> inv(const Tensor<Cmpt>& t, const Cmpt dett)
615{
616 return Tensor<Cmpt>
617 (
618 t.yy()*t.zz() - t.zy()*t.yz(),
619 t.xz()*t.zy() - t.xy()*t.zz(),
620 t.xy()*t.yz() - t.xz()*t.yy(),
621
622 t.zx()*t.yz() - t.yx()*t.zz(),
623 t.xx()*t.zz() - t.xz()*t.zx(),
624 t.yx()*t.xz() - t.xx()*t.yz(),
625
626 t.yx()*t.zy() - t.yy()*t.zx(),
627 t.xy()*t.zx() - t.xx()*t.zy(),
628 t.xx()*t.yy() - t.yx()*t.xy()
629 )/dett;
630}
631
632
633//- Return the inverse of a tensor

Callers 2

operator/Function · 0.70
invMethod · 0.70

Calls 2

xyMethod · 0.80
detFunction · 0.70

Tested by

no test coverage detected