From 3752e462ceb0da46ad1e5753788653944987cf5e Mon Sep 17 00:00:00 2001 From: Emilie Marchandise <emilie.marchandise@uclouvain.be> Date: Thu, 26 May 2011 11:39:56 +0000 Subject: [PATCH] add determinant --- Geo/GFaceCompound.cpp | 6 +++--- Geo/STensor3.h | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/Geo/GFaceCompound.cpp b/Geo/GFaceCompound.cpp index 348cb6e6fb..37b4bbc878 100644 --- a/Geo/GFaceCompound.cpp +++ b/Geo/GFaceCompound.cpp @@ -661,8 +661,8 @@ bool GFaceCompound::parametrize() const } // Radial-Basis Function parametrization else if (_mapping == RBF){ - printf("Parametrizing surface %d with 'rbf' \n", tag()); - Msg::Debug("Parametrizing surface %d with 'rbf's'", tag()); + printf("Parametrizing surface %d with 'RBF' \n", tag()); + Msg::Debug("Parametrizing surface %d with 'RBF''", tag()); } buildOct(); @@ -1727,7 +1727,7 @@ GPoint GFaceCompound::point(double par1, double par2) const // b102 = (2*lt->v3 + lt->v1-w31*n3)*0.333; // b201 = (2*lt->v1 + lt->v3-w13*n1)*0.333; - //tagged PN trinagles (sigma=1) + //tagged PN triangles (sigma=1) double theta = 0.0; SVector3 d1 = lt->v1+.33*(1-theta)*(lt->v2-lt->v1); SVector3 d2 = lt->v2+.33*(1-theta)*(lt->v1-lt->v2); diff --git a/Geo/STensor3.h b/Geo/STensor3.h index b554a7edcb..ef83e911f7 100644 --- a/Geo/STensor3.h +++ b/Geo/STensor3.h @@ -101,6 +101,13 @@ class SMetric3 { ithis.setMat(m); return ithis; } + double determinant () const + { + fullMatrix<double> m(3,3); + getMat(m); + double det = m.determinant(); + return det; + } SMetric3 operator + (const SMetric3 &other) const { SMetric3 res(*this); @@ -229,6 +236,7 @@ class STensor3 { ithis.setMat(m); return ithis; } + STensor3 operator + (const STensor3 &other) const { STensor3 res(*this); -- GitLab