From 687dc8a9c50fb4c77a67097694915bacab046a59 Mon Sep 17 00:00:00 2001 From: Nicolas Marsic <nicolas.marsic@gmail.com> Date: Mon, 29 Jul 2013 12:08:33 +0000 Subject: [PATCH] Ooops: Reverting back Numeric and Geo --- Geo/MElement.h | 1 - Geo/MLine.h | 1 - Geo/MQuadrangle.h | 1 - Geo/MTetrahedron.h | 1 - Geo/MTriangle.h | 1 - Numeric/BasisFactory.cpp | 12 ++---------- Numeric/fullMatrix.h | 19 ------------------- 7 files changed, 2 insertions(+), 34 deletions(-) diff --git a/Geo/MElement.h b/Geo/MElement.h index 1d086a18a1..328c3adf61 100644 --- a/Geo/MElement.h +++ b/Geo/MElement.h @@ -347,7 +347,6 @@ class MElement // info for specific IO formats (returning 0 means that the element // is not implemented in that format) virtual int getTypeForMSH() const { return 0; } - virtual int getLowOrderTypeForMSH() const { return 0; } virtual int getTypeForUNV() const { return 0; } virtual int getTypeForVTK() const { return 0; } virtual const char *getStringForPOS() const { return 0; } diff --git a/Geo/MLine.h b/Geo/MLine.h index 28e341d599..1cb90314eb 100644 --- a/Geo/MLine.h +++ b/Geo/MLine.h @@ -65,7 +65,6 @@ class MLine : public MElement { virtual void getFaceRep(int num, double *x, double *y, double *z, SVector3 *n){} virtual int getType() const { return TYPE_LIN; } virtual int getTypeForMSH() const { return MSH_LIN_2; } - virtual int getLowOrderTypeForMSH() const { return MSH_LIN_2; } virtual int getTypeForUNV() const { return 21; } // linear beam virtual int getTypeForVTK() const { return 3; } virtual const char *getStringForPOS() const { return "SL"; } diff --git a/Geo/MQuadrangle.h b/Geo/MQuadrangle.h index 28cdb5d515..14e3bf691e 100644 --- a/Geo/MQuadrangle.h +++ b/Geo/MQuadrangle.h @@ -111,7 +111,6 @@ class MQuadrangle : public MElement { } virtual int getType() const { return TYPE_QUA; } virtual int getTypeForMSH() const { return MSH_QUA_4; } - virtual int getLowOrderTypeForMSH() const { return MSH_QUA_4; } virtual int getTypeForUNV() const { return 94; } // thin shell linear quadrilateral virtual int getTypeForVTK() const { return 9; } virtual const char *getStringForPOS() const { return "SQ"; } diff --git a/Geo/MTetrahedron.h b/Geo/MTetrahedron.h index f09ef8a8ee..920a88bc2f 100644 --- a/Geo/MTetrahedron.h +++ b/Geo/MTetrahedron.h @@ -100,7 +100,6 @@ class MTetrahedron : public MElement { } virtual int getType() const { return TYPE_TET; } virtual int getTypeForMSH() const { return MSH_TET_4; } - virtual int getLowOrderTypeForMSH() const { return MSH_TET_4; } virtual int getTypeForUNV() const { return 111; } // solid linear tetrahedron virtual int getTypeForVTK() const { return 10; } virtual const char *getStringForPOS() const { return "SS"; } diff --git a/Geo/MTriangle.h b/Geo/MTriangle.h index 345fe10836..eaab6370c4 100644 --- a/Geo/MTriangle.h +++ b/Geo/MTriangle.h @@ -114,7 +114,6 @@ class MTriangle : public MElement { } virtual int getType() const { return TYPE_TRI; } virtual int getTypeForMSH() const { return MSH_TRI_3; } - virtual int getLowOrderTypeForMSH() const { return MSH_TRI_3; } virtual int getTypeForUNV() const { return 91; } // thin shell linear triangle virtual int getTypeForVTK() const { return 5; } virtual const char *getStringForPOS() const { return "ST"; } diff --git a/Numeric/BasisFactory.cpp b/Numeric/BasisFactory.cpp index 6f548388ee..60f8ea8aa1 100644 --- a/Numeric/BasisFactory.cpp +++ b/Numeric/BasisFactory.cpp @@ -46,17 +46,9 @@ const nodalBasis* BasisFactory::getNodalBasis(int tag) } // FIXME: check if already exists to deallocate if necessary - std::pair<std::map<int, nodalBasis*>::const_iterator, bool> inserted; + fs.insert(std::make_pair(tag, F)); - #pragma omp critical - { - inserted = fs.insert(std::make_pair(tag, F)); - - if (!inserted.second) - delete F; - } - - return inserted.first->second; + return F; } const JacobianBasis* BasisFactory::getJacobianBasis(int tag) diff --git a/Numeric/fullMatrix.h b/Numeric/fullMatrix.h index 8e1f8edb0d..420e6e4df5 100644 --- a/Numeric/fullMatrix.h +++ b/Numeric/fullMatrix.h @@ -745,25 +745,6 @@ class fullMatrix printf("};\n"); } - - void printMatlab(const std::string name = "A") const - { - int ni = size1(); - int nj = size2(); - - printf("%s = [", name.c_str()); - - for(int I = 0; I < ni; I++){ - for(int J = 0; J < nj; J++){ - printf("%+e,", (*this)(I, J)); - } - - printf(";"); - } - - printf("]\n"); - } - // specific functions for dgshell void mult_naiveBlock(const fullMatrix<scalar> &b, const int ncol, const int fcol, const int alpha, const int beta, fullVector<scalar> &c, -- GitLab