X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingDefinitionTime.hxx;h=d1bff789f9f8d418df972aa8a245cab977696319;hb=90b7c9c73054965b8085ab0ecd2646a3d59f475a;hp=24ea804fe4d4b641b4df6af49bcb2202f40e44b6;hpb=5c5eac0685cacee529bf388d4369f3535c3803f9;p=tools%2Fmedcoupling.git diff --git a/src/MEDCoupling/MEDCouplingDefinitionTime.hxx b/src/MEDCoupling/MEDCouplingDefinitionTime.hxx index 24ea804fe..d1bff789f 100644 --- a/src/MEDCoupling/MEDCouplingDefinitionTime.hxx +++ b/src/MEDCoupling/MEDCouplingDefinitionTime.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D +// Copyright (C) 2007-2020 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 // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,27 +22,27 @@ #define __PARAMEDMEM_MEDCOUPLINGDEFINITIONTIME_HXX__ #include "MEDCouplingRefCountObject.hxx" -#include "MEDCouplingAutoRefCountObjectPtr.hxx" +#include "MCAuto.hxx" #include "InterpKernelException.hxx" #include #include -namespace ParaMEDMEM +namespace MEDCoupling { class MEDCouplingFieldDouble; class MEDCouplingDefinitionTimeSlice : public RefCountObject { public: - MEDCOUPLING_EXPORT static MEDCouplingDefinitionTimeSlice *New(const MEDCouplingFieldDouble *f, int meshId, const std::vector& arrId, int fieldId) throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT static MEDCouplingDefinitionTimeSlice *New(TypeOfTimeDiscretization type, const std::vector& tiI, const std::vector& tiD) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT static MEDCouplingDefinitionTimeSlice *New(const MEDCouplingFieldDouble *f, int meshId, const std::vector& arrId, int fieldId); + MEDCOUPLING_EXPORT static MEDCouplingDefinitionTimeSlice *New(TypeOfTimeDiscretization type, const std::vector& tiI, const std::vector& tiD); MEDCOUPLING_EXPORT int getArrayId() const { return _array_id; } MEDCOUPLING_EXPORT virtual MEDCouplingDefinitionTimeSlice *copy() const = 0; MEDCOUPLING_EXPORT virtual bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const; MEDCOUPLING_EXPORT virtual void getHotSpotsTime(std::vector& ret) const = 0; - MEDCOUPLING_EXPORT virtual void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const throw(INTERP_KERNEL::Exception) = 0; + MEDCOUPLING_EXPORT virtual void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const = 0; MEDCOUPLING_EXPORT virtual bool isContaining(double tmp, double eps) const = 0; MEDCOUPLING_EXPORT virtual int getStartId() const; MEDCOUPLING_EXPORT virtual int getEndId() const; @@ -52,14 +52,14 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT virtual void getTinySerializationInformation(std::vector& tiI, std::vector& tiD) const = 0; MEDCOUPLING_EXPORT virtual TypeOfTimeDiscretization getTimeType() const = 0; MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; - MEDCOUPLING_EXPORT std::vector getDirectChildren() const; + MEDCOUPLING_EXPORT std::vector getDirectChildrenWithNull() const; MEDCOUPLING_EXPORT bool isFullyIncludedInMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const; MEDCOUPLING_EXPORT bool isOverllapingWithMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const; MEDCOUPLING_EXPORT bool isAfterMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const; MEDCOUPLING_EXPORT bool isBeforeMe(const MEDCouplingDefinitionTimeSlice *other, double eps) const; protected: MEDCOUPLING_EXPORT MEDCouplingDefinitionTimeSlice() { } - MEDCOUPLING_EXPORT MEDCouplingDefinitionTimeSlice(const MEDCouplingFieldDouble *f, int meshId, int arrId, int fieldId) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT MEDCouplingDefinitionTimeSlice(const MEDCouplingFieldDouble *f, int meshId, int arrId, int fieldId); protected: int _mesh_id; int _array_id; @@ -70,10 +70,11 @@ namespace ParaMEDMEM { public: static MEDCouplingDefinitionTimeSliceInst *New(const std::vector& tiI, const std::vector& tiD); + MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceInst"); } MEDCouplingDefinitionTimeSlice *copy() const; bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const; void getHotSpotsTime(std::vector& ret) const; - void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const throw(INTERP_KERNEL::Exception); + void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const; bool isContaining(double tmp, double eps) const; void appendRepr(std::ostream& stream) const; double getStartTime() const; @@ -82,7 +83,7 @@ namespace ParaMEDMEM void unserialize(const std::vector& tiI, const std::vector& tiD); TypeOfTimeDiscretization getTimeType() const; public: - MEDCouplingDefinitionTimeSliceInst(const MEDCouplingFieldDouble *f, int meshId, int arrId, int fieldId) throw(INTERP_KERNEL::Exception); + MEDCouplingDefinitionTimeSliceInst(const MEDCouplingFieldDouble *f, int meshId, int arrId, int fieldId); protected: MEDCouplingDefinitionTimeSliceInst() { } protected: @@ -93,10 +94,11 @@ namespace ParaMEDMEM { public: static MEDCouplingDefinitionTimeSliceCstOnTI *New(const std::vector& tiI, const std::vector& tiD); + MEDCOUPLING_EXPORT std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceCstOnTI"); } MEDCouplingDefinitionTimeSlice *copy() const; bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const; void getHotSpotsTime(std::vector& ret) const; - void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const throw(INTERP_KERNEL::Exception); + void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const; bool isContaining(double tmp, double eps) const; void appendRepr(std::ostream& stream) const; double getStartTime() const; @@ -105,22 +107,23 @@ namespace ParaMEDMEM void unserialize(const std::vector& tiI, const std::vector& tiD); TypeOfTimeDiscretization getTimeType() const; public: - MEDCouplingDefinitionTimeSliceCstOnTI(const MEDCouplingFieldDouble *f, int meshId, int arrId, int fieldId) throw(INTERP_KERNEL::Exception); + MEDCouplingDefinitionTimeSliceCstOnTI(const MEDCouplingFieldDouble *f, int meshId, int arrId, int fieldId); protected: MEDCouplingDefinitionTimeSliceCstOnTI() { } protected: double _start; double _end; }; - + class MEDCouplingDefinitionTimeSliceLT : public MEDCouplingDefinitionTimeSlice { public: static MEDCouplingDefinitionTimeSliceLT *New(const std::vector& tiI, const std::vector& tiD); + std::string getClassName() const override { return std::string("MEDCouplingDefinitionTimeSliceLT"); } MEDCouplingDefinitionTimeSlice *copy() const; bool isEqual(const MEDCouplingDefinitionTimeSlice& other, double eps) const; void getHotSpotsTime(std::vector& ret) const; - void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const throw(INTERP_KERNEL::Exception); + void getIdsOnTime(double tm, double eps, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const; bool isContaining(double tmp, double eps) const; void appendRepr(std::ostream& stream) const; double getStartTime() const; @@ -130,7 +133,7 @@ namespace ParaMEDMEM void unserialize(const std::vector& tiI, const std::vector& tiD); TypeOfTimeDiscretization getTimeType() const; public: - MEDCouplingDefinitionTimeSliceLT(const MEDCouplingFieldDouble *f, int meshId, int arrId, int arr2Id, int fieldId) throw(INTERP_KERNEL::Exception); + MEDCouplingDefinitionTimeSliceLT(const MEDCouplingFieldDouble *f, int meshId, int arrId, int arr2Id, int fieldId); protected: MEDCouplingDefinitionTimeSliceLT() { } protected: @@ -143,15 +146,15 @@ namespace ParaMEDMEM { public: MEDCOUPLING_EXPORT MEDCouplingDefinitionTime(); - MEDCOUPLING_EXPORT MEDCouplingDefinitionTime(const std::vector& fs, const std::vector& meshRefs, const std::vector >& arrRefs) throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT MEDCouplingDefinitionTime(const std::vector& fs, const std::vector& meshRefs, const std::vector >& arrRefs); MEDCOUPLING_EXPORT std::size_t getHeapMemorySizeWithoutChildren() const; - MEDCOUPLING_EXPORT std::vector getDirectChildren() const; + MEDCOUPLING_EXPORT std::vector getDirectChildrenWithNull() const; MEDCOUPLING_EXPORT void assign(const MEDCouplingDefinitionTime& other); MEDCOUPLING_EXPORT bool isEqual(const MEDCouplingDefinitionTime& other) const; MEDCOUPLING_EXPORT double getTimeResolution() const { return _eps; } - MEDCOUPLING_EXPORT void getIdsOnTimeRight(double tm, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT void getIdsOnTimeLeft(double tm, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const throw(INTERP_KERNEL::Exception); - MEDCOUPLING_EXPORT void getIdsOnTime(double tm, std::vector& meshIds, std::vector& arrIds, std::vector& arrIdsInField, std::vector& fieldIds) const throw(INTERP_KERNEL::Exception); + MEDCOUPLING_EXPORT void getIdsOnTimeRight(double tm, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const; + MEDCOUPLING_EXPORT void getIdsOnTimeLeft(double tm, int& meshId, int& arrId, int& arrIdInField, int& fieldId) const; + MEDCOUPLING_EXPORT void getIdsOnTime(double tm, std::vector& meshIds, std::vector& arrIds, std::vector& arrIdsInField, std::vector& fieldIds) const; MEDCOUPLING_EXPORT std::vector getHotSpotsTime() const; MEDCOUPLING_EXPORT void appendRepr(std::ostream& stream) const; public: @@ -159,7 +162,7 @@ namespace ParaMEDMEM MEDCOUPLING_EXPORT void unserialize(const std::vector& tinyInfoI, const std::vector& tinyInfoD); private: double _eps; - std::vector< MEDCouplingAutoRefCountObjectPtr > _slices; + std::vector< MCAuto > _slices; static const double EPS_DFT; }; }