X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingAMRAttribute.hxx;h=e8565077c281ccc23970777c36e3da70fd29f328;hb=b7e277ad50223814bc479c5bd64cf12abe8fc959;hp=3a8b7d32fd9273e9df54af38d0689edac873032a;hpb=8538c34eedffc9e9ed9e856a2a5f8fe62cc9e473;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingAMRAttribute.hxx b/src/MEDCoupling/MEDCouplingAMRAttribute.hxx index 3a8b7d32f..e8565077c 100644 --- a/src/MEDCoupling/MEDCouplingAMRAttribute.hxx +++ b/src/MEDCoupling/MEDCouplingAMRAttribute.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 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,14 +25,14 @@ #include "MEDCouplingNatureOfFieldEnum" #include "MEDCouplingCartesianAMRMesh.hxx" -namespace ParaMEDMEM +namespace MEDCoupling { /// @cond INTERNAL class DataArrayDoubleCollection : public RefCountObject, public TimeLabel { public: static DataArrayDoubleCollection *New(const std::vector< std::pair >& fieldNames); - DataArrayDoubleCollection *deepCpy() const; + DataArrayDoubleCollection *deepCopy() const; void allocTuples(int nbOfTuples); void dellocTuples(); void copyFrom(const DataArrayDoubleCollection& other); @@ -42,6 +42,7 @@ namespace ParaMEDMEM std::vector getNatures() const; std::vector retrieveFields() const; const DataArrayDouble *getFieldWithName(const std::string& name) const; + DataArrayDouble *getFieldWithName(const std::string& name); DataArrayDouble *at(int pos); const DataArrayDouble *at(int pos) const; int size() const; @@ -56,21 +57,21 @@ namespace ParaMEDMEM DataArrayDoubleCollection(const std::vector< std::pair >& fieldNames); DataArrayDoubleCollection(const DataArrayDoubleCollection& other); std::size_t getHeapMemorySizeWithoutChildren() const; - std::vector getDirectChildren() const; + std::vector getDirectChildrenWithNull() const; void updateTime() const; static void CheckDiscriminantNames(const std::vector& names); static bool IsConservativeNature(NatureOfField n); static void CheckSameNatures(NatureOfField n1, NatureOfField n2); static void CheckValidNature(NatureOfField n); private: - std::vector< std::pair< MEDCouplingAutoRefCountObjectPtr, NatureOfField > > _arrs; + std::vector< std::pair< MCAuto, NatureOfField > > _arrs; }; class MEDCouplingGridCollection : public RefCountObject, public TimeLabel { public: static MEDCouplingGridCollection *New(const std::vector& ms, const std::vector< std::pair >& fieldNames); - MEDCouplingGridCollection *deepCpy(const MEDCouplingCartesianAMRMeshGen *newGf, const MEDCouplingCartesianAMRMeshGen *oldGf) const; + MEDCouplingGridCollection *deepCopy(const MEDCouplingCartesianAMRMeshGen *newGf, const MEDCouplingCartesianAMRMeshGen *oldGf) const; void alloc(int ghostLev); void dealloc(); void spillInfoOnComponents(const std::vector< std::vector >& compNames); @@ -92,10 +93,10 @@ namespace ParaMEDMEM MEDCouplingGridCollection(const std::vector& ms, const std::vector< std::pair >& fieldNames); MEDCouplingGridCollection(const MEDCouplingGridCollection& other, const MEDCouplingCartesianAMRMeshGen *newGf, const MEDCouplingCartesianAMRMeshGen *oldGf); std::size_t getHeapMemorySizeWithoutChildren() const; - std::vector getDirectChildren() const; + std::vector getDirectChildrenWithNull() const; void updateTime() const; private: - std::vector< std::pair > > _map_of_dadc; + std::vector< std::pair > > _map_of_dadc; }; /// @endcond @@ -123,7 +124,7 @@ namespace ParaMEDMEM virtual bool changeGodFather(MEDCouplingCartesianAMRMesh *gf); MEDCouplingDataForGodFather(const MEDCouplingDataForGodFather& other, bool deepCpyGF); protected: - MEDCouplingAutoRefCountObjectPtr _gf; + MCAuto _gf; TimeLabelConstOverseer _tlc; }; @@ -134,14 +135,16 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair > >& fieldNames, int ghostLev); MEDCOUPLING_EXPORT void spillInfoOnComponents(const std::vector< std::vector >& compNames); MEDCOUPLING_EXPORT void spillNatures(const std::vector& nfs); - MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *deepCpy() const; + MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *deepCopy() const; MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *deepCpyWithoutGodFather() const; MEDCOUPLING_EXPORT int getNumberOfLevels() const; MEDCOUPLING_EXPORT std::vector retrieveFieldsOn(MEDCouplingCartesianAMRMeshGen *mesh) const; MEDCOUPLING_EXPORT const DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const; + MEDCOUPLING_EXPORT DataArrayDouble *getFieldOn(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName); MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnRecurseWithoutOverlapWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const; MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnWithGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const; MEDCOUPLING_EXPORT MEDCouplingFieldDouble *buildCellFieldOnWithoutGhost(MEDCouplingCartesianAMRMeshGen *mesh, const std::string& fieldName) const; + MEDCOUPLING_EXPORT std::string writeVTHB(const std::string& fileName) const; // MEDCOUPLING_EXPORT MEDCouplingAMRAttribute *projectTo(MEDCouplingCartesianAMRMesh *targetGF) const; // @@ -159,7 +162,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT bool changeGodFather(MEDCouplingCartesianAMRMesh *gf); // MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; - MEDCOUPLING_EXPORT std::vector getDirectChildren() const; + MEDCOUPLING_EXPORT std::vector getDirectChildrenWithNull() const; MEDCOUPLING_EXPORT void updateTime() const; private: MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair >& fieldNames, int ghostLev); @@ -169,7 +172,7 @@ namespace ParaMEDMEM void synchronizeCoarseToFineByOneLevel(int level); private: int _ghost_lev; - std::vector< MEDCouplingAutoRefCountObjectPtr > _levs; + std::vector< MCAuto > _levs; std::vector< std::vector< std::pair > > _neighbors; std::vector< std::pair > _mixed_lev_neighbors; std::vector< std::vector< std::pair > > _cross_lev_neighbors;