diff --git a/dumux/common/timemanager.hh b/dumux/common/timemanager.hh index eeb9a8cd6db28cfe9872ba7b49ff3fba8db5364f..a4984fea6b646d279f9c6c13336294e812d454a6 100644 --- a/dumux/common/timemanager.hh +++ b/dumux/common/timemanager.hh @@ -337,16 +337,32 @@ public: * \brief Returns true if the current episode is finished at the * current time. */ - bool episodeIsOver() const + bool episodeIsFinished() const { return time() >= episodeStartTime_ + episodeLength(); } /*! * \brief Returns true if the current episode will be finished * after the current time step. */ - bool episodeWillBeOver() const + bool episodeWillBeFinished() const { return time() + timeStepSize() >= episodeStartTime_ + episodeLength(); } + /*! + * \brief Returns true if the current episode is finished at the + * current time. + */ + DUNE_DEPRECATED_MSG("episodeIsOver() is deprecated and has been replaced by episodeIsFinished() instead.") + bool episodeIsOver() const + { return episodeIsFinished(); } + + /*! + * \brief Returns true if the current episode will be finished + * after the current time step. + */ + DUNE_DEPRECATED_MSG("episodeWillBeOver() is deprecated and has been replaced by episodeWillBeFinished() instead.") + bool episodeWillBeOver() const + { return episodeWillBeFinished(); } + /*! * \brief Aligns the time step size to the episode boundary if the @@ -358,7 +374,7 @@ public: // wants to give it some extra time, we will return // the time step size it suggested instead of trying // to align it to the end of the episode. - if (episodeIsOver()) + if (episodeIsFinished()) return 0.0; // make sure that we don't exceed the end of the @@ -419,7 +435,7 @@ public: problem_->serialize(); // notify the problem if an episode is finished - if (episodeIsOver()) { + if (episodeIsFinished()) { //define what to do at the end of an episode in the problem problem_->episodeEnd(); diff --git a/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh b/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh index 201edfd2d6cdca328c3d3e1e1092fb77e2dd7b7a..d5fc5c86e09dd4cf21d20289db7202d0cfd845a5 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvpressure.hh @@ -286,7 +286,7 @@ void FVPressure2P2C<TypeTag>::getStorage(Dune::FieldVector<Scalar, 2>& storageEn // Abort error damping if there will be a possibly tiny timestep compared with last one // This might be the case if the episode or simulation comes to an end. - if( problem().timeManager().episodeWillBeOver() + if( problem().timeManager().episodeWillBeFinished() || problem().timeManager().willBeFinished()) { problem().variables().cellData(eIdxGlobalI).errorCorrection() = 0.; diff --git a/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh b/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh index 30f237550b14f49b1c80a416521ccb986d1ef75a..28959196e50052d885bd02fc750df9857e58c26d 100644 --- a/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh +++ b/dumux/porousmediumflow/2p2c/sequential/fvpressuremultiphysics.hh @@ -453,7 +453,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pStorage(Dune::FieldVector<Scalar, // Abort error damping if there will be a possibly tiny timestep compared with last one // This might be the case if the episode or simulation comes to an end. - if( problem().timeManager().episodeWillBeOver() + if( problem().timeManager().episodeWillBeFinished() || problem().timeManager().willBeFinished()) { problem().variables().cellData(eIdxGlobalI).errorCorrection() = 0.; @@ -876,7 +876,7 @@ void FVPressure2P2CMultiPhysics<TypeTag>::updateMaterialLaws(bool postTimeStep) timer_.stop(); - if(problem().timeManager().willBeFinished() or problem().timeManager().episodeWillBeOver()) + if(problem().timeManager().willBeFinished() or problem().timeManager().episodeWillBeFinished()) Dune::dinfo << "Subdomain routines took " << timer_.elapsed() << " seconds" << std::endl; return; diff --git a/dumux/porousmediumflow/sequential/impetproblem.hh b/dumux/porousmediumflow/sequential/impetproblem.hh index 0cd59f80f6bacc8727458a6f8aba662b8045937e..d881b904dd2747f4b8026463b39c400d8d63c6d1 100644 --- a/dumux/porousmediumflow/sequential/impetproblem.hh +++ b/dumux/porousmediumflow/sequential/impetproblem.hh @@ -500,13 +500,13 @@ public: { if (timeManager().timeStepIndex() % outputInterval_ == 0 || timeManager().willBeFinished() - || timeManager().episodeWillBeOver()) + || timeManager().episodeWillBeFinished()) { return true; } } else if (timeManager().willBeFinished() - || timeManager().episodeWillBeOver() || timeManager().timeStepIndex() == 0) + || timeManager().episodeWillBeFinished() || timeManager().timeStepIndex() == 0) { return true; } diff --git a/dumux/porousmediumflow/sequential/onemodelproblem.hh b/dumux/porousmediumflow/sequential/onemodelproblem.hh index 388accd44833237acc2e932bfaff9033e9fc8a5a..e3e095cf5b40843464daddff3732b97481182842 100644 --- a/dumux/porousmediumflow/sequential/onemodelproblem.hh +++ b/dumux/porousmediumflow/sequential/onemodelproblem.hh @@ -434,13 +434,13 @@ public: { if (timeManager().timeStepIndex() % outputInterval_ == 0 || timeManager().willBeFinished() - || timeManager().episodeWillBeOver()) + || timeManager().episodeWillBeFinished()) { return true; } } else if (timeManager().willBeFinished() - || timeManager().episodeWillBeOver() || timeManager().timeStepIndex() == 0) + || timeManager().episodeWillBeFinished() || timeManager().timeStepIndex() == 0) { return true; } diff --git a/test/common/generalproblem/generallensproblem.hh b/test/common/generalproblem/generallensproblem.hh index 0cdb37a23a87bb3b74e64f20f7c9fbc6d20d5b86..b4638d474b3d1ff2574d44a4413cd472dc1fe929 100644 --- a/test/common/generalproblem/generallensproblem.hh +++ b/test/common/generalproblem/generallensproblem.hh @@ -222,7 +222,7 @@ public: { if (this->timeManager().time() < eps_ || this->timeManager().willBeFinished() || - this->timeManager().episodeWillBeOver()) + this->timeManager().episodeWillBeFinished()) { return true; } diff --git a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh index ad2860c0473e757b731ad063deb58382e4961895..c699dbe45ebbdbec540ff79557c84f297bf7ae98 100644 --- a/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/2cnistokes2p2cniproblem.hh @@ -222,7 +222,7 @@ public: bool shouldWriteRestartFile() const { return (this->timeManager().timeStepIndex() % freqRestart_ == 0 - || this->timeManager().episodeWillBeOver() + || this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished()); } @@ -237,7 +237,7 @@ public: bool shouldWriteOutput() const { return (this->timeManager().timeStepIndex() % freqOutput_ == 0 - || this->timeManager().episodeWillBeOver() + || this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished()); } diff --git a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh index 45d19fe9ea4094622073c2965df3f989015da2db..c5031e06b7d33c9c1a970b8b6866354e1c699544 100644 --- a/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh +++ b/test/multidomain/2cnistokes2p2cni/2p2cnisubproblem.hh @@ -360,7 +360,7 @@ public: if (this->gridView().comm().rank() == 0) { if (this->timeManager().timeStepIndex() % freqMassOutput_ == 0 - || this->timeManager().episodeWillBeOver()) + || this->timeManager().episodeWillBeFinished()) { PrimaryVariables storageChange(0.); storageChange = storageLastTimestep_ - storage; diff --git a/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh b/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh index afd1befda7a55e6eb52ffb8352ff37002b0d954d..8bea652efba0c5746c06fda82ff07b1f0a08d0aa 100644 --- a/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh +++ b/test/multidomain/2cnizeroeq2p2cni/2cnizeroeq2p2cniproblem.hh @@ -187,7 +187,7 @@ public: { return (((this->timeManager().timeStepIndex() > 0) && (this->timeManager().timeStepIndex() % freqRestart_ == 0)) - || this->timeManager().episodeWillBeOver() + || this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished()); } @@ -195,7 +195,7 @@ public: bool shouldWriteOutput() const { return (this->timeManager().timeStepIndex() % freqOutput_ == 0 - || this->timeManager().episodeWillBeOver() + || this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished()); } diff --git a/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh b/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh index 0b3f9be23e59efe396d677a0c18f82c533b91568..734405037427144cbc6197f38de6787cf74a0e46 100644 --- a/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh +++ b/test/multidomain/2cnizeroeq2p2cni/2p2cnisubproblem.hh @@ -308,7 +308,7 @@ public: if (this->gridView().comm().rank() == 0) { if (this->timeManager().timeStepIndex() % freqMassOutput_ == 0 - || this->timeManager().episodeWillBeOver()) + || this->timeManager().episodeWillBeFinished()) { PrimaryVariables storageChange(0.); storageChange = storageLastTimestep_ - storage; diff --git a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh index 98949507864f35fbea0d7c5aaa5b337ad71ac829..4c6bfedab8261a099d6526ed84f7a79af5103658 100644 --- a/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh +++ b/test/multidomain/2cstokes2p2c/2cstokes2p2cproblem.hh @@ -221,7 +221,7 @@ public: bool shouldWriteRestartFile() const { return (this->timeManager().timeStepIndex() % freqRestart_ == 0 - || this->timeManager().episodeWillBeOver() + || this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished()); } @@ -236,7 +236,7 @@ public: bool shouldWriteOutput() const { return (this->timeManager().timeStepIndex() % freqOutput_ == 0 - || this->timeManager().episodeWillBeOver() + || this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished()); } diff --git a/test/multidomain/2cstokes2p2c/2p2csubproblem.hh b/test/multidomain/2cstokes2p2c/2p2csubproblem.hh index 2d2698bb98d661956f959b9bba3969f6909cb2d8..f3ed79e0dfe36fab3e5264b1ae3ebf2552672775 100644 --- a/test/multidomain/2cstokes2p2c/2p2csubproblem.hh +++ b/test/multidomain/2cstokes2p2c/2p2csubproblem.hh @@ -337,7 +337,7 @@ public: if (this->gridView().comm().rank() == 0) { if (this->timeManager().timeStepIndex() % freqMassOutput_ == 0 - || this->timeManager().episodeWillBeOver()) + || this->timeManager().episodeWillBeFinished()) { PrimaryVariables storageChange(0.); storageChange = storageLastTimestep_ - storage; diff --git a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh index 2f1596456bbd4a1d4c9fae00ffc70174a5911984..8a61b4794928be0b7617793d4f8e13849b7b2ee4 100644 --- a/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh +++ b/test/multidomain/2czeroeq2p2c/2czeroeq2p2cproblem.hh @@ -189,7 +189,7 @@ public: return ( ((this->timeManager().timeStepIndex() > 0) && (this->timeManager().timeStepIndex() % freqRestart_ == 0)) // also write a restart file at the end of each episode - || this->timeManager().episodeWillBeOver() + || this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished()); } @@ -197,7 +197,7 @@ public: bool shouldWriteOutput() const { return (this->timeManager().timeStepIndex() % freqOutput_ == 0 - || this->timeManager().episodeWillBeOver() + || this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished()); } diff --git a/test/multidomain/2czeroeq2p2c/2p2csubproblem.hh b/test/multidomain/2czeroeq2p2c/2p2csubproblem.hh index 4eb4ce1e948daf839a4256d4b6ee21c044e2603b..3108784c97ee542d49569e522e07b0399c2eb446 100644 --- a/test/multidomain/2czeroeq2p2c/2p2csubproblem.hh +++ b/test/multidomain/2czeroeq2p2c/2p2csubproblem.hh @@ -303,7 +303,7 @@ public: if (this->gridView().comm().rank() == 0) { if (this->timeManager().timeStepIndex() % freqMassOutput_ == 0 - || this->timeManager().episodeWillBeOver()) + || this->timeManager().episodeWillBeFinished()) { PrimaryVariables storageChange(0.); storageChange = storageLastTimestep_ - storage; diff --git a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh index ae4a37cfe8008b82077f8b54dc2df555c9fe946a..4323d27bffc6399cc1b5d537d9261b82982bcadc 100644 --- a/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh +++ b/test/porousmediumflow/1p/implicit/1pniconductionproblem.hh @@ -153,7 +153,7 @@ public: return this->timeManager().timeStepIndex() == 0 || this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); } diff --git a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh index 4d78eff5f897521d1e62dfd0ab2efdfb0b8e4c11..64c5dbc3d00b78d1be3858c034e6b6628b895842 100644 --- a/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh +++ b/test/porousmediumflow/1p/implicit/1pniconvectionproblem.hh @@ -161,7 +161,7 @@ public: return this->timeManager().timeStepIndex() == 0 || this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); } diff --git a/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh index 0ed78b339c641277293ca523a09eb7837206aeb8..15b3840674794f3e0672a07b0914128bb5e7b670 100644 --- a/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh +++ b/test/porousmediumflow/1p2c/implicit/1p2cniconductionproblem.hh @@ -167,7 +167,7 @@ public: return this->timeManager().timeStepIndex() == 0 || this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); } diff --git a/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh b/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh index 83b0dad6ea43414781af5f858885101c7953dd6a..009609932276727a92569f4481d31861c6eb1133 100644 --- a/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh +++ b/test/porousmediumflow/1p2c/implicit/1p2cniconvectionproblem.hh @@ -170,7 +170,7 @@ public: return this->timeManager().timeStepIndex() == 0 || this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); } diff --git a/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh b/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh index c6c2046e3aa87eae0fa90635be4f7ea3072b1525..2c85b91b31e90185993beb6e1bc4ed592bb9ea8f 100644 --- a/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh +++ b/test/porousmediumflow/2pncmin/implicit/dissolutionproblem.hh @@ -188,7 +188,7 @@ public: bool shouldWriteOutput() const { return this->timeManager().timeStepIndex() % 1 == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); } diff --git a/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh b/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh index ae8ea1c7d5204340ae758549026da59141f83a29..78f2abf5dde96f442d8706765d45fd240f6ee778 100644 --- a/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh +++ b/test/porousmediumflow/3p/implicit/3pniconductionproblem.hh @@ -157,7 +157,7 @@ public: return this->timeManager().timeStepIndex() == 0 || this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); } diff --git a/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh b/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh index 980403cbd8612fd5edccf33bb7864316b8a8da95..192150f5742ae349590602efd71337832ae95fff 100644 --- a/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh +++ b/test/porousmediumflow/3p/implicit/3pniconvectionproblem.hh @@ -162,7 +162,7 @@ public: return this->timeManager().timeStepIndex() == 0 || this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); } diff --git a/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh b/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh index 6011dfe66e3d249458bff202af58ee83f2f3d29e..cfacea767338d48bf29f789e073f03ce17521c8b 100644 --- a/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh +++ b/test/porousmediumflow/3p3c/implicit/kuevetteproblem.hh @@ -317,7 +317,7 @@ public: bool shouldWriteOutput() const { return this->timeManager().timeStepIndex() == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); } diff --git a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh index 2953d9eed8bcc074b942ded26fe3a8ef03ad4580..383a15e8206ad1fb8beec0266dbc648de35985a9 100644 --- a/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh +++ b/test/porousmediumflow/3pwateroil/implicit/3pwateroilsagdproblem.hh @@ -208,7 +208,7 @@ public: if (timeStepIndex == 0 || timeStepIndex % 100 == 0 || //after every 1000000 secs - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished()) { std::cout<<" totalMassProducedOil_ : "<< totalMassProducedOil_ << " Time: " << time+dt << std::endl; diff --git a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh index 4d75c5aea5f786966ce0c41af3a2795d2278df6e..c883661ab4a5da84d02c6ddb8decb65b7d88f7a2 100644 --- a/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsniconductionproblem.hh @@ -146,7 +146,7 @@ public: return this->timeManager().timeStepIndex() == 0 || this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); } diff --git a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh index 7079debfad2decdd1bf1e67b2fc8d9064eb1294a..5ddb1784fd867f15710dbd14bbbcb6e32bfdae62 100644 --- a/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh +++ b/test/porousmediumflow/richards/implicit/richardsniconvectionproblem.hh @@ -155,7 +155,7 @@ public: return this->timeManager().timeStepIndex() == 0 || this->timeManager().timeStepIndex() % outputInterval_ == 0 || - this->timeManager().episodeWillBeOver() || + this->timeManager().episodeWillBeFinished() || this->timeManager().willBeFinished(); }