]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
*** empty log message ***
authorvbd <vbd>
Wed, 9 Jan 2008 15:30:36 +0000 (15:30 +0000)
committervbd <vbd>
Wed, 9 Jan 2008 15:30:36 +0000 (15:30 +0000)
src/INTERP_KERNEL/BBTree.H
src/INTERP_KERNEL/ConvexIntersector.cxx
src/INTERP_KERNEL/GenericIntersector.cxx
src/INTERP_KERNEL/PlanarIntersector.H
src/INTERP_KERNEL/TriangulationIntersector.cxx
src/INTERP_KERNEL/testUnitTetra.cxx
src/INTERP_KERNEL/test_Interpol_2D.cxx
src/INTERP_KERNEL/test_Interpol_3DSurf.cxx

index 4354abec880b3d5ab49fec335f7fa66bfdab89a1..211a1503297bf4d4795c1bd6943c0e86efcb12a4 100644 (file)
@@ -1,9 +1,13 @@
+#ifndef BBTREE_H
+#define BBTREE_H
+
 #include <iostream> 
 #include <vector>
 #include <algorithm>
 
 const int MIN_NB_ELEMS =15;
 const int MAX_LEVEL=20;
+const double BBHUGE = 1e40;
 using namespace std;
 
 
@@ -57,8 +61,8 @@ BBTree(double* bbs, int* elems, int level, int nbelems):
  
   new_elems_left.reserve(nbelems/2+1);
   new_elems_right.reserve(nbelems/2+1);
-  double max_left=-HUGE;
-  double min_right=HUGE;
+  double max_left=-BBHUGE;
+  double min_right=BBHUGE;
   for (int i=0; i<nbelems;i++)
     {
       int elem;
@@ -154,4 +158,6 @@ int size()
 {
   if (_terminal) return _nbelems;
   return _left->size()+_right->size();
-}};
+}
+};
+#endif
index eba6e19a6aeef74ccf933b4b7a21475d51de5df5..16ac7734e623aade408f9e203ddb6c66d6c4408f 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef __CONVEX_INTERSECTOR_CXX__
+#define __CONVEX_INTERSECTOR_CXX__
 #include "MEDMEM_Mesh.hxx"
 #include "InterpolationUtils.hxx"
 #include "PlanarIntersector.hxx"
@@ -122,3 +124,4 @@ namespace MEDMEM
   }
 
 }
+#endif
index d880e26f4bf7c793694acc7028005935ff7847e0..efc961f092ae1cfdd0aa67dd7bf8f8e82e6752c5 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef __GENERIC_INTERSECTOR_CXX__
+#define __GENERIC_INTERSECTOR_CXX__
 #include "MEDMEM_Mesh.hxx"
 #include "InterpolationUtils.hxx"
 #include "PlanarIntersector.hxx"
@@ -133,3 +135,4 @@ namespace MEDMEM
   }
   
 }
+#endif
index d961b11a89b2fcb79825f3c4e9a4fc0b7cb8a2b8..8c7200b068ad440d12bc22648df949d195ae2cfb 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef __PLANAR_INTERSECTOR_H__
+#define __PLANAR_INTERSECTOR_H__
+
 #include "PlanarIntersector.hxx"
 #include "MEDMEM_Mesh.hxx"
 
@@ -117,3 +120,4 @@ namespace MEDMEM {
       }
   }
 }
+#endif
\ No newline at end of file
index 512a30068d32ec9787063906e18f79af33dc5be6..0d4cd561bb25333e2dde37722e6fc9ee2b8eb3b9 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef __TRIANGULATION_INTERSECTOR_CXX__
+#define __TRIANGULATION_INTERSECTOR_CXX__
 #include "MEDMEM_Mesh.hxx"
 #include "InterpolationUtils.hxx"
 #include "PlanarIntersector.hxx"
@@ -101,3 +103,4 @@ namespace MEDMEM
   }
   
 }
+#endif
index 8ff191984a262b5248ac6e068c4586ac02600b00..5626e7f035527c51f8eb4bc89ac673dd496fc7ee 100644 (file)
@@ -1,6 +1,6 @@
 #include "MEDMEM_Mesh.hxx"
 #include "Interpolation3D.hxx"
-
+#include "Interpolation3D.txx"
 #include <cmath>
 
 using namespace MEDMEM;
@@ -49,7 +49,8 @@ int main()
        MEDMEM::MESH mesh1(MED_DRIVER,"/home/vb144235/resources/DividedUnitTetraSimpler.med","DividedUnitTetraSimpler");
        MEDMEM::MESH mesh2(MED_DRIVER,"/home/vb144235/resources/DividedUnitTetraSimpler.med","DividedUnitTetraSimpler");
        Interpolation3D interpolator;
-       vector<map<int,double> > matrix = interpolator.interpolateMeshes(mesh1,mesh2);
+       vector<map<int,double> > matrix;
+       interpolator.interpolateMeshes(mesh1,mesh2,matrix);
 
        // dump
        dumpIntersectionMatrix(matrix);
index d8e914a7af87a59a48f86471c651b909a22c5b7f..a5af925fc2eca6e166494cae629ebed07ecbde04 100644 (file)
@@ -1,4 +1,5 @@
 #include "Interpolation2D.hxx"
+#include "Interpolation2D.txx"
 #include "MEDMEM_Mesh.hxx"
 #include "MEDMEM_Field.hxx"
 
@@ -30,10 +31,11 @@ int main(int argc, char** argv)
   MEDMEM::Interpolation2D interp; 
  
   interp.setOptions(1e-6,2,intersectiontype);
-  vector<map<int,double> > surfaces= interp.interpolateMeshes(target,source); 
+  vector<map<int,double> > surfaces;
+  interp.interpolateMeshes(target,source,surfaces); 
 
 //   map<int,double>::iterator mi;
-//    cerr<< "Résultat interpolation: celulle " << 0 << endl;
+//    cerr<< "Rsultat interpolation: celulle " << 0 << endl;
 //    for(mi=(surfaces[0]).begin(); mi!=(surfaces[0]).end(); mi++)
 //      cerr<< (*mi).first << " ; " << (*mi).second << endl;
 
index 8e3e6a54409587ec69538ffb64c72731dc551580..f4e910c066c57e586e66f2ee16e0655f73705016 100644 (file)
@@ -1,4 +1,6 @@
 #include "Interpolation3DSurf.hxx"
+#include "Interpolation3DSurf.txx"
+
 #include "MEDMEM_Mesh.hxx"
 #include "MEDMEM_Field.hxx"
 
@@ -32,10 +34,11 @@ int main(int argc, char** argv)
   MEDMEM::Interpolation3DSurf interp;
 
    interp.setOptions(1e-6,2,medianPlane,intersectiontype, rotate); 
-   vector<map<int,double> > surfaces= interp.interpolateMeshes(source,target);
+   vector<map<int,double> > surfaces;
+   interp.interpolateMeshes(source,target,surfaces);
 
 //   map<int,double>::iterator mi;
-//    cerr<< "Résultat interpolation: celulle " << 0 << endl;
+//    cerr<< "Rsultat interpolation: celulle " << 0 << endl;
 //    for(mi=(surfaces[0]).begin(); mi!=(surfaces[0]).end(); mi++)
 //      cerr<< (*mi).first << " ; " << (*mi).second << endl;
 }