Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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 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