diff --git a/dumux/decoupled/2p/transport/fv/evalcflflux.hh b/dumux/decoupled/2p/transport/fv/evalcflflux.hh index e5420cebb504dd92ab6d53aaadee26f6ee4c845a..6c6259f61fe70e1711ee514403a0679aeb3a4e42 100644 --- a/dumux/decoupled/2p/transport/fv/evalcflflux.hh +++ b/dumux/decoupled/2p/transport/fv/evalcflflux.hh @@ -114,6 +114,10 @@ public: return 0.0; } + //! reset function + void reset() + {} + /*! @brief Constructs a EvalCflFlux instance */ EvalCflFlux () {} diff --git a/dumux/decoupled/2p/transport/fv/evalcflfluxdefault.hh b/dumux/decoupled/2p/transport/fv/evalcflfluxdefault.hh index 19b208bcf16fbf8b99512ac0b6ef080f7cc763f9..c0cb35b6b8706d0763667b508518546942c42f1d 100644 --- a/dumux/decoupled/2p/transport/fv/evalcflfluxdefault.hh +++ b/dumux/decoupled/2p/transport/fv/evalcflfluxdefault.hh @@ -111,6 +111,15 @@ public: return (getCFLFluxFunction(element) * element.geometry().volume()); } + //! resets the accumulated CFL-fluxes to zero + void reset() + { + fluxWettingOut_ = 0; + fluxNonwettingOut_ = 0; + fluxIn_ = 0; + fluxOut_ = 0; + } + /*! \brief Constructs an EvalCflFluxDefault object * * \param problem A problem type object @@ -209,19 +218,6 @@ private: return fluxOut_; } - -protected: - - //! resets the accumulated CFL-fluxes to zero - void reset() - { - fluxWettingOut_ = 0; - fluxNonwettingOut_ = 0; - fluxIn_ = 0; - fluxOut_ = 0; - } - -private: Problem& problem_;//problem data Scalar fluxWettingOut_; Scalar fluxNonwettingOut_; @@ -273,8 +269,6 @@ typename EvalCflFluxDefault<TypeTag>::Scalar EvalCflFluxDefault<TypeTag>::getCFL //determine timestep Scalar cFLFluxFunction = std::min(cFLFluxIn, cFLFluxOut); - reset(); - return cFLFluxFunction; } diff --git a/dumux/decoupled/common/fv/fvtransport.hh b/dumux/decoupled/common/fv/fvtransport.hh index 8123012022f9609d07d1b700545076ec9d4f1114..1d711254e16fb86294cfb6827fb8641f37fdb844 100644 --- a/dumux/decoupled/common/fv/fvtransport.hh +++ b/dumux/decoupled/common/fv/fvtransport.hh @@ -244,6 +244,8 @@ void FVTransport<TypeTag>::update(const Scalar t, Scalar& dt, TransportSolutionT CellData& cellDataI = problem_.variables().cellData(globalIdxI); Scalar update = 0; + evalCflFluxFunction().reset(); + // run through all intersections with neighbors and boundary IntersectionIterator isItEnd = problem_.gridView().iend(*eIt); for (IntersectionIterator isIt = problem_.gridView().ibegin(*eIt); isIt != isItEnd; ++isIt)