Back to index

salome-med  6.5.0
MEDCouplingMultiFields.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 __PARAMEDMEM_MEDCOUPLINGMULTIFIELDS_HXX__
00021 #define __PARAMEDMEM_MEDCOUPLINGMULTIFIELDS_HXX__
00022 
00023 #include "MEDCouplingRefCountObject.hxx"
00024 #include "MEDCouplingTimeLabel.hxx"
00025 #include "MEDCouplingAutoRefCountObjectPtr.hxx"
00026 
00027 #include "InterpKernelException.hxx"
00028 
00029 #include <vector>
00030 
00031 namespace ParaMEDMEM
00032 {
00033   class MEDCouplingMesh;
00034   class DataArrayDouble;
00035   class MEDCouplingFieldDouble;
00036   class MEDCouplingFieldTemplate;
00037 
00038   class MEDCOUPLING_EXPORT MEDCouplingMultiFields : public RefCountObject, public TimeLabel
00039   {
00040   public:
00041     static MEDCouplingMultiFields *New(const std::vector<MEDCouplingFieldDouble *>& fs) throw(INTERP_KERNEL::Exception);
00042     static MEDCouplingMultiFields *New();
00043     MEDCouplingMultiFields *deepCpy() const;
00044     std::string getName() const;
00045     std::string getDescription() const;
00046     std::string getTimeUnit() const;
00047     double getTimeResolution() const throw(INTERP_KERNEL::Exception);
00048     virtual std::string simpleRepr() const;
00049     virtual std::string advancedRepr() const;
00050     virtual bool isEqual(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
00051     virtual bool isEqualWithoutConsideringStr(const MEDCouplingMultiFields *other, double meshPrec, double valsPrec) const;
00052     const MEDCouplingFieldDouble *getFieldWithId(int id) const throw(INTERP_KERNEL::Exception);
00053     std::vector<const MEDCouplingFieldDouble *> getFields() const;
00054     int getNumberOfFields() const;
00055     const MEDCouplingFieldDouble *getFieldAtPos(int id) const throw(INTERP_KERNEL::Exception);
00056     virtual std::vector<MEDCouplingMesh *> getMeshes() const throw(INTERP_KERNEL::Exception);
00057     virtual std::vector<MEDCouplingMesh *> getDifferentMeshes(std::vector<int>& refs) const throw(INTERP_KERNEL::Exception);
00058     virtual std::vector<DataArrayDouble *> getArrays() const throw(INTERP_KERNEL::Exception);
00059     virtual std::vector<DataArrayDouble *> getDifferentArrays(std::vector< std::vector<int> >& refs) const throw(INTERP_KERNEL::Exception);
00060     void updateTime() const;
00061     void getTinySerializationInformation(std::vector<int>& tinyInfo, std::vector<double>& tinyInfo2, int& nbOfDiffMeshes, int& nbOfDiffArr) const;
00062     void finishUnserialization(const std::vector<int>& tinyInfoI, const std::vector<double>& tinyInfoD,
00063                                const std::vector<MEDCouplingFieldTemplate *>& ft, const std::vector<MEDCouplingMesh *>& ms,
00064                                const std::vector<DataArrayDouble *>& das);
00065     virtual void checkCoherency() const throw(INTERP_KERNEL::Exception);
00066   protected:
00067     MEDCouplingMultiFields(const std::vector<MEDCouplingFieldDouble *>& fs) throw(INTERP_KERNEL::Exception);
00068     MEDCouplingMultiFields(const MEDCouplingMultiFields& other);
00069     MEDCouplingMultiFields();
00070   protected:
00071     std::vector< MEDCouplingAutoRefCountObjectPtr<MEDCouplingFieldDouble> > _fs;
00072   };
00073 }
00074 
00075 #endif
00076