X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMEDCoupling%2FMEDCouplingTimeDiscretization.cxx;h=718507f271465df960397920669f42db7b1530c8;hb=526ef42327de18dcc1d67705f59a5d00fe8ba321;hp=acb73dc7717f88b6ff192cec42d90d030ba068c4;hpb=b4921675e99acce1553ae3235e120b281f780b2c;p=modules%2Fmed.git diff --git a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx b/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx index acb73dc77..718507f27 100644 --- a/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx +++ b/src/MEDCoupling/MEDCouplingTimeDiscretization.cxx @@ -52,7 +52,7 @@ const char MEDCouplingLinearTime::REPR[]="Linear time between 2 time steps."; MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::New(TypeOfTimeDiscretization type) { switch(type) - { + { case MEDCouplingNoTimeLabel::DISCRETIZATION: return new MEDCouplingNoTimeLabel; case MEDCouplingWithTimeStep::DISCRETIZATION: @@ -63,7 +63,7 @@ MEDCouplingTimeDiscretization *MEDCouplingTimeDiscretization::New(TypeOfTimeDisc return new MEDCouplingLinearTime; default: throw INTERP_KERNEL::Exception("Time discretization not implemented yet"); - } + } } void MEDCouplingTimeDiscretization::copyTinyAttrFrom(const MEDCouplingTimeDiscretization& other) @@ -697,6 +697,17 @@ void MEDCouplingTimeDiscretization::applyLin(double a, double b, int compoId) } } +void MEDCouplingTimeDiscretization::applyLin(double a, double b) +{ + std::vector arrays; + getArrays(arrays); + for(std::size_t j=0;japplyLin(a,b); + } +} + void MEDCouplingTimeDiscretization::applyFunc(int nbOfComp, FunctionToEvaluate func) { std::vector arrays; @@ -1251,7 +1262,7 @@ void MEDCouplingNoTimeLabel::finishUnserialization2(const std::vector& tiny } MEDCouplingWithTimeStep::MEDCouplingWithTimeStep(const MEDCouplingWithTimeStep& other, bool deepCpy):MEDCouplingTimeDiscretization(other,deepCpy), - _time(other._time),_iteration(other._iteration),_order(other._order) + _time(other._time),_iteration(other._iteration),_order(other._order) { } @@ -1773,8 +1784,8 @@ void MEDCouplingConstOnTimeInterval::finishUnserialization2(const std::vectoraddEqual(other->getArray()); } - + MEDCouplingTimeDiscretization *MEDCouplingConstOnTimeInterval::substract(const MEDCouplingTimeDiscretization *other) const { const MEDCouplingConstOnTimeInterval *otherC=dynamic_cast(other); @@ -2185,9 +2196,9 @@ void MEDCouplingConstOnTimeInterval::powEqual(const MEDCouplingTimeDiscretizatio } MEDCouplingTwoTimeSteps::MEDCouplingTwoTimeSteps(const MEDCouplingTwoTimeSteps& other, bool deepCpy):MEDCouplingTimeDiscretization(other,deepCpy), - _start_time(other._start_time),_end_time(other._end_time), - _start_iteration(other._start_iteration),_end_iteration(other._end_iteration), - _start_order(other._start_order),_end_order(other._end_order) + _start_time(other._start_time),_end_time(other._end_time), + _start_iteration(other._start_iteration),_end_iteration(other._end_iteration), + _start_order(other._start_order),_end_order(other._end_order) { if(other._end_array) _end_array=other._end_array->performCpy(deepCpy); @@ -2506,7 +2517,7 @@ void MEDCouplingTwoTimeSteps::finishUnserialization2(const std::vector& tin std::vector< const DataArrayDouble *> MEDCouplingTwoTimeSteps::getArraysForTime(double time) const { - if(time>_start_time-_time_tolerance && time<_end_time+_time_tolerance) + if(time>_start_time-_time_tolerance && time<_end_time+_time_tolerance) { std::vector< const DataArrayDouble *> ret(2); ret[0]=_array;