From cd3afa89cb6b829ffbf875ffd2e8018d99ebd823 Mon Sep 17 00:00:00 2001 From: Klaus Mosthaf <klmos@env.dtu.dk> Date: Wed, 22 Feb 2012 09:37:03 +0000 Subject: [PATCH] removed calculateMass() - outdated function, globalStorage of the model is used instead git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@7851 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/freeflow/stokes/stokesmodel.hh | 84 +--------------------------- 1 file changed, 3 insertions(+), 81 deletions(-) diff --git a/dumux/freeflow/stokes/stokesmodel.hh b/dumux/freeflow/stokes/stokesmodel.hh index 9f592e9104..88d9b84001 100644 --- a/dumux/freeflow/stokes/stokesmodel.hh +++ b/dumux/freeflow/stokes/stokesmodel.hh @@ -138,88 +138,10 @@ public: flux = this->problem_.gridView().comm().sum(flux); } - DUMUX_DEPRECATED_MSG("outdated function; use globalStorage() of the model") - void calculateMass(const SolutionVector &sol, Dune::FieldVector<Scalar, 2> &mass) - { - // const DofMapper &dofMapper = this->dofEntityMapper(); - VolumeVariables tmp; - Scalar vol, poro, rhoN, rhoW, satN, satW, pW;//, Te; - Scalar massNPhase(0.), massWPhase(0.); - - mass = 0; - Scalar minSat = 1e100; - Scalar maxSat = -1e100; - Scalar minP = 1e100; - Scalar maxP = -1e100; - // Scalar minTe = 1e100; - // Scalar maxTe = -1e100; - - FVElementGeometry fvElemGeom; - VolumeVariables volVars; - ElementBoundaryTypes elemBcTypes; - - // Loop over elements - ElementIterator elemIt = this->problem_.gridView().template begin<0>(); - ElementIterator endit = this->problem_.gridView().template end<0>(); - for (; elemIt != endit; ++elemIt) - { - if (elemIt->partitionType() != Dune::InteriorEntity) - continue; - - fvElemGeom.update(this->gridView_(), *elemIt); - elemBcTypes.update(this->problem_(), *elemIt, fvElemGeom); - - int numVerts = elemIt->template count<dim>(); - for (int i = 0; i < numVerts; ++i) - { - int globalIdx = this->vertexMapper().map(*elemIt, i, dim); - volVars.update(sol[globalIdx], - this->problem_(), - *elemIt, - fvElemGeom, - i, - false); - - // int globalIdx = dofMapper.map(*elemIt, i, dim); - vol = fvElemGeom.subContVol[i].volume; - poro = volVars.porosity; - rhoN = volVars.density; - pW = volVars.pressure; - // Te = asImp_()->temperature((*sol)[globalIdx]); - - - massNPhase = vol * poro * rhoN; - - // get minimum and maximum values of primary variables - minP = std::min(minP, pW); - maxP = std::max(maxP, pW); - // minTe = std::min(minTe, Te); - // maxTe = std::max(maxTe, Te); - - // calculate total mass - mass[0] += massNPhase; // mass nonwetting phase - } - } - - // IF PARALLEL: calculate total mass including all processors - // also works for sequential calculation - mass = this->problem_.gridView().comm().sum(mass); - - if(this->problem_.gridView().comm().rank() == 0) // IF PARALLEL: only print by processor with rank() == 0 - { - // print minimum and maximum values - std::cout << "nonwetting phase saturation: min = "<< minSat - << ", max = "<< maxSat << std::endl; - std::cout << "wetting phase pressure: min = "<< minP - << ", max = "<< maxP << std::endl; - // std::cout << "temperature: min = "<< minTe - // << ", max = "<< maxTe << std::endl; - } - } - - //! \@copydoc BoxModel::addOutputVtkFields + //! \copydoc BoxModel::addOutputVtkFields template <class MultiWriter> - void addOutputVtkFields(const SolutionVector &sol, MultiWriter &writer) + void addOutputVtkFields(const SolutionVector &sol, + MultiWriter &writer) { typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; typedef Dune::BlockVector<Dune::FieldVector<Scalar, dim> > VelocityField; -- GitLab