From fe341d88cf4382d81b81ddaf5a21728fb386f206 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Tue, 22 Jul 2014 12:41:56 +0200 Subject: [PATCH] use the checkConservativeness() method in all appropriate test problems "appropriate" basically means "does not use constraints", as constraints do not care about the conservation quantities... --- tests/problems/eclproblem.hh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/problems/eclproblem.hh b/tests/problems/eclproblem.hh index 8b9cd8fd8..55a9edd08 100644 --- a/tests/problems/eclproblem.hh +++ b/tests/problems/eclproblem.hh @@ -175,6 +175,7 @@ class EclProblem : public GET_PROP_TYPE(TypeTag, BaseProblem) enum { waterCompIdx = FluidSystem::waterCompIdx }; typedef typename GET_PROP_TYPE(TypeTag, PrimaryVariables) PrimaryVariables; + typedef typename GET_PROP_TYPE(TypeTag, EqVector) EqVector; typedef typename GET_PROP_TYPE(TypeTag, RateVector) RateVector; typedef typename GET_PROP_TYPE(TypeTag, BoundaryRateVector) BoundaryRateVector; typedef typename GET_PROP_TYPE(TypeTag, MaterialLaw) MaterialLaw; @@ -250,8 +251,21 @@ public: /*! * \brief Called by the simulator before each time integration. */ - void beginTimeStep() - { } + void endTimeStep() + { +#ifndef NDEBUG + this->model().checkConservativeness(); + + // Calculate storage terms + EqVector storage; + this->model().globalStorage(storage); + + // Write mass balance information for rank 0 + if (this->gridView().comm().rank() == 0) { + std::cout << "Storage: " << storage << std::endl << std::flush; + } +#endif // NDEBUG + } /*! * \brief Called by the simulator before each Newton-Raphson iteration.