From 88d9be549cbf7cc392c87b33b98d80c418d23f41 Mon Sep 17 00:00:00 2001 From: ageay Date: Mon, 1 Feb 2010 16:21:14 +0000 Subject: [PATCH] Addition of operations on fields and CONST_ON_INTER policy for Time discretization. --- src/MEDCoupling/MEDCouplingFieldDouble.hxx | 4 ++++ src/MEDCoupling/MEDCouplingTimeDiscretization.cxx | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/MEDCoupling/MEDCouplingFieldDouble.hxx b/src/MEDCoupling/MEDCouplingFieldDouble.hxx index 175db4479..d27a42c72 100644 --- a/src/MEDCoupling/MEDCouplingFieldDouble.hxx +++ b/src/MEDCoupling/MEDCouplingFieldDouble.hxx @@ -40,7 +40,11 @@ namespace ParaMEDMEM NatureOfField getNature() const { return _nature; } void setNature(NatureOfField nat) throw(INTERP_KERNEL::Exception); void setTime(double val, int dt, int it) { _time_discr->setTime(val,dt,it); } + void setStartTime(double val, int dt, int it) { _time_discr->setStartTime(val,dt,it); } + void setEndTime(double val, int dt, int it) { _time_discr->setEndTime(val,dt,it); } double getTime(int& dt, int& it) const { return _time_discr->getTime(dt,it); } + double getStartTime(int& dt, int& it) const { return _time_discr->getStartTime(dt,it); } + double getEndTime(int& dt, int& it) const { return _time_discr->getEndTime(dt,it); } double getIJ(int tupleId, int compoId) const { return getArray()->getIJ(tupleId,compoId); } void setArray(DataArrayDouble *array); DataArrayDouble *getArray() const { return _time_discr->getArray(); } diff --git a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx b/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx index dbc0dc5f6..4946ba99b 100644 --- a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx +++ b/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx @@ -625,6 +625,12 @@ bool MEDCouplingConstOnTimeInterval::isEqual(const MEDCouplingTimeDiscretization return false; if(std::fabs(_start_time-otherC->_start_time)>_time_tolerance) return false; + if(_end_dt!=otherC->_end_dt) + return false; + if(_end_it!=otherC->_end_it) + return false; + if(std::fabs(_end_time-otherC->_end_time)>_time_tolerance) + return false; return MEDCouplingTimeDiscretization::isEqual(other,prec); } -- 2.39.2