]> SALOME platform Git repositories - tools/medcoupling.git/blobdiff - src/ParaMEDMEM/DisjointDEC.cxx
Salome HOME
refactor!: remove adm_local/ directory
[tools/medcoupling.git] / src / ParaMEDMEM / DisjointDEC.cxx
index 178f296f65cb37019683590b913a922bb7822b1a..b213300bbf59038edfdf02445934d169957ef13b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2024  CEA, EDF
 //
 // 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 "ParaFIELD.hxx"
 #include "ParaMESH.hxx"
 #include "ICoCoField.hxx"
-#include "ICoCoMEDField.hxx"
+#include "ICoCoMEDDoubleField.hxx"
 #include "MPIProcessorGroup.hxx"
 
 #include <cmath>
@@ -173,7 +173,7 @@ namespace MEDCoupling
       {
         delete _local_field;
       }
-    _local_field=0;
+    _local_field=nullptr;
     _owns_field=false;
     if(_owns_groups)
       {
@@ -181,12 +181,13 @@ namespace MEDCoupling
         delete _target_group;
       }
     _owns_groups=false;
-    _source_group=0;
-    _target_group=0;
+    _source_group=nullptr;
+    _target_group=nullptr;
     delete _union_group;
-    _union_group=0;
+    _union_group=nullptr;
     if (_union_comm != MPI_COMM_NULL)
       _comm_interface->commFree(&_union_comm);
+    _union_comm = MPI_COMM_NULL;
   }
 
   /**
@@ -268,16 +269,16 @@ namespace MEDCoupling
     will be updated by a recvData() call.
     Reversely, if the processor is on the sending end, the field will be read, possibly transformed, and sent appropriately to the other side.
     The field type is a generic ICoCo Field, so that the DEC can couple a number of different fields :
-    - a ICoCo::MEDField, that is created from a MEDCoupling structure
+    - a ICoCo::MEDDoubleField, that is created from a MEDCoupling structure
     
   */
-  void DisjointDEC::attachLocalField(const ICoCo::MEDField *field)
+  void DisjointDEC::attachLocalField(const ICoCo::MEDDoubleField *field)
   {
     if(!isInUnion())
       return ;
     if(!field)
-      throw INTERP_KERNEL::Exception("DisjointDEC::attachLocalField : ICoCo::MEDField pointer is NULL !");
-    attachLocalField(field->getField());
+      throw INTERP_KERNEL::Exception("DisjointDEC::attachLocalField : ICoCo::MEDDoubleField pointer is NULL !");
+    attachLocalField(field->getMCField());
   }
   
   /*!