Back to index

salome-med  6.5.0
MEDFileField.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef __MEDFILEFIELD_HXX__
00021 #define __MEDFILEFIELD_HXX__
00022 
00023 #include "MEDLoaderDefines.hxx"
00024 
00025 #include "MEDFileUtilities.hxx"
00026 
00027 #include "MEDCouplingAutoRefCountObjectPtr.hxx"
00028 #include "MEDCouplingRefCountObject.hxx"
00029 #include "MEDCouplingMemArray.hxx"
00030 
00031 #include "NormalizedUnstructuredMesh.hxx"
00032 #include "InterpKernelException.hxx"
00033 
00034 #include <vector>
00035 #include <string>
00036 
00037 #include "med.h"
00038 
00039 namespace ParaMEDMEM
00040 {
00041   class MEDFieldFieldGlobs;
00042   class MEDCouplingMesh;
00043   class MEDCouplingFieldDouble;
00044   class MEDFileMesh;
00046   class MEDFileFieldLoc : public RefCountObject
00047   {
00048   public:
00049     void MEDLOADER_EXPORT simpleRepr(std::ostream& oss) const;
00050     const MEDLOADER_EXPORT std::string& getName() const { return _name; }
00051     void MEDLOADER_EXPORT setName(const char *name);
00052     static MEDFileFieldLoc *New(med_idt fid, const char *locName);
00053     static MEDFileFieldLoc *New(med_idt fid, int id);
00054     static MEDFileFieldLoc *New(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
00055     int MEDLOADER_EXPORT getNbOfGaussPtPerCell() const { return _nb_gauss_pt; }
00056     void MEDLOADER_EXPORT writeLL(med_idt fid) const;
00057     std::string MEDLOADER_EXPORT repr() const;
00058     bool MEDLOADER_EXPORT isName(const char *name) const { return _name==name; }
00059     int MEDLOADER_EXPORT getDimension() const { return _dim; }
00060     int MEDLOADER_EXPORT getNumberOfGaussPoints() const { return _nb_gauss_pt; }
00061     int MEDLOADER_EXPORT getNumberOfPointsInCells() const { return _nb_node_per_cell; }
00062     const MEDLOADER_EXPORT std::vector<double>& getRefCoords() const { return _ref_coo; }
00063     const MEDLOADER_EXPORT std::vector<double>& getGaussCoords() const { return _gs_coo; }
00064     const MEDLOADER_EXPORT std::vector<double>& getGaussWeights() const { return _w; }
00065     bool MEDLOADER_EXPORT isEqual(const MEDFileFieldLoc& other, double eps) const;
00066   private:
00067     MEDFileFieldLoc(med_idt fid, const char *locName);
00068     MEDFileFieldLoc(med_idt fid, int id);
00069     MEDFileFieldLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w);
00070   private:
00071     int _dim;
00072     int _nb_gauss_pt;
00073     int _nb_node_per_cell;
00074     std::string _name;
00075     INTERP_KERNEL::NormalizedCellType _geo_type;
00076     std::vector<double> _ref_coo;
00077     std::vector<double> _gs_coo;
00078     std::vector<double> _w;
00079   };
00080 
00081   class MEDFileFieldPerMeshPerType;
00082   class MEDFileField1TSWithoutDAS;
00083   class MEDFieldFieldGlobsReal;
00084   class MEDFileFieldPerMesh;
00085 
00086   class MEDFileFieldPerMeshPerTypePerDisc : public RefCountObject, public MEDFileWritable
00087   {
00088   public:
00089     static MEDFileFieldPerMeshPerTypePerDisc *NewOnRead(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt) throw(INTERP_KERNEL::Exception);
00090     static MEDFileFieldPerMeshPerTypePerDisc *New(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int locId);
00091     void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00092     void assignFieldProfile(int& start, const char *pflName, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, const MEDCouplingFieldDouble *field, const MEDCouplingMesh *mesh, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00093     void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00094     void getCoarseData(TypeOfField& type, std::pair<int,int>& dad, std::string& pfl, std::string& loc) const throw(INTERP_KERNEL::Exception);
00095     void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
00096     const MEDFileFieldPerMeshPerType *getFather() const;
00097     void prepareLoading(med_idt fid, int profileIt, int& start) throw(INTERP_KERNEL::Exception);
00098     void finishLoading(med_idt fid, int profileIt, int ft) throw(INTERP_KERNEL::Exception);
00099     int getIteration() const;
00100     int getOrder() const;
00101     double getTime() const;
00102     std::string getName() const;
00103     std::string getMeshName() const;
00104     TypeOfField getType() const;
00105     void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
00106     void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const throw(INTERP_KERNEL::Exception);
00107     void setType(TypeOfField newType);
00108     INTERP_KERNEL::NormalizedCellType getGeoType() const;
00109     int getNumberOfComponents() const;
00110     int getNumberOfTuples() const;
00111     DataArrayDouble *getArray();
00112     const DataArrayDouble *getArray() const;
00113     const std::vector<std::string>& getInfo() const;
00114     std::string getProfile() const;
00115     void setProfile(const char *newPflName);
00116     std::string getLocalization() const;
00117     void setLocalization(const char *newLocName);
00118     int getLocId() const { return _loc_id; }
00119     void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00120     void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00121     void getFieldAtLevel(TypeOfField type, const MEDFieldFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs,
00122                          std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
00123     void fillValues(int discId, int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
00124     static int ConvertType(TypeOfField type, int locId) throw(INTERP_KERNEL::Exception);
00125   private:
00126     MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt) throw(INTERP_KERNEL::Exception);
00127     MEDFileFieldPerMeshPerTypePerDisc(MEDFileFieldPerMeshPerType *fath, TypeOfField type, int profileIt, const std::string& dummy);
00128   private:
00129     TypeOfField _type;
00130     MEDFileFieldPerMeshPerType *_father;
00131     int _start;
00132     int _end;
00134     int _nval;
00135     int _profile_it;
00136     std::string _profile;
00137     std::string _localization;
00139     mutable int _loc_id;
00140   };
00141 
00142   class MEDFileFieldPerMeshPerType : public RefCountObject, public MEDFileWritable
00143   {
00144   public:
00145     static MEDFileFieldPerMeshPerType *New(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType) throw(INTERP_KERNEL::Exception);
00146     static MEDFileFieldPerMeshPerType *NewOnRead(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType) throw(INTERP_KERNEL::Exception);
00147     void assignFieldNoProfile(int& start, int offset, int nbOfCells, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00148     void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const DataArrayInt *idsInPfl, DataArrayInt *locIds, const MEDCouplingFieldDouble *field, const MEDCouplingMesh *mesh, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00149     void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00150     void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00151     const MEDFileFieldPerMesh *getFather() const;
00152     void prepareLoading(med_idt fid, int &start) throw(INTERP_KERNEL::Exception);
00153     void finishLoading(med_idt fid, int ft) throw(INTERP_KERNEL::Exception);
00154     void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
00155     void getDimension(int& dim) const;
00156     void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const throw(INTERP_KERNEL::Exception);
00157     void fillFieldSplitedByType(std::vector< std::pair<int,int> >& dads, std::vector<TypeOfField>& types, std::vector<std::string>& pfls, std::vector<std::string>& locs) const throw(INTERP_KERNEL::Exception);
00158     int getIteration() const;
00159     int getOrder() const;
00160     double getTime() const;
00161     std::string getName() const;
00162     std::string getMeshName() const;
00163     void simpleRepr(int bkOffset, std::ostream& oss, int id) const;
00164     void getSizes(int& globalSz, int& nbOfEntries) const;
00165     INTERP_KERNEL::NormalizedCellType getGeoType() const;
00166     int getNumberOfComponents() const;
00167     DataArrayDouble *getArray();
00168     const DataArrayDouble *getArray() const;
00169     const std::vector<std::string>& getInfo() const;
00170     std::vector<std::string> getPflsReallyUsed() const;
00171     std::vector<std::string> getLocsReallyUsed() const;
00172     std::vector<std::string> getPflsReallyUsedMulti() const;
00173     std::vector<std::string> getLocsReallyUsedMulti() const;
00174     void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00175     void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00176     MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId) throw(INTERP_KERNEL::Exception);
00177     const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenLocId(int locId) const throw(INTERP_KERNEL::Exception);
00178     void getFieldAtLevel(int meshDim, TypeOfField type, const MEDFieldFieldGlobsReal *glob, std::vector< std::pair<int,int> >& dads, std::vector<const DataArrayInt *>& pfls, std::vector<int>& locs, std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes) const;
00179     void fillValues(int& startEntryId, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const;
00180     static med_entity_type ConvertIntoMEDFileType(TypeOfField ikType, INTERP_KERNEL::NormalizedCellType ikGeoType, med_geometry_type& medfGeoType);
00181   private:
00182     std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldDouble *field, int offset, int nbOfCells) throw(INTERP_KERNEL::Exception);
00183     std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldDouble *field, int offset, int nbOfCells) throw(INTERP_KERNEL::Exception);
00184     std::vector<int> addNewEntryIfNecessary(const MEDCouplingFieldDouble *field, const DataArrayInt *subCells) throw(INTERP_KERNEL::Exception);
00185     std::vector<int> addNewEntryIfNecessaryGauss(const MEDCouplingFieldDouble *field, const DataArrayInt *subCells) throw(INTERP_KERNEL::Exception);
00186     MEDFileFieldPerMeshPerType(med_idt fid, MEDFileFieldPerMesh *fath, TypeOfField type, INTERP_KERNEL::NormalizedCellType geoType) throw(INTERP_KERNEL::Exception);
00187     MEDFileFieldPerMeshPerType(MEDFileFieldPerMesh *fath, INTERP_KERNEL::NormalizedCellType geoType) throw(INTERP_KERNEL::Exception);
00188   private:
00189     MEDFileFieldPerMesh *_father;
00190     std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldPerMeshPerTypePerDisc> > _field_pm_pt_pd;
00191     INTERP_KERNEL::NormalizedCellType _geo_type;
00192   };
00193 
00194   class MEDFileFieldPerMesh : public RefCountObject, public MEDFileWritable
00195   {
00196   public:
00197     static MEDFileFieldPerMesh *New(MEDFileField1TSWithoutDAS *fath, const MEDCouplingMesh *mesh);
00198     static MEDFileFieldPerMesh *NewOnRead(med_idt fid, MEDFileField1TSWithoutDAS *fath, int meshCsit, int meshIteration, int meshOrder) throw(INTERP_KERNEL::Exception);
00199     void simpleRepr(int bkOffset,std::ostream& oss, int id) const;
00200     void copyTinyInfoFrom(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
00201     void assignFieldProfile(int& start, const DataArrayInt *multiTypePfl, const std::vector<int>& code, const std::vector<DataArrayInt *>& idsInPflPerType, const std::vector<DataArrayInt *>& idsPerType, const MEDCouplingFieldDouble *field, const MEDCouplingMesh *mesh, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00202     void assignFieldProfileGeneral(int& start, const DataArrayInt *multiTypePfl, const std::vector<int>& code, const std::vector<DataArrayInt *>& idsInPflPerType, const std::vector<DataArrayInt *>& idsPerType, const MEDCouplingFieldDouble *field, const MEDCouplingMesh *mesh, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00203     void assignFieldNoProfileNoRenum(int& start, const std::vector<int>& code, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00204     void assignNodeFieldNoProfile(int& start, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00205     void assignNodeFieldProfile(int& start, const DataArrayInt *pfl, const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00206     void prepareLoading(med_idt fid, int &start) throw(INTERP_KERNEL::Exception);
00207     void finishLoading(med_idt fid, int ft) throw(INTERP_KERNEL::Exception);
00208     void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
00209     void fillTypesOfFieldAvailable(std::set<TypeOfField>& types) const throw(INTERP_KERNEL::Exception);
00210     std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
00211     void getDimension(int& dim) const;
00212     double getTime() const;
00213     int getIteration() const;
00214     int getOrder() const;
00215     int getMeshIteration() const { return _mesh_iteration; }
00216     int getMeshOrder() const { return _mesh_order; }
00217     const std::string& getDtUnit() const;
00218     std::string getName() const;
00219     std::string getMeshName() const { return _mesh_name; }
00220     int getNumberOfComponents() const;
00221     DataArrayDouble *getArray();
00222     const DataArrayDouble *getArray() const;
00223     const std::vector<std::string>& getInfo() const;
00224     std::vector<std::string> getPflsReallyUsed() const;
00225     std::vector<std::string> getLocsReallyUsed() const;
00226     std::vector<std::string> getPflsReallyUsedMulti() const;
00227     std::vector<std::string> getLocsReallyUsedMulti() const;
00228     void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00229     void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00230     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDFieldFieldGlobsReal *glob, const MEDCouplingMesh *mesh, bool& isPfl) const throw(INTERP_KERNEL::Exception);
00231     DataArrayDouble *getFieldOnMeshAtLevelWithPfl(TypeOfField type, const MEDCouplingMesh *mesh, DataArrayInt *&pfl, const MEDFieldFieldGlobsReal *glob) const throw(INTERP_KERNEL::Exception);
00232     DataArrayDouble *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
00233     MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId) throw(INTERP_KERNEL::Exception);
00234     const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenTypeAndLocId(INTERP_KERNEL::NormalizedCellType typ, int locId) const throw(INTERP_KERNEL::Exception);
00235   private:
00236     int addNewEntryIfNecessary(INTERP_KERNEL::NormalizedCellType type);
00237     MEDCouplingFieldDouble *finishField(TypeOfField type, const MEDFieldFieldGlobsReal *glob,
00238                                         const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs, const MEDCouplingMesh *mesh, bool& isPfl) const throw(INTERP_KERNEL::Exception);
00239     MEDCouplingFieldDouble *finishField2(TypeOfField type, const MEDFieldFieldGlobsReal *glob,
00240                                          const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
00241                                          const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes,
00242                                          const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl) const throw(INTERP_KERNEL::Exception);
00243     MEDCouplingFieldDouble *finishField3(const MEDFieldFieldGlobsReal *glob,
00244                                          const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs,
00245                                          const MEDCouplingMesh *mesh, const DataArrayInt *da, bool& isPfl) const throw(INTERP_KERNEL::Exception);
00246     DataArrayDouble *finishField4(const std::vector< std::pair<int,int> >& dads, const DataArrayInt *pflIn, int nbOfElems, DataArrayInt *&pflOut) const throw(INTERP_KERNEL::Exception);
00247     static void SortArraysPerType(const MEDFieldFieldGlobsReal *glob, TypeOfField type, 
00248                                   const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<int,int> >& dads, const std::vector<const DataArrayInt *>& pfls, const std::vector<int>& locs,
00249                                   std::vector<int>& code, std::vector<DataArrayInt *>& notNullPfls);
00250     static int ComputeNbOfElems(const MEDFieldFieldGlobsReal *glob, TypeOfField type, const std::vector<INTERP_KERNEL::NormalizedCellType>& geoTypes, const std::vector< std::pair<int,int> >& dads, const std::vector<int>& locs) throw(INTERP_KERNEL::Exception);
00251     MEDFileFieldPerMesh(med_idt fid, MEDFileField1TSWithoutDAS *fath, int meshCsit, int meshIteration, int meshOrder) throw(INTERP_KERNEL::Exception);
00252     MEDFileFieldPerMesh(MEDFileField1TSWithoutDAS *fath, const MEDCouplingMesh *mesh);
00253   private:
00254     std::string _mesh_name;
00255     int _mesh_iteration;
00256     int _mesh_order;
00257     int _mesh_csit;
00258     MEDFileField1TSWithoutDAS *_father;
00259     std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMeshPerType > > _field_pm_pt;
00260   };
00261 
00262   class MEDFieldFieldGlobsReal;
00263 
00264   class MEDFieldFieldGlobs : public RefCountObject
00265   {
00266   public:
00267     static MEDFieldFieldGlobs *New(const char *fname);
00268     static MEDFieldFieldGlobs *New();
00269     void simpleRepr(std::ostream& oss) const;
00270     void appendGlobs(const MEDFieldFieldGlobs& other, double eps) throw(INTERP_KERNEL::Exception);
00271     void loadProfileInFile(med_idt fid, int id, const char *pflName) throw(INTERP_KERNEL::Exception);
00272     void loadProfileInFile(med_idt fid, int id);
00273     void loadGlobals(med_idt fid, const MEDFieldFieldGlobsReal& real) throw(INTERP_KERNEL::Exception);
00274     void loadAllGlobals(med_idt fid) throw(INTERP_KERNEL::Exception);
00275     void writeGlobals(med_idt fid, const MEDFileWritable& opt) const throw(INTERP_KERNEL::Exception);
00276     std::vector<std::string> getPfls() const;
00277     std::vector<std::string> getLocs() const;
00278     bool existsPfl(const char *pflName) const;
00279     bool existsLoc(const char *locName) const;
00280     std::vector< std::vector<int> > whichAreEqualProfiles() const;
00281     std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
00282     void setFileName(const char *fileName);
00283     void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00284     void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00285     int getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception);
00286     int getLocalizationId(const char *loc) const throw(INTERP_KERNEL::Exception);
00287     const char *getFileName() const { return _file_name.c_str(); }
00288     std::string getFileName2() const { return _file_name; }
00289     const MEDFileFieldLoc& getLocalizationFromId(int locId) const throw(INTERP_KERNEL::Exception);
00290     const MEDFileFieldLoc& getLocalization(const char *locName) const throw(INTERP_KERNEL::Exception);
00291     const DataArrayInt *getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception);
00292     const DataArrayInt *getProfile(const char *pflName) const throw(INTERP_KERNEL::Exception);
00293     MEDFileFieldLoc& getLocalizationFromId(int locId) throw(INTERP_KERNEL::Exception);
00294     MEDFileFieldLoc& getLocalization(const char *locName) throw(INTERP_KERNEL::Exception);
00295     DataArrayInt *getProfile(const char *pflName) throw(INTERP_KERNEL::Exception);
00296     DataArrayInt *getProfileFromId(int pflId) throw(INTERP_KERNEL::Exception);
00297     void killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception);
00298     void killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception);
00299     //
00300     void appendProfile(DataArrayInt *pfl) throw(INTERP_KERNEL::Exception);
00301     void appendLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
00302   protected:
00303     MEDFieldFieldGlobs(const char *fname);
00304     MEDFieldFieldGlobs();
00305     ~MEDFieldFieldGlobs();
00306   protected:
00307     std::vector< MEDCouplingAutoRefCountObjectPtr<DataArrayInt> > _pfls;
00308     std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldLoc> > _locs;
00309     std::string _file_name;
00310   };
00311 
00313 
00314   class MEDLOADER_EXPORT MEDFieldFieldGlobsReal
00315   {
00316   public:
00317     MEDFieldFieldGlobsReal(const char *fname);
00318     MEDFieldFieldGlobsReal();
00319     void simpleRepr(std::ostream& oss) const;
00320     void shallowCpyGlobs(const MEDFieldFieldGlobsReal& other);
00321     void appendGlobs(const MEDFieldFieldGlobsReal& other, double eps) throw(INTERP_KERNEL::Exception);
00322     virtual std::vector<std::string> getPflsReallyUsed() const = 0;
00323     virtual std::vector<std::string> getLocsReallyUsed() const = 0;
00324     virtual std::vector<std::string> getPflsReallyUsedMulti() const = 0;
00325     virtual std::vector<std::string> getLocsReallyUsedMulti() const = 0;
00326     virtual void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception) = 0;
00327     virtual void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception) = 0;
00328     virtual ~MEDFieldFieldGlobsReal();
00329     //
00330     void loadProfileInFile(med_idt fid, int id, const char *pflName) throw(INTERP_KERNEL::Exception);
00331     void loadProfileInFile(med_idt fid, int id);
00332     void loadGlobals(med_idt fid) throw(INTERP_KERNEL::Exception);
00333     void loadAllGlobals(med_idt fid) throw(INTERP_KERNEL::Exception);
00334     void writeGlobals(med_idt fid, const MEDFileWritable& opt) const throw(INTERP_KERNEL::Exception);
00335     std::vector<std::string> getPfls() const;
00336     std::vector<std::string> getLocs() const;
00337     bool existsPfl(const char *pflName) const;
00338     bool existsLoc(const char *locName) const;
00339     std::vector< std::vector<int> > whichAreEqualProfiles() const;
00340     std::vector< std::vector<int> > whichAreEqualLocs(double eps) const;
00341     void setFileName(const char *fileName);
00342     void changePflsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00343     void changeLocsNamesInStruct(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00344     void changePflsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00345     void changeLocsNames(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00346     void changePflName(const char *oldName, const char *newName) throw(INTERP_KERNEL::Exception);
00347     void changeLocName(const char *oldName, const char *newName) throw(INTERP_KERNEL::Exception);
00348     std::vector< std::pair<std::vector<std::string>, std::string > > zipPflsNames() throw(INTERP_KERNEL::Exception);
00349     std::vector< std::pair<std::vector<std::string>, std::string > > zipLocsNames(double eps) throw(INTERP_KERNEL::Exception);
00350     int getNbOfGaussPtPerCell(int locId) const throw(INTERP_KERNEL::Exception);
00351     int getLocalizationId(const char *loc) const throw(INTERP_KERNEL::Exception);
00352     const char *getFileName() const;
00353     std::string getFileName2() const;
00354     const MEDFileFieldLoc& getLocalizationFromId(int locId) const throw(INTERP_KERNEL::Exception);
00355     const MEDFileFieldLoc& getLocalization(const char *locName) const throw(INTERP_KERNEL::Exception);
00356     MEDFileFieldLoc& getLocalizationFromId(int locId) throw(INTERP_KERNEL::Exception);
00357     MEDFileFieldLoc& getLocalization(const char *locName) throw(INTERP_KERNEL::Exception);
00358     const DataArrayInt *getProfile(const char *pflName) const throw(INTERP_KERNEL::Exception);
00359     const DataArrayInt *getProfileFromId(int pflId) const throw(INTERP_KERNEL::Exception);
00360     DataArrayInt *getProfile(const char *pflName) throw(INTERP_KERNEL::Exception);
00361     DataArrayInt *getProfileFromId(int pflId) throw(INTERP_KERNEL::Exception);
00362     void killProfileIds(const std::vector<int>& pflIds) throw(INTERP_KERNEL::Exception);
00363     void killLocalizationIds(const std::vector<int>& locIds) throw(INTERP_KERNEL::Exception);
00364     //
00365     void appendProfile(DataArrayInt *pfl) throw(INTERP_KERNEL::Exception);
00366     void appendLoc(const char *locName, INTERP_KERNEL::NormalizedCellType geoType, const std::vector<double>& refCoo, const std::vector<double>& gsCoo, const std::vector<double>& w) throw(INTERP_KERNEL::Exception);
00367   protected:
00368     MEDCouplingAutoRefCountObjectPtr< MEDFieldFieldGlobs > _globals;
00369   };
00370 
00374   class MEDLOADER_EXPORT MEDFileField1TSWithoutDAS : public RefCountObject, public MEDFileWritable
00375   {
00376   public:
00377     int copyTinyInfoFrom(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
00378     int getDimension() const;
00379     int getIteration() const { return _iteration; }
00380     int getOrder() const { return _order; }
00381     double getTime(int& iteration, int& order) const { iteration=_iteration; order=_order; return _dt; }
00382     void setTime(double val, int iteration, int order) { _dt=val; _iteration=iteration; _order=order; }
00383     std::string getName() const;
00384     void simpleRepr(int bkOffset, std::ostream& oss, int f1tsId) const;
00385     const std::string& getDtUnit() const { return _dt_unit; }
00386     std::string getMeshName() const throw(INTERP_KERNEL::Exception);
00387     int getMeshIteration() const throw(INTERP_KERNEL::Exception);
00388     int getMeshOrder() const throw(INTERP_KERNEL::Exception);
00389     int getNumberOfComponents() const;
00390     void simpleReprWithoutHeader(std::ostream& oss) const;
00391     bool isDealingTS(int iteration, int order) const;
00392     std::pair<int,int> getDtIt() const;
00393     void fillIteration(std::pair<int,int>& p) const;
00394     void fillTypesOfFieldAvailable(std::vector<TypeOfField>& types) const throw(INTERP_KERNEL::Exception);
00395     const std::vector<std::string>& getInfo() const;
00396     std::vector<std::string>& getInfo();
00397     //
00398     static MEDFileField1TSWithoutDAS *New(const char *fieldName, int csit, int fieldtype, int iteration, int order, const std::vector<std::string>& infos);
00399     void finishLoading(med_idt fid) throw(INTERP_KERNEL::Exception);
00400     virtual void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
00401     std::vector<std::string> getPflsReallyUsed2() const;
00402     std::vector<std::string> getLocsReallyUsed2() const;
00403     std::vector<std::string> getPflsReallyUsedMulti2() const;
00404     std::vector<std::string> getLocsReallyUsedMulti2() const;
00405     void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00406     void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00407     static void CheckMeshDimRel(int meshDimRelToMax) throw(INTERP_KERNEL::Exception);
00408     static std::vector<int> CheckSBTMesh(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
00409     //
00410     void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00411     void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile, MEDFieldFieldGlobsReal& glob) throw(INTERP_KERNEL::Exception);
00412   public:
00413     int getNonEmptyLevels(const char *mname, std::vector<int>& levs) const throw(INTERP_KERNEL::Exception);
00414     std::vector<TypeOfField> getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception);
00415     std::vector< std::vector<std::pair<int,int> > > getFieldSplitedByType(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
00416     std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
00417     MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, const char *mName, int renumPol, const MEDFieldFieldGlobsReal *glob) const throw(INTERP_KERNEL::Exception);
00418     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol, const MEDFieldFieldGlobsReal *glob, const MEDFileMesh *mesh) const throw(INTERP_KERNEL::Exception);
00419     MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, const char *mName, int renumPol, const MEDFieldFieldGlobsReal *glob) const throw(INTERP_KERNEL::Exception);
00420     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int renumPol, const MEDFieldFieldGlobsReal *glob, const MEDCouplingMesh *mesh, const DataArrayInt *cellRenum, const DataArrayInt *nodeRenum) const throw(INTERP_KERNEL::Exception);
00421     DataArrayDouble *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl, const MEDFieldFieldGlobsReal *glob) const throw(INTERP_KERNEL::Exception);
00422     DataArrayDouble *getUndergroundDataArray() const throw(INTERP_KERNEL::Exception);
00423     DataArrayDouble *getUndergroundDataArrayExt(std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
00424   protected:
00425     int addNewEntryIfNecessary(const MEDCouplingMesh *mesh) throw(INTERP_KERNEL::Exception);
00426     int getMeshIdFromMeshName(const char *mName) const throw(INTERP_KERNEL::Exception);
00427     MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) throw(INTERP_KERNEL::Exception);
00428     const MEDFileFieldPerMeshPerTypePerDisc *getLeafGivenMeshAndTypeAndLocId(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId) const throw(INTERP_KERNEL::Exception);
00429     MEDFileField1TSWithoutDAS(const char *fieldName, int csit, int fieldtype, int iteration, int order, const std::vector<std::string>& infos);
00430   public:
00431     MEDFileField1TSWithoutDAS();
00432     DataArrayDouble *getOrCreateAndGetArray();
00433     const DataArrayDouble *getOrCreateAndGetArray() const;
00434   protected:
00435     std::string _dt_unit;
00436     MEDCouplingAutoRefCountObjectPtr< DataArrayDouble > _arr;
00437     std::vector< MEDCouplingAutoRefCountObjectPtr< MEDFileFieldPerMesh > > _field_per_mesh;
00439     mutable int _csit;
00441     mutable int _field_type;
00442     int _iteration;
00443     int _order;
00444     double _dt;
00445   };
00446 
00450   class MEDLOADER_EXPORT MEDFileField1TS : public MEDFileField1TSWithoutDAS, public MEDFieldFieldGlobsReal
00451   {
00452   public:
00453     static MEDFileField1TS *New(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
00454     static MEDFileField1TS *New();
00455     std::string simpleRepr() const;
00456     void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
00457     MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00458     MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00459     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00460     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00461     MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const char *mname, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00462     DataArrayDouble *getFieldWithProfile(TypeOfField type, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const throw(INTERP_KERNEL::Exception);
00463     //
00464     void setFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
00465     void setFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
00466   public:
00468     void setProfileNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newPflName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception);
00470     void setLocNameOnLeaf(const char *mName, INTERP_KERNEL::NormalizedCellType typ, int locId, const char *newLocName, bool forceRenameOnGlob=false) throw(INTERP_KERNEL::Exception);
00471   private:
00472     void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
00473     std::vector<std::string> getPflsReallyUsed() const;
00474     std::vector<std::string> getLocsReallyUsed() const;
00475     std::vector<std::string> getPflsReallyUsedMulti() const;
00476     std::vector<std::string> getLocsReallyUsedMulti() const;
00477     void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00478     void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00479     MEDFileField1TS(const char *fileName, const char *fieldName, int iteration, int order) throw(INTERP_KERNEL::Exception);
00480     MEDFileField1TS();
00481   };
00482   
00483   class MEDLOADER_EXPORT MEDFileFieldMultiTSWithoutDAS : public RefCountObject, public MEDFileWritable
00484   {
00485   public:
00486     static MEDFileFieldMultiTSWithoutDAS *New(med_idt fid, const char *fieldName, int id, int ft, const std::vector<std::string>& infos, int nbOfStep) throw(INTERP_KERNEL::Exception);
00487     int getNumberOfTS() const;
00488     std::vector< std::pair<int,int> > getIterations() const;
00489     int getNonEmptyLevels(int iteration, int order, const char *mname, std::vector<int>& levs) const throw(INTERP_KERNEL::Exception);
00490     std::vector< std::vector<TypeOfField> > getTypesOfFieldAvailable() const throw(INTERP_KERNEL::Exception);
00491     std::vector< std::vector< std::pair<int,int> > > getFieldSplitedByType(int iteration, int order, const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
00492     std::vector< std::vector<DataArrayDouble *> > getFieldSplitedByType2(int iteration, int order, const char *mname, std::vector<INTERP_KERNEL::NormalizedCellType>& types, std::vector< std::vector<TypeOfField> >& typesF, std::vector< std::vector<std::string> >& pfls, std::vector< std::vector<std::string> >& locs) const throw(INTERP_KERNEL::Exception);
00493     virtual void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
00494     std::string getName() const;
00495     void simpleRepr(int bkOffset, std::ostream& oss, int fmtsId) const;
00496     std::vector< std::pair<int,int> > getTimeSteps(std::vector<double>& ret1) const throw(INTERP_KERNEL::Exception);
00497     std::string getMeshName() const throw(INTERP_KERNEL::Exception);
00498     const std::vector<std::string>& getInfo() const throw(INTERP_KERNEL::Exception);
00499     DataArrayDouble *getUndergroundDataArray(int iteration, int order) const throw(INTERP_KERNEL::Exception);
00500     DataArrayDouble *getUndergroundDataArrayExt(int iteration, int order, std::vector< std::pair<std::pair<INTERP_KERNEL::NormalizedCellType,int>,std::pair<int,int> > >& entries) const throw(INTERP_KERNEL::Exception);
00501   public:
00502     std::vector<std::string> getPflsReallyUsed2() const;
00503     std::vector<std::string> getLocsReallyUsed2() const;
00504     std::vector<std::string> getPflsReallyUsedMulti2() const;
00505     std::vector<std::string> getLocsReallyUsedMulti2() const;
00506     void changePflsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00507     void changeLocsRefsNamesGen2(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00508   protected:
00509     const MEDFileField1TSWithoutDAS& getTimeStepEntry(int iteration, int order) const throw(INTERP_KERNEL::Exception);
00510     MEDFileField1TSWithoutDAS& getTimeStepEntry(int iteration, int order) throw(INTERP_KERNEL::Exception);
00511     std::string getDtUnit() const throw(INTERP_KERNEL::Exception);
00512     MEDFileFieldMultiTSWithoutDAS();
00513     MEDFileFieldMultiTSWithoutDAS(const char *fieldName);
00514     MEDFileFieldMultiTSWithoutDAS(med_idt fid, const char *fieldName, int id, int ft, const std::vector<std::string>& infos, int nbOfStep) throw(INTERP_KERNEL::Exception);
00515     void finishLoading(med_idt fid, int nbPdt) throw(INTERP_KERNEL::Exception);
00516     void copyTinyInfoFrom(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
00517     void checkCoherencyOfTinyInfo(const MEDCouplingFieldDouble *field) const throw(INTERP_KERNEL::Exception);
00518   protected:
00519     std::string _name;
00520     std::vector<std::string> _infos;
00522     mutable int _field_type;
00523     std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileField1TSWithoutDAS>  > _time_steps;
00524   };
00525 
00529   class MEDLOADER_EXPORT MEDFileFieldMultiTS : public MEDFileFieldMultiTSWithoutDAS, public MEDFieldFieldGlobsReal
00530   {
00531   public:
00532     static MEDFileFieldMultiTS *New();
00533     static MEDFileFieldMultiTS *New(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception);
00534     static MEDFileFieldMultiTS *New(const MEDFileFieldMultiTSWithoutDAS& other);
00535     std::string simpleRepr() const;
00536     void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
00537     void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
00538     MEDCouplingFieldDouble *getFieldAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00539     MEDCouplingFieldDouble *getFieldAtTopLevel(TypeOfField type, int iteration, int order, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00540     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00541     MEDCouplingFieldDouble *getFieldOnMeshAtLevel(TypeOfField type, int iteration, int order, const MEDCouplingMesh *mesh, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00542     MEDCouplingFieldDouble *getFieldAtLevelOld(TypeOfField type, const char *mname, int iteration, int order, int meshDimRelToMax, int renumPol=0) const throw(INTERP_KERNEL::Exception);
00543     DataArrayDouble *getFieldWithProfile(TypeOfField type, int iteration, int order, int meshDimRelToMax, const MEDFileMesh *mesh, DataArrayInt *&pfl) const throw(INTERP_KERNEL::Exception);
00544     //
00545     void appendFieldNoProfileSBT(const MEDCouplingFieldDouble *field) throw(INTERP_KERNEL::Exception);
00546     void appendFieldProfile(const MEDCouplingFieldDouble *field, const MEDFileMesh *mesh, int meshDimRelToMax, const DataArrayInt *profile) throw(INTERP_KERNEL::Exception);
00547   private:
00548     std::vector<std::string> getPflsReallyUsed() const;
00549     std::vector<std::string> getLocsReallyUsed() const;
00550     std::vector<std::string> getPflsReallyUsedMulti() const;
00551     std::vector<std::string> getLocsReallyUsedMulti() const;
00552     void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00553     void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00554   private:
00555     MEDFileFieldMultiTS();
00556     MEDFileFieldMultiTS(const MEDFileFieldMultiTSWithoutDAS& other);
00557     MEDFileFieldMultiTS(const char *fileName, const char *fieldName) throw(INTERP_KERNEL::Exception);
00558   };
00559 
00563   class MEDLOADER_EXPORT MEDFileFields : public RefCountObject, public MEDFieldFieldGlobsReal, public MEDFileWritable
00564   {
00565   public:
00566     static MEDFileFields *New();
00567     static MEDFileFields *New(const char *fileName) throw(INTERP_KERNEL::Exception);
00568     void write(const char *fileName, int mode) const throw(INTERP_KERNEL::Exception);
00569     void writeLL(med_idt fid) const throw(INTERP_KERNEL::Exception);
00570     int getNumberOfFields() const;
00571     std::vector<std::string> getFieldsNames() const throw(INTERP_KERNEL::Exception);
00572     std::string simpleRepr() const;
00573     void simpleRepr(int bkOffset, std::ostream& oss) const;
00574     //
00575     void resize(int newSize) throw(INTERP_KERNEL::Exception);
00576     void pushField(MEDFileFieldMultiTS *field) throw(INTERP_KERNEL::Exception);
00577     void setFieldAtPos(int i, MEDFileFieldMultiTS *field) throw(INTERP_KERNEL::Exception);
00578     MEDFileFieldMultiTS *getFieldAtPos(int i) const throw(INTERP_KERNEL::Exception);
00579     MEDFileFieldMultiTS *getFieldWithName(const char *fieldName) const throw(INTERP_KERNEL::Exception);
00580     void destroyFieldAtPos(int i) throw(INTERP_KERNEL::Exception);
00581   private:
00582     int getPosFromFieldName(const char *fieldName) const throw(INTERP_KERNEL::Exception);
00583     std::vector<std::string> getPflsReallyUsed() const;
00584     std::vector<std::string> getLocsReallyUsed() const;
00585     std::vector<std::string> getPflsReallyUsedMulti() const;
00586     std::vector<std::string> getLocsReallyUsedMulti() const;
00587     void changePflsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00588     void changeLocsRefsNamesGen(const std::vector< std::pair<std::vector<std::string>, std::string > >& mapOfModif) throw(INTERP_KERNEL::Exception);
00589   private:
00590     MEDFileFields();
00591     MEDFileFields(const char *fileName) throw(INTERP_KERNEL::Exception);
00592   private:
00593     std::vector< MEDCouplingAutoRefCountObjectPtr<MEDFileFieldMultiTSWithoutDAS> > _fields;
00594   };
00595 }
00596 
00597 #endif