From 9ab9c57c1bb8fd94a99318fc5610d3a1dbe14592 Mon Sep 17 00:00:00 2001 From: vbd Date: Wed, 9 Jan 2008 15:30:36 +0000 Subject: [PATCH] *** empty log message *** --- src/INTERP_KERNEL/BBTree.H | 12 +++++++++--- src/INTERP_KERNEL/ConvexIntersector.cxx | 3 +++ src/INTERP_KERNEL/GenericIntersector.cxx | 3 +++ src/INTERP_KERNEL/PlanarIntersector.H | 4 ++++ src/INTERP_KERNEL/TriangulationIntersector.cxx | 3 +++ src/INTERP_KERNEL/testUnitTetra.cxx | 5 +++-- src/INTERP_KERNEL/test_Interpol_2D.cxx | 6 ++++-- src/INTERP_KERNEL/test_Interpol_3DSurf.cxx | 7 +++++-- 8 files changed, 34 insertions(+), 9 deletions(-) diff --git a/src/INTERP_KERNEL/BBTree.H b/src/INTERP_KERNEL/BBTree.H index 4354abec8..211a15032 100644 --- a/src/INTERP_KERNEL/BBTree.H +++ b/src/INTERP_KERNEL/BBTree.H @@ -1,9 +1,13 @@ +#ifndef BBTREE_H +#define BBTREE_H + #include #include #include 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; isize()+_right->size(); -}}; +} +}; +#endif diff --git a/src/INTERP_KERNEL/ConvexIntersector.cxx b/src/INTERP_KERNEL/ConvexIntersector.cxx index eba6e19a6..16ac7734e 100644 --- a/src/INTERP_KERNEL/ConvexIntersector.cxx +++ b/src/INTERP_KERNEL/ConvexIntersector.cxx @@ -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 diff --git a/src/INTERP_KERNEL/GenericIntersector.cxx b/src/INTERP_KERNEL/GenericIntersector.cxx index d880e26f4..efc961f09 100644 --- a/src/INTERP_KERNEL/GenericIntersector.cxx +++ b/src/INTERP_KERNEL/GenericIntersector.cxx @@ -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 diff --git a/src/INTERP_KERNEL/PlanarIntersector.H b/src/INTERP_KERNEL/PlanarIntersector.H index d961b11a8..8c7200b06 100644 --- a/src/INTERP_KERNEL/PlanarIntersector.H +++ b/src/INTERP_KERNEL/PlanarIntersector.H @@ -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 diff --git a/src/INTERP_KERNEL/TriangulationIntersector.cxx b/src/INTERP_KERNEL/TriangulationIntersector.cxx index 512a30068..0d4cd561b 100644 --- a/src/INTERP_KERNEL/TriangulationIntersector.cxx +++ b/src/INTERP_KERNEL/TriangulationIntersector.cxx @@ -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 diff --git a/src/INTERP_KERNEL/testUnitTetra.cxx b/src/INTERP_KERNEL/testUnitTetra.cxx index 8ff191984..5626e7f03 100644 --- a/src/INTERP_KERNEL/testUnitTetra.cxx +++ b/src/INTERP_KERNEL/testUnitTetra.cxx @@ -1,6 +1,6 @@ #include "MEDMEM_Mesh.hxx" #include "Interpolation3D.hxx" - +#include "Interpolation3D.txx" #include 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 > matrix = interpolator.interpolateMeshes(mesh1,mesh2); + vector > matrix; + interpolator.interpolateMeshes(mesh1,mesh2,matrix); // dump dumpIntersectionMatrix(matrix); diff --git a/src/INTERP_KERNEL/test_Interpol_2D.cxx b/src/INTERP_KERNEL/test_Interpol_2D.cxx index d8e914a7a..a5af925fc 100644 --- a/src/INTERP_KERNEL/test_Interpol_2D.cxx +++ b/src/INTERP_KERNEL/test_Interpol_2D.cxx @@ -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 > surfaces= interp.interpolateMeshes(target,source); + vector > surfaces; + interp.interpolateMeshes(target,source,surfaces); // map::iterator mi; -// cerr<< "Résultat interpolation: celulle " << 0 << endl; +// cerr<< "R�sultat interpolation: celulle " << 0 << endl; // for(mi=(surfaces[0]).begin(); mi!=(surfaces[0]).end(); mi++) // cerr<< (*mi).first << " ; " << (*mi).second << endl; diff --git a/src/INTERP_KERNEL/test_Interpol_3DSurf.cxx b/src/INTERP_KERNEL/test_Interpol_3DSurf.cxx index 8e3e6a544..f4e910c06 100644 --- a/src/INTERP_KERNEL/test_Interpol_3DSurf.cxx +++ b/src/INTERP_KERNEL/test_Interpol_3DSurf.cxx @@ -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 > surfaces= interp.interpolateMeshes(source,target); + vector > surfaces; + interp.interpolateMeshes(source,target,surfaces); // map::iterator mi; -// cerr<< "Résultat interpolation: celulle " << 0 << endl; +// cerr<< "R�sultat interpolation: celulle " << 0 << endl; // for(mi=(surfaces[0]).begin(); mi!=(surfaces[0]).end(); mi++) // cerr<< (*mi).first << " ; " << (*mi).second << endl; } -- 2.39.2