]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
WIP
authorAnthony Geay <anthony.geay@edf.fr>
Fri, 17 Apr 2020 22:17:42 +0000 (00:17 +0200)
committerAnthony Geay <anthony.geay@edf.fr>
Fri, 17 Apr 2020 22:17:42 +0000 (00:17 +0200)
src/ParaMEDMEM/ParaSkyLineArray.cxx
src/ParaMEDMEM/ParaSkyLineArray.hxx
src/ParaMEDMEM_Swig/ParaMEDMEMCommon.i

index 9b39c082df41e85cb5238ab23dbb44438eb0a621..5672037f09b1cb728781d11e991f41acded876bb 100644 (file)
@@ -48,6 +48,16 @@ ParaSkyLineArray::ParaSkyLineArray(MEDCouplingSkyLineArray *ska, DataArrayIdType
     throw INTERP_KERNEL::Exception("ParaSkyLineArray constructor : mismatch between # globalIds and len of indices in SkyLineArray.");
 }
 
+std::size_t ParaSkyLineArray::getHeapMemorySizeWithoutChildren() const
+{
+  return 0;
+}
+
+std::vector<const BigMemoryObject *> ParaSkyLineArray::getDirectChildrenWithNull() const
+{
+  return {_ska,_global_ids};
+}
+
 MCAuto<ParaSkyLineArray> ParaSkyLineArray::equiRedistribute(mcIdType nbOfEntities) const
 {
   //TODO
index 968a9d6aac9efd2f65bf5c41f86171e6782eab92..e012f96095b172594746f5ede32c23430f5a83fc 100644 (file)
@@ -34,12 +34,15 @@ namespace MEDCoupling
    *
    * This class is very specific to the requirement of parallel code computations.
    */
-  class ParaSkyLineArray
+  class ParaSkyLineArray : public RefCountObject
   {
   public:
     ParaSkyLineArray(MEDCouplingSkyLineArray *ska, DataArrayIdType *globalIds);
     MCAuto<ParaSkyLineArray> equiRedistribute(mcIdType nbOfEntities) const;
     virtual ~ParaSkyLineArray() { }
+  protected:
+    std::size_t getHeapMemorySizeWithoutChildren() const override;
+    std::vector<const BigMemoryObject *> getDirectChildrenWithNull() const override;
   private:
     MCAuto<MEDCouplingSkyLineArray> _ska;
     MCAuto<DataArrayIdType> _global_ids;
index 054d680b936fca4f2022b4cbd6cb2f9464b4e60e..4b4ee79bbd216f358d1dafb91c3725c12e0958ad 100644 (file)
@@ -35,6 +35,7 @@
 #include "ICoCoMEDField.hxx"
 #include "ComponentTopology.hxx"
 #include "ParaUMesh.hxx"
+#include "ParaSkyLineArray.hxx"
 
 using namespace INTERP_KERNEL;
 using namespace MEDCoupling;
@@ -58,6 +59,9 @@ using namespace ICoCo;
 %include "ICoCoMEDField.hxx"
 
 %newobject MEDCoupling::ParaUMesh::getCellIdsLyingOnNodes;
+%newobject MEDCoupling::ParaSkyLineArray::equiRedistribute;
+
+%feature("unref") ParaSkyLineArray "$this->decrRef();"
 
 %nodefaultctor;
 
@@ -136,6 +140,20 @@ namespace MEDCoupling
       }
     }
   };
+
+  class ParaSkyLineArray : public RefCountObject
+  {
+  public:
+    ParaSkyLineArray(MEDCouplingSkyLineArray *ska, DataArrayIdType *globalIds);
+    %extend
+    {
+      ParaSkyLineArray *equiRedistribute(mcIdType nbOfEntities) const
+      {
+        MCAuto<ParaSkyLineArray> ret(self->equiRedistribute(nbOfEntities));
+        return ret.retn();
+      }
+    }
+  };
 }
 
 /* This object can be used only if MED_ENABLE_FVM is defined*/