From: Anthony Geay Date: Fri, 17 Apr 2020 22:17:42 +0000 (+0200) Subject: WIP X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e0c8c29d446c5e282192260587442e53122831ee;p=tools%2Fmedcoupling.git WIP --- diff --git a/src/ParaMEDMEM/ParaSkyLineArray.cxx b/src/ParaMEDMEM/ParaSkyLineArray.cxx index 9b39c082d..5672037f0 100644 --- a/src/ParaMEDMEM/ParaSkyLineArray.cxx +++ b/src/ParaMEDMEM/ParaSkyLineArray.cxx @@ -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 ParaSkyLineArray::getDirectChildrenWithNull() const +{ + return {_ska,_global_ids}; +} + MCAuto ParaSkyLineArray::equiRedistribute(mcIdType nbOfEntities) const { //TODO diff --git a/src/ParaMEDMEM/ParaSkyLineArray.hxx b/src/ParaMEDMEM/ParaSkyLineArray.hxx index 968a9d6aa..e012f9609 100644 --- a/src/ParaMEDMEM/ParaSkyLineArray.hxx +++ b/src/ParaMEDMEM/ParaSkyLineArray.hxx @@ -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 equiRedistribute(mcIdType nbOfEntities) const; virtual ~ParaSkyLineArray() { } + protected: + std::size_t getHeapMemorySizeWithoutChildren() const override; + std::vector getDirectChildrenWithNull() const override; private: MCAuto _ska; MCAuto _global_ids; diff --git a/src/ParaMEDMEM_Swig/ParaMEDMEMCommon.i b/src/ParaMEDMEM_Swig/ParaMEDMEMCommon.i index 054d680b9..4b4ee79bb 100644 --- a/src/ParaMEDMEM_Swig/ParaMEDMEMCommon.i +++ b/src/ParaMEDMEM_Swig/ParaMEDMEMCommon.i @@ -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 ret(self->equiRedistribute(nbOfEntities)); + return ret.retn(); + } + } + }; } /* This object can be used only if MED_ENABLE_FVM is defined*/