Salome HOME
Fix MEDCOUPLING compilation issue on Windows bos/33389 1/head
authorAntoine KARCHER <antoine.karcher@csgroup.eu>
Mon, 16 Jan 2023 09:43:30 +0000 (10:43 +0100)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Mon, 16 Jan 2023 09:43:30 +0000 (10:43 +0100)
src/INTERP_KERNEL/VolSurfUser.cxx
src/INTERP_KERNEL/VolSurfUser.txx
src/MEDCoupling/MEDCoupling1GTUMesh.cxx
src/MEDCoupling/MEDCouplingMemArray.txx

index fb9bb90f01f54df28b2c1c6efaeda419383ad65c..1c4ed13765b3ffa42f7d9759a6731f297d68952e 100644 (file)
@@ -277,15 +277,4 @@ namespace INTERP_KERNEL
     matrix[11]=-p0[0]*matrix[8]-p0[1]*matrix[9]-p0[2]*matrix[10];
     return true;
   }
-
-  template<int SPACEDIM>
-  void ComputeTriangleHeight(const double *PA, const double *PB, const double *PC, double *res)
-  {
-    double AB = getDistanceBtw2Pts<SPACEDIM>(PA,PB);
-    double BC = getDistanceBtw2Pts<SPACEDIM>(PB,PC);
-    double CA = getDistanceBtw2Pts<SPACEDIM>(PC,PA);
-    double perim( (AB+BC+CA)*0.5 );
-    double num( 2*sqrt(perim*(perim-AB)*(perim-BC)*(perim-CA)) );
-    res[0] = num/AB; res[1] = num/BC; res[2] = num/CA;
-  }
 }
index e77c74c3eb4a6c6802206ed74e3824ae36a8d48b..9ad5ee469f6f43443b5c21dfa2f4e19de454387a 100644 (file)
@@ -23,6 +23,7 @@
 #include "VolSurfUser.hxx"
 #include "VolSurfFormulae.hxx"
 #include "InterpolationUtils.hxx"
+#include "VectorUtils.hxx"
 
 #include <algorithm>
 
@@ -434,6 +435,17 @@ namespace INTERP_KERNEL
       return computeBarycenter<ConnType,numPolConn,1>(type,connec,lgth,coords,res);
     throw INTERP_KERNEL::Exception("Invalid spaceDim specified for compute barycenter : must be 1, 2 or 3");
   }
+
+  template<int SPACEDIM>
+  void ComputeTriangleHeight(const double *PA, const double *PB, const double *PC, double *res)
+  {
+    double AB = getDistanceBtw2Pts<SPACEDIM>(PA,PB);
+    double BC = getDistanceBtw2Pts<SPACEDIM>(PB,PC);
+    double CA = getDistanceBtw2Pts<SPACEDIM>(PC,PA);
+    double perim( (AB+BC+CA)*0.5 );
+    double num( 2*sqrt(perim*(perim-AB)*(perim-BC)*(perim-CA)) );
+    res[0] = num/AB; res[1] = num/BC; res[2] = num/CA;
+  }
 }
 
 #endif
index 8b656758300c9ff3eb8e5b065463498bf5f830fb..a5ae41bd0bc46717ff7f7281a046939d4d6fdef3 100644 (file)
@@ -27,7 +27,7 @@
 #include "DiameterCalculator.hxx"
 #include "OrientationInverter.hxx"
 #include "InterpKernelAutoPtr.hxx"
-#include "VolSurfUser.cxx"
+#include "VolSurfUser.txx"
 
 using namespace MEDCoupling;
 
index 01863c8546771884d5ff26e19b58b0e167f1cadd..0a0128161c97e2d1b14e8a8a604250f58dd9fe5f 100755 (executable)
@@ -4944,8 +4944,9 @@ struct NotInRange
     this->checkAllocated();
     constexpr char MSG1[] = "DataArrayInt::locateComponentId : single component array expected";
     valToSearchIntoTuples->checkNbOfComps(1,MSG1); tupleIdHint->checkNbOfComps(1,MSG1);
-    auto nbOfCompo( this->getNumberOfComponents() ),thisNbTuples( this->getNumberOfTuples() );
-    auto nbOfTuples( valToSearchIntoTuples->getNumberOfTuples() );
+    std::size_t nbOfCompo( this->getNumberOfComponents() );
+    mcIdType thisNbTuples( this->getNumberOfTuples() );
+    mcIdType nbOfTuples( valToSearchIntoTuples->getNumberOfTuples() );
     tupleIdHint->checkNbOfTuples(nbOfTuples,"Number of tuples of input arrays must be the same.");
     const T *cPtr(this->begin()),*valSearchPt(valToSearchIntoTuples->begin());
     const mcIdType *tHintPtr(tupleIdHint->begin());