1 // Copyright (C) 2007-2014 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay
21 #ifndef __MEDCOUPLINGAMRATTRIBUTE_HXX__
22 #define __MEDCOUPLINGAMRATTRIBUTE_HXX__
24 #include "MEDCoupling.hxx"
25 #include "MEDCouplingCartesianAMRMesh.hxx"
30 class DataArrayDoubleCollection : public RefCountObject
33 static DataArrayDoubleCollection *New(const std::vector< std::pair<std::string,int> >& fieldNames);
34 void allocTuples(int nbOfTuples);
37 DataArrayDoubleCollection(const std::vector< std::pair<std::string,int> >& fieldNames);
38 std::size_t getHeapMemorySizeWithoutChildren() const;
39 std::vector<const BigMemoryObject *> getDirectChildren() const;
40 static void CheckDiscriminantNames(const std::vector<std::string>& names);
42 std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> > _arrs;
45 class MEDCouplingGridCollection : public RefCountObject
48 std::size_t getHeapMemorySizeWithoutChildren() const;
49 std::vector<const BigMemoryObject *> getDirectChildren() const;
51 std::vector< std::pair<MEDCouplingCartesianAMRMeshGen *,MEDCouplingAutoRefCountObjectPtr<DataArrayDoubleCollection> > > _map_of_dadc;
55 class MEDCouplingAMRAttribute : public MEDCouplingDataForGodFather, public TimeLabel
58 MEDCOUPLING_EXPORT static MEDCouplingAMRAttribute *New(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames);
60 MEDCOUPLING_EXPORT void alloc();
61 MEDCOUPLING_EXPORT void dealloc();
62 MEDCOUPLING_EXPORT bool changeGodFather(MEDCouplingCartesianAMRMesh *gf);
64 MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const;
65 MEDCOUPLING_EXPORT std::vector<const BigMemoryObject *> getDirectChildren() const;
66 MEDCOUPLING_EXPORT void updateTime() const;
68 MEDCouplingAMRAttribute(MEDCouplingCartesianAMRMesh *gf, const std::vector< std::pair<std::string,int> >& fieldNames);
70 std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingGridCollection> > _levs;