diff --git a/Geo/STensor3.h b/Geo/STensor3.h index 42a8eb82bbfc03778456a715826c11db9cc49570..ed8ccdaab9fb83eaf6a8239dbd5138a7462cd482 100644 --- a/Geo/STensor3.h +++ b/Geo/STensor3.h @@ -245,6 +245,15 @@ class STensor3 { ithis.setMat(m); return ithis; } + STensor3 transpose () const + { + STensor3 ithis; + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) + ithis(i,j) = (*this)(j,i); + return ithis; + } + STensor3 operator + (const STensor3 &other) const { STensor3 res(*this); diff --git a/Numeric/fullMatrix.h b/Numeric/fullMatrix.h index cd3ea275b5b2713761386909d3a2d64822690d71..cd2126a9e4aee5d7b8eeac8db5bf79ec2d086f0e 100644 --- a/Numeric/fullMatrix.h +++ b/Numeric/fullMatrix.h @@ -84,12 +84,12 @@ class fullVector _data = new scalar[_r]; _own_data = true; if(resetValue) - setAll(0.); + setAll(scalar()); return true; } _r = r; if(resetValue) - setAll(0.); + setAll(scalar()); return false; } void setAsProxy(const fullVector<scalar> &original, int r_start, int r)