Salome HOME
Merge branch 'master' of ssh://git.salome-platform.org/tools/medcoupling
[tools/medcoupling.git] / src / ParaMEDMEM / OverlapElementLocator.hxx
index bf55802323f33d0f438b779201398aeba611c072..4b37b31bf5ede7dbc3d1b3758cf25cb1a6ccf0e3 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -25,7 +25,7 @@
 #include "MEDCouplingNatureOfField.hxx"
 #include "MEDCouplingPointSet.hxx"
 #include "MEDCouplingMemArray.hxx"
-#include "MEDCouplingAutoRefCountObjectPtr.hxx"
+#include "MCAuto.hxx"
 
 #include <mpi.h>
 #include <vector>
@@ -34,7 +34,7 @@
 
 //#define DEC_DEBUG
 
-namespace ParaMEDMEM
+namespace MEDCoupling
 {
   class ParaFIELD;
   class ProcessorGroup;
@@ -59,10 +59,11 @@ namespace ParaMEDMEM
     const MEDCouplingPointSet *getTargetMesh(int procId) const;
     const DataArrayInt *getTargetIds(int procId) const;
     bool isInMyTodoList(int i, int j) const;
+    void debugPrintWorkSharing(std::ostream & ostr) const;
   private:
     void computeBoundingBoxesAndInteractionList();
     void computeTodoList_original();
-    void computeTodoList_new();
+    void computeTodoList_new(bool revertIter);
     void fillProcToSend();
     bool intersectsBoundingBox(int i, int j) const;
     void sendLocalMeshTo(int procId, bool sourceOrTarget, OverlapInterpolationMatrix& matrix) const;
@@ -70,8 +71,8 @@ namespace ParaMEDMEM
     void sendMesh(int procId, const MEDCouplingPointSet *mesh, const DataArrayInt *idsToSend) const;
     void receiveMesh(int procId, MEDCouplingPointSet* &mesh, DataArrayInt *&ids) const;
   private:
-    typedef MEDCouplingAutoRefCountObjectPtr< MEDCouplingPointSet >  AutoMCPointSet;
-    typedef MEDCouplingAutoRefCountObjectPtr< DataArrayInt >         AutoDAInt;
+    typedef MCAuto< MEDCouplingPointSet >  AutoMCPointSet;
+    typedef MCAuto< DataArrayInt >         AutoDAInt;
     typedef std::pair<int,bool>  Proc_SrcOrTgt;  // a key indicating a proc ID and whether the data is for source mesh/field or target mesh/field
 
     static const int START_TAG_MESH_XCH;