From 91b617d339031c07fc89565bd98fbe5f901a5eaf Mon Sep 17 00:00:00 2001 From: Christoph Grueninger <christoph.grueninger@iws.uni-stuttgart.de> Date: Fri, 16 Nov 2012 12:55:54 +0000 Subject: [PATCH] Remove deprecated headers, indices and methods. (reviewed by bernd) git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@9563 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/1p2c/1p2cindices.hh | 8 - dumux/boxmodels/2p/2pfluxvariables.hh | 243 ------------------ dumux/boxmodels/3p3c/3p3cproblem.hh | 66 ----- .../common/boxelementboundarytypes.hh | 1 - .../richards/richardsfluxvariables.hh | 231 ----------------- 5 files changed, 549 deletions(-) delete mode 100644 dumux/boxmodels/2p/2pfluxvariables.hh delete mode 100644 dumux/boxmodels/3p3c/3p3cproblem.hh delete mode 100644 dumux/boxmodels/richards/richardsfluxvariables.hh diff --git a/dumux/boxmodels/1p2c/1p2cindices.hh b/dumux/boxmodels/1p2c/1p2cindices.hh index b4eba3aefe..90a3d14f79 100644 --- a/dumux/boxmodels/1p2c/1p2cindices.hh +++ b/dumux/boxmodels/1p2c/1p2cindices.hh @@ -47,25 +47,17 @@ struct OnePTwoCIndices //! Component indices static const int phaseCompIdx = phaseIdx;//!< The index of the main component of the considered phase static const int transportCompIdx = (unsigned int)(1-phaseIdx); //!< The index of the transported (minor) component; ASSUMES phase indices of 0 and 1 - static const int comp0Idx = phaseCompIdx;//!< \deprecated use phaseCompIdx - static const int comp1Idx = transportCompIdx;//!< \deprecated use phaseCompIdx // Equation indices static const int conti0EqIdx = PVOffset + 0; //!< continuity equation index static const int transportEqIdx = PVOffset + 1; //!< transport equation index - static const int contiEqIdx = conti0EqIdx; //!< \deprecated use conti0EqIdx instead - static const int transEqIdx = transportEqIdx; //!< \deprecated use transportEqIdx instead - // primary variable indices static const int pressureIdx = PVOffset + 0; //!< pressure static const int massOrMoleFracIdx = PVOffset + 1; //!< mole fraction of the second component - static const int x1Idx = massOrMoleFracIdx; //!< \deprecated use massOrMoleFracIdx instead - }; // \} } #endif - diff --git a/dumux/boxmodels/2p/2pfluxvariables.hh b/dumux/boxmodels/2p/2pfluxvariables.hh deleted file mode 100644 index ccd54a90e6..0000000000 --- a/dumux/boxmodels/2p/2pfluxvariables.hh +++ /dev/null @@ -1,243 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * See the file COPYING for full copying permissions. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - *****************************************************************************/ -/*! - * \file - * - * \brief This file contains the data which is required to calculate - * all fluxes of fluid phases over a face of a finite volume. - * - * This means pressure and temperature gradients, phase densities at - * the integration point, etc. - */ -#ifndef DUMUX_2P_FLUX_VARIABLES_HH -#define DUMUX_2P_FLUX_VARIABLES_HH - -#warning This file is deprecated. Use dumux/boxmodels/common/boxdarcyfluxvariables.hh instead. - -#include "2pproperties.hh" - -#include <dumux/boxmodels/common/boxdarcyfluxvariables.hh> -#include <dumux/common/parameters.hh> -#include <dumux/common/math.hh> - -namespace Dumux -{ - -/*! - * \ingroup TwoPBoxModel - * \ingroup BoxFluxVariables - * \brief This template class contains the data which is required to - * calculate the fluxes of the fluid phases over a face of a - * finite volume for the two-phase model. - * - * This means pressure and concentration gradients, phase densities at - * the intergration point, etc. - */ -template <class TypeTag> -class TwoPFluxVariables : public BoxDarcyFluxVariables<TypeTag> -{ - typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; - - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GridView::template Codim<0>::Entity Element; - enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, - numPhases = GET_PROP_VALUE(TypeTag, NumPhases) - }; - - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef Dune::FieldMatrix<Scalar, dimWorld, dimWorld> Tensor; - typedef Dune::FieldVector<Scalar, dimWorld> Vector; - - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename FVElementGeometry::SubControlVolumeFace SCVFace; - -public: - /* - * \brief The constructor - * - * \param problem The problem - * \param element The finite element - * \param fvGeometry The finite-volume geometry in the box scheme - * \param faceIdx The local index of the SCV (sub-control-volume) face - * \param elemDat The volume variables of the current element - * \param onBoundary A boolean variable to specify whether the flux variables - * are calculated for interior SCV faces or boundary faces, default=false - */ - TwoPFluxVariables(const Problem &problem, - const Element &element, - const FVElementGeometry &fvGeometry, - int faceIdx, - const ElementVolumeVariables &elemVolVars, - const bool onBoundary = false) - : BoxDarcyFluxVariables<TypeTag>(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary), - fvGeometry_(fvGeometry), onBoundary_(onBoundary) - { - faceIdx_ = faceIdx; - - for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { - potentialGrad_[phaseIdx] = Scalar(0); - } - - calculateGradients_(problem, element, elemVolVars); - calculateK_(problem, element, elemVolVars); - }; - -public: - /* - * \brief Return the intrinsic permeability. - */ - const Tensor &intrinsicPermeability() const - { return K_; } - - /*! - * \brief Return the pressure potential gradient. - * - * \param phaseIdx The index of the fluid phase - */ - const Vector &potentialGrad(int phaseIdx) const - { return potentialGrad_[phaseIdx]; } - - /*! - * \brief Return the local index of the downstream control volume - * for a given phase as a function of the normal flux. - * - * \param normalFlux The normal flux i.e. the given intrinsic permeability - * times the pressure potential gradient and SCV face normal. - */ - int downstreamIdx(Scalar normalFlux) const - { return (normalFlux >= 0)?face().j:face().i; } - - /*! - * \brief Return the local index of the upstream control volume - * for a given phase as a function of the normal flux. - * - * \param normalFlux The normal flux i.e. the given intrinsic permeability - * times the pressure potential gradient and SCV face normal. - */ - int upstreamIdx(Scalar normalFlux) const - { return (normalFlux > 0)?face().i:face().j; } - - /*! - * \brief Return the SCV (sub-control-volume) face - */ - const SCVFace &face() const - { - if (onBoundary_) - return fvGeometry_.boundaryFace[faceIdx_]; - else - return fvGeometry_.subContVolFace[faceIdx_]; - } - -protected: - const FVElementGeometry &fvGeometry_; - int faceIdx_; - const bool onBoundary_; - - // gradients - Vector potentialGrad_[numPhases]; - - // intrinsic permeability - Tensor K_; - -private: - void calculateGradients_(const Problem &problem, - const Element &element, - const ElementVolumeVariables &elemVolVars) - { - // calculate gradients - for (int idx = 0; - idx < fvGeometry_.numFAP; - idx++) // loop over adjacent vertices - { - // FE gradient at vertex idx - const Vector &feGrad = face().grad[idx]; - - // index for the element volume variables - int volVarsIdx = face().fapIndices[idx]; - - // compute sum of pressure gradients for each phase - for (int phaseIdx = 0; phaseIdx < numPhases; phaseIdx++) - { - // the pressure gradient - Vector tmp(feGrad); - tmp *= elemVolVars[volVarsIdx].pressure(phaseIdx); - potentialGrad_[phaseIdx] += tmp; - } - } - - /////////////// - // correct the pressure gradients by the gravitational acceleration - /////////////// - if (GET_PARAM_FROM_GROUP(TypeTag, bool, Problem, EnableGravity)) - { - // estimate the gravitational acceleration at a given SCV face - // using the arithmetic mean - Vector g(problem.boxGravity(element, fvGeometry_, face().i)); - g += problem.boxGravity(element, fvGeometry_, face().j); - g /= 2; - - for (int phaseIdx = 0; phaseIdx < numPhases; phaseIdx++) - { - // calculate the phase density at the integration point. we - // only do this if the wetting phase is present in both cells - Scalar SI = elemVolVars[face().i].saturation(phaseIdx); - Scalar SJ = elemVolVars[face().j].saturation(phaseIdx); - Scalar rhoI = elemVolVars[face().i].density(phaseIdx); - Scalar rhoJ = elemVolVars[face().j].density(phaseIdx); - Scalar fI = std::max(0.0, std::min(SI/1e-5, 0.5)); - Scalar fJ = std::max(0.0, std::min(SJ/1e-5, 0.5)); - if (fI + fJ == 0) - // doesn't matter because no wetting phase is present in - // both cells! - fI = fJ = 0.5; - Scalar density = (fI*rhoI + fJ*rhoJ)/(fI + fJ); - - // make gravity acceleration a force - Vector f(g); - f *= density; - - // calculate the final potential gradient - potentialGrad_[phaseIdx] -= f; - } - } - } - - void calculateK_(const Problem &problem, - const Element &element, - const ElementVolumeVariables &elemVolVars) - { - const SpatialParams &spatialParams = problem.spatialParams(); - // calculate the intrinsic permeability - spatialParams.meanK(K_, - spatialParams.intrinsicPermeability(element, - fvGeometry_, - face().i), - spatialParams.intrinsicPermeability(element, - fvGeometry_, - face().j)); - } -}; - -} // end namepace - -#endif diff --git a/dumux/boxmodels/3p3c/3p3cproblem.hh b/dumux/boxmodels/3p3c/3p3cproblem.hh deleted file mode 100644 index 23536bd798..0000000000 --- a/dumux/boxmodels/3p3c/3p3cproblem.hh +++ /dev/null @@ -1,66 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * See the file COPYING for full copying permissions. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - *****************************************************************************/ -/*! - * \file - * - * \brief Base class for all problems which use the two-phase, - * two-component box model - */ -#ifndef DUMUX_3P3C_PROBLEM_HH -#define DUMUX_3P3C_PROBLEM_HH - -#include <dumux/boxmodels/common/porousmediaboxproblem.hh> - -#include "3p3cproperties.hh" - -namespace Dumux -{ -/*! - * \ingroup ThreePThreeCModel - * - * \brief Base class for all problems which use the two-phase, - * two-component box model - */ -template<class TypeTag> -class ThreePThreeCProblem : public PorousMediaBoxProblem<TypeTag> -{ - typedef PorousMediaBoxProblem<TypeTag> ParentType; - - typedef typename GET_PROP_TYPE(TypeTag, TimeManager) TimeManager; - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - -public: - /*! - * \brief The constructor - * - * \param timeManager The time manager - * \param gridView The grid view - * \param verbose Turn verbosity on or off - */ - DUNE_DEPRECATED_MSG("use PorousMediaBoxProblem instead") - ThreePThreeCProblem(TimeManager &timeManager, - const GridView &gridView, - bool verbose = true) - : ParentType(timeManager, gridView) - {} -}; - -} - -#endif diff --git a/dumux/boxmodels/common/boxelementboundarytypes.hh b/dumux/boxmodels/common/boxelementboundarytypes.hh index f60127c7ef..fe7e02a09c 100644 --- a/dumux/boxmodels/common/boxelementboundarytypes.hh +++ b/dumux/boxmodels/common/boxelementboundarytypes.hh @@ -111,7 +111,6 @@ public: * types should be collected * \param fvGeometry The element's finite volume geometry */ - //DUNE_DEPRECATED_MSG("use update(problem, element) instead") void update(const Problem &problem, const Element &element, const FVElementGeometry &fvGeometry) diff --git a/dumux/boxmodels/richards/richardsfluxvariables.hh b/dumux/boxmodels/richards/richardsfluxvariables.hh deleted file mode 100644 index d245cbba87..0000000000 --- a/dumux/boxmodels/richards/richardsfluxvariables.hh +++ /dev/null @@ -1,231 +0,0 @@ -// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- -// vi: set et ts=4 sw=4 sts=4: -/***************************************************************************** - * See the file COPYING for full copying permissions. * - * * - * This program is free software: you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation, either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program. If not, see <http://www.gnu.org/licenses/>. * - *****************************************************************************/ -/*! - * \file - * - * \brief Data which is required to calculate the flux of fluid over a - * face of a finite volume - */ -#ifndef DUMUX_RICHARDS_FLUX_VARIABLES_HH -#define DUMUX_RICHARDS_FLUX_VARIABLES_HH - -#warning This file is deprecated. Use boxfluxvariables instead. - -#include <dumux/boxmodels/common/boxdarcyfluxvariables.hh> -#include <dumux/common/math.hh> -#include "richardsproperties.hh" - -namespace Dumux -{ - -/*! - * \ingroup RichardsModel - * \ingroup BoxFluxVariables - * \brief Calculates and stores the data which is required to - * calculate the flux of fluid over a face of a finite volume. - */ -template <class TypeTag> -class RichardsFluxVariables : public BoxDarcyFluxVariables<TypeTag> -{ - typedef typename GET_PROP_TYPE(TypeTag, Problem) Problem; - typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, SpatialParams) SpatialParams; - - typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; - enum { - wPhaseIdx = Indices::wPhaseIdx - }; - - typedef typename GET_PROP_TYPE(TypeTag, GridView) GridView; - typedef typename GridView::template Codim<0>::Entity Element; - enum { dim = GridView::dimension}; - - typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; - typedef Dune::FieldVector<Scalar, dim> DimVector; - typedef Dune::FieldMatrix<Scalar, dim, dim> DimMatrix; - - typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; - typedef typename FVElementGeometry::SubControlVolumeFace SCVFace; -public: - /*! - * \brief Constructor - * - * \param problem The representation of the physical problem - * \param element The DUNE Codim<0> entity which contains the face of - * the finite volume - * \param fvGeometry The finite volume geometry of the element - * \param faceIdx The local index of the sub-control volume face in the - * element's finite volume geometry. - * \param elemVolVars An array containing the volume variables for all - * sub-control volumes of the element. - * \param onBoundary A boolean variable to specify whether the flux variables - * are calculated for interior SCV faces or boundary faces, default=false - */ - RichardsFluxVariables(const Problem &problem, - const Element &element, - const FVElementGeometry &fvGeometry, - const int faceIdx, - const ElementVolumeVariables &elemVolVars, - const bool onBoundary = false) - : BoxDarcyFluxVariables<TypeTag>(problem, element, fvGeometry, faceIdx, elemVolVars, onBoundary), - fvGeometry_(fvGeometry), faceIdx_(faceIdx), onBoundary_(onBoundary) - { - - - calculateGradients_(problem, element, elemVolVars); - calculateK_(problem, element, elemVolVars); - }; - - /*! - * \brief Return the intrinsic permeability \f$\mathrm{[m^2]}\f$. - */ - const DimMatrix &intrinsicPermeability() const - { return K_; } - - /*! - * \brief Return the pressure potential gradient \f$\mathrm{[Pa/m]}\f$ - */ - const DimVector &potentialGradW() const - { return potentialGrad_; } - - /*! - * \brief Given the intrinisc permeability times the pressure - * potential gradient and SCV face normal for a phase, - * return the local index of the downstream control volume - * for a given phase. - * - * \param normalFlux The mass flux over the face multiplied with - * the face's normal. - */ - int downstreamIdx(Scalar normalFlux) const - { return (normalFlux >= 0)?face().j:face().i; } - - /*! - * \brief Given the intrinisc permeability times the pressure - * potential gradient and SCV face normal for a phase, - * return the local index of the upstream control volume - * for a given phase. - * - * \param normalFlux The mass flux over the face multiplied with - * the face's normal. - */ - int upstreamIdx(Scalar normalFlux) const - { return (normalFlux > 0)?face().i:face().j; } - - - - /*! - * \brief The face of the current sub-control volume. This may be either - * an inner sub-control-volume face or a face on the boundary. - */ - const SCVFace &face() const - { - if (onBoundary_) - return fvGeometry_.boundaryFace[faceIdx_]; - else - return fvGeometry_.subContVolFace[faceIdx_]; - } - - - -protected: - void calculateGradients_(const Problem &problem, - const Element &element, - const ElementVolumeVariables &elemVolVars) - { - potentialGrad_ = 0.0; - // calculate gradients - for (int idx = 0; - idx < fvGeometry_.numFAP; - idx++) // loop over adjacent vertices - { - // FE gradient at vertex index - const DimVector &feGrad = face().grad[idx]; - - // index for the element volume variables - int volVarsIdx = face().fapIndices[idx]; - - // the pressure gradient - DimVector tmp(feGrad); - tmp *= elemVolVars[volVarsIdx].pressure(wPhaseIdx); - - potentialGrad_ += tmp; - } - - /////////////// - // correct the pressure gradients by the gravitational acceleration - /////////////// - if (GET_PARAM_FROM_GROUP(TypeTag, bool, Problem, EnableGravity)) { - // calculate the phase density at the integration point. we - // only do this if the wetting phase is present in both cells - Scalar SI = elemVolVars[face().i].saturation(wPhaseIdx); - Scalar SJ = elemVolVars[face().j].saturation(wPhaseIdx); - Scalar rhoI = elemVolVars[face().i].density(wPhaseIdx); - Scalar rhoJ = elemVolVars[face().j].density(wPhaseIdx); - Scalar fI = std::max(0.0, std::min(SI/1e-5, 0.5)); - Scalar fJ = std::max(0.0, std::min(SJ/1e-5, 0.5)); - if (fI + fJ == 0) - // doesn't matter because no wetting phase is present in - // both cells! - fI = fJ = 0.5; - Scalar density = (fI*rhoI + fJ*rhoJ)/(fI + fJ); - - // estimate the gravitational acceleration at a given SCV face - // using the arithmetic mean - DimVector f(problem.boxGravity(element, fvGeometry_, face().i)); - f += problem.boxGravity(element, fvGeometry_, face().j); - f /= 2; - - // make it a force - f *= density; - - // calculate the final potential gradient - potentialGrad_ -= f; - } - } - - void calculateK_(const Problem &problem, - const Element &element, - const ElementVolumeVariables &elemDat) - { - const SpatialParams &spatialParams = problem.spatialParams(); - // calculate the intrinsic permeability - spatialParams.meanK(K_, - spatialParams.intrinsicPermeability(element, - fvGeometry_, - face().i), - spatialParams.intrinsicPermeability(element, - fvGeometry_, - face().j)); - } - - const FVElementGeometry &fvGeometry_; - const int faceIdx_; - const bool onBoundary_; - - // gradients - DimVector potentialGrad_; - - // intrinsic permeability - DimMatrix K_; -}; - -} // end namepace - -#endif -- GitLab