]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Correct no respects of code rules.
authorageay <ageay>
Thu, 15 Apr 2010 07:54:15 +0000 (07:54 +0000)
committerageay <ageay>
Thu, 15 Apr 2010 07:54:15 +0000 (07:54 +0000)
src/INTERP_KERNEL/CurveIntersector.txx
src/INTERP_KERNEL/InterpolationCurve.hxx
src/INTERP_KERNEL/InterpolationCurve.txx

index 469c4ab8d42ac3caafc82690eacc4e34b99fec2a..a27bed48d2a65250b17ea8c5f57aa616bc39a970 100644 (file)
@@ -20,6 +20,7 @@
 #define __CURVEINTERSECTOR_TXX__
 
 #include "CurveIntersector.hxx"
+#include "InterpolationUtils.hxx"
 
 #include <limits>
 
index fe3706e93d84ed56284bd956befd62537e9181da..144149f51c96b4f592206b0abad77406936e46ec 100644 (file)
@@ -33,8 +33,8 @@ namespace INTERP_KERNEL
 
     // Main function to interpolate
     template<class MyMeshType, class MatrixType>
-      int interpolateMeshes(const MyMeshType& mesh1, const MyMeshType& mesh2,
-                            MatrixType& result, const char *method);
+    int interpolateMeshes(const MyMeshType& meshS, const MyMeshType& meshT,
+                          MatrixType& result, const char *method);
     
   };
 }
index d7181ce617ae5b40a8af42406bee6566daeb3894..4309fb1ed09b5af21037ab2fe8a4b3152f9bc0b9 100644 (file)
@@ -88,38 +88,42 @@ namespace INTERP_KERNEL
     
     CurveIntersector<MyMeshType,MatrixType>* intersector=0;
     std::string meth(method);
-    if(meth=="P0P0") {
-      intersector = new CurveIntersectorP0P0<MyMeshType,MatrixType>
-        (myMeshT, myMeshS,
-         InterpolationOptions::getPrecision(),
-         InterpolationOptions::getBoundingBoxAdjustmentAbs(),
-         InterpolationOptions::getMedianPlane(),
-         InterpolationOptions::getPrintLevel());
-    }
-    else if(meth=="P0P1") {
-      intersector = new CurveIntersectorP0P1<MyMeshType,MatrixType>
-        (myMeshT, myMeshS,
-         InterpolationOptions::getPrecision(),
-         InterpolationOptions::getBoundingBoxAdjustmentAbs(),
-         InterpolationOptions::getMedianPlane(),
-         InterpolationOptions::getPrintLevel());
-    }
-    else if(meth=="P1P0") {
-      intersector = new CurveIntersectorP1P0<MyMeshType,MatrixType>
-        (myMeshT, myMeshS,
-         InterpolationOptions::getPrecision(),
-         InterpolationOptions::getBoundingBoxAdjustmentAbs(),
-         InterpolationOptions::getMedianPlane(),
-         InterpolationOptions::getPrintLevel());
-    }
-    else if(meth=="P1P1") {
-      intersector = new CurveIntersectorP1P1<MyMeshType,MatrixType>
-        (myMeshT, myMeshS,
-         InterpolationOptions::getPrecision(),
-         InterpolationOptions::getBoundingBoxAdjustmentAbs(),
-         InterpolationOptions::getMedianPlane(),
-         InterpolationOptions::getPrintLevel());
-    }
+    if(meth=="P0P0")
+      {
+        intersector = new CurveIntersectorP0P0<MyMeshType,MatrixType>
+          (myMeshT, myMeshS,
+           InterpolationOptions::getPrecision(),
+           InterpolationOptions::getBoundingBoxAdjustmentAbs(),
+           InterpolationOptions::getMedianPlane(),
+           InterpolationOptions::getPrintLevel());
+      }
+    else if(meth=="P0P1")
+      {
+        intersector = new CurveIntersectorP0P1<MyMeshType,MatrixType>
+          (myMeshT, myMeshS,
+           InterpolationOptions::getPrecision(),
+           InterpolationOptions::getBoundingBoxAdjustmentAbs(),
+           InterpolationOptions::getMedianPlane(),
+           InterpolationOptions::getPrintLevel());
+      }
+    else if(meth=="P1P0")
+      {
+        intersector = new CurveIntersectorP1P0<MyMeshType,MatrixType>
+          (myMeshT, myMeshS,
+           InterpolationOptions::getPrecision(),
+           InterpolationOptions::getBoundingBoxAdjustmentAbs(),
+           InterpolationOptions::getMedianPlane(),
+           InterpolationOptions::getPrintLevel());
+      }
+    else if(meth=="P1P1")
+      {
+        intersector = new CurveIntersectorP1P1<MyMeshType,MatrixType>
+          (myMeshT, myMeshS,
+           InterpolationOptions::getPrecision(),
+           InterpolationOptions::getBoundingBoxAdjustmentAbs(),
+           InterpolationOptions::getMedianPlane(),
+           InterpolationOptions::getPrintLevel());
+      }
     else
       throw INTERP_KERNEL::Exception("Invalid method specified ! Must be in : \"P0P0\" \"P0P1\" \"P1P0\" or \"P1P1\"");
     /****************************************************************/
@@ -144,26 +148,27 @@ namespace INTERP_KERNEL
     long start_intersection = clock();
     const ConnType *connIndxT = myMeshT.getConnectivityIndexPtr();
     for(int iT=0; iT<nbMailleT; iT++)
-    {
-      int nb_nodesT = connIndxT[iT+1] - connIndxT[iT];
-      std::vector<int> intersecting_elems;
-      double bb[2*SPACEDIM];
-      intersector->getElemBB(bb,myMeshT,OTT<ConnType,numPol>::indFC(iT),nb_nodesT);
-      my_tree.getIntersectingElems(bb, intersecting_elems);
-      intersector->intersectCells(iT,intersecting_elems,result);
-      counter += intersecting_elems.size();
-    }
+      {
+        int nb_nodesT = connIndxT[iT+1] - connIndxT[iT];
+        std::vector<int> intersecting_elems;
+        double bb[2*SPACEDIM];
+        intersector->getElemBB(bb,myMeshT,OTT<ConnType,numPol>::indFC(iT),nb_nodesT);
+        my_tree.getIntersectingElems(bb, intersecting_elems);
+        intersector->intersectCells(iT,intersecting_elems,result);
+        counter += intersecting_elems.size();
+      }
     int ret = intersector->getNumberOfColsOfResMatrix();
     delete intersector;
-
-    if (InterpolationOptions::getPrintLevel() >= 1) {
-      long end_intersection=clock();
-      std::cout << "Filtering time= " << end_filtering-start_filtering << std::endl;
-      std::cout << "Intersection time= " << end_intersection-start_intersection << std::endl;
-      long global_end =clock();    
-      std::cout << "Number of computed intersections = " << counter << std::endl;
-      std::cout << "Global time= " << global_end - global_start << std::endl;
-    }
+    
+    if (InterpolationOptions::getPrintLevel() >= 1)
+      {
+        long end_intersection=clock();
+        std::cout << "Filtering time= " << end_filtering-start_filtering << std::endl;
+        std::cout << "Intersection time= " << end_intersection-start_intersection << std::endl;
+        long global_end =clock();    
+        std::cout << "Number of computed intersections = " << counter << std::endl;
+        std::cout << "Global time= " << global_end - global_start << std::endl;
+      }
     return ret;
   }
 }