Salome HOME
MED33 porting
[tools/medcoupling.git] / src / ParaMEDMEM / OverlapDEC.hxx
index f89e6a7a4fa0b67c2012cbeb6ce58513e0ff0eca..c510617f336b0107dbee8e08bcaaeacfbe054dbd 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
 #include "InterpolationOptions.hxx"
 
 #include <mpi.h>
+#include <string>
 
-namespace ParaMEDMEM
+namespace ICoCo {
+  class MEDField;
+}
+
+namespace MEDCoupling
 {
   class OverlapInterpolationMatrix;
+  class OverlapElementLocator;
   class ProcessorGroup;
   class ParaFIELD;
 
@@ -43,17 +49,33 @@ namespace ParaMEDMEM
     void synchronize();
     void attachSourceLocalField(ParaFIELD *field, bool ownPt=false);
     void attachTargetLocalField(ParaFIELD *field, bool ownPt=false);
-    ProcessorGroup *getGrp() { return _group; }
+    void attachSourceLocalField(MEDCouplingFieldDouble *field);
+    void attachTargetLocalField(MEDCouplingFieldDouble *field);
+    void attachSourceLocalField(ICoCo::MEDField *field);
+    void attachTargetLocalField(ICoCo::MEDField *field);
+    ProcessorGroup *getGroup() { return _group; }
     bool isInGroup() const;
+
+    void setDefaultValue(double val) {_default_field_value = val;}
+    //! 0 means initial algo from Antho, 1 or 2 means Adrien's algo (2 should be better). Make your choice :-))
+    void setWorkSharingAlgo(int method)  { _load_balancing_algo = method; }
+
+    void debugPrintWorkSharing(std::ostream & ostr) const;
   private:
+    int _load_balancing_algo;
+
     bool _own_group;
     OverlapInterpolationMatrix* _interpolation_matrix;
+    OverlapElementLocator* _locator;
     ProcessorGroup *_group;
-  private:
+
+    double _default_field_value;
+
     ParaFIELD *_source_field;
     bool _own_source_field;
     ParaFIELD *_target_field;
     bool _own_target_field;
+    MPI_Comm _comm;
   };
 }