From 82dd0ac43b78908a760399efef7b8a4ddfdd1405 Mon Sep 17 00:00:00 2001 From: Andreas Lauser <and@poware.org> Date: Thu, 5 Aug 2010 12:11:43 +0000 Subject: [PATCH] change names according to the meeting on monday git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@3998 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- .../1p/{1pfluxvars.hh => 1pfluxvariables.hh} | 20 +-- dumux/boxmodels/1p/1plocalresidual.hh | 44 ++--- dumux/boxmodels/1p/1pmodel.hh | 20 +-- dumux/boxmodels/1p/1pproblem.hh | 2 +- dumux/boxmodels/1p/1pproperties.hh | 14 +- ...psecondaryvars.hh => 1pvolumevariables.hh} | 32 ++-- dumux/boxmodels/1p2c/1p2cfluidstate.hh | 4 +- .../{1p2cfluxvars.hh => 1p2cfluxvariables.hh} | 44 ++--- dumux/boxmodels/1p2c/1p2clocalresidual.hh | 34 ++-- dumux/boxmodels/1p2c/1p2cmodel.hh | 22 +-- dumux/boxmodels/1p2c/1p2cproblem.hh | 6 +- dumux/boxmodels/1p2c/1p2cproperties.hh | 18 +- ...econdaryvars.hh => 1p2cvolumevariables.hh} | 34 ++-- .../2p/{2pfluxvars.hh => 2pfluxvariables.hh} | 20 +-- dumux/boxmodels/2p/2plocalresidual.hh | 40 ++--- dumux/boxmodels/2p/2pmodel.hh | 62 +++---- dumux/boxmodels/2p/2pproblem.hh | 8 +- dumux/boxmodels/2p/2pproperties.hh | 28 ++-- ...psecondaryvars.hh => 2pvolumevariables.hh} | 42 ++--- dumux/boxmodels/2p2c/2p2cfluidstate.hh | 4 +- .../{2p2cfluxvars.hh => 2p2cfluxvariables.hh} | 28 ++-- dumux/boxmodels/2p2c/2p2clocalresidual.hh | 54 +++--- dumux/boxmodels/2p2c/2p2cmodel.hh | 100 +++++------ dumux/boxmodels/2p2c/2p2cnewtoncontroller.hh | 4 +- dumux/boxmodels/2p2c/2p2cproblem.hh | 6 +- dumux/boxmodels/2p2c/2p2cproperties.hh | 24 +-- ...econdaryvars.hh => 2p2cvolumevariables.hh} | 50 +++--- ...2cnifluxvars.hh => 2p2cnifluxvariables.hh} | 26 +-- dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh | 46 ++--- dumux/boxmodels/2p2cni/2p2cnimodel.hh | 2 +- dumux/boxmodels/2p2cni/2p2cniproperties.hh | 18 +- ...ondaryvars.hh => 2p2cnivolumevariables.hh} | 26 +-- .../{2pnifluxvars.hh => 2pnifluxvariables.hh} | 26 +-- dumux/boxmodels/2pni/2pnilocalresidual.hh | 48 +++--- dumux/boxmodels/2pni/2pniproperties.hh | 18 +- ...econdaryvars.hh => 2pnivolumevariables.hh} | 36 ++-- .../common/boxelementboundarytypes.hh | 14 +- ...ryvars.hh => boxelementvolumevariables.hh} | 26 +-- .../boxmodels/common/boxfvelementgeometry.hh | 84 +++++----- dumux/boxmodels/common/boxlocaljacobian.hh | 86 +++++----- dumux/boxmodels/common/boxlocalresidual.hh | 158 +++++++++--------- dumux/boxmodels/common/boxmodel.hh | 50 +++--- dumux/boxmodels/common/boxproblem.hh | 22 +-- dumux/boxmodels/common/boxproperties.hh | 30 ++-- dumux/boxmodels/common/pdelabboxassembler.hh | 16 +- .../common/pdelabboxlocaloperator.hh | 2 +- ...dsfluxvars.hh => richardsfluxvariables.hh} | 20 +-- .../richards/richardslocalresidual.hh | 46 ++--- dumux/boxmodels/richards/richardsmodel.hh | 28 ++-- .../boxmodels/richards/richardsproperties.hh | 18 +- ...daryvars.hh => richardsvolumevariables.hh} | 24 +-- dumux/common/boundaryconditions.hh | 6 +- dumux/common/pardiso.hh | 22 +-- dumux/common/pdelabpreconditioner.hh | 36 ++-- dumux/common/propertysystem.hh | 90 +++++----- dumux/common/spline.hh | 14 +- dumux/common/start.hh | 4 +- dumux/common/timemanager.hh | 20 +-- dumux/decoupled/2p/2pfluidstate.hh | 2 +- dumux/decoupled/2p/2pproperties.hh | 2 +- .../2p/diffusion/diffusionproblem2p.hh | 2 +- .../decoupled/2p/diffusion/fv/fvpressure2p.hh | 8 +- .../decoupled/2p/diffusion/fv/fvvelocity2p.hh | 18 +- .../2p/diffusion/fvmpfa/fvmpfaopressure2p.hh | 10 +- .../diffusion/fvmpfa/fvmpfaopressure2p_new.hh | 30 ++-- .../2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh | 4 +- .../2p/diffusion/mimetic/croperator.hh | 6 +- .../2p/diffusion/mimetic/localstiffness.hh | 32 ++-- .../diffusion/mimetic/mimeticgroundwater.hh | 12 +- .../2p/diffusion/mimetic/mimeticoperator.hh | 2 +- .../2p/diffusion/mimetic/mimeticpressure2p.hh | 10 +- .../2p/diffusion/mimetic/mimeticvelocity2p.hh | 18 +- dumux/decoupled/2p/impes/impesproblem2p.hh | 10 +- .../2p/transport/fv/capillarydiffusion.hh | 10 +- .../2p/transport/fv/convectivepart.hh | 4 +- .../2p/transport/fv/diffusivepart.hh | 4 +- .../2p/transport/fv/fvsaturation2p.hh | 8 +- .../decoupled/2p/transport/fv/gravitypart.hh | 10 +- .../2p/transport/transportproblem2p.hh | 12 +- dumux/decoupled/2p/variableclass2p.hh | 8 +- dumux/decoupled/common/impesproblem.hh | 28 ++-- dumux/decoupled/common/onemodelproblem.hh | 30 ++-- dumux/decoupled/common/variableclass.hh | 14 +- dumux/io/restart.hh | 4 +- dumux/io/vtkmultiwriter.hh | 28 ++-- .../material/binarycoefficients/henryiapws.hh | 2 +- dumux/material/components/brine.hh | 6 +- dumux/material/components/ch4.hh | 6 +- dumux/material/components/h2.hh | 6 +- dumux/material/components/h2o.hh | 4 +- dumux/material/components/iapws/common.hh | 12 +- dumux/material/components/iapws/region1.hh | 58 +++---- dumux/material/components/iapws/region2.hh | 38 ++--- dumux/material/components/iapws/region4.hh | 6 +- dumux/material/components/n2.hh | 4 +- dumux/material/components/o2.hh | 10 +- dumux/material/components/simpleh2o.hh | 6 +- .../material/components/tabulatedcomponent.hh | 24 +-- .../2p/efftoabslawparams.hh | 4 +- .../2p/regularizedlinearmaterial.hh | 10 +- .../fluidsystems/defaultcomponents.hh | 6 +- dumux/material/fluidsystems/h2o_n2_system.hh | 12 +- .../spatialparameters/boxspatialparameters.hh | 14 +- dumux/nonlinear/newtoncontroller.hh | 28 ++-- dumux/nonlinear/newtonmethod.hh | 2 +- test/boxmodels/1p/1pspatialparameters.hh | 4 +- test/boxmodels/1p/1ptestproblem.hh | 44 ++--- test/boxmodels/1p2c/tissue_tumor_problem.hh | 50 +++--- .../1p2c/tissue_tumor_spatialparameters.hh | 16 +- test/boxmodels/2p/lensproblem.hh | 52 +++--- test/boxmodels/2p/lensspatialparameters.hh | 6 +- test/boxmodels/2p/test_2p.cc | 6 +- test/boxmodels/2p2c/injectionproblem.hh | 52 +++--- .../2p2c/injectionspatialparameters.hh | 32 ++-- test/boxmodels/2p2cni/waterairproblem.hh | 60 +++---- .../2p2cni/waterairspatialparameters.hh | 32 ++-- test/boxmodels/2pni/injectionproblem2pni.hh | 14 +- .../boxmodels/richards/richardslensproblem.hh | 50 +++--- .../richards/richardslensspatialparameters.hh | 6 +- test/boxmodels/richards/test_richards.cc | 2 +- test/common/pardiso/test_pardiso.cc | 46 ++--- test/common/spline/test_spline.cc | 2 +- test/decoupled/1p/benchmarkresult.hh | 4 +- test/decoupled/1p/test_diffusion.cc | 4 +- test/decoupled/1p/test_diffusion_problem.hh | 4 +- .../1p/test_diffusion_spatialparams.hh | 10 +- test/decoupled/2p/test_2p.cc | 4 +- test/decoupled/2p/test_2p_problem.hh | 2 +- test/decoupled/2p/test_2p_spatialparams.hh | 10 +- tutorial/tutorial_decoupled.cc | 4 +- tutorial/tutorialproblem_coupled.hh | 14 +- tutorial/tutorialproblem_decoupled.hh | 2 +- .../tutorialspatialparameters_decoupled.hh | 10 +- 133 files changed, 1476 insertions(+), 1476 deletions(-) rename dumux/boxmodels/1p/{1pfluxvars.hh => 1pfluxvariables.hh} (90%) rename dumux/boxmodels/1p/{1psecondaryvars.hh => 1pvolumevariables.hh} (81%) rename dumux/boxmodels/1p2c/{1p2cfluxvars.hh => 1p2cfluxvariables.hh} (87%) rename dumux/boxmodels/1p2c/{1p2csecondaryvars.hh => 1p2cvolumevariables.hh} (82%) rename dumux/boxmodels/2p/{2pfluxvars.hh => 2pfluxvariables.hh} (93%) rename dumux/boxmodels/2p/{2psecondaryvars.hh => 2pvolumevariables.hh} (86%) rename dumux/boxmodels/2p2c/{2p2cfluxvars.hh => 2p2cfluxvariables.hh} (93%) rename dumux/boxmodels/2p2c/{2p2csecondaryvars.hh => 2p2cvolumevariables.hh} (86%) rename dumux/boxmodels/2p2cni/{2p2cnifluxvars.hh => 2p2cnifluxvariables.hh} (84%) rename dumux/boxmodels/2p2cni/{2p2cnisecondaryvars.hh => 2p2cnivolumevariables.hh} (88%) rename dumux/boxmodels/2pni/{2pnifluxvars.hh => 2pnifluxvariables.hh} (85%) rename dumux/boxmodels/2pni/{2pnisecondaryvars.hh => 2pnivolumevariables.hh} (82%) rename dumux/boxmodels/common/{boxelementsecondaryvars.hh => boxelementvolumevariables.hh} (79%) rename dumux/boxmodels/richards/{richardsfluxvars.hh => richardsfluxvariables.hh} (90%) rename dumux/boxmodels/richards/{richardssecondaryvars.hh => richardsvolumevariables.hh} (87%) diff --git a/dumux/boxmodels/1p/1pfluxvars.hh b/dumux/boxmodels/1p/1pfluxvariables.hh similarity index 90% rename from dumux/boxmodels/1p/1pfluxvars.hh rename to dumux/boxmodels/1p/1pfluxvariables.hh index 427e790609..e6a1d02e38 100644 --- a/dumux/boxmodels/1p/1pfluxvars.hh +++ b/dumux/boxmodels/1p/1pfluxvariables.hh @@ -1,4 +1,4 @@ -// $Id: 1pfluxvars.hh 3759 2010-06-21 16:59:10Z bernd $ +// $Id: 1pfluxvariables.hh 3759 2010-06-21 16:59:10Z bernd $ /***************************************************************************** * Copyright (C) 2008-2009 by Onur Dogan * * Copyright (C) 2008-2009 by Andreas Lauser * @@ -20,8 +20,8 @@ * \brief This file contains the data which is required to calculate * the flux of the fluid over a face of a finite volume. */ -#ifndef DUMUX_1P_FLUX_DATA_HH -#define DUMUX_1P_FLUX_DATA_HH +#ifndef DUMUX_1P_FLUX_VARIABLES_HH +#define DUMUX_1P_FLUX_VARIABLES_HH #include <dumux/common/math.hh> @@ -35,16 +35,16 @@ namespace Dumux * finite volume for the one-phase model. */ template <class TypeTag> -class OnePFluxVars +class OnePFluxVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; enum { dim = GridView::dimension, @@ -62,11 +62,11 @@ class OnePFluxVars typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePIndices)) Indices; public: - OnePFluxVars(const Problem &problem, + OnePFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, int faceIdx, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) : fvElemGeom_(elemGeom) { scvfIdx_ = faceIdx; @@ -85,7 +85,7 @@ public: private: void calculateGradients_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { // calculate gradients GlobalPosition tmp(0.0); @@ -119,7 +119,7 @@ private: void calculateVelocities_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { const SpatialParameters &spatialParams = problem.spatialParameters(); typedef Dune::FieldMatrix<Scalar, dim, dim> Tensor; diff --git a/dumux/boxmodels/1p/1plocalresidual.hh b/dumux/boxmodels/1p/1plocalresidual.hh index 7683e373b8..220be3cdda 100644 --- a/dumux/boxmodels/1p/1plocalresidual.hh +++ b/dumux/boxmodels/1p/1plocalresidual.hh @@ -19,14 +19,14 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -#ifndef DUMUX_1P_BOX_JACOBIAN_HH -#define DUMUX_1P_BOX_JACOBIAN_HH +#ifndef DUMUX_1P_LOCAL_RESIDUAL_HH +#define DUMUX_1P_LOCAL_RESIDUAL_HH #include <dumux/boxmodels/common/boxlocalresidual.hh> -#include "1psecondaryvars.hh" +#include "1pvolumevariables.hh" -#include "1pfluxvars.hh" +#include "1pfluxvariables.hh" namespace Dumux { @@ -51,27 +51,27 @@ class OnePLocalResidual : public BoxLocalResidual<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSolutionVector)) ElementSolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePIndices)) Indices; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, - pressureIdx = Indices::pressureIdx, + pressureIdx = Indices::pressureIdx, }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef Dune::FieldVector<Scalar, dim> LocalPosition; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; public: - + /*! * \brief Evaluate the rate of change of all conservation @@ -81,18 +81,18 @@ public: * * This function should not include the source and sink terms. */ - void computeStorage(PrimaryVarVector &result, int scvIdx, bool usePrevSol) const + void computeStorage(PrimaryVariables &result, int scvIdx, bool usePrevSol) const { // if flag usePrevSol is set, the solution from the previous // time step is used, otherwise the current solution is // used. The secondary variables are used accordingly. This // is required to compute the derivative of the storage term // using the implicit euler method. - const ElementSecondaryVars &elemVars = usePrevSol ? this->prevSecVars_() : this->curSecVars_(); - const SecondaryVars &secVars = elemVars[scvIdx]; + const ElementVolumeVariables &elemVars = usePrevSol ? this->prevVolVars_() : this->curVolVars_(); + const VolumeVariables &volVars = elemVars[scvIdx]; // partial time derivative of the wetting phase mass - result[pressureIdx] = secVars.density * secVars.porosity; + result[pressureIdx] = volVars.density * volVars.porosity; } @@ -100,13 +100,13 @@ public: * \brief Evaluates the mass flux over a face of a subcontrol * volume. */ - void computeFlux(PrimaryVarVector &flux, int faceId) const + void computeFlux(PrimaryVariables &flux, int faceId) const { - FluxVars vars(this->problem_(), + FluxVariables vars(this->problem_(), this->elem_(), this->fvElemGeom_(), faceId, - this->curSecVars_()); + this->curVolVars_()); flux[pressureIdx] = vars.densityAtIP * vars.vDarcyNormal / vars.viscosityAtIP; } @@ -114,7 +114,7 @@ public: /*! * \brief Calculate the source term of the equation */ - void computeSource(PrimaryVarVector &q, int localVertexIdx) + void computeSource(PrimaryVariables &q, int localVertexIdx) { this->problem_().source(q, this->elem_(), @@ -126,8 +126,8 @@ public: * \brief Return the temperature given the solution vector of a * finite volume. */ - template <class PrimaryVarVector> - Scalar temperature(const PrimaryVarVector &sol) + template <class PrimaryVariables> + Scalar temperature(const PrimaryVariables &sol) { return this->problem_.temperature(); /* constant temperature */ } private: diff --git a/dumux/boxmodels/1p/1pmodel.hh b/dumux/boxmodels/1p/1pmodel.hh index 5d75e4ca03..8941567bbc 100644 --- a/dumux/boxmodels/1p/1pmodel.hh +++ b/dumux/boxmodels/1p/1pmodel.hh @@ -59,10 +59,10 @@ class OnePBoxModel : public BoxModel<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GridView::template Codim<0>::Entity Element; typedef typename GridView::template Codim<0>::Iterator ElementIterator; - + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementBoundaryTypes)) ElementBoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementMapper)) ElementMapper; @@ -80,7 +80,7 @@ public: * writer. */ template<class MultiWriter> - void addOutputVtkFields(const SolutionVector &sol, + void addOutputVtkFields(const SolutionVector &sol, MultiWriter &writer) { typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; @@ -88,13 +88,13 @@ public: // create the required scalar fields unsigned numVertices = this->problem_().gridView().size(dim); ScalarField *p = writer.template createField<Scalar, 1> (numVertices); - + unsigned numElements = this->gridView_().size(0); ScalarField *rank = writer.template createField<Scalar, 1> (numElements); FVElementGeometry fvElemGeom; - SecondaryVars secVars; + VolumeVariables volVars; ElementBoundaryTypes elemBcTypes; ElementIterator elemIt = this->gridView_().template begin<0>(); @@ -111,14 +111,14 @@ public: for (int i = 0; i < numVerts; ++i) { int globalIdx = this->vertexMapper().map(*elemIt, i, dim); - secVars.update(sol[globalIdx], + volVars.update(sol[globalIdx], this->problem_(), *elemIt, - fvElemGeom, + fvElemGeom, i, false); - - (*p)[globalIdx] = secVars.pressure; + + (*p)[globalIdx] = volVars.pressure; }; } diff --git a/dumux/boxmodels/1p/1pproblem.hh b/dumux/boxmodels/1p/1pproblem.hh index ea854a0fa1..bf5c44bfca 100644 --- a/dumux/boxmodels/1p/1pproblem.hh +++ b/dumux/boxmodels/1p/1pproblem.hh @@ -42,7 +42,7 @@ class OnePBoxProblem : public BoxProblem<TypeTag> typedef typename GridView::Grid Grid; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; - + // material properties typedef typename GET_PROP_TYPE(TypeTag, PTAG(SpatialParameters)) SpatialParameters; diff --git a/dumux/boxmodels/1p/1pproperties.hh b/dumux/boxmodels/1p/1pproperties.hh index cca0e688c1..09f7e03f40 100644 --- a/dumux/boxmodels/1p/1pproperties.hh +++ b/dumux/boxmodels/1p/1pproperties.hh @@ -40,10 +40,10 @@ template<class TypeTag> class OnePLocalResidual; template <class TypeTag> -class OnePSecondaryVars; +class OnePVolumeVariables; template <class TypeTag> -class OnePFluxVars; +class OnePFluxVariables; /*! * \brief Indices for the single phase model. @@ -71,7 +71,7 @@ NEW_TYPE_TAG(BoxOneP, INHERITS_FROM(BoxModel)); NEW_PROP_TAG(NumPhases); //!< Number of fluid phases in the system NEW_PROP_TAG(OnePIndices); //!< Enumerations for the 1p models -NEW_PROP_TAG(SpatialParameters); //!< The type of the soil properties object +NEW_PROP_TAG(SpatialParameters); //!< The type of the spatial parameters object NEW_PROP_TAG(Fluid); //!< The fluid for the single-phase problems NEW_PROP_TAG(EnableGravity); //!< Returns whether gravity is considered in the problem @@ -90,11 +90,11 @@ SET_TYPE_PROP(BoxOneP, //! the Model property SET_TYPE_PROP(BoxOneP, Model, OnePBoxModel<TypeTag>); -//! the SecondaryVars property -SET_TYPE_PROP(BoxOneP, SecondaryVars, OnePSecondaryVars<TypeTag>); +//! the VolumeVariables property +SET_TYPE_PROP(BoxOneP, VolumeVariables, OnePVolumeVariables<TypeTag>); -//! the FluxVars property -SET_TYPE_PROP(BoxOneP, FluxVars, OnePFluxVars<TypeTag>); +//! the FluxVariables property +SET_TYPE_PROP(BoxOneP, FluxVariables, OnePFluxVariables<TypeTag>); //! The indices required by the isothermal single-phase model SET_TYPE_PROP(BoxOneP, OnePIndices, OnePIndices); diff --git a/dumux/boxmodels/1p/1psecondaryvars.hh b/dumux/boxmodels/1p/1pvolumevariables.hh similarity index 81% rename from dumux/boxmodels/1p/1psecondaryvars.hh rename to dumux/boxmodels/1p/1pvolumevariables.hh index 5e4b52f58f..079c52f1c0 100644 --- a/dumux/boxmodels/1p/1psecondaryvars.hh +++ b/dumux/boxmodels/1p/1pvolumevariables.hh @@ -1,4 +1,4 @@ -// $Id: 1psecondaryvars.hh 3784 2010-06-24 13:43:57Z bernd $ +// $Id: 1pvolumevariables.hh 3784 2010-06-24 13:43:57Z bernd $ /***************************************************************************** * Copyright (C) 2008 by Onur Dogan * * Copyright (C) 2008-2009 by Andreas Lauser * @@ -19,8 +19,8 @@ * * \brief Quantities required by the single-phase box model defined on a vertex. */ -#ifndef DUMUX_1P_SECONDARY_VARS_HH -#define DUMUX_1P_SECONDARY_VARS_HH +#ifndef DUMUX_1P_VOLUME_VARIABLES_HH +#define DUMUX_1P_VOLUME_VARIABLES_HH #include "1pproperties.hh" @@ -33,27 +33,27 @@ namespace Dumux * finite volume in the one-phase model. */ template <class TypeTag> -class OnePSecondaryVars +class OnePVolumeVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) Implementation; - + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) Implementation; + typedef typename GridView::template Codim<0>::Entity Element; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, }; typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp; typedef typename RefElemProp::Container ReferenceElements; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePIndices)) Indices; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Fluid)) Fluid; @@ -64,12 +64,12 @@ public: /*! * \brief Update all quantities for a given control volume. */ - void update(const PrimaryVarVector &priVars, - const Problem &problem, - const Element &element, + void update(const PrimaryVariables &priVars, + const Problem &problem, + const Element &element, const FVElementGeometry &elemGeom, - int scvIdx, - bool isOldSol) + int scvIdx, + bool isOldSol) { primaryVars_ = priVars; @@ -95,7 +95,7 @@ public: /*! * \brief Return the vector of primary variables */ - const PrimaryVarVector &primaryVars() const + const PrimaryVariables &primaryVars() const { return primaryVars_; } Scalar pressure; @@ -104,7 +104,7 @@ public: Scalar porosity; protected: - PrimaryVarVector primaryVars_; + PrimaryVariables primaryVars_; }; } diff --git a/dumux/boxmodels/1p2c/1p2cfluidstate.hh b/dumux/boxmodels/1p2c/1p2cfluidstate.hh index 1974dba0a1..a545fafc26 100644 --- a/dumux/boxmodels/1p2c/1p2cfluidstate.hh +++ b/dumux/boxmodels/1p2c/1p2cfluidstate.hh @@ -39,7 +39,7 @@ class OnePTwoCFluidState : public FluidState<typename GET_PROP_TYPE(TypeTag, PTA typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePTwoCIndices)) Indices; @@ -55,7 +55,7 @@ public: /*! * \brief Update the phase state from the primary variables. */ - void update(const PrimaryVarVector &primaryVars, + void update(const PrimaryVariables &primaryVars, Scalar temperature) { Valgrind::CheckDefined(primaryVars); diff --git a/dumux/boxmodels/1p2c/1p2cfluxvars.hh b/dumux/boxmodels/1p2c/1p2cfluxvariables.hh similarity index 87% rename from dumux/boxmodels/1p2c/1p2cfluxvars.hh rename to dumux/boxmodels/1p2c/1p2cfluxvariables.hh index d9f9e83880..07ea1bb7bc 100644 --- a/dumux/boxmodels/1p2c/1p2cfluxvars.hh +++ b/dumux/boxmodels/1p2c/1p2cfluxvariables.hh @@ -1,4 +1,4 @@ -// $Id: 1p2cfluxvars.hh 3838 2010-07-15 08:31:53Z bernd $ +// $Id: 1p2cfluxvariables.hh 3838 2010-07-15 08:31:53Z bernd $ /***************************************************************************** * Copyright (C) 2009 by Karin Erbertseder * * Copyright (C) 2009 by Andreas Lauser * @@ -24,8 +24,8 @@ * This means pressure and temperature gradients, phase densities at * the integration point, etc. */ -#ifndef DUMUX_1P2C_FLUX_DATA_HH -#define DUMUX_1P2C_FLUX_DATA_HH +#ifndef DUMUX_1P2C_FLUX_VARIABLES_HH +#define DUMUX_1P2C_FLUX_VARIABLES_HH #include <dumux/common/math.hh> @@ -41,16 +41,16 @@ namespace Dumux * the intergration point, etc. */ template <class TypeTag> -class OnePTwoCFluxVars +class OnePTwoCFluxVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; enum { dim = GridView::dimension, @@ -71,11 +71,11 @@ class OnePTwoCFluxVars typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePTwoCIndices)) Indices; public: - OnePTwoCFluxVars(const Problem &problem, + OnePTwoCFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, int faceIdx, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) : fvElemGeom(elemGeom) { face = &fvElemGeom.subContVolFace[faceIdx]; @@ -101,7 +101,7 @@ public: private: void calculateGradients_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { GlobalPosition tmp; if (!problem.spatialParameters().useTwoPointGradient(element, face->i, face->j)) { @@ -143,16 +143,16 @@ private: tmp -= element.geometry().corner(face->j); Scalar dist = tmp.two_norm(); - tmp = face->normal; + tmp = face->normal; tmp /= face->normal.two_norm()*dist; - pressureGrad = tmp; + pressureGrad = tmp; pressureGrad *= elemDat[face->j].pressure - elemDat[face->i].pressure; - concentrationGrad = tmp; + concentrationGrad = tmp; concentrationGrad *= elemDat[face->j].molefraction - elemDat[face->i].molefraction; - densityAtIP = (elemDat[face->j].density + elemDat[face->i].density)/2; - molarDensityAtIP = (elemDat[face->j].molarDensity + elemDat[face->i].molarDensity)/2; - viscosityAtIP = (elemDat[face->j].viscosity + elemDat[face->i].viscosity)/2; + densityAtIP = (elemDat[face->j].density + elemDat[face->i].density)/2; + molarDensityAtIP = (elemDat[face->j].molarDensity + elemDat[face->i].molarDensity)/2; + viscosityAtIP = (elemDat[face->j].viscosity + elemDat[face->i].viscosity)/2; } // correct the pressure by the hydrostatic pressure due to @@ -166,7 +166,7 @@ private: void calculateVelocities_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { Tensor K; problem.spatialParameters().meanK(K, @@ -190,10 +190,10 @@ private: void calculateDiffCoeffPM_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { - const SecondaryVars &vDat_i = elemDat[face->i]; - const SecondaryVars &vDat_j = elemDat[face->j]; + const VolumeVariables &vDat_i = elemDat[face->i]; + const VolumeVariables &vDat_j = elemDat[face->j]; // Diffusion coefficient in the porous medium diffCoeffPM @@ -203,10 +203,10 @@ private: void calculateDispersionTensor_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { - const SecondaryVars &vDat_i = elemDat[face->i]; - const SecondaryVars &vDat_j = elemDat[face->j]; + const VolumeVariables &vDat_i = elemDat[face->i]; + const VolumeVariables &vDat_j = elemDat[face->j]; //calculate dispersivity at the interface: [0]: alphaL = longitudinal disp. [m], [1] alphaT = transverse disp. [m] Dune::FieldVector<Scalar, 2> dispersivity(0); diff --git a/dumux/boxmodels/1p2c/1p2clocalresidual.hh b/dumux/boxmodels/1p2c/1p2clocalresidual.hh index 5848f483ba..cf234883f6 100644 --- a/dumux/boxmodels/1p2c/1p2clocalresidual.hh +++ b/dumux/boxmodels/1p2c/1p2clocalresidual.hh @@ -15,16 +15,16 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -#ifndef DUMUX_ONEP_TWOC_BOX_JACOBIAN_HH -#define DUMUX_ONEP_TWOC_BOX_JACOBIAN_HH +#ifndef DUMUX_ONEP_TWOC_LOCAL_RESIDUAL_HH +#define DUMUX_ONEP_TWOC_LOCAL_RESIDUAL_HH #include <dumux/boxmodels/common/boxmodel.hh> #include <dumux/boxmodels/1p2c/1p2cproperties.hh> -#include <dumux/boxmodels/1p2c/1p2csecondaryvars.hh> +#include <dumux/boxmodels/1p2c/1p2cvolumevariables.hh> -#include <dumux/boxmodels/1p2c/1p2cfluxvars.hh> +#include <dumux/boxmodels/1p2c/1p2cfluxvariables.hh> #include <dune/common/collectivecommunication.hh> #include <vector> @@ -69,17 +69,17 @@ protected: typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSolutionVector)) ElementSolutionVector; typedef Dune::FieldVector<Scalar, numPhases> PhasesVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef Dune::FieldMatrix<Scalar, dim, dim> Tensor; static const Scalar upwindAlpha = GET_PROP_VALUE(TypeTag, PTAG(UpwindAlpha)); @@ -89,15 +89,15 @@ public: * \brief Evaluate the amount all conservation quantites * (e.g. phase mass) within a finite volume. */ - void computeStorage(PrimaryVarVector &result, int scvIdx, bool usePrevSol) const + void computeStorage(PrimaryVariables &result, int scvIdx, bool usePrevSol) const { // if flag usePrevSol is set, the solution from the previous // time step is used, otherwise the current solution is // used. The secondary variables are used accordingly. This // is required to compute the derivative of the storage term // using the implicit euler method. - const ElementSecondaryVars &elemDat = usePrevSol ? this->prevSecVars_() : this->curSecVars_(); - const SecondaryVars &vertDat = elemDat[scvIdx]; + const ElementVolumeVariables &elemDat = usePrevSol ? this->prevVolVars_() : this->curVolVars_(); + const VolumeVariables &vertDat = elemDat[scvIdx]; // storage term of continuity equation result[konti] = 0; @@ -110,19 +110,19 @@ public: * \brief Evaluates the mass flux over a face of a subcontrol * volume. */ - void computeFlux(PrimaryVarVector &flux, int faceId) const + void computeFlux(PrimaryVariables &flux, int faceId) const { - FluxVars vars(this->problem_(), + FluxVariables vars(this->problem_(), this->elem_(), this->fvElemGeom_(), faceId, - this->curSecVars_()); + this->curVolVars_()); flux = 0; // data attached to upstream and the downstream vertices // of the current phase - const SecondaryVars &up = this->curSecVars_(vars.upstreamIdx); - const SecondaryVars &dn = this->curSecVars_(vars.downstreamIdx); + const VolumeVariables &up = this->curVolVars_(vars.upstreamIdx); + const VolumeVariables &dn = this->curVolVars_(vars.downstreamIdx); flux[konti] = vars.vDarcyNormal / vars.viscosityAtIP; @@ -155,7 +155,7 @@ public: /*! * \brief Calculate the source term of the equation */ - void computeSource(PrimaryVarVector &q, int localVertexIdx) + void computeSource(PrimaryVariables &q, int localVertexIdx) { this->problem_().source(q, this->elem_(), diff --git a/dumux/boxmodels/1p2c/1p2cmodel.hh b/dumux/boxmodels/1p2c/1p2cmodel.hh index bd8afd7a11..675d3c93da 100644 --- a/dumux/boxmodels/1p2c/1p2cmodel.hh +++ b/dumux/boxmodels/1p2c/1p2cmodel.hh @@ -43,7 +43,7 @@ namespace Dumux * approach (neglecting gravitation) as the equation for the conservation of momentum: \f[ v_{D} = - \frac{K}{\mu} - \left(\text{grad} p - \varrho g \right) + \left(\text{grad} p - \varrho g \right) \f] * * By inserting this into the continuity equation, one gets @@ -56,7 +56,7 @@ namespace Dumux * The transport of the components is described by the following equation: \f[ \Phi \varrho \frac{ \partial x}{\partial t} - \text{div} \left( \varrho \frac{K x}{\mu} \left( \text{grad} p - - \varrho g \right) + \varrho \tau \Phi D \text{grad} x \right) = q. + \varrho g \right) + \varrho \tau \Phi D \text{grad} x \right) = q. \f] * * All equations are discretized using a fully-coupled vertex @@ -79,8 +79,8 @@ class OnePTwoCBoxModel : public BoxModel<TypeTag> typedef typename GridView::template Codim<0>::Iterator ElementIterator; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementBoundaryTypes)) ElementBoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementMapper)) ElementMapper; @@ -97,7 +97,7 @@ public: * writer. */ template<class MultiWriter> - void addOutputVtkFields(const SolutionVector &sol, + void addOutputVtkFields(const SolutionVector &sol, MultiWriter &writer) { typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; @@ -112,7 +112,7 @@ public: writer.template createField<Scalar, 1> (numElements); FVElementGeometry fvElemGeom; - SecondaryVars secVars; + VolumeVariables volVars; ElementBoundaryTypes elemBcTypes; ElementIterator elemIt = this->gridView_().template begin<0>(); @@ -129,16 +129,16 @@ public: for (int i = 0; i < numVerts; ++i) { int globalIdx = this->vertexMapper().map(*elemIt, i, dim); - secVars.update(sol[globalIdx], + volVars.update(sol[globalIdx], this->problem_(), *elemIt, - fvElemGeom, + fvElemGeom, i, false); - - (*pressure)[globalIdx] = secVars.pressure; - (*molefraction)[globalIdx] = secVars.molefraction; + + (*pressure)[globalIdx] = volVars.pressure; + (*molefraction)[globalIdx] = volVars.molefraction; }; } diff --git a/dumux/boxmodels/1p2c/1p2cproblem.hh b/dumux/boxmodels/1p2c/1p2cproblem.hh index 45f67f9d38..c222e0d4e6 100644 --- a/dumux/boxmodels/1p2c/1p2cproblem.hh +++ b/dumux/boxmodels/1p2c/1p2cproblem.hh @@ -86,13 +86,13 @@ public: { return gravity_; } /*! - * \brief Returns the soil properties object. + * \brief Returns the spatial parameters object. */ SpatialParameters &spatialParameters() { return spatialParams_; } /*! - * \copydoc soil() + * \copydoc spatialParameters() */ const SpatialParameters &spatialParameters() const { return spatialParams_; } @@ -110,7 +110,7 @@ private: GlobalPosition gravity_; - // soil properties + // spatial parameters SpatialParameters spatialParams_; }; diff --git a/dumux/boxmodels/1p2c/1p2cproperties.hh b/dumux/boxmodels/1p2c/1p2cproperties.hh index 1255e10249..435b087b57 100644 --- a/dumux/boxmodels/1p2c/1p2cproperties.hh +++ b/dumux/boxmodels/1p2c/1p2cproperties.hh @@ -39,10 +39,10 @@ template<class TypeTag> class OnePTwoCLocalResidual; template <class TypeTag> -class OnePTwoCSecondaryVars; +class OnePTwoCVolumeVariables; template <class TypeTag> -class OnePTwoCFluxVars; +class OnePTwoCFluxVariables; /*! * \brief The indices for the isothermal single-phase, two-component model. @@ -71,7 +71,7 @@ NEW_TYPE_TAG(BoxOnePTwoC, INHERITS_FROM(BoxModel)); NEW_PROP_TAG(NumPhases); //!< Number of fluid phases in the system NEW_PROP_TAG(NumComponents); //!< Number of fluid components in the system NEW_PROP_TAG(OnePTwoCIndices); //!< Enumerations for the 1p2c models -NEW_PROP_TAG(SpatialParameters); //!< The type of the soil +NEW_PROP_TAG(SpatialParameters); //!< The type of the spatial parameters NEW_PROP_TAG(FluidSystem); //!< Type of the multi-component relations NEW_PROP_TAG(UpwindAlpha); //!< The default value of the upwind parameter NEW_PROP_TAG(EnableGravity); //!< Returns whether gravity is considered in the problem @@ -80,8 +80,8 @@ NEW_PROP_TAG(EnableGravity); //!< Returns whether gravity is considered in the p // Properties ////////////////////////////////////////////////////////////////// -SET_INT_PROP(BoxOnePTwoC, NumEq, 2); //!< set the number of equations to 2 -SET_INT_PROP(BoxOnePTwoC, NumPhases, 1); //!< The number of phases in the 1p2c model is 1 +SET_INT_PROP(BoxOnePTwoC, NumEq, 2); //!< set the number of equations to 2 +SET_INT_PROP(BoxOnePTwoC, NumPhases, 1); //!< The number of phases in the 1p2c model is 1 SET_INT_PROP(BoxOnePTwoC, NumComponents, 2); //!< The number of components in the 1p2c model is 2 //! Use the 1p2c local jacobian operator for the 1p2c model @@ -92,14 +92,14 @@ SET_TYPE_PROP(BoxOnePTwoC, //! the Model property SET_TYPE_PROP(BoxOnePTwoC, Model, OnePTwoCBoxModel<TypeTag>); -//! the SecondaryVars property -SET_TYPE_PROP(BoxOnePTwoC, SecondaryVars, OnePTwoCSecondaryVars<TypeTag>); +//! the VolumeVariables property +SET_TYPE_PROP(BoxOnePTwoC, VolumeVariables, OnePTwoCVolumeVariables<TypeTag>); -//! the FluxVars property -SET_TYPE_PROP(BoxOnePTwoC, FluxVars, OnePTwoCFluxVars<TypeTag>); +//! the FluxVariables property +SET_TYPE_PROP(BoxOnePTwoC, FluxVariables, OnePTwoCFluxVariables<TypeTag>); //! the default upwind factor. Default 1.0, i.e. fully upwind... SET_SCALAR_PROP(BoxOnePTwoC, UpwindAlpha, 1.0); diff --git a/dumux/boxmodels/1p2c/1p2csecondaryvars.hh b/dumux/boxmodels/1p2c/1p2cvolumevariables.hh similarity index 82% rename from dumux/boxmodels/1p2c/1p2csecondaryvars.hh rename to dumux/boxmodels/1p2c/1p2cvolumevariables.hh index 6ac3d9ccab..7e715721ee 100644 --- a/dumux/boxmodels/1p2c/1p2csecondaryvars.hh +++ b/dumux/boxmodels/1p2c/1p2cvolumevariables.hh @@ -1,4 +1,4 @@ -// $Id: 1p2csecondaryvars.hh 3838 2010-07-15 08:31:53Z bernd $ +// $Id: 1p2cvolumevariables.hh 3838 2010-07-15 08:31:53Z bernd $ /***************************************************************************** * Copyright (C) 2009 by Karin Erbertseder * * Copyright (C) 2009 by Andreas Lauser * @@ -21,8 +21,8 @@ * \brief Quantities required by the single-phase, two-component box * model defined on a vertex. */ -#ifndef DUMUX_1P2C_SECONDARY_VARS_HH -#define DUMUX_1P2C_SECONDARY_VARS_HH +#ifndef DUMUX_1P2C_VOLUME_VARIABLES_HH +#define DUMUX_1P2C_VOLUME_VARIABLES_HH #include "1p2cfluidstate.hh" @@ -34,24 +34,24 @@ namespace Dumux * finite volume in the single-phase, two-component model. */ template <class TypeTag> -class OnePTwoCSecondaryVars +class OnePTwoCVolumeVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePTwoCIndices)) Indices; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) Implementation; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) Implementation; typedef OnePTwoCFluidState<TypeTag> FluidState; typedef typename GridView::template Codim<0>::Entity Element; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), numComponents = GET_PROP_VALUE(TypeTag, PTAG(NumComponents)), - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, konti = Indices::konti, transport = Indices::transport @@ -63,7 +63,7 @@ class OnePTwoCSecondaryVars typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; @@ -73,12 +73,12 @@ public: /*! * \brief Update all quantities for a given control volume. */ - void update(const PrimaryVarVector &priVars, - const Problem &problem, - const Element &element, + void update(const PrimaryVariables &priVars, + const Problem &problem, + const Element &element, const FVElementGeometry &elemGeom, - int scvIdx, - bool isOldSol) + int scvIdx, + bool isOldSol) { primaryVars_ = priVars; @@ -106,7 +106,7 @@ public: /*! * \brief Return the vector of primary variables */ - const PrimaryVarVector &primaryVars() const + const PrimaryVariables &primaryVars() const { return primaryVars_; } Scalar porosity; @@ -121,7 +121,7 @@ public: FluidState fluidState_; protected: - PrimaryVarVector primaryVars_; + PrimaryVariables primaryVars_; }; } diff --git a/dumux/boxmodels/2p/2pfluxvars.hh b/dumux/boxmodels/2p/2pfluxvariables.hh similarity index 93% rename from dumux/boxmodels/2p/2pfluxvars.hh rename to dumux/boxmodels/2p/2pfluxvariables.hh index 906acd021b..51ced18897 100644 --- a/dumux/boxmodels/2p/2pfluxvars.hh +++ b/dumux/boxmodels/2p/2pfluxvariables.hh @@ -1,4 +1,4 @@ -// $Id: 2pfluxvars.hh 3736 2010-06-15 09:52:10Z lauser $ +// $Id: 2pfluxvariables.hh 3736 2010-06-15 09:52:10Z lauser $ /***************************************************************************** * Copyright (C) 2008 by Bernd Flemisch * * Copyright (C) 2008-2009 by Andreas Lauser * @@ -23,8 +23,8 @@ * This means pressure and temperature gradients, phase densities at * the integration point, etc. */ -#ifndef DUMUX_2P_FLUX_DATA_HH -#define DUMUX_2P_FLUX_DATA_HH +#ifndef DUMUX_2P_FLUX_VARIABLES_HH +#define DUMUX_2P_FLUX_VARIABLES_HH #include <dumux/common/math.hh> @@ -41,17 +41,17 @@ namespace Dumux * the intergration point, etc. */ template <class TypeTag> -class TwoPFluxVars +class TwoPFluxVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; typedef typename GridView::ctype CoordScalar; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; enum { dim = GridView::dimension, @@ -71,11 +71,11 @@ class TwoPFluxVars typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; public: - TwoPFluxVars(const Problem &problem, + TwoPFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, int faceIdx, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) : fvElemGeom_(elemGeom) { scvfIdx_ = faceIdx; @@ -156,7 +156,7 @@ protected: private: void calculateGradients_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { // calculate gradients Vector tmp(0.0); @@ -196,7 +196,7 @@ private: void calculateVelocities_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { const SpatialParameters &spatialParams = problem.spatialParameters(); // multiply the pressure potential with the intrinsic diff --git a/dumux/boxmodels/2p/2plocalresidual.hh b/dumux/boxmodels/2p/2plocalresidual.hh index e6d9e5e35c..d0dc353cc6 100644 --- a/dumux/boxmodels/2p/2plocalresidual.hh +++ b/dumux/boxmodels/2p/2plocalresidual.hh @@ -19,16 +19,16 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -#ifndef DUMUX_TWOP_BOX_JACOBIAN_BASE_HH -#define DUMUX_TWOP_BOX_JACOBIAN_BASE_HH +#ifndef DUMUX_TWOP_LOCAL_RESIDUAL_BASE_HH +#define DUMUX_TWOP_LOCAL_RESIDUAL_BASE_HH #include <dumux/boxmodels/common/boxmodel.hh> #include "2pproperties.hh" -#include "2psecondaryvars.hh" +#include "2pvolumevariables.hh" -#include "2pfluxvars.hh" +#include "2pfluxvariables.hh" #include "2pfluidstate.hh" #include <dune/common/collectivecommunication.hh> @@ -84,7 +84,7 @@ protected: typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; typedef typename GET_PROP_TYPE(TypeTag, PTAG(DofMapper)) DofMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSolutionVector)) ElementSolutionVector; @@ -92,11 +92,11 @@ protected: typedef Dune::FieldVector<Scalar, numPhases> PhasesVector; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef Dune::FieldMatrix<Scalar, dim, dim> Tensor; static const Scalar mobilityUpwindAlpha = @@ -107,15 +107,15 @@ public: * \brief Evaluate the amount all conservation quantites * (e.g. phase mass) within a finite sub-control volume. */ - void computeStorage(PrimaryVarVector &result, int scvIdx, bool usePrevSol) const + void computeStorage(PrimaryVariables &result, int scvIdx, bool usePrevSol) const { // if flag usePrevSol is set, the solution from the previous // time step is used, otherwise the current solution is // used. The secondary variables are used accordingly. This // is required to compute the derivative of the storage term // using the implicit euler method. - const ElementSecondaryVars &elemDat = usePrevSol ? this->prevSecVars_() : this->curSecVars_(); - const SecondaryVars &vertDat = elemDat[scvIdx]; + const ElementVolumeVariables &elemDat = usePrevSol ? this->prevVolVars_() : this->curVolVars_(); + const VolumeVariables &vertDat = elemDat[scvIdx]; // wetting phase mass result[contiWEqIdx] = vertDat.density(wPhaseIdx) * vertDat.porosity() @@ -131,13 +131,13 @@ public: * \brief Evaluates the mass flux over a face of a sub-control * volume. */ - void computeFlux(PrimaryVarVector &flux, int faceIdx) const + void computeFlux(PrimaryVariables &flux, int faceIdx) const { - FluxVars vars(this->problem_(), + FluxVariables vars(this->problem_(), this->elem_(), this->fvElemGeom_(), faceIdx, - this->curSecVars_()); + this->curVolVars_()); flux = 0; asImp_()->computeAdvectiveFlux(flux, vars); asImp_()->computeDiffusiveFlux(flux, vars); @@ -151,7 +151,7 @@ public: * This method is called by compute flux and is mainly there for * derived models to ease adding equations selectively. */ - void computeAdvectiveFlux(PrimaryVarVector &flux, const FluxVars &vars) const + void computeAdvectiveFlux(PrimaryVariables &flux, const FluxVariables &vars) const { //////// // advective fluxes of all components in all phases @@ -160,8 +160,8 @@ public: { // data attached to upstream and the downstream vertices // of the current phase - const SecondaryVars &up = this->curSecVars_(vars.upstreamIdx(phaseIdx)); - const SecondaryVars &dn = this->curSecVars_(vars.downstreamIdx(phaseIdx)); + const VolumeVariables &up = this->curVolVars_(vars.upstreamIdx(phaseIdx)); + const VolumeVariables &dn = this->curVolVars_(vars.downstreamIdx(phaseIdx)); // add advective flux of current component in current // phase @@ -181,7 +181,7 @@ public: * non-isothermal two-phase models to calculate diffusive heat * fluxes */ - void computeDiffusiveFlux(PrimaryVarVector &flux, const FluxVars &fluxData) const + void computeDiffusiveFlux(PrimaryVariables &flux, const FluxVariables &fluxData) const { // diffusive fluxes flux += 0.0; @@ -190,11 +190,11 @@ public: /*! * \brief Calculate the source term of the equation */ - void computeSource(PrimaryVarVector &q, int localVertexIdx) + void computeSource(PrimaryVariables &q, int localVertexIdx) { // retrieve the source term intrinsic to the problem this->problem_().source(q, - this->elem_(), + this->elem_(), this->fvElemGeom_(), localVertexIdx); } diff --git a/dumux/boxmodels/2p/2pmodel.hh b/dumux/boxmodels/2p/2pmodel.hh index 5b3f302e35..dbb54d0e2e 100644 --- a/dumux/boxmodels/2p/2pmodel.hh +++ b/dumux/boxmodels/2p/2pmodel.hh @@ -86,10 +86,10 @@ class TwoPModel : public BoxModel<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GridView::template Codim<0>::Entity Element; typedef typename GridView::template Codim<0>::Iterator ElementIterator; - + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementMapper)) ElementMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; @@ -101,7 +101,7 @@ class TwoPModel : public BoxModel<TypeTag> wPhaseIdx = Indices::wPhaseIdx, }; -public: +public: /*! * \brief Calculate mass of both components in the whole model domain * and get minimum and maximum values of primary variables @@ -117,7 +117,7 @@ public: this->gridView_().template begin<0> (); ElementIterator endit = this->gridView_().template end<0> (); - ElementSecondaryVars elemDat; + ElementVolumeVariables elemDat; Scalar minSat = 1e100; Scalar maxSat = -1e100; @@ -129,7 +129,7 @@ public: #endif FVElementGeometry fvElemGeom; - SecondaryVars secVars; + VolumeVariables volVars; ElementIterator elemIt = this->gridView_().template begin<0>(); ElementIterator elemEndIt = this->gridView_().template end<0>(); @@ -141,18 +141,18 @@ public: for (int i = 0; i < numLocalVerts; ++i) { int globalIdx = this->vertexMapper().map(*elemIt, i, dim); - secVars.update(sol[globalIdx], + volVars.update(sol[globalIdx], this->problem_(), *elemIt, - fvElemGeom, + fvElemGeom, i, false); Scalar vol = fvElemGeom.subContVol[i].volume; - Scalar satN = secVars.saturation(nPhaseIdx); - Scalar pW = secVars.pressure(wPhaseIdx); - Scalar T = secVars.temperature(); + Scalar satN = volVars.saturation(nPhaseIdx); + Scalar pW = volVars.pressure(wPhaseIdx); + Scalar T = volVars.temperature(); // get minimum and maximum values of primary variables minSat = std::min(minSat, satN); @@ -164,11 +164,11 @@ public: maxTe = std::max(maxTe, T); #endif - mass[nPhaseIdx] += secVars.porosity() * secVars.saturation(nPhaseIdx) - * secVars.density(nPhaseIdx) * vol; + mass[nPhaseIdx] += volVars.porosity() * volVars.saturation(nPhaseIdx) + * volVars.density(nPhaseIdx) * vol; - mass[wPhaseIdx] += secVars.porosity() * secVars.saturation(wPhaseIdx) - * secVars.density(wPhaseIdx) * vol; + mass[wPhaseIdx] += volVars.porosity() * volVars.saturation(wPhaseIdx) + * volVars.density(wPhaseIdx) * vol; } } @@ -201,7 +201,7 @@ public: * writer. */ template<class MultiWriter> - void addOutputVtkFields(const SolutionVector &sol, + void addOutputVtkFields(const SolutionVector &sol, MultiWriter &writer) { typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; @@ -225,7 +225,7 @@ public: writer.template createField<Scalar, 1> (numElements); FVElementGeometry fvElemGeom; - SecondaryVars secVars; + VolumeVariables volVars; ElementIterator elemIt = this->gridView_().template begin<0>(); ElementIterator elemEndIt = this->gridView_().template end<0>(); @@ -240,24 +240,24 @@ public: for (int i = 0; i < numVerts; ++i) { int globalIdx = this->vertexMapper().map(*elemIt, i, dim); - secVars.update(sol[globalIdx], + volVars.update(sol[globalIdx], this->problem_(), *elemIt, - fvElemGeom, + fvElemGeom, i, false); - - (*pW)[globalIdx] = secVars.pressure(wPhaseIdx); - (*pN)[globalIdx] = secVars.pressure(nPhaseIdx); - (*pC)[globalIdx] = secVars.capillaryPressure(); - (*Sw)[globalIdx] = secVars.saturation(wPhaseIdx); - (*Sn)[globalIdx] = secVars.saturation(nPhaseIdx); - (*rhoW)[globalIdx] = secVars.density(wPhaseIdx); - (*rhoN)[globalIdx] = secVars.density(nPhaseIdx); - (*mobW)[globalIdx] = secVars.mobility(wPhaseIdx); - (*mobN)[globalIdx] = secVars.mobility(nPhaseIdx); - (*poro)[globalIdx] = secVars.porosity(); - (*Te)[globalIdx] = secVars.temperature(); + + (*pW)[globalIdx] = volVars.pressure(wPhaseIdx); + (*pN)[globalIdx] = volVars.pressure(nPhaseIdx); + (*pC)[globalIdx] = volVars.capillaryPressure(); + (*Sw)[globalIdx] = volVars.saturation(wPhaseIdx); + (*Sn)[globalIdx] = volVars.saturation(nPhaseIdx); + (*rhoW)[globalIdx] = volVars.density(wPhaseIdx); + (*rhoN)[globalIdx] = volVars.density(nPhaseIdx); + (*mobW)[globalIdx] = volVars.mobility(wPhaseIdx); + (*mobN)[globalIdx] = volVars.mobility(nPhaseIdx); + (*poro)[globalIdx] = volVars.porosity(); + (*Te)[globalIdx] = volVars.temperature(); }; } diff --git a/dumux/boxmodels/2p/2pproblem.hh b/dumux/boxmodels/2p/2pproblem.hh index bc0230aed6..948320e7c4 100644 --- a/dumux/boxmodels/2p/2pproblem.hh +++ b/dumux/boxmodels/2p/2pproblem.hh @@ -54,8 +54,8 @@ class TwoPProblem : public BoxProblem<TypeTag> typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; public: - TwoPProblem(TimeManager &timeManager, - const GridView &gridView, + TwoPProblem(TimeManager &timeManager, + const GridView &gridView, bool verbose = true) : ParentType(timeManager, gridView), gravity_(0) @@ -68,9 +68,9 @@ public: gravity_[dim-1] = -9.81; } - TwoPProblem(TimeManager &timeManager, + TwoPProblem(TimeManager &timeManager, const GridView &gridView, - SpatialParameters &spatialParameters, + SpatialParameters &spatialParameters, bool verbose = true) : ParentType(timeManager, gridView), spatialParameters_(&spatialParameters), gravity_(0) diff --git a/dumux/boxmodels/2p/2pproperties.hh b/dumux/boxmodels/2p/2pproperties.hh index 8bdaf1ccd5..7410caafdf 100644 --- a/dumux/boxmodels/2p/2pproperties.hh +++ b/dumux/boxmodels/2p/2pproperties.hh @@ -46,10 +46,10 @@ template <class TypeTag> class TwoPProblem; template <class TypeTag> -class TwoPSecondaryVars; +class TwoPVolumeVariables; template <class TypeTag> -class TwoPFluxVars; +class TwoPFluxVariables; template<class TypeTag> class FluidSystem2P; @@ -81,7 +81,7 @@ template <int formulation = TwoPCommonIndices::pwSn, int PVOffset = 0> struct TwoPIndices : public TwoPCommonIndices { // Primary variable indices - static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector + static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector static const int saturationIdx = PVOffset + 1; //!< Index of the saturation of the non-wetting/wetting phase // indices of the primary variables @@ -104,7 +104,7 @@ struct TwoPIndices<TwoPCommonIndices::pnSw, PVOffset> : public TwoPCommonIndices { // Primary variable indices - static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector + static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector static const int saturationIdx = PVOffset + 1; //!< Index of the saturation of the non-wetting/wetting phase // indices of the primary variables @@ -145,9 +145,9 @@ NEW_PROP_TAG(EnableGravity); //!< Returns whether gravity is considered in the p NEW_PROP_TAG(MobilityUpwindAlpha); //!< The value of the upwind parameter for the mobility NEW_PROP_TAG(Formulation); //!< The formulation of the model NEW_PROP_TAG(TwoPIndices); //!< Enumerations for the 2p models -NEW_PROP_TAG(SpatialParameters); //!< The type of the soil properties object -NEW_PROP_TAG(MaterialLaw); //!< The material law which ought to be used (extracted from the soil) -NEW_PROP_TAG(MaterialLawParams); //!< The context material law (extracted from the soil) +NEW_PROP_TAG(SpatialParameters); //!< The type of the spatial parameters object +NEW_PROP_TAG(MaterialLaw); //!< The material law which ought to be used (extracted from the spatial parameters) +NEW_PROP_TAG(MaterialLawParams); //!< The context material law (extracted from the spatial parameters) NEW_PROP_TAG(WettingPhase); //!< The wetting phase for two-phase models NEW_PROP_TAG(NonwettingPhase); //!< The non-wetting phase for two-phase models NEW_PROP_TAG( FluidSystem ); //!<The fluid systems including the information about the phases @@ -157,8 +157,8 @@ NEW_PROP_TAG( FluidState ); //!<The phases state // Properties ////////////////////////////////////////////////////////////////// -SET_INT_PROP(BoxTwoP, NumEq, 2); //!< set the number of equations to 2 -SET_INT_PROP(BoxTwoP, NumPhases, 2); //!< The number of phases in the 2p model is 2 +SET_INT_PROP(BoxTwoP, NumEq, 2); //!< set the number of equations to 2 +SET_INT_PROP(BoxTwoP, NumPhases, 2); //!< The number of phases in the 2p model is 2 //! Set the default formulation to pWsN SET_INT_PROP(BoxTwoP, @@ -176,14 +176,14 @@ SET_TYPE_PROP(BoxTwoP, Model, TwoPModel<TypeTag>); //! the default newton controller for two-phase problems SET_TYPE_PROP(BoxTwoP, NewtonController, TwoPNewtonController<TypeTag>); -//! the SecondaryVars property -SET_TYPE_PROP(BoxTwoP, SecondaryVars, TwoPSecondaryVars<TypeTag>); +//! the VolumeVariables property +SET_TYPE_PROP(BoxTwoP, VolumeVariables, TwoPVolumeVariables<TypeTag>); -//! the FluxVars property -SET_TYPE_PROP(BoxTwoP, FluxVars, TwoPFluxVars<TypeTag>); +//! the FluxVariables property +SET_TYPE_PROP(BoxTwoP, FluxVariables, TwoPFluxVariables<TypeTag>); //! the upwind factor for the mobility. -SET_SCALAR_PROP(BoxTwoP, MobilityUpwindAlpha, 1.0); +SET_SCALAR_PROP(BoxTwoP, MobilityUpwindAlpha, 1.0); //! The indices required by the isothermal 2p model SET_PROP(BoxTwoP, TwoPIndices) diff --git a/dumux/boxmodels/2p/2psecondaryvars.hh b/dumux/boxmodels/2p/2pvolumevariables.hh similarity index 86% rename from dumux/boxmodels/2p/2psecondaryvars.hh rename to dumux/boxmodels/2p/2pvolumevariables.hh index d6bd569614..9019af3eb9 100644 --- a/dumux/boxmodels/2p/2psecondaryvars.hh +++ b/dumux/boxmodels/2p/2pvolumevariables.hh @@ -1,4 +1,4 @@ -// $Id: 2psecondaryvars.hh 3784 2010-06-24 13:43:57Z bernd $ +// $Id: 2pvolumevariables.hh 3784 2010-06-24 13:43:57Z bernd $ /***************************************************************************** * Copyright (C) 2008 by Bernd Flemisch * * Copyright (C) 2008-2009 by Andreas Lauser * @@ -19,8 +19,8 @@ * * \brief Quantities required by the twophase box model defined on a vertex. */ -#ifndef DUMUX_2P_SECONDARY_VARS_HH -#define DUMUX_2P_SECONDARY_VARS_HH +#ifndef DUMUX_2P_VOLUME_VARIABLES_HH +#define DUMUX_2P_VOLUME_VARIABLES_HH #include "2pproperties.hh" @@ -33,22 +33,22 @@ namespace Dumux * finite volume in the two-phase model. */ template <class TypeTag> -class TwoPSecondaryVars +class TwoPVolumeVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) Implementation; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) Implementation; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), - formulation = GET_PROP_VALUE(TypeTag, PTAG(Formulation)), + formulation = GET_PROP_VALUE(TypeTag, PTAG(Formulation)), - dim = GridView::dimension, - dimWorld = GridView::dimensionworld + dim = GridView::dimension, + dimWorld = GridView::dimensionworld }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; @@ -73,7 +73,7 @@ class TwoPSecondaryVars typedef typename GET_PROP_TYPE(TypeTag, PTAG(MaterialLaw)) MaterialLaw; typedef typename GET_PROP_TYPE(TypeTag, PTAG(MaterialLawParams)) MaterialLawParams; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef Dune::FieldVector<Scalar, numPhases> PhasesVector; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; @@ -83,12 +83,12 @@ public: /*! * \brief Update all quantities for a given control volume. */ - void update(const PrimaryVarVector &priVars, - const Problem &problem, - const Element &element, + void update(const PrimaryVariables &priVars, + const Problem &problem, + const Element &element, const FVElementGeometry &elemGeom, - int scvIdx, - bool isOldSol) + int scvIdx, + bool isOldSol) { primaryVars_ = priVars; @@ -142,11 +142,11 @@ public: scvIdx); } - void updateTemperature_(const PrimaryVarVector &priVars, - const Element &element, + void updateTemperature_(const PrimaryVariables &priVars, + const Element &element, const FVElementGeometry &elemGeom, int scvIdx, - const Problem &problem) + const Problem &problem) { temperature_ = problem.temperature(element, elemGeom, scvIdx); } @@ -154,7 +154,7 @@ public: /*! * \brief Return the vector of primary variables */ - const PrimaryVarVector &primaryVars() const + const PrimaryVariables &primaryVars() const { return primaryVars_; } /*! @@ -220,7 +220,7 @@ public: { return porosity_; } protected: - PrimaryVarVector primaryVars_; + PrimaryVariables primaryVars_; FluidState fluidState_; Scalar porosity_; Scalar temperature_; diff --git a/dumux/boxmodels/2p2c/2p2cfluidstate.hh b/dumux/boxmodels/2p2c/2p2cfluidstate.hh index ad4e5bccc9..fea3f92984 100644 --- a/dumux/boxmodels/2p2c/2p2cfluidstate.hh +++ b/dumux/boxmodels/2p2c/2p2cfluidstate.hh @@ -43,7 +43,7 @@ class TwoPTwoCFluidState : public FluidState<typename GET_PROP_TYPE(TypeTag, PTA typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPTwoCIndices)) Indices; @@ -83,7 +83,7 @@ public: /*! * \brief Update the phase state from the primary variables. */ - void update(const PrimaryVarVector &primaryVars, + void update(const PrimaryVariables &primaryVars, const MaterialLawParams &pcParams, Scalar temperature, int phasePresence) diff --git a/dumux/boxmodels/2p2c/2p2cfluxvars.hh b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh similarity index 93% rename from dumux/boxmodels/2p2c/2p2cfluxvars.hh rename to dumux/boxmodels/2p2c/2p2cfluxvariables.hh index f53c0170bc..776905b43e 100644 --- a/dumux/boxmodels/2p2c/2p2cfluxvars.hh +++ b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh @@ -1,4 +1,4 @@ -// $Id: 2p2cfluxvars.hh 3736 2010-06-15 09:52:10Z lauser $ +// $Id: 2p2cfluxvariables.hh 3736 2010-06-15 09:52:10Z lauser $ /***************************************************************************** * Copyright (C) 2008-2009 by Klaus Mosthaf * * Copyright (C) 2008-2009 by Andreas Lauser * @@ -25,8 +25,8 @@ * This means pressure, concentration and temperature gradients, phase * densities, etc. at the integration points of the control volume */ -#ifndef DUMUX_2P2C_FLUX_DATA_HH -#define DUMUX_2P2C_FLUX_DATA_HH +#ifndef DUMUX_2P2C_FLUX_VARIABLES_HH +#define DUMUX_2P2C_FLUX_VARIABLES_HH #include <dumux/common/math.hh> #include <dumux/common/spline.hh> @@ -43,17 +43,17 @@ namespace Dumux * the intergration point, etc. */ template <class TypeTag> -class TwoPTwoCFluxVars +class TwoPTwoCFluxVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; typedef typename GridView::ctype CoordScalar; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; enum { dim = GridView::dimension, @@ -79,11 +79,11 @@ class TwoPTwoCFluxVars }; public: - TwoPTwoCFluxVars(const Problem &problem, + TwoPTwoCFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, int faceIdx, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) : fvElemGeom_(elemGeom) { scvfIdx_ = faceIdx; @@ -104,7 +104,7 @@ public: private: void calculateGradients_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { // calculate gradients Vector tmp(0.0); @@ -176,7 +176,7 @@ private: } } - Scalar rhoFactor_(int phaseIdx, int scvIdx, const ElementSecondaryVars &vDat) + Scalar rhoFactor_(int phaseIdx, int scvIdx, const ElementVolumeVariables &vDat) { static const Scalar eps = 1e-2; const Scalar sat = vDat[scvIdx].density(phaseIdx); @@ -193,7 +193,7 @@ private: void calculateVelocities_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { const SpatialParameters &spatialParams = problem.spatialParameters(); // multiply the pressure potential with the intrinsic @@ -228,10 +228,10 @@ private: void calculateDiffCoeffPM_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { - const SecondaryVars &vDat_i = elemDat[face().i]; - const SecondaryVars &vDat_j = elemDat[face().j]; + const VolumeVariables &vDat_i = elemDat[face().i]; + const VolumeVariables &vDat_j = elemDat[face().j]; for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { diff --git a/dumux/boxmodels/2p2c/2p2clocalresidual.hh b/dumux/boxmodels/2p2c/2p2clocalresidual.hh index d08050b4bd..c444121eaf 100644 --- a/dumux/boxmodels/2p2c/2p2clocalresidual.hh +++ b/dumux/boxmodels/2p2c/2p2clocalresidual.hh @@ -15,17 +15,17 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -#ifndef DUMUX_NEW_2P2C_BOX_JACOBIAN_BASE_HH -#define DUMUX_NEW_2P2C_BOX_JACOBIAN_BASE_HH +#ifndef DUMUX_NEW_2P2C_LOCAL_RESIDUAL_BASE_HH +#define DUMUX_NEW_2P2C_LOCAL_RESIDUAL_BASE_HH #include <dumux/boxmodels/common/boxmodel.hh> #include <dumux/common/math.hh> #include "2p2cproperties.hh" -#include "2p2csecondaryvars.hh" +#include "2p2cvolumevariables.hh" -#include "2p2cfluxvars.hh" +#include "2p2cfluxvariables.hh" #include "2p2cnewtoncontroller.hh" @@ -61,7 +61,7 @@ protected: typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSolutionVector)) ElementSolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef TwoPTwoCFluidState<TypeTag> FluidState; @@ -98,9 +98,9 @@ protected: formulation = GET_PROP_VALUE(TypeTag, PTAG(Formulation)) }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; typedef Dune::FieldVector<Scalar, numPhases> PhasesVector; typedef Dune::FieldVector<Scalar, dim> LocalPosition; @@ -118,16 +118,16 @@ public: * The result should be averaged over the volume (e.g. phase mass * inside a sub control volume divided by the volume) */ - void computeStorage(PrimaryVarVector &result, int scvIdx, bool usePrevSol) const + void computeStorage(PrimaryVariables &result, int scvIdx, bool usePrevSol) const { // if flag usePrevSol is set, the solution from the previous // time step is used, otherwise the current solution is // used. The secondary variables are used accordingly. This // is required to compute the derivative of the storage term // using the implicit euler method. - const ElementSecondaryVars &elemDat = usePrevSol ? this->prevSecVars_() - : this->curSecVars_(); - const SecondaryVars &vertDat = elemDat[scvIdx]; + const ElementVolumeVariables &elemDat = usePrevSol ? this->prevVolVars_() + : this->curVolVars_(); + const VolumeVariables &vertDat = elemDat[scvIdx]; // compute storage term of all components within all phases result = 0; @@ -148,13 +148,13 @@ public: * \brief Evaluates the total flux of all conservation quantities * over a face of a subcontrol volume. */ - void computeFlux(PrimaryVarVector &flux, int faceIdx) const + void computeFlux(PrimaryVariables &flux, int faceIdx) const { - FluxVars vars(this->problem_(), + FluxVariables vars(this->problem_(), this->elem_(), - this->fvElemGeom_(), - faceIdx, - this->curSecVars_()); + this->fvElemGeom_(), + faceIdx, + this->curVolVars_()); flux = 0; asImp_()->computeAdvectiveFlux(flux, vars); @@ -169,7 +169,7 @@ public: * \brief Evaluates the advective mass flux of all components over * a face of a subcontrol volume. */ - void computeAdvectiveFlux(PrimaryVarVector &flux, const FluxVars &vars) const + void computeAdvectiveFlux(PrimaryVariables &flux, const FluxVariables &vars) const { //////// // advective fluxes of all components in all phases @@ -178,9 +178,9 @@ public: { // data attached to upstream and the downstream vertices // of the current phase - const SecondaryVars &up = - this->curSecVars_(vars.upstreamIdx(phaseIdx)); - const SecondaryVars &dn = this->curSecVars_()[vars.downstreamIdx( + const VolumeVariables &up = + this->curVolVars_(vars.upstreamIdx(phaseIdx)); + const VolumeVariables &dn = this->curVolVars_()[vars.downstreamIdx( phaseIdx)]; for (int compIdx = 0; compIdx < numComponents; ++compIdx) @@ -208,19 +208,19 @@ public: * \brief Adds the diffusive mass flux of all components over * a face of a subcontrol volume. */ - void computeDiffusiveFlux(PrimaryVarVector &flux, const FluxVars &vars) const + void computeDiffusiveFlux(PrimaryVariables &flux, const FluxVariables &vars) const { // add diffusive flux of gas component in liquid phase - Scalar tmp = - - vars.porousDiffCoeff(lPhaseIdx) * + Scalar tmp = + - vars.porousDiffCoeff(lPhaseIdx) * vars.molarDensityAtIP(lPhaseIdx) * (vars.molarConcGrad(lPhaseIdx) * vars.face().normal); flux[contiGEqIdx] += tmp * FluidSystem::molarMass(gCompIdx); flux[contiLEqIdx] -= tmp * FluidSystem::molarMass(lCompIdx); // add diffusive flux of liquid component in gas phase - tmp = - - vars.porousDiffCoeff(gPhaseIdx) * + tmp = + - vars.porousDiffCoeff(gPhaseIdx) * vars.molarDensityAtIP(gPhaseIdx) * (vars.molarConcGrad(gPhaseIdx) * vars.face().normal); flux[contiLEqIdx] += tmp * FluidSystem::molarMass(lCompIdx); @@ -230,7 +230,7 @@ public: /*! * \brief Calculate the source term of the equation */ - void computeSource(PrimaryVarVector &q, int localVertexIdx) + void computeSource(PrimaryVariables &q, int localVertexIdx) { this->problem_().source(q, this->elem_(), diff --git a/dumux/boxmodels/2p2c/2p2cmodel.hh b/dumux/boxmodels/2p2c/2p2cmodel.hh index bf377db59a..002fd68840 100644 --- a/dumux/boxmodels/2p2c/2p2cmodel.hh +++ b/dumux/boxmodels/2p2c/2p2cmodel.hh @@ -47,7 +47,7 @@ namespace Dumux * By inserting this into the equations for the conservation of the * components, one gets one transport equation for each component * \f{eqnarray*} - && \phi \frac{\partial (\sum_\alpha \varrho_\alpha X_\alpha^\kappa S_\alpha )} + && \phi \frac{\partial (\sum_\alpha \varrho_\alpha X_\alpha^\kappa S_\alpha )} {\partial t} - \sum_\alpha \nabla \cdot \left\{ \varrho_\alpha X_\alpha^\kappa \frac{k_{r\alpha}}{\mu_\alpha} \mbox{\bf K} @@ -94,10 +94,10 @@ class TwoPTwoCModel: public BoxModel<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; - + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementBoundaryTypes)) ElementBoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementMapper)) ElementMapper; @@ -139,7 +139,7 @@ class TwoPTwoCModel: public BoxModel<TypeTag> typedef typename GridView::template Codim<0>::Entity Element; typedef typename GridView::template Codim<0>::Iterator ElementIterator; typedef typename GridView::template Codim<dim>::Iterator VertexIterator; - + typedef Dune::FieldVector<Scalar, dim> LocalPosition; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; @@ -152,7 +152,7 @@ public: ParentType::init(problem); staticVertexDat_.resize(this->gridView_().size(dim)); - + setSwitched_(false); VertexIterator it = this->gridView_().template begin<dim> (); @@ -238,7 +238,7 @@ public: ElementIterator endit = this->gridView_().template end<0> (); FVElementGeometry fvElemGeom; - SecondaryVars secVars; + VolumeVariables volVars; Scalar minSat = 1e100; Scalar maxSat = -1e100; @@ -254,20 +254,20 @@ public: { if (elemIt->partitionType() != Dune::InteriorEntity) continue; - + fvElemGeom.update(this->gridView_(), *elemIt); // Loop over element vertices for (int i = 0; i < fvElemGeom.numVertices; ++i) { int globalIdx = this->vertexMapper().map(*elemIt, i, dim); - secVars.update(sol[globalIdx], + volVars.update(sol[globalIdx], this->problem_(), *elemIt, - fvElemGeom, + fvElemGeom, i, false); - const FluidState &fs = secVars.fluidState(); + const FluidState &fs = volVars.fluidState(); Scalar vol = fvElemGeom.subContVol[i].volume; Scalar satN = fs.saturation(gPhaseIdx); @@ -286,12 +286,12 @@ public: maxTe = std::max(maxTe, T); // calculate total mass - Scalar mGas = secVars.porosity() * fs.saturation(gPhaseIdx) + Scalar mGas = volVars.porosity() * fs.saturation(gPhaseIdx) * fs.density(gPhaseIdx) * vol; massGas[lCompIdx] += mGas * fs.massFrac(gPhaseIdx, lCompIdx); massGas[gCompIdx] += mGas * fs.massFrac(gPhaseIdx, gCompIdx); - Scalar mLiquid = secVars.porosity() * fs.saturation(lPhaseIdx) + Scalar mLiquid = volVars.porosity() * fs.saturation(lPhaseIdx) * fs.density(lPhaseIdx) * vol; massLiquid[lCompIdx] += mLiquid * fs.massFrac(lPhaseIdx, lCompIdx); @@ -338,7 +338,7 @@ public: * writer. */ template<class MultiWriter> - void addOutputVtkFields(const SolutionVector &sol, + void addOutputVtkFields(const SolutionVector &sol, MultiWriter &writer) { typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; @@ -368,7 +368,7 @@ public: ScalarField *temperature = writer.template createField<Scalar, 1>(numVertices); ScalarField *poro = writer.template createField<Scalar, 1>(numVertices); -#ifdef VELOCITY_OUTPUT // check if velocity output is demanded +#ifdef VELOCITY_OUTPUT // check if velocity output is demanded ScalarField *velocityX = writer.template createField<Scalar, 1>(numVertices); ScalarField *velocityY = writer.template createField<Scalar, 1>(numVertices); ScalarField *velocityZ = writer.template createField<Scalar, 1>(numVertices); @@ -392,7 +392,7 @@ public: writer.template createField<Scalar, 1> (numElements); FVElementGeometry fvElemGeom; - SecondaryVars secVars; + VolumeVariables volVars; ElementIterator elemIt = this->gridView_().template begin<0>(); ElementIterator elemEndIt = this->gridView_().template end<0>(); @@ -406,38 +406,38 @@ public: for (int i = 0; i < numVerts; ++i) { int globalIdx = this->vertexMapper().map(*elemIt, i, dim); - secVars.update(sol[globalIdx], + volVars.update(sol[globalIdx], this->problem_(), *elemIt, - fvElemGeom, + fvElemGeom, i, false); - (*Sg)[globalIdx] = secVars.saturation(gPhaseIdx); - (*Sl)[globalIdx] = secVars.saturation(lPhaseIdx); - (*pg)[globalIdx] = secVars.pressure(gPhaseIdx); - (*pl)[globalIdx] = secVars.pressure(lPhaseIdx); - (*pc)[globalIdx] = secVars.capillaryPressure(); - (*rhoL)[globalIdx] = secVars.fluidState().density(lPhaseIdx); - (*rhoG)[globalIdx] = secVars.fluidState().density(gPhaseIdx); - (*mobL)[globalIdx] = secVars.mobility(lPhaseIdx); - (*mobG)[globalIdx] = secVars.mobility(gPhaseIdx); + (*Sg)[globalIdx] = volVars.saturation(gPhaseIdx); + (*Sl)[globalIdx] = volVars.saturation(lPhaseIdx); + (*pg)[globalIdx] = volVars.pressure(gPhaseIdx); + (*pl)[globalIdx] = volVars.pressure(lPhaseIdx); + (*pc)[globalIdx] = volVars.capillaryPressure(); + (*rhoL)[globalIdx] = volVars.fluidState().density(lPhaseIdx); + (*rhoG)[globalIdx] = volVars.fluidState().density(gPhaseIdx); + (*mobL)[globalIdx] = volVars.mobility(lPhaseIdx); + (*mobG)[globalIdx] = volVars.mobility(gPhaseIdx); for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) for (int compIdx = 0; compIdx < numComponents; ++compIdx) { (*massFrac[phaseIdx][compIdx])[globalIdx] - = secVars.fluidState().massFrac(phaseIdx, + = volVars.fluidState().massFrac(phaseIdx, compIdx); Valgrind::CheckDefined( (*massFrac[phaseIdx][compIdx])[globalIdx][0]); } - (*poro)[globalIdx] = secVars.porosity(); - (*temperature)[globalIdx] = secVars.temperature(); + (*poro)[globalIdx] = volVars.porosity(); + (*temperature)[globalIdx] = volVars.temperature(); (*phasePresence)[globalIdx] = staticVertexDat_[globalIdx].phasePresence; }; -#ifdef VELOCITY_OUTPUT // check if velocity output is demanded +#ifdef VELOCITY_OUTPUT // check if velocity output is demanded // In the box method, the velocity is evaluated on the FE-Grid. However, to get an // average apparent velocity at the vertex, all contributing velocities have to be interpolated. GlobalPosition velocity(0.); @@ -445,7 +445,7 @@ public: for (int faceIdx = 0; faceIdx< this->fvElemGeom_().numEdges; faceIdx++) { //prepare the flux calculations (set up and prepare geometry, FE gradients) - FluxVars fluxDat(this->problem_(), + FluxVariables fluxDat(this->problem_(), this->elem_(), this->fvElemGeom_(), faceIdx, @@ -458,8 +458,8 @@ public: velocity = fluxDat.KmvpNormal(phaseIdx); // mind the sign: vDarcy = kf grad p // up+downstream mobility - const SecondaryVars &up = this->curSecVars_(fluxDat.upstreamIdx(phaseIdx)); - const SecondaryVars &down = this->curSecVars_(fluxDat.downstreamIdx(phaseIdx)); + const VolumeVariables &up = this->curVolVars_(fluxDat.upstreamIdx(phaseIdx)); + const VolumeVariables &down = this->curVolVars_(fluxDat.downstreamIdx(phaseIdx)); Scalar scvfArea = fluxDat.face().normal.two_norm(); //get surface area to weight velocity at the IP with the surface area velocity *= (mobilityUpwindAlpha*up.mobility(phaseIdx) + (1-mobilityUpwindAlpha)*down.mobility(phaseIdx))* scvfArea; @@ -491,7 +491,7 @@ public: #endif } -#ifdef VELOCITY_OUTPUT // check if velocity output is demanded +#ifdef VELOCITY_OUTPUT // check if velocity output is demanded // normalize the velocities at the vertices for (int i = 0; i < numVertices; ++i) { @@ -526,7 +526,7 @@ public: writer.addVertexData(temperature, "temperature"); writer.addVertexData(phasePresence, "phase presence"); -#ifdef VELOCITY_OUTPUT // check if velocity output is demanded +#ifdef VELOCITY_OUTPUT // check if velocity output is demanded writer.addVertexData(velocityX, "Vx"); if (dim >= 2) writer.addVertexData(velocityY, "Vy"); @@ -585,7 +585,7 @@ public: staticVertexDat_[i].visited = false; FVElementGeometry fvElemGeom; - static SecondaryVars secVars; + static VolumeVariables volVars; ElementIterator it = this->gridView_().template begin<0> (); const ElementIterator &endit = this->gridView_().template end<0> (); for (; it != endit; ++it) @@ -599,14 +599,14 @@ public: continue; staticVertexDat_[globalIdx].visited = true; - secVars.update(curGlobalSol[globalIdx], + volVars.update(curGlobalSol[globalIdx], this->problem_(), *it, fvElemGeom, i, false); const GlobalPosition &global = it->geometry().corner(i); - wasSwitched = primaryVarSwitch_(curGlobalSol, secVars, + wasSwitched = primaryVarSwitch_(curGlobalSol, volVars, globalIdx, global) || wasSwitched; } } @@ -675,7 +675,7 @@ protected: // perform variable switch at a vertex; Returns true if a // variable switch was performed. bool primaryVarSwitch_(SolutionVector &globalSol, - const SecondaryVars &secVars, int globalIdx, + const VolumeVariables &volVars, int globalIdx, const GlobalPosition &globalPos) { // evaluate primary variable switch @@ -687,8 +687,8 @@ protected: if (phasePresence == gPhaseOnly) { // calculate mole fraction in the hypothetic liquid phase - Scalar xll = secVars.fluidState().moleFrac(lPhaseIdx, lCompIdx); - Scalar xlg = secVars.fluidState().moleFrac(lPhaseIdx, gCompIdx); + Scalar xll = volVars.fluidState().moleFrac(lPhaseIdx, lCompIdx); + Scalar xlg = volVars.fluidState().moleFrac(lPhaseIdx, gCompIdx); Scalar xlMax = 1.0; if (xll + xlg > xlMax) @@ -715,8 +715,8 @@ protected: { // calculate fractions of the partial pressures in the // hypothetic gas phase - Scalar xgl = secVars.fluidState().moleFrac(gPhaseIdx, lCompIdx); - Scalar xgg = secVars.fluidState().moleFrac(gPhaseIdx, gCompIdx); + Scalar xgl = volVars.fluidState().moleFrac(gPhaseIdx, lCompIdx); + Scalar xgg = volVars.fluidState().moleFrac(gPhaseIdx, gCompIdx); Scalar xgMax = 1.0; if (xgl + xgg > xgMax) @@ -745,29 +745,29 @@ protected: if (staticVertexDat_[globalIdx].wasSwitched) Smin = -0.01; - if (secVars.saturation(gPhaseIdx) <= Smin) + if (volVars.saturation(gPhaseIdx) <= Smin) { wouldSwitch = true; // gas phase disappears std::cout << "Gas phase disappears at vertex " << globalIdx << ", coordinates: " << globalPos << ", Sg: " - << secVars.saturation(gPhaseIdx) << std::endl; + << volVars.saturation(gPhaseIdx) << std::endl; newPhasePresence = lPhaseOnly; globalSol[globalIdx][switchIdx] - = secVars.fluidState().massFrac(lPhaseIdx, gCompIdx); + = volVars.fluidState().massFrac(lPhaseIdx, gCompIdx); } - else if (secVars.saturation(lPhaseIdx) <= Smin) + else if (volVars.saturation(lPhaseIdx) <= Smin) { wouldSwitch = true; // liquid phase disappears std::cout << "Liquid phase disappears at vertex " << globalIdx << ", coordinates: " << globalPos << ", Sl: " - << secVars.saturation(lPhaseIdx) << std::endl; + << volVars.saturation(lPhaseIdx) << std::endl; newPhasePresence = gPhaseOnly; globalSol[globalIdx][switchIdx] - = secVars.fluidState().massFrac(gPhaseIdx, lCompIdx); + = volVars.fluidState().massFrac(gPhaseIdx, lCompIdx); } } diff --git a/dumux/boxmodels/2p2c/2p2cnewtoncontroller.hh b/dumux/boxmodels/2p2c/2p2cnewtoncontroller.hh index e90287db0e..b6170f6ad8 100644 --- a/dumux/boxmodels/2p2c/2p2cnewtoncontroller.hh +++ b/dumux/boxmodels/2p2c/2p2cnewtoncontroller.hh @@ -54,7 +54,7 @@ class TwoPTwoCNewtonController : public NewtonController<TypeTag> enum { pressureIdx = Indices::pressureIdx, - switchIdx = Indices::switchIdx + switchIdx = Indices::switchIdx }; public: @@ -127,7 +127,7 @@ private: ++n; } }; - + }; } diff --git a/dumux/boxmodels/2p2c/2p2cproblem.hh b/dumux/boxmodels/2p2c/2p2cproblem.hh index dad5462c7a..beb2ca4de3 100644 --- a/dumux/boxmodels/2p2c/2p2cproblem.hh +++ b/dumux/boxmodels/2p2c/2p2cproblem.hh @@ -86,13 +86,13 @@ public: { return gravity_; } /*! - * \brief Returns the soil properties object. + * \brief Returns the spatial parameters object. */ SpatialParameters &spatialParameters() { return spatialParams_; } /*! - * \copydoc soil() + * \copydoc spatialParameters() */ const SpatialParameters &spatialParameters() const { return spatialParams_; } @@ -110,7 +110,7 @@ private: GlobalPosition gravity_; - // soil properties + // spatial parameters SpatialParameters spatialParams_; }; diff --git a/dumux/boxmodels/2p2c/2p2cproperties.hh b/dumux/boxmodels/2p2c/2p2cproperties.hh index 7ae4d6ded4..d35ad2d9c8 100644 --- a/dumux/boxmodels/2p2c/2p2cproperties.hh +++ b/dumux/boxmodels/2p2c/2p2cproperties.hh @@ -48,11 +48,11 @@ NEW_PROP_TAG(NumPhases); //!< Number of fluid phases in the system NEW_PROP_TAG(NumComponents); //!< Number of fluid components in the system NEW_PROP_TAG(TwoPTwoCIndices); //!< Enumerations for the 2p2c models NEW_PROP_TAG(Formulation); //!< The formulation of the model -NEW_PROP_TAG(SpatialParameters); //!< The type of the soil +NEW_PROP_TAG(SpatialParameters); //!< The type of the spatial parameters NEW_PROP_TAG(FluidSystem); //!< Type of the multi-component relations -NEW_PROP_TAG(MaterialLaw); //!< The material law which ought to be used (extracted from the soil) -NEW_PROP_TAG(MaterialLawParams); //!< The context material law (extracted from the soil) +NEW_PROP_TAG(MaterialLaw); //!< The material law which ought to be used (extracted from the spatial parameters) +NEW_PROP_TAG(MaterialLawParams); //!< The context material law (extracted from the spatial parameters) NEW_PROP_TAG(EnableGravity); //!< Returns whether gravity is considered in the problem NEW_PROP_TAG(MobilityUpwindAlpha); //!< The value of the upwind parameter for the mobility @@ -71,10 +71,10 @@ template<class TypeTag> class TwoPTwoCLocalResidual; template <class TypeTag> -class TwoPTwoCSecondaryVars; +class TwoPTwoCVolumeVariables; template <class TypeTag> -class TwoPTwoCFluxVars; +class TwoPTwoCFluxVariables; template <class TypeTag> class TwoPTwoCNewtonController; @@ -118,7 +118,7 @@ public: // Primary variable indices static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector - static const int switchIdx = PVOffset + 1; //!< Index of the either the saturation or the mass fraction of the non-wetting/wetting phase + static const int switchIdx = PVOffset + 1; //!< Index of the either the saturation or the mass fraction of the non-wetting/wetting phase static const int plIdx = pressureIdx; //!< Index for liquid phase pressure in a solution vector static const int SgOrXIdx = switchIdx; //!< Index of the either the saturation of the gas phase or the mass fraction secondary component in the only phase @@ -155,7 +155,7 @@ public: // Primary variable indices static const int pressureIdx = PVOffset + 0; //!< Index for wetting/non-wetting phase pressure (depending on formulation) in a solution vector - static const int switchIdx = PVOffset + 1; //!< Index of the either the saturation or the mass fraction of the non-wetting/wetting phase + static const int switchIdx = PVOffset + 1; //!< Index of the either the saturation or the mass fraction of the non-wetting/wetting phase static const int pgIdx = pressureIdx; //!< Index for gas phase pressure in a solution vector static const int SlOrXIdx = switchIdx; //!< Index of the either the saturation of the liquid phase or the mass fraction secondary component in the only phase @@ -208,7 +208,7 @@ public: "Only fluid systems with 2 phases are supported by the 2p-2c model!"); }; -SET_INT_PROP(BoxTwoPTwoC, NumEq, 2); //!< set the number of equations to 2 +SET_INT_PROP(BoxTwoPTwoC, NumEq, 2); //!< set the number of equations to 2 //! Set the default formulation to pl-Sg SET_INT_PROP(BoxTwoPTwoC, @@ -252,11 +252,11 @@ SET_TYPE_PROP(BoxTwoPTwoC, NewtonController, TwoPTwoCNewtonController<TypeTag>); //! the Model property SET_TYPE_PROP(BoxTwoPTwoC, Model, TwoPTwoCModel<TypeTag>); -//! the SecondaryVars property -SET_TYPE_PROP(BoxTwoPTwoC, SecondaryVars, TwoPTwoCSecondaryVars<TypeTag>); +//! the VolumeVariables property +SET_TYPE_PROP(BoxTwoPTwoC, VolumeVariables, TwoPTwoCVolumeVariables<TypeTag>); -//! the FluxVars property -SET_TYPE_PROP(BoxTwoPTwoC, FluxVars, TwoPTwoCFluxVars<TypeTag>); +//! the FluxVariables property +SET_TYPE_PROP(BoxTwoPTwoC, FluxVariables, TwoPTwoCFluxVariables<TypeTag>); //! the upwind factor for the mobility. SET_SCALAR_PROP(BoxTwoPTwoC, MobilityUpwindAlpha, 1.0); diff --git a/dumux/boxmodels/2p2c/2p2csecondaryvars.hh b/dumux/boxmodels/2p2c/2p2cvolumevariables.hh similarity index 86% rename from dumux/boxmodels/2p2c/2p2csecondaryvars.hh rename to dumux/boxmodels/2p2c/2p2cvolumevariables.hh index 4b871f566b..5510f8a045 100644 --- a/dumux/boxmodels/2p2c/2p2csecondaryvars.hh +++ b/dumux/boxmodels/2p2c/2p2cvolumevariables.hh @@ -1,4 +1,4 @@ -// $Id: 2p2csecondaryvars.hh 3736 2010-06-15 09:52:10Z lauser $ +// $Id: 2p2cvolumevariables.hh 3736 2010-06-15 09:52:10Z lauser $ /***************************************************************************** * Copyright (C) 2008,2009 by Klaus Mosthaf, * * Andreas Lauser, * @@ -22,8 +22,8 @@ * \brief Contains the quantities which are are constant within a * finite volume in the two-phase, two-component model. */ -#ifndef DUMUX_2P2C_SECONDARY_VARS_HH -#define DUMUX_2P2C_SECONDARY_VARS_HH +#ifndef DUMUX_2P2C_VOLUME_VARIABLES_HH +#define DUMUX_2P2C_VOLUME_VARIABLES_HH #include <dumux/boxmodels/common/boxmodel.hh> #include <dumux/common/math.hh> @@ -42,23 +42,23 @@ namespace Dumux * finite volume in the two-phase, two-component model. */ template <class TypeTag> -class TwoPTwoCSecondaryVars +class TwoPTwoCVolumeVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) Implementation; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) Implementation; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), numComponents = GET_PROP_VALUE(TypeTag, PTAG(NumComponents)), - formulation = GET_PROP_VALUE(TypeTag, PTAG(Formulation)), + formulation = GET_PROP_VALUE(TypeTag, PTAG(Formulation)), - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; @@ -66,15 +66,15 @@ class TwoPTwoCSecondaryVars typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPTwoCIndices)) Indices; enum { - lCompIdx = Indices::lCompIdx, - gCompIdx = Indices::gCompIdx, + lCompIdx = Indices::lCompIdx, + gCompIdx = Indices::gCompIdx, - lPhaseIdx = Indices::lPhaseIdx, - gPhaseIdx = Indices::gPhaseIdx + lPhaseIdx = Indices::lPhaseIdx, + gPhaseIdx = Indices::gPhaseIdx }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; typedef TwoPTwoCFluidState<TypeTag> FluidState; @@ -86,12 +86,12 @@ public: /*! * \brief Update all quantities for a given control volume. */ - void update(const PrimaryVarVector &priVars, - const Problem &problem, - const Element &element, + void update(const PrimaryVariables &priVars, + const Problem &problem, + const Element &element, const FVElementGeometry &elemGeom, - int scvIdx, - bool isOldSol) + int scvIdx, + bool isOldSol) { primaryVars_ = priVars; @@ -152,11 +152,11 @@ public: Valgrind::CheckDefined(porosity_); } - void updateTemperature_(const PrimaryVarVector &priVars, - const Element &element, + void updateTemperature_(const PrimaryVariables &priVars, + const Element &element, const FVElementGeometry &elemGeom, int scvIdx, - const Problem &problem) + const Problem &problem) { temperature_ = problem.temperature(element, elemGeom, scvIdx); } @@ -164,7 +164,7 @@ public: /*! * \brief Return the vector of primary variables */ - const PrimaryVarVector &primaryVars() const + const PrimaryVariables &primaryVars() const { return primaryVars_; } /*! @@ -246,7 +246,7 @@ public: protected: - PrimaryVarVector primaryVars_; + PrimaryVariables primaryVars_; Scalar temperature_; //!< Temperature within the control volume Scalar porosity_; //!< Effective porosity within the control volume Scalar mobility_[numPhases]; //!< Effective mobility within the control volume diff --git a/dumux/boxmodels/2p2cni/2p2cnifluxvars.hh b/dumux/boxmodels/2p2cni/2p2cnifluxvariables.hh similarity index 84% rename from dumux/boxmodels/2p2cni/2p2cnifluxvars.hh rename to dumux/boxmodels/2p2cni/2p2cnifluxvariables.hh index 5144a2bf41..764214a2c3 100644 --- a/dumux/boxmodels/2p2cni/2p2cnifluxvars.hh +++ b/dumux/boxmodels/2p2cni/2p2cnifluxvariables.hh @@ -1,4 +1,4 @@ -// $Id: 2p2cnifluxvars.hh 3736 2010-06-15 09:52:10Z lauser $ +// $Id: 2p2cnifluxvariables.hh 3736 2010-06-15 09:52:10Z lauser $ /***************************************************************************** * Copyright (C) 2008-2009 by Andreas Lauser * * Copyright (C) 2008-2009 by Melanie Darcis * @@ -25,8 +25,8 @@ * This means pressure, concentration and temperature gradients, phase * densities at the integration point, etc. */ -#ifndef DUMUX_2P2CNI_FLUX_DATA_HH -#define DUMUX_2P2CNI_FLUX_DATA_HH +#ifndef DUMUX_2P2CNI_FLUX_VARIABLES_HH +#define DUMUX_2P2CNI_FLUX_VARIABLES_HH #include <dumux/common/math.hh> @@ -43,24 +43,24 @@ namespace Dumux * the integration point, etc. */ template <class TypeTag> -class TwoPTwoCNIFluxVars : public TwoPTwoCFluxVars<TypeTag> +class TwoPTwoCNIFluxVariables : public TwoPTwoCFluxVariables<TypeTag> { - typedef TwoPTwoCFluxVars<TypeTag> ParentType; + typedef TwoPTwoCFluxVariables<TypeTag> ParentType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; typedef typename GridView::ctype CoordScalar; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), + numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; @@ -70,11 +70,11 @@ class TwoPTwoCNIFluxVars : public TwoPTwoCFluxVars<TypeTag> typedef Dune::FieldVector<CoordScalar, dimWorld> Vector; public: - TwoPTwoCNIFluxVars(const Problem &problem, + TwoPTwoCNIFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, int scvfIdx, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) : ParentType(problem, element, elemGeom, scvfIdx, elemDat) { // calculate temperature gradient using finite element @@ -88,7 +88,7 @@ public: temperatureGrad += tmp; } - // The soil calculates the actual heat flux vector + // The spatial parameters calculates the actual heat flux vector problem.spatialParameters().matrixHeatFlux(tmp, *this, elemDat, diff --git a/dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh b/dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh index cfab2e2262..3fcff51ba6 100644 --- a/dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh +++ b/dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh @@ -23,14 +23,14 @@ * using the non-isothermal two-phase two-component box model. * */ -#ifndef DUMUX_NEW_2P2CNI_BOX_JACOBIAN_HH -#define DUMUX_NEW_2P2CNI_BOX_JACOBIAN_HH +#ifndef DUMUX_NEW_2P2CNI_LOCAL_RESIDUAL_HH +#define DUMUX_NEW_2P2CNI_LOCAL_RESIDUAL_HH #include <dumux/boxmodels/2p2c/2p2clocalresidual.hh> -#include <dumux/boxmodels/2p2cni/2p2cnisecondaryvars.hh> -#include <dumux/boxmodels/2p2cni/2p2cnifluxvars.hh> +#include <dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh> +#include <dumux/boxmodels/2p2cni/2p2cnifluxvariables.hh> #include <dumux/boxmodels/2p2cni/2p2cniproperties.hh> @@ -52,25 +52,25 @@ class TwoPTwoCNILocalResidual : public TwoPTwoCLocalResidual<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPTwoCIndices)) Indices; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), - temperatureIdx = Indices::temperatureIdx, + numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), + temperatureIdx = Indices::temperatureIdx, - lPhaseIdx = Indices::lPhaseIdx, - gPhaseIdx = Indices::gPhaseIdx + lPhaseIdx = Indices::lPhaseIdx, + gPhaseIdx = Indices::gPhaseIdx }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef Dune::FieldVector<Scalar, dim> LocalPosition; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; @@ -85,7 +85,7 @@ public: * The result should be averaged over the volume (e.g. phase mass * inside a sub control volume divided by the volume) */ - void computeStorage(PrimaryVarVector &result, int scvIdx, bool usePrevSol) const + void computeStorage(PrimaryVariables &result, int scvIdx, bool usePrevSol) const { // compute the storage term for phase mass ParentType::computeStorage(result, scvIdx, usePrevSol); @@ -95,8 +95,8 @@ public: // used. The secondary variables are used accordingly. This // is required to compute the derivative of the storage term // using the implicit euler method. - const ElementSecondaryVars &elemDat = usePrevSol ? this->prevSecVars_() : this->curSecVars_(); - const SecondaryVars &vertDat = elemDat[scvIdx]; + const ElementVolumeVariables &elemDat = usePrevSol ? this->prevVolVars_() : this->curVolVars_(); + const VolumeVariables &vertDat = elemDat[scvIdx]; // compute the energy storage result[temperatureIdx] = @@ -121,8 +121,8 @@ public: * * This method is called by compute flux (base class) */ - void computeAdvectiveFlux(PrimaryVarVector &flux, - const FluxVars &fluxData) const + void computeAdvectiveFlux(PrimaryVariables &flux, + const FluxVariables &fluxData) const { // advective mass flux ParentType::computeAdvectiveFlux(flux, fluxData); @@ -131,8 +131,8 @@ public: flux[temperatureIdx] = 0; for (int phase = 0; phase < numPhases; ++phase) { // vertex data of the upstream and the downstream vertices - const SecondaryVars &up = this->curSecVars_(fluxData.upstreamIdx(phase)); - const SecondaryVars &dn = this->curSecVars_(fluxData.downstreamIdx(phase)); + const VolumeVariables &up = this->curVolVars_(fluxData.upstreamIdx(phase)); + const VolumeVariables &dn = this->curVolVars_(fluxData.downstreamIdx(phase)); flux[temperatureIdx] += fluxData.KmvpNormal(phase) * ( @@ -152,8 +152,8 @@ public: * \brief Adds the diffusive heat flux to the flux vector over * the face of a sub-control volume. */ - void computeDiffusiveFlux(PrimaryVarVector &flux, - const FluxVars &fluxData) const + void computeDiffusiveFlux(PrimaryVariables &flux, + const FluxVariables &fluxData) const { // diffusive mass flux ParentType::computeDiffusiveFlux(flux, fluxData); diff --git a/dumux/boxmodels/2p2cni/2p2cnimodel.hh b/dumux/boxmodels/2p2cni/2p2cnimodel.hh index 0de854b0ac..bdb1a87cc8 100644 --- a/dumux/boxmodels/2p2cni/2p2cnimodel.hh +++ b/dumux/boxmodels/2p2cni/2p2cnimodel.hh @@ -55,7 +55,7 @@ namespace Dumux { - \sum_\alpha \text{div} \left\{ \varrho_\alpha X_\alpha^\kappa \frac{k_{r\alpha}}{\mu_\alpha} \mbox{\bf K} (\text{grad} p_\alpha - \varrho_{\alpha} \mbox{\bf g}) \right\}\\ - &-& \sum_\alpha \text{div} \left\{{\bf D_{\alpha, pm}^\kappa} \varrho_{\alpha} \text{grad} X^\kappa_{\alpha} \right\} + &-& \sum_\alpha \text{div} \left\{{\bf D_{\alpha, pm}^\kappa} \varrho_{\alpha} \text{grad} X^\kappa_{\alpha} \right\} - \sum_\alpha q_\alpha^\kappa = \quad 0 \qquad \kappa \in \{w, a\} \, , \alpha \in \{w, n\} * \f} diff --git a/dumux/boxmodels/2p2cni/2p2cniproperties.hh b/dumux/boxmodels/2p2cni/2p2cniproperties.hh index 7e82effae4..974a5269c9 100644 --- a/dumux/boxmodels/2p2cni/2p2cniproperties.hh +++ b/dumux/boxmodels/2p2cni/2p2cniproperties.hh @@ -24,9 +24,9 @@ #include <dumux/boxmodels/2p2c/2p2cproperties.hh> -#include "2p2cnisecondaryvars.hh" +#include "2p2cnivolumevariables.hh" -#include "2p2cnifluxvars.hh" +#include "2p2cnifluxvariables.hh" namespace Dumux { @@ -44,10 +44,10 @@ template<class TypeTag> class TwoPTwoCNILocalResidual; template <class TypeTag> -class TwoPTwoCNISecondaryVars; +class TwoPTwoCNIVolumeVariables; template <class TypeTag> -class TwoPTwoCNIFluxVars; +class TwoPTwoCNIFluxVariables; /*! * \brief Enumerations for the non-isothermal 2-phase 2-component model @@ -83,7 +83,7 @@ NEW_PROP_TAG(TwoPTwoCNIIndices); //!< Enumerations for the 2p2cni models // Properties ////////////////////////////////////////////////////////////////// -SET_INT_PROP(BoxTwoPTwoCNI, NumEq, 3); //!< set the number of equations to 3 +SET_INT_PROP(BoxTwoPTwoCNI, NumEq, 3); //!< set the number of equations to 3 //! Use the 2p2cni local jacobian operator for the 2p2cni model SET_TYPE_PROP(BoxTwoPTwoCNI, @@ -93,14 +93,14 @@ SET_TYPE_PROP(BoxTwoPTwoCNI, //! the Model property SET_TYPE_PROP(BoxTwoPTwoCNI, Model, TwoPTwoCNIModel<TypeTag>); -//! the SecondaryVars property -SET_TYPE_PROP(BoxTwoPTwoCNI, SecondaryVars, TwoPTwoCNISecondaryVars<TypeTag>); +//! the VolumeVariables property +SET_TYPE_PROP(BoxTwoPTwoCNI, VolumeVariables, TwoPTwoCNIVolumeVariables<TypeTag>); -//! the FluxVars property -SET_TYPE_PROP(BoxTwoPTwoCNI, FluxVars, TwoPTwoCNIFluxVars<TypeTag>); +//! the FluxVariables property +SET_TYPE_PROP(BoxTwoPTwoCNI, FluxVariables, TwoPTwoCNIFluxVariables<TypeTag>); //! The indices required by the non-isothermal 2p2c model SET_PROP(BoxTwoPTwoCNI, TwoPTwoCIndices) diff --git a/dumux/boxmodels/2p2cni/2p2cnisecondaryvars.hh b/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh similarity index 88% rename from dumux/boxmodels/2p2cni/2p2cnisecondaryvars.hh rename to dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh index 5555919628..0834a4313f 100644 --- a/dumux/boxmodels/2p2cni/2p2cnisecondaryvars.hh +++ b/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh @@ -1,4 +1,4 @@ -// $Id: 2p2cnisecondaryvars.hh 3736 2010-06-15 09:52:10Z lauser $ +// $Id: 2p2cnivolumevariables.hh 3736 2010-06-15 09:52:10Z lauser $ /***************************************************************************** * Copyright (C) 2008-2009 by Melanie Darcis * * Copyright (C) 2008-2010 by Andreas Lauser * @@ -22,10 +22,10 @@ * finite volume in the non-isothermal two-phase, two-component * model. */ -#ifndef DUMUX_2P2CNI_SECONDARY_VARS_HH -#define DUMUX_2P2CNI_SECONDARY_VARS_HH +#ifndef DUMUX_2P2CNI_VOLUME_VARIABLES_HH +#define DUMUX_2P2CNI_VOLUME_VARIABLES_HH -#include <dumux/boxmodels/2p2c/2p2csecondaryvars.hh> +#include <dumux/boxmodels/2p2c/2p2cvolumevariables.hh> namespace Dumux { @@ -37,9 +37,9 @@ namespace Dumux * model. */ template <class TypeTag> -class TwoPTwoCNISecondaryVars : public TwoPTwoCSecondaryVars<TypeTag> +class TwoPTwoCNIVolumeVariables : public TwoPTwoCVolumeVariables<TypeTag> { - typedef TwoPTwoCSecondaryVars<TypeTag> ParentType; + typedef TwoPTwoCVolumeVariables<TypeTag> ParentType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; @@ -49,8 +49,8 @@ class TwoPTwoCNISecondaryVars : public TwoPTwoCSecondaryVars<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; @@ -62,14 +62,14 @@ class TwoPTwoCNISecondaryVars : public TwoPTwoCSecondaryVars<TypeTag> typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements))::Container ReferenceElements; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef Dune::FieldVector<Scalar, numPhases> PhasesVector; public: /*! * \brief Update all quantities for a given control volume. */ - void update(const PrimaryVarVector &sol, + void update(const PrimaryVariables &sol, const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, @@ -108,11 +108,11 @@ public: }; // this method gets called by the parent class - void updateTemperature_(const PrimaryVarVector &sol, - const Element &element, + void updateTemperature_(const PrimaryVariables &sol, + const Element &element, const FVElementGeometry &elemGeom, int scvIdx, - const Problem &problem) + const Problem &problem) { // retrieve temperature from solution vector this->temperature_ = sol[temperatureIdx]; diff --git a/dumux/boxmodels/2pni/2pnifluxvars.hh b/dumux/boxmodels/2pni/2pnifluxvariables.hh similarity index 85% rename from dumux/boxmodels/2pni/2pnifluxvars.hh rename to dumux/boxmodels/2pni/2pnifluxvariables.hh index 5a6f33c054..3105643b22 100644 --- a/dumux/boxmodels/2pni/2pnifluxvars.hh +++ b/dumux/boxmodels/2pni/2pnifluxvariables.hh @@ -1,4 +1,4 @@ -// $Id: 2pnifluxvars.hh 3793 2010-06-25 15:38:42Z melanie $ +// $Id: 2pnifluxvariables.hh 3793 2010-06-25 15:38:42Z melanie $ /***************************************************************************** * Copyright (C) 2008-2009 by Melanie Darcis * * Copyright (C) 2008-2009 by Andreas Lauser * @@ -31,8 +31,8 @@ * This means pressure and temperature gradients, phase densities at * the integration point, etc. */ -#ifndef DUMUX_2PNI_FLUX_DATA_HH -#define DUMUX_2PNI_FLUX_DATA_HH +#ifndef DUMUX_2PNI_FLUX_VARIABLES_HH +#define DUMUX_2PNI_FLUX_VARIABLES_HH #include <dumux/common/math.hh> @@ -49,24 +49,24 @@ namespace Dumux * the integration point, etc. */ template <class TypeTag> -class TwoPNIFluxVars : public TwoPFluxVars<TypeTag> +class TwoPNIFluxVariables : public TwoPFluxVariables<TypeTag> { - typedef TwoPFluxVars<TypeTag> ParentType; + typedef TwoPFluxVariables<TypeTag> ParentType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; typedef typename GridView::ctype CoordScalar; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), + numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; @@ -76,11 +76,11 @@ class TwoPNIFluxVars : public TwoPFluxVars<TypeTag> typedef Dune::FieldVector<CoordScalar, dimWorld> Vector; public: - TwoPNIFluxVars(const Problem &problem, + TwoPNIFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, int scvfIdx, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) : ParentType(problem, element, elemGeom, scvfIdx, elemDat) { // calculate temperature gradient using finite element @@ -94,7 +94,7 @@ public: temperatureGrad += tmp; } - // The soil calculates the actual heat flux vector + // The spatial parameters calculates the actual heat flux vector problem.spatialParameters().matrixHeatFlux(tmp, *this, elemDat, diff --git a/dumux/boxmodels/2pni/2pnilocalresidual.hh b/dumux/boxmodels/2pni/2pnilocalresidual.hh index f9781d5aad..bec92dc271 100644 --- a/dumux/boxmodels/2pni/2pnilocalresidual.hh +++ b/dumux/boxmodels/2pni/2pnilocalresidual.hh @@ -22,16 +22,16 @@ * using the non-isothermal two-phase box model. * */ -#ifndef DUMUX_NEW_2PNI_BOX_JACOBIAN_HH -#define DUMUX_NEW_2PNI_BOX_JACOBIAN_HH +#ifndef DUMUX_NEW_2PNI_LOCAL_RESIDUAL_HH +#define DUMUX_NEW_2PNI_LOCAL_RESIDUAL_HH #include "2pniproperties.hh" #include <dumux/boxmodels/2p/2plocalresidual.hh> -#include <dumux/boxmodels/2pni/2pnisecondaryvars.hh> -#include <dumux/boxmodels/2pni/2pnifluxvars.hh> +#include <dumux/boxmodels/2pni/2pnivolumevariables.hh> +#include <dumux/boxmodels/2pni/2pnifluxvariables.hh> namespace Dumux @@ -53,26 +53,26 @@ class TwoPNILocalResidual : public TwoPLocalResidual<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), - temperatureIdx = Indices::temperatureIdx, - energyEqIdx = Indices::energyEqIdx, + numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)), + temperatureIdx = Indices::temperatureIdx, + energyEqIdx = Indices::energyEqIdx, - wPhaseIdx = Indices::wPhaseIdx, - nPhaseIdx = Indices::nPhaseIdx + wPhaseIdx = Indices::wPhaseIdx, + nPhaseIdx = Indices::nPhaseIdx }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef Dune::FieldVector<Scalar, dim> LocalPosition; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; @@ -87,7 +87,7 @@ public: * The result should be averaged over the volume (e.g. phase mass * inside a sub control volume divided by the volume) */ - void computeStorage(PrimaryVarVector &result, int scvIdx, bool usePrevSol) const + void computeStorage(PrimaryVariables &result, int scvIdx, bool usePrevSol) const { // compute the storage term for phase mass ParentType::computeStorage(result, scvIdx, usePrevSol); @@ -97,8 +97,8 @@ public: // used. The secondary variables are used accordingly. This // is required to compute the derivative of the storage term // using the implicit euler method. - const ElementSecondaryVars &vertDatArray = usePrevSol ? this->prevSecVars_() : this->curSecVars_(); - const SecondaryVars &vertDat = vertDatArray[scvIdx]; + const ElementVolumeVariables &vertDatArray = usePrevSol ? this->prevVolVars_() : this->curVolVars_(); + const VolumeVariables &vertDat = vertDatArray[scvIdx]; // compute the energy storage result[temperatureIdx] = @@ -119,8 +119,8 @@ public: * * This method is called by compute flux (base class) */ - void computeAdvectiveFlux(PrimaryVarVector &flux, - const FluxVars &fluxData) const + void computeAdvectiveFlux(PrimaryVariables &flux, + const FluxVariables &fluxData) const { // advective mass flux ParentType::computeAdvectiveFlux(flux, fluxData); @@ -129,8 +129,8 @@ public: flux[energyEqIdx] = 0; for (int phase = 0; phase < numPhases; ++phase) { // vertex data of the upstream and the downstream vertices - const SecondaryVars &up = this->curSecVars_(fluxData.upstreamIdx(phase)); - const SecondaryVars &dn = this->curSecVars_(fluxData.downstreamIdx(phase)); + const VolumeVariables &up = this->curVolVars_(fluxData.upstreamIdx(phase)); + const VolumeVariables &dn = this->curVolVars_(fluxData.downstreamIdx(phase)); flux[energyEqIdx] += fluxData.KmvpNormal(phase) * ( @@ -150,8 +150,8 @@ public: * \brief Adds the diffusive heat flux to the flux vector over * the face of a sub-control volume. */ - void computeDiffusiveFlux(PrimaryVarVector &flux, - const FluxVars &fluxData) const + void computeDiffusiveFlux(PrimaryVariables &flux, + const FluxVariables &fluxData) const { // diffusive mass flux ParentType::computeDiffusiveFlux(flux, fluxData); diff --git a/dumux/boxmodels/2pni/2pniproperties.hh b/dumux/boxmodels/2pni/2pniproperties.hh index 68632a5799..930804ff83 100644 --- a/dumux/boxmodels/2pni/2pniproperties.hh +++ b/dumux/boxmodels/2pni/2pniproperties.hh @@ -25,9 +25,9 @@ #define DUMUX_2PNI_PROPERTIES_HH #include <dumux/boxmodels/2p/2pproperties.hh> -#include "2pnisecondaryvars.hh" +#include "2pnivolumevariables.hh" -#include "2pnifluxvars.hh" +#include "2pnifluxvariables.hh" namespace Dumux { @@ -46,10 +46,10 @@ template<class TypeTag> class TwoPNILocalResidual; template <class TypeTag> -class TwoPNISecondaryVars; +class TwoPNIVolumeVariables; template <class TypeTag> -class TwoPNIFluxVars; +class TwoPNIFluxVariables; /*! * \brief Enumerations for the non-isothermal two-phase model @@ -95,14 +95,14 @@ SET_TYPE_PROP(BoxTwoPNI, //! the Model property SET_TYPE_PROP(BoxTwoPNI, Model, TwoPNIModel<TypeTag>); -//! the SecondaryVars property -SET_TYPE_PROP(BoxTwoPNI, SecondaryVars, TwoPNISecondaryVars<TypeTag>); +//! the VolumeVariables property +SET_TYPE_PROP(BoxTwoPNI, VolumeVariables, TwoPNIVolumeVariables<TypeTag>); -//! the FluxVars property -SET_TYPE_PROP(BoxTwoPNI, FluxVars, TwoPNIFluxVars<TypeTag>); +//! the FluxVariables property +SET_TYPE_PROP(BoxTwoPNI, FluxVariables, TwoPNIFluxVariables<TypeTag>); //! The indices required by the non-isothermal two-phase model -SET_TYPE_PROP(BoxTwoPNI, TwoPIndices, TwoPNIIndices<0>); +SET_TYPE_PROP(BoxTwoPNI, TwoPIndices, TwoPNIIndices<0>); SET_TYPE_PROP(BoxTwoPNI, TwoPNIIndices, TwoPNIIndices<0>); } diff --git a/dumux/boxmodels/2pni/2pnisecondaryvars.hh b/dumux/boxmodels/2pni/2pnivolumevariables.hh similarity index 82% rename from dumux/boxmodels/2pni/2pnisecondaryvars.hh rename to dumux/boxmodels/2pni/2pnivolumevariables.hh index 6e3502f093..371de4e3d2 100644 --- a/dumux/boxmodels/2pni/2pnisecondaryvars.hh +++ b/dumux/boxmodels/2pni/2pnivolumevariables.hh @@ -1,4 +1,4 @@ -// $Id: 2pnisecondaryvars.hh 3736 2010-06-15 09:52:10Z lauser $ +// $Id: 2pnivolumevariables.hh 3736 2010-06-15 09:52:10Z lauser $ /***************************************************************************** * Copyright (C) 2008-2009 by Melanie Darcis * * Copyright (C) 2009 by Andreas Lauser * @@ -19,10 +19,10 @@ * \brief Contains the quantities which are are constant within a * finite volume in the non-isothermal two-phase model. */ -#ifndef DUMUX_2PNI_SECONDARY_VARS_HH -#define DUMUX_2PNI_SECONDARY_VARS_HH +#ifndef DUMUX_2PNI_VOLUME_VARIABLES_HH +#define DUMUX_2PNI_VOLUME_VARIABLES_HH -#include <dumux/boxmodels/2p/2psecondaryvars.hh> +#include <dumux/boxmodels/2p/2pvolumevariables.hh> namespace Dumux { @@ -33,9 +33,9 @@ namespace Dumux * finite volume in the non-isothermal two-phase model. */ template <class TypeTag> -class TwoPNISecondaryVars : public TwoPSecondaryVars<TypeTag> +class TwoPNIVolumeVariables : public TwoPVolumeVariables<TypeTag> { - typedef TwoPSecondaryVars<TypeTag> ParentType; + typedef TwoPVolumeVariables<TypeTag> ParentType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; @@ -45,10 +45,10 @@ class TwoPNISecondaryVars : public TwoPSecondaryVars<TypeTag> typedef typename GridView::template Codim<0>::Entity Element; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, - numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)) + numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)) }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; @@ -59,19 +59,19 @@ class TwoPNISecondaryVars : public TwoPSecondaryVars<TypeTag> typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp; typedef typename RefElemProp::Container ReferenceElements; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef Dune::FieldVector<Scalar, numPhases> PhasesVector; public: /*! * \brief Update all quantities for a given control volume. */ - void update(const PrimaryVarVector &priVars, - const Problem &problem, - const Element &element, + void update(const PrimaryVariables &priVars, + const Problem &problem, + const Element &element, const FVElementGeometry &elemGeom, - int scvIdx, - bool isOldSol) + int scvIdx, + bool isOldSol) { typedef Indices I; @@ -101,11 +101,11 @@ public: } // this method gets called by the parent class - void updateTemperature_(const PrimaryVarVector &priVars, - const Element &element, + void updateTemperature_(const PrimaryVariables &priVars, + const Element &element, const FVElementGeometry &elemGeom, int scvIdx, - const Problem &problem) + const Problem &problem) { // retrieve temperature from primary variables this->temperature_ = priVars[temperatureIdx]; diff --git a/dumux/boxmodels/common/boxelementboundarytypes.hh b/dumux/boxmodels/common/boxelementboundarytypes.hh index 6c206e7342..eb4a14f138 100644 --- a/dumux/boxmodels/common/boxelementboundarytypes.hh +++ b/dumux/boxmodels/common/boxelementboundarytypes.hh @@ -34,7 +34,7 @@ class BoxElementBoundaryTypes : public std::vector<typename GET_PROP_TYPE(TypeTa { typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef std::vector<BoundaryTypes> ParentType; - + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; @@ -57,18 +57,18 @@ public: BoxElementBoundaryTypes() { } - void update(const Problem &problem, - const Element &element, + void update(const Problem &problem, + const Element &element, const FVElementGeometry &fvElemGeom) { - Dune::GeometryType geoType = element.geometry().type(); + Dune::GeometryType geoType = element.geometry().type(); const ReferenceElement &refElem = ReferenceElements::general(geoType); - + int numVerts = element.template count<dim>(); this->resize(numVerts); for (int i = 0; i < numVerts; ++i) (*this)[i].reset(); - + // evaluate boundary conditions IntersectionIterator isIt = problem.gridView().template ibegin(element); const IntersectionIterator &endIt = problem.gridView().template iend(element); @@ -76,7 +76,7 @@ public: // Ignore non- boundary faces. if (!isIt->boundary()) continue; - + // Set the boundary type for all vertices of the face int faceIdx = isIt->indexInInside(); int numFaceVerts = refElem.size(faceIdx, 1, dim); diff --git a/dumux/boxmodels/common/boxelementsecondaryvars.hh b/dumux/boxmodels/common/boxelementvolumevariables.hh similarity index 79% rename from dumux/boxmodels/common/boxelementsecondaryvars.hh rename to dumux/boxmodels/common/boxelementvolumevariables.hh index 1a1130bea7..012028c3ee 100644 --- a/dumux/boxmodels/common/boxelementsecondaryvars.hh +++ b/dumux/boxmodels/common/boxelementvolumevariables.hh @@ -13,8 +13,8 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -#ifndef DUMUX_BOX_ELEMENT_SECONDARY_VARS_HH -#define DUMUX_BOX_ELEMENT_SECONDARY_VARS_HH +#ifndef DUMUX_BOX_ELEMENT_VOLUME_VARIABLES_HH +#define DUMUX_BOX_ELEMENT_VOLUME_VARIABLES_HH #include "boxproperties.hh" @@ -27,20 +27,20 @@ namespace Dumux /*! * \ingroup BoxModel * - * \brief This class stores an array of SecondaryVars objects + * \brief This class stores an array of VolumeVariables objects */ template<class TypeTag> -class BoxElementSecondaryVars : public std::vector<typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) > +class BoxElementVolumeVariables : public std::vector<typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) > { - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef std::vector<SecondaryVars> ParentType; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef std::vector<VolumeVariables> ParentType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GridView::template Codim<0>::Entity Element; @@ -52,15 +52,15 @@ public: /*! * \brief The constructor. */ - BoxElementSecondaryVars() + BoxElementVolumeVariables() { } - void update(const Problem &problem, - const Element &element, + void update(const Problem &problem, + const Element &element, const FVElementGeometry &fvElemGeom, bool oldSol) { - const SolutionVector &globalSol = + const SolutionVector &globalSol = oldSol? problem.model().prevSol(): problem.model().curSol(); @@ -68,9 +68,9 @@ public: // we assert that the i-th shape function is // associated to the i-th vert of the element. int n = element.template count<dim>(); - this->resize(n); + this->resize(n); for (int i = 0; i < n; i++) { - const PrimaryVarVector &solI + const PrimaryVariables &solI = globalSol[vertexMapper.map(element, i, dim)]; (*this)[i].update(solI, problem, diff --git a/dumux/boxmodels/common/boxfvelementgeometry.hh b/dumux/boxmodels/common/boxfvelementgeometry.hh index 1e08636441..b131525cc4 100644 --- a/dumux/boxmodels/common/boxfvelementgeometry.hh +++ b/dumux/boxmodels/common/boxfvelementgeometry.hh @@ -446,60 +446,60 @@ class BoxFVElementGeometry void getEdgeIndices(int numVertices, int face, int vert, int& leftEdge, int& rightEdge) { static const int faceAndVertexToLeftEdgeTet[4][4] = { - { 0, 0, 2, -1}, - { 0, 0, -1, 3}, - { 1, -1, 1, 3}, - {-1, 2, 2, 4} + { 0, 0, 2, -1}, + { 0, 0, -1, 3}, + { 1, -1, 1, 3}, + {-1, 2, 2, 4} }; static const int faceAndVertexToRightEdgeTet[4][4] = { - { 1, 2, 1, -1}, - { 3, 4, -1, 4}, - { 3, -1, 5, 5}, - {-1, 4, 5, 5} + { 1, 2, 1, -1}, + { 3, 4, -1, 4}, + { 3, -1, 5, 5}, + {-1, 4, 5, 5} }; static const int faceAndVertexToLeftEdgePyramid[5][5] = { - { 0, 2, 3, 1, -1}, - { 0, -1, 0, -1, 4}, - {-1, 1, -1, 1, 5}, - { 2, 2, -1, -1, 4}, - {-1, -1, 3, 3, 7} + { 0, 2, 3, 1, -1}, + { 0, -1, 0, -1, 4}, + {-1, 1, -1, 1, 5}, + { 2, 2, -1, -1, 4}, + {-1, -1, 3, 3, 7} }; static const int faceAndVertexToRightEdgePyramid[5][5] = { - { 2, 1, 0, 3, -1}, - { 4, -1, 6, -1, 6}, - {-1, 5, -1, 7, 7}, - { 4, 5, -1, -1, 5}, - {-1, -1, 6, 7, 6} + { 2, 1, 0, 3, -1}, + { 4, -1, 6, -1, 6}, + {-1, 5, -1, 7, 7}, + { 4, 5, -1, -1, 5}, + {-1, -1, 6, 7, 6} }; static const int faceAndVertexToLeftEdgePrism[5][6] = { - { 3, 3, -1, 0, 1, -1}, - { 4, -1, 4, 0, -1, 2}, - {-1, 5, 5, -1, 1, 2}, - { 3, 3, 5, -1, -1, -1}, - {-1, -1, -1, 6, 6, 8} + { 3, 3, -1, 0, 1, -1}, + { 4, -1, 4, 0, -1, 2}, + {-1, 5, 5, -1, 1, 2}, + { 3, 3, 5, -1, -1, -1}, + {-1, -1, -1, 6, 6, 8} }; static const int faceAndVertexToRightEdgePrism[5][6] = { - { 0, 1, -1, 6, 6, -1}, - { 0, -1, 2, 7, -1, 7}, - {-1, 1, 2, -1, 8, 8}, - { 4, 5, 4, -1, -1, -1}, - {-1, -1, -1, 7, 8, 7} + { 0, 1, -1, 6, 6, -1}, + { 0, -1, 2, 7, -1, 7}, + {-1, 1, 2, -1, 8, 8}, + { 4, 5, 4, -1, -1, -1}, + {-1, -1, -1, 7, 8, 7} }; static const int faceAndVertexToLeftEdgeHex[6][8] = { - { 0, -1, 4, -1, 8, -1, 2, -1}, - {-1, 5, -1, 3, -1, 1, -1, 9}, - { 6, 1, -1, -1, 0, 10, -1, -1}, - {-1, -1, 2, 7, -1, -1, 11, 3}, - { 4, 6, 7, 5, -1, -1, -1, -1}, - {-1, -1, -1, -1, 10, 9, 8, 11} + { 0, -1, 4, -1, 8, -1, 2, -1}, + {-1, 5, -1, 3, -1, 1, -1, 9}, + { 6, 1, -1, -1, 0, 10, -1, -1}, + {-1, -1, 2, 7, -1, -1, 11, 3}, + { 4, 6, 7, 5, -1, -1, -1, -1}, + {-1, -1, -1, -1, 10, 9, 8, 11} }; static const int faceAndVertexToRightEdgeHex[6][8] = { - { 4, -1, 2, -1, 0, -1, 8, -1}, - {-1, 1, -1, 5, -1, 9, -1, 3}, - { 0, 6, -1, -1, 10, 1, -1, -1}, - {-1, -1, 7, 3, -1, -1, 2, 11}, - { 6, 5, 4, 7, -1, -1, -1, -1}, - {-1, -1, -1, -1, 8, 10, 11, 9} + { 4, -1, 2, -1, 0, -1, 8, -1}, + {-1, 1, -1, 5, -1, 9, -1, 3}, + { 0, 6, -1, -1, 10, 1, -1, -1}, + {-1, -1, 7, 3, -1, -1, 2, 11}, + { 6, 5, 4, 7, -1, -1, -1, -1}, + {-1, -1, -1, -1, 8, 10, 11, 9} }; switch (numVertices) { @@ -609,7 +609,7 @@ public: // corners: for (int vert = 0; vert < numVertices; vert++) { - subContVol[vert].local = referenceElement.position(vert, dim); + subContVol[vert].local = referenceElement.position(vert, dim); subContVol[vert].global = geometry.global(subContVol[vert].local); subContVol[vert].inner = true; } @@ -660,7 +660,7 @@ public: subContVolFace[k].normal[0] = diffVec[1]; subContVolFace[k].normal[1] = -diffVec[0]; - diffVec = subContVol[j].global; + diffVec = subContVol[j].global; diffVec -= subContVol[i].global; // make sure the normal points to the right direction if (subContVolFace[k].normal * diffVec < 0) diff --git a/dumux/boxmodels/common/boxlocaljacobian.hh b/dumux/boxmodels/common/boxlocaljacobian.hh index b1f7ce7138..905b53755f 100644 --- a/dumux/boxmodels/common/boxlocaljacobian.hh +++ b/dumux/boxmodels/common/boxlocaljacobian.hh @@ -37,7 +37,7 @@ #include <dune/common/fmatrix.hh> #include <dune/istl/matrix.hh> -#include "boxelementsecondaryvars.hh" +#include "boxelementvolumevariables.hh" #include "boxfvelementgeometry.hh" #include "boxlocalresidual.hh" @@ -66,37 +66,37 @@ private: typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), - dim = GridView::dimension, - dimWorld = GridView::dimensionworld + dim = GridView::dimension, + dimWorld = GridView::dimensionworld }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename GridView::Grid::ctype CoordScalar; + typedef typename GridView::Grid::ctype CoordScalar; typedef Dune::FieldVector<Scalar, dim> LocalPosition; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; - typedef typename Element::EntityPointer ElementPointer; + typedef typename GridView::template Codim<0>::Entity Element; + typedef typename GridView::template Codim<0>::Iterator ElementIterator; + typedef typename Element::EntityPointer ElementPointer; typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp; - typedef typename RefElemProp::Container ReferenceElements; - typedef typename RefElemProp::ReferenceElement ReferenceElement; + typedef typename RefElemProp::Container ReferenceElements; + typedef typename RefElemProp::ReferenceElement ReferenceElement; - typedef typename GridView::IntersectionIterator IntersectionIterator; - typedef typename Element::Geometry Geometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; + typedef typename GridView::IntersectionIterator IntersectionIterator; + typedef typename Element::Geometry Geometry; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSolutionVector)) ElementSolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementBoundaryTypes)) ElementBoundaryTypes; typedef Dune::FieldMatrix<Scalar, numEq, numEq> MatrixBlock; @@ -116,7 +116,7 @@ public: // assume quadrilinears as elements with most vertices A_.setSize(2<<dim, 2<<dim); } - + /*! * \brief Assemble the linear system of equations for the * verts of a element, given a local solution 'localU'. @@ -141,11 +141,11 @@ public: // update the secondary variables for the element at the last // and the current time levels - prevSecVars_.update(problem_(), + prevVolVars_.update(problem_(), elem_(), fvElemGeom_, true /* isOldSol? */); - curSecVars_.update(problem_(), + curVolVars_.update(problem_(), elem_(), fvElemGeom_, false /* isOldSol? */); @@ -176,7 +176,7 @@ public: /*! * \brief Returns a reference to the local residual. */ - LocalResidual &localResidual() + LocalResidual &localResidual() { return localResidual_; } /*! @@ -196,7 +196,7 @@ protected: * \brief Returns a reference to the problem. */ const Problem &problem_() const - { + { Valgrind::CheckDefined(problemPtr_); return *problemPtr_; }; @@ -240,26 +240,26 @@ protected: int pvIdx) { int globalIdx = vertexMapper_().map(elem_(), scvIdx, dim); - PrimaryVarVector priVars(model_().curSol()[globalIdx]); - SecondaryVars origSecVars(curSecVars_[scvIdx]); + PrimaryVariables priVars(model_().curSol()[globalIdx]); + VolumeVariables origVolVars(curVolVars_[scvIdx]); - curSecVars_[scvIdx].setEvalPoint(&origSecVars); + curVolVars_[scvIdx].setEvalPoint(&origVolVars); Scalar eps = asImp_().numericEpsilon_(scvIdx, pvIdx); - + // deflect primary variables priVars[pvIdx] += eps; - + // calculate the residual - curSecVars_[scvIdx].update(priVars, + curVolVars_[scvIdx].update(priVars, problem_(), elem_(), fvElemGeom_, scvIdx, false); - localResidual().eval(elem_(), - fvElemGeom_, - prevSecVars_, - curSecVars_, + localResidual().eval(elem_(), + fvElemGeom_, + prevVolVars_, + curVolVars_, bcTypes_); // store the residual @@ -269,16 +269,16 @@ protected: priVars[pvIdx] -= 2*eps; // calculate residual again - curSecVars_[scvIdx].update(priVars, + curVolVars_[scvIdx].update(priVars, problem_(), elem_(), fvElemGeom_, scvIdx, false); - localResidual().eval(elem_(), - fvElemGeom_, - prevSecVars_, - curSecVars_, + localResidual().eval(elem_(), + fvElemGeom_, + prevVolVars_, + curVolVars_, bcTypes_); // central differences @@ -287,7 +287,7 @@ protected: // restore the orignal state of the element's secondary // variables - curSecVars_[scvIdx] = origSecVars; + curVolVars_[scvIdx] = origVolVars; #if HAVE_VALGRIND for (unsigned i = 0; i < dest.size(); ++i) @@ -306,8 +306,8 @@ protected: */ Scalar numericEpsilon_(int scvIdx, int pvIdx) const - { - Scalar pv = this->curSecVars_[scvIdx].primaryVars()[pvIdx]; + { + Scalar pv = this->curVolVars_[scvIdx].primaryVars()[pvIdx]; return 1e-9*(std::abs(pv) + 1); } @@ -339,12 +339,12 @@ protected: // The problem we would like to solve Problem *problemPtr_; - + // secondary variables at the previous and at the current time // levels - ElementSecondaryVars prevSecVars_; - ElementSecondaryVars curSecVars_; - + ElementVolumeVariables prevVolVars_; + ElementVolumeVariables curVolVars_; + LocalResidual localResidual_; LocalBlockMatrix A_; }; diff --git a/dumux/boxmodels/common/boxlocalresidual.hh b/dumux/boxmodels/common/boxlocalresidual.hh index bb8354ca16..a1e83e7881 100644 --- a/dumux/boxmodels/common/boxlocalresidual.hh +++ b/dumux/boxmodels/common/boxlocalresidual.hh @@ -55,42 +55,42 @@ class BoxLocalResidual private: typedef BoxLocalResidual<TypeTag> ThisType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalResidual)) Implementation; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Model; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Model; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), - dim = GridView::dimension, - dimWorld = GridView::dimensionworld + dim = GridView::dimension, + dimWorld = GridView::dimensionworld }; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename GridView::Grid::ctype CoordScalar; + typedef typename GridView::Grid::ctype CoordScalar; typedef Dune::FieldVector<Scalar, dim> LocalPosition; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; - typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GridView::template Codim<0>::Iterator ElementIterator; + typedef typename GridView::template Codim<0>::Entity Element; + typedef typename GridView::template Codim<0>::Iterator ElementIterator; typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp; - typedef typename RefElemProp::Container ReferenceElements; - typedef typename RefElemProp::ReferenceElement ReferenceElement; + typedef typename RefElemProp::Container ReferenceElements; + typedef typename RefElemProp::ReferenceElement ReferenceElement; - typedef typename GridView::IntersectionIterator IntersectionIterator; - typedef typename Element::Geometry Geometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; + typedef typename GridView::IntersectionIterator IntersectionIterator; + typedef typename Element::Geometry Geometry; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSolutionVector)) ElementSolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementBoundaryTypes)) ElementBoundaryTypes; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef Dune::FieldMatrix<Scalar, numEq, numEq> MatrixBlock; typedef Dune::Matrix<MatrixBlock> LocalBlockMatrix; @@ -104,7 +104,7 @@ public: void init(Problem &prob) { problemPtr_ = &prob; } - + /*! * \brief Compute the local residual, i.e. the deviation of the * equations from zero. @@ -113,47 +113,47 @@ public: { FVElementGeometry fvGeom; fvGeom.update(gridView_(), element); - ElementSecondaryVars secVarsPrev, secVarsCur; - secVarsPrev.update(problem_(), - element, + ElementVolumeVariables volVarsPrev, volVarsCur; + volVarsPrev.update(problem_(), + element, fvGeom, true /* oldSol? */); - secVarsCur.update(problem_(), - element, + volVarsCur.update(problem_(), + element, fvGeom, false /* oldSol? */); ElementBoundaryTypes bcTypes; bcTypes.update(problem_(), element, fvGeom); - + // this is pretty much a HACK because the internal state of // the problem is not supposed to be changed during the // evaluation of the residual. (Reasons: It is a violation of // abstraction, makes everything more prone to errors and is // not thread save.) The real solution are context objects! problem_().updateCouplingParams(element); - - asImp_().eval(element, fvGeom, secVarsPrev, secVarsCur, bcTypes); + + asImp_().eval(element, fvGeom, volVarsPrev, volVarsCur, bcTypes); } /*! * \brief Compute the flux term for the current solution. */ - void evalFluxes(const Element &element, - const ElementSecondaryVars &curSecVars) + void evalFluxes(const Element &element, + const ElementVolumeVariables &curVolVars) { FVElementGeometry fvGeom; fvGeom.update(gridView_(), element); ElementBoundaryTypes bcTypes; bcTypes.update(problem_(), element, fvGeom); - + residual_.resize(fvGeom.numVertices); residual_ = 0; elemPtr_ = &element; fvElemGeomPtr_ = &fvGeom; bcTypesPtr_ = &bcTypes; - prevSecVarsPtr_ = 0; - curSecVarsPtr_ = &curSecVars; + prevVolVarsPtr_ = 0; + curVolVarsPtr_ = &curVolVars; asImp_().evalFluxes_(); } @@ -162,29 +162,29 @@ public: * \brief Compute the local residual, i.e. the deviation of the * equations from zero. */ - void eval(const Element &element, + void eval(const Element &element, const FVElementGeometry &fvGeom, - const ElementSecondaryVars &prevSecVars, - const ElementSecondaryVars &curSecVars, + const ElementVolumeVariables &prevVolVars, + const ElementVolumeVariables &curVolVars, const ElementBoundaryTypes &bcTypes) { //Valgrind::CheckDefined(fvGeom); - Valgrind::CheckDefined(prevSecVars); - Valgrind::CheckDefined(curSecVars); + Valgrind::CheckDefined(prevVolVars); + Valgrind::CheckDefined(curVolVars); #if HAVE_VALGRIND for (int i=0; i < fvGeom.numVertices; i++) { - Valgrind::CheckDefined(prevSecVars[i]); - Valgrind::CheckDefined(curSecVars[i]); + Valgrind::CheckDefined(prevVolVars[i]); + Valgrind::CheckDefined(curVolVars[i]); } #endif // HAVE_VALGRIND elemPtr_ = &element; fvElemGeomPtr_ = &fvGeom; bcTypesPtr_ = &bcTypes; - prevSecVarsPtr_ = &prevSecVars; - curSecVarsPtr_ = &curSecVars; - + prevVolVarsPtr_ = &prevVolVars; + curVolVarsPtr_ = &curVolVars; + // reset residual int numVerts = fvElemGeom_().numVertices; residual_.resize(numVerts); @@ -213,19 +213,19 @@ public: * \brief Returns the local residual for a given sub-control * volume of the element. */ - const PrimaryVarVector residual(int scvIdx) const + const PrimaryVariables residual(int scvIdx) const { return residual_[scvIdx]; } -protected: +protected: Implementation &asImp_() { return *static_cast<Implementation*>(this); } - + const Implementation &asImp_() const { return *static_cast<const Implementation*>(this); } void evalBoundary_() { - Dune::GeometryType geoType = elem_().geometry().type(); + Dune::GeometryType geoType = elem_().geometry().type(); const ReferenceElement &refElem = ReferenceElements::general(geoType); // evaluate boundary conditions for all intersections of @@ -250,7 +250,7 @@ protected: 1, faceVertIdx, dim); - + int boundaryFaceIdx = fvElemGeom_().boundaryFaceIndex(faceIdx, faceVertIdx); @@ -268,9 +268,9 @@ protected: int boundaryFaceIdx) { // temporary vector to store the neumann boundary fluxes - PrimaryVarVector values(0.0); + PrimaryVariables values(0.0); const BoundaryTypes &bcTypes = bcTypes_(scvIdx); - + // deal with neumann boundaries if (bcTypes.hasNeumann()) { problem_().neumann(values, @@ -283,7 +283,7 @@ protected: Valgrind::CheckDefined(values); residual_[scvIdx] += values; } - + // deal with dirichlet boundaries if (bcTypes.hasDirichlet()) { problem_().dirichlet(values, @@ -295,16 +295,16 @@ protected: Valgrind::CheckDefined(values); for (int i = 0; i < numEq; ++i) { - if (!bcTypes.isDirichlet(i)) + if (!bcTypes.isDirichlet(i)) continue; int pvIdx = bcTypes.eqToDirichletIndex(i); - residual_[scvIdx][i] = + residual_[scvIdx][i] = curPrimaryVars_(scvIdx)[pvIdx] - values[pvIdx]; } } } - + void evalFluxes_() { // calculate the mass flux over the faces and subtract @@ -314,7 +314,7 @@ protected: int i = fvElemGeom_().subContVolFace[k].i; int j = fvElemGeom_().subContVolFace[k].j; - PrimaryVarVector flux; + PrimaryVariables flux; Valgrind::SetUndefined(flux); this->asImp_().computeFlux(flux, k); Valgrind::CheckDefined(flux); @@ -333,7 +333,7 @@ protected: // evaluate the volume terms (storage + source terms) for (int i=0; i < fvElemGeom_().numVertices; i++) { - PrimaryVarVector massContrib(0), tmp(0); + PrimaryVariables massContrib(0), tmp(0); // mass balance within the element. this is the // $\frac{m}{\partial t}$ term if using implicit @@ -354,7 +354,7 @@ protected: residual_[i][j] += massContrib[j]; // subtract the source term from the local rate - PrimaryVarVector source; + PrimaryVariables source; this->asImp_().computeSource(source, i); source *= fvElemGeom_().subContVol[i].volume; @@ -384,54 +384,54 @@ protected: * \brief Returns a reference to the vertex mapper. */ const VertexMapper &vertexMapper_() const - { return problem_().vertexMapper(); }; + { return problem_().vertexMapper(); }; const GridView &gridView_() const { return problem_().gridView(); } const Element &elem_() const - { + { Valgrind::CheckDefined(elemPtr_); return *elemPtr_; } const FVElementGeometry &fvElemGeom_() const - { + { Valgrind::CheckDefined(fvElemGeomPtr_); - return *fvElemGeomPtr_; + return *fvElemGeomPtr_; } - const PrimaryVarVector &curPrimaryVars_(int i) const + const PrimaryVariables &curPrimaryVars_(int i) const { - return curSecVars_(i).primaryVars(); + return curVolVars_(i).primaryVars(); } - const ElementSecondaryVars &curSecVars_() const - { - Valgrind::CheckDefined(curSecVarsPtr_); - return *curSecVarsPtr_; + const ElementVolumeVariables &curVolVars_() const + { + Valgrind::CheckDefined(curVolVarsPtr_); + return *curVolVarsPtr_; } - const SecondaryVars &curSecVars_(int i) const - { - return curSecVars_()[i]; + const VolumeVariables &curVolVars_(int i) const + { + return curVolVars_()[i]; } - const ElementSecondaryVars &prevSecVars_() const - { - Valgrind::CheckDefined(prevSecVarsPtr_); - return *prevSecVarsPtr_; + const ElementVolumeVariables &prevVolVars_() const + { + Valgrind::CheckDefined(prevVolVarsPtr_); + return *prevVolVarsPtr_; } - const SecondaryVars &prevSecVars_(int i) const - { - return prevSecVars_()[i]; + const VolumeVariables &prevVolVars_(int i) const + { + return prevVolVars_()[i]; } const ElementBoundaryTypes &bcTypes_() const - { + { Valgrind::CheckDefined(bcTypesPtr_); return *bcTypesPtr_; } const BoundaryTypes &bcTypes_(int i) const - { + { return bcTypes_()[i]; } @@ -446,8 +446,8 @@ private: const FVElementGeometry *fvElemGeomPtr_; // current and previous secondary variables for the element - const ElementSecondaryVars *prevSecVarsPtr_; - const ElementSecondaryVars *curSecVarsPtr_; + const ElementVolumeVariables *prevVolVarsPtr_; + const ElementVolumeVariables *curVolVarsPtr_; const ElementBoundaryTypes *bcTypesPtr_; }; diff --git a/dumux/boxmodels/common/boxmodel.hh b/dumux/boxmodels/common/boxmodel.hh index 76cb99904a..56a48cf497 100644 --- a/dumux/boxmodels/common/boxmodel.hh +++ b/dumux/boxmodels/common/boxmodel.hh @@ -24,7 +24,7 @@ #include "boxproperties.hh" -#include "boxelementsecondaryvars.hh" +#include "boxelementvolumevariables.hh" #include "boxlocaljacobian.hh" #include "boxlocalresidual.hh" @@ -60,31 +60,31 @@ class BoxModel typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename GridView::Grid::ctype CoordScalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename GridView::Grid::ctype CoordScalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementMapper)) ElementMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(DofMapper)) DofMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(JacobianAssembler)) JacobianAssembler; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), - dim = GridView::dimension + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + dim = GridView::dimension }; - typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp; - typedef typename RefElemProp::Container ReferenceElements; - typedef typename RefElemProp::ReferenceElement ReferenceElement; + typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp; + typedef typename RefElemProp::Container ReferenceElements; + typedef typename RefElemProp::ReferenceElement ReferenceElement; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalJacobian)) LocalJacobian; typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalResidual)) LocalResidual; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(NewtonMethod)) NewtonMethod; typedef typename GET_PROP_TYPE(TypeTag, PTAG(NewtonController)) NewtonController; @@ -112,7 +112,7 @@ public: { problemPtr_ = &prob; - int nDofs = asImp_().numDofs(); + int nDofs = asImp_().numDofs(); uCur_.resize(nDofs); uPrev_.resize(nDofs); boxVolume_.resize(nDofs); @@ -120,7 +120,7 @@ public: localJacobian_.init(problem_()); jacAsm_ = new JacobianAssembler(); jacAsm_->init(problem_()); - + applyInitialSolution_(); // also set the solution of the "previous" time step to the @@ -148,7 +148,7 @@ public: Scalar globalResidual(SolutionVector &dest) { dest = 0; - + ElementIterator elemIt = gridView_().template begin<0>(); const ElementIterator elemEndIt = gridView_().template end<0>(); for (; elemIt != elemEndIt; ++elemIt) { @@ -253,13 +253,13 @@ public: asImp_().updateSuccessful(); else asImp_().updateFailed(); - + #if HAVE_VALGRIND for (size_t i = 0; i < curSol().size(); ++i) { Valgrind::CheckDefined(curSol()[i]); } #endif // HAVE_VALGRIND - + return converged; } @@ -395,7 +395,7 @@ public: */ template <class MultiWriter> void addConvergenceVtkFields(MultiWriter &writer, - const SolutionVector &u, + const SolutionVector &u, const SolutionVector &deltaU) { typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; @@ -440,7 +440,7 @@ public: /*! * \brief Add the quantities of a time step which ought to be - * written to disk. + * written to disk. * * This should be overwritten by the acutal model if any secondary * variables should be written out. Read: This should _always_ be @@ -449,14 +449,14 @@ public: * \param writer The VTK multi writer where the fields should be added. */ template <class MultiWriter> - void addOutputVtkFields(const SolutionVector &sol, + void addOutputVtkFields(const SolutionVector &sol, MultiWriter &writer) { typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; // create the required scalar fields unsigned numVertices = this->gridView_().size(dim); - + // global defect of the two auxiliary equations ScalarField* x[numEq]; for (int i = 0; i < numEq; ++i) { @@ -504,9 +504,9 @@ protected: // first set the whole domain to zero uCur_ = Scalar(0.0); boxVolume_ = Scalar(0.0); - + FVElementGeometry fvElemGeom; - + // iterate through leaf grid and evaluate initial // condition at the center of each sub control volume // @@ -528,7 +528,7 @@ protected: // let the problem do the dirty work of nailing down // the initial solution. - PrimaryVarVector initVal; + PrimaryVariables initVal; Valgrind::SetUndefined(initVal); problem_().initial(initVal, *it, @@ -537,7 +537,7 @@ protected: Valgrind::CheckDefined(initVal); // add up the initial values of all sub-control - // volumes. If the initial values disagree for + // volumes. If the initial values disagree for // different sub control volumes, the initial value // will be the arithmetic mean. initVal *= fvElemGeom.subContVol[scvIdx].volume; @@ -566,7 +566,7 @@ protected: Problem *problemPtr_; // calculates the local jacobian matrix for a given element - LocalJacobian localJacobian_; + LocalJacobian localJacobian_; // Linearizes the problem at the current time step using the // local jacobian JacobianAssembler *jacAsm_; diff --git a/dumux/boxmodels/common/boxproblem.hh b/dumux/boxmodels/common/boxproblem.hh index bf7d3c8db4..2abf4e9b17 100644 --- a/dumux/boxmodels/common/boxproblem.hh +++ b/dumux/boxmodels/common/boxproblem.hh @@ -118,7 +118,7 @@ public: */ void updateCouplingParams(const Element &element) const {} - + /*! * \name Simulation steering */ @@ -127,7 +127,7 @@ public: /*! * \brief Called by the time manager before the time integration. */ - void preProcess() + void preTimeStep() {} /*! @@ -144,13 +144,13 @@ public: if (model_->update(*newtonMethod_, newtonCtl_)) return; - + // update failed Scalar dt = timeManager().timeStepSize(); Scalar nextDt = dt / 2; timeManager().setTimeStepSize(nextDt); } - + DUNE_THROW(Dune::MathError, "Newton solver didn't converge after " << maxFails @@ -177,7 +177,7 @@ public: * steps. This file is intented to be overwritten by the * implementation. */ - bool doSerialize() const + bool shouldWriteRestartFile() const { return timeManager().timeStepIndex() > 0 && (timeManager().timeStepIndex() % 10 == 0); @@ -191,13 +191,13 @@ public: * very time step. This file is intented to be overwritten by the * implementation. */ - bool doOutput() const + bool shouldWriteOutput() const { return true; } /*! * \brief Called by the time manager after the time integration. */ - void postProcess() + void postTimeStep() { } /*! @@ -317,7 +317,7 @@ public: asImp_().serialize(res); res.serializeEnd(); } - + /*! * \brief This method writes the complete state of the problem * to the harddisk. @@ -341,9 +341,9 @@ public: void restart(Scalar tRestart) { typedef Dumux::Restart Restarter; - + Restarter res; - + res.deserializeBegin(asImp_(), tRestart); std::cout << "Deserialize from file '" << res.fileName() << "'\n"; timeManager().deserialize(res); @@ -373,7 +373,7 @@ public: void writeOutput() { // write the current result to disk - if (asImp_().doOutput()) { + if (asImp_().shouldWriteOutput()) { if (gridView().comm().rank() == 0) std::cout << "Writing result file for \"" << asImp_().name() << "\"\n"; diff --git a/dumux/boxmodels/common/boxproperties.hh b/dumux/boxmodels/common/boxproperties.hh index 196be01938..eb61b47b5b 100644 --- a/dumux/boxmodels/common/boxproperties.hh +++ b/dumux/boxmodels/common/boxproperties.hh @@ -65,16 +65,16 @@ NEW_PROP_TAG(JacobianMatrix); //!< Type of the global jacobian matrix NEW_PROP_TAG(BoundaryTypes); //!< Stores the boundary types of a single degree of freedom NEW_PROP_TAG(ElementBoundaryTypes); //!< Stores the boundary types on an element -NEW_PROP_TAG(PrimaryVarVector); //!< A vector of primary variables within a sub-control volume +NEW_PROP_TAG(PrimaryVariables); //!< A vector of primary variables within a sub-control volume NEW_PROP_TAG(SolutionVector); //!< Vector containing all primary variable vector of the grid NEW_PROP_TAG(ElementSolutionVector); //!< A vector of primary variables within a sub-control volume -NEW_PROP_TAG(SecondaryVars); //!< The secondary variables within a sub-control volume -NEW_PROP_TAG(ElementSecondaryVars); //!< The secondary variables of all sub-control volumes in an element -NEW_PROP_TAG(FluxVars); //!< Data required to calculate a flux over a face +NEW_PROP_TAG(VolumeVariables); //!< The secondary variables within a sub-control volume +NEW_PROP_TAG(ElementVolumeVariables); //!< The secondary variables of all sub-control volumes in an element +NEW_PROP_TAG(FluxVariables); //!< Data required to calculate a flux over a face // high level simulation control -NEW_PROP_TAG(TimeManager); //!< Manages the simulation time +NEW_PROP_TAG(TimeManager); //!< Manages the simulation time NEW_PROP_TAG(NewtonMethod); //!< The type of the newton method NEW_PROP_TAG(NewtonController); //!< The type of the newton controller @@ -115,7 +115,7 @@ template<typename TypeTag> class BoxElementBoundaryTypes; template<typename TypeTag> -class BoxElementSecondaryVars; +class BoxElementVolumeVariables; template<typename TypeTag> class BoxLocalJacobian; @@ -244,7 +244,7 @@ SET_TYPE_PROP(BoxModel, LocalJacobian, Dumux::BoxLocalJacobian<TypeTag>); */ SET_PROP(BoxModel, SolutionVector) { private: - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridFunctionSpace)) GridFunctionSpace; public: typedef typename GridFunctionSpace::template VectorContainer<Scalar>::Type type; @@ -255,21 +255,21 @@ public: */ SET_PROP(BoxModel, ElementSolutionVector) { private: - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; public: - typedef Dune::BlockVector<PrimaryVarVector> type; + typedef Dune::BlockVector<PrimaryVariables> type; }; /*! * \brief A vector of primary variables. */ -SET_PROP(BoxModel, PrimaryVarVector) +SET_PROP(BoxModel, PrimaryVariables) { typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector))::block_type type; }; /*! * \brief An array of secondary variable containers. */ -SET_TYPE_PROP(BoxModel, ElementSecondaryVars, Dumux::BoxElementSecondaryVars<TypeTag>); +SET_TYPE_PROP(BoxModel, ElementVolumeVariables, Dumux::BoxElementVolumeVariables<TypeTag>); /*! * \brief Boundary types at a single degree of freedom. @@ -292,7 +292,7 @@ SET_PROP(BoxModel, JacobianMatrix) private: typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridOperatorSpace)) GridOperatorSpace; -public: +public: typedef typename GridOperatorSpace::template MatrixContainer<Scalar>::Type type; }; @@ -322,8 +322,8 @@ public: typedef Dune::PDELab::PowerGridFunctionSpace<ScalarGridFunctionSpace, numEq, Dune::PDELab::GridFunctionSpaceBlockwiseMapper> type; - - typedef typename type::template ConstraintsContainer<Scalar>::Type + + typedef typename type::template ConstraintsContainer<Scalar>::Type ConstraintsTrafo; }; @@ -341,7 +341,7 @@ SET_PROP(BoxModel, GridOperatorSpace) typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridFunctionSpace)) GridFunctionSpace; enum{numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq))}; -public: +public: typedef Dumux::PDELab::BoxLocalOperator<TypeTag> LocalOperator; typedef Dune::PDELab::GridOperatorSpace<GridFunctionSpace, diff --git a/dumux/boxmodels/common/pdelabboxassembler.hh b/dumux/boxmodels/common/pdelabboxassembler.hh index c15d6437c1..9c24a0c60b 100644 --- a/dumux/boxmodels/common/pdelabboxassembler.hh +++ b/dumux/boxmodels/common/pdelabboxassembler.hh @@ -29,16 +29,16 @@ namespace Dumux { namespace PDELab { - + template<class TypeTag> class BoxAssembler { - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Model; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Model; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; enum{numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq))}; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; enum{dim = GridView::dimension}; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(LocalFEMSpace)) FEM; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Constraints)) Constraints; @@ -92,14 +92,14 @@ public: gridFunctionSpace_ = new GridFunctionSpace(*scalarGridFunctionSpace_); //cn_->compute_ghosts(*gridFunctionSpace_); - + //typedef BoundaryIndexHelper<TypeTag> BoundaryFunction; //BoundaryFunction *bTypes = new BoundaryFunction(); constraintsTrafo_ = new ConstraintsTrafo(); //Dune::PDELab::constraints(*bTypes, *gridFunctionSpace_, *constraintsTrafo_, false); localOperator_ = new LocalOperator(problem_->model()); - gridOperatorSpace_ = + gridOperatorSpace_ = new GridOperatorSpace(*gridFunctionSpace_, *constraintsTrafo_, *gridFunctionSpace_, *constraintsTrafo_, *localOperator_); @@ -121,7 +121,7 @@ public: // entry on the main diagonal block matrix typedef typename Matrix::RowIterator RowIterator; typedef typename Matrix::ColIterator ColIterator; - typedef typename Matrix::block_type BlockType; + typedef typename Matrix::block_type BlockType; const typename Matrix::block_type::size_type rowsInBlock = Matrix::block_type::rows; const typename Matrix::block_type::size_type colsInBlock = Matrix::block_type::cols; Scalar diagonalEntry[rowsInBlock]; diff --git a/dumux/boxmodels/common/pdelabboxlocaloperator.hh b/dumux/boxmodels/common/pdelabboxlocaloperator.hh index 5e3a4b2aeb..410d606c4d 100644 --- a/dumux/boxmodels/common/pdelabboxlocaloperator.hh +++ b/dumux/boxmodels/common/pdelabboxlocaloperator.hh @@ -61,7 +61,7 @@ public: typedef typename LFSU::Traits::SizeType size_type; model_.localResidual().eval(eg.entity()); - + int numVertices = x.size()/numEq; for (size_type comp = 0; comp < r.size(); comp++) r[comp] = model_.localResidual().residual(comp%numVertices)[comp/numVertices]; diff --git a/dumux/boxmodels/richards/richardsfluxvars.hh b/dumux/boxmodels/richards/richardsfluxvariables.hh similarity index 90% rename from dumux/boxmodels/richards/richardsfluxvars.hh rename to dumux/boxmodels/richards/richardsfluxvariables.hh index 38d0dc542c..e48c1f2bc0 100644 --- a/dumux/boxmodels/richards/richardsfluxvars.hh +++ b/dumux/boxmodels/richards/richardsfluxvariables.hh @@ -1,4 +1,4 @@ -// $Id: richardsfluxvars.hh 3840 2010-07-15 10:14:15Z bernd $ +// $Id: richardsfluxvariables.hh 3840 2010-07-15 10:14:15Z bernd $ /***************************************************************************** * Copyright (C) 2009 by Onur Dogan * * Copyright (C) 2009 by Andreas Lauser * @@ -20,8 +20,8 @@ * \brief This file contains the data which is required to calculate * the flux of fluid over a face of a finite volume. */ -#ifndef DUMUX_RICHARDS_FLUX_DATA_HH -#define DUMUX_RICHARDS_FLUX_DATA_HH +#ifndef DUMUX_RICHARDS_FLUX_VARIABLES_HH +#define DUMUX_RICHARDS_FLUX_VARIABLES_HH #include <dumux/common/math.hh> @@ -34,16 +34,16 @@ namespace Dumux * calculate the flux of fluid over a face of a finite volume. */ template <class TypeTag> -class RichardsFluxVars +class RichardsFluxVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; enum { dim = GridView::dimension, @@ -60,11 +60,11 @@ class RichardsFluxVars typedef typename GET_PROP_TYPE(TypeTag, PTAG(RichardsIndices)) Indices; public: - RichardsFluxVars(const Problem &problem, + RichardsFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, int faceIdx, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) : fvElemGeom(elemGeom) { face = &fvElemGeom.subContVolFace[faceIdx]; @@ -85,7 +85,7 @@ public: private: void calculateGradients_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { // calculate gradients GlobalPosition tmp(0.0); @@ -116,7 +116,7 @@ private: void calculateVelocities_(const Problem &problem, const Element &element, - const ElementSecondaryVars &elemDat) + const ElementVolumeVariables &elemDat) { // calculate the permeability tensor. TODO: this should be // more flexible diff --git a/dumux/boxmodels/richards/richardslocalresidual.hh b/dumux/boxmodels/richards/richardslocalresidual.hh index 1e7f7c2cf1..69cd5ebf37 100644 --- a/dumux/boxmodels/richards/richardslocalresidual.hh +++ b/dumux/boxmodels/richards/richardslocalresidual.hh @@ -19,14 +19,14 @@ * * * This program is distributed WITHOUT ANY WARRANTY. * *****************************************************************************/ -#ifndef DUMUX_RICHARDS_BOX_JACOBIAN_HH -#define DUMUX_RICHARDS_BOX_JACOBIAN_HH +#ifndef DUMUX_RICHARDS_LOCAL_RESIDUAL_HH +#define DUMUX_RICHARDS_LOCAL_RESIDUAL_HH #include <dumux/boxmodels/common/boxlocalresidual.hh> -#include "richardssecondaryvars.hh" +#include "richardsvolumevariables.hh" -#include "richardsfluxvars.hh" +#include "richardsfluxvariables.hh" namespace Dumux { @@ -51,21 +51,21 @@ class RichardsLocalResidual : public BoxLocalResidual<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSolutionVector)) ElementSolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(RichardsIndices)) Indices; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, - pW = Indices::pW, + pW = Indices::pW, }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef Dune::FieldVector<Scalar, dim> LocalPosition; typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; @@ -81,21 +81,21 @@ public: * * This function should not include the source and sink terms. */ - void computeStorage(PrimaryVarVector &result, int scvIdx, bool usePrevSol) const + void computeStorage(PrimaryVariables &result, int scvIdx, bool usePrevSol) const { // if flag usePrevSol is set, the solution from the previous // time step is used, otherwise the current solution is // used. The secondary variables are used accordingly. This // is required to compute the derivative of the storage term // using the implicit euler method. - const ElementSecondaryVars &elemDat = usePrevSol ? this->prevSecVars_() : this->curSecVars_(); - const SecondaryVars &vertDat = elemDat[scvIdx]; + const ElementVolumeVariables &elemDat = usePrevSol ? this->prevVolVars_() : this->curVolVars_(); + const VolumeVariables &vertDat = elemDat[scvIdx]; // partial time derivative of the wetting phase mass result[pW] = vertDat.densityW * vertDat.porosity - * this->prevSecVars_()[scvIdx].dSwdpC // TODO: use derivative for the current solution + * this->prevVolVars_()[scvIdx].dSwdpC // TODO: use derivative for the current solution * (vertDat.pNreference - vertDat.pW); } @@ -104,17 +104,17 @@ public: * \brief Evaluates the mass flux over a face of a subcontrol * volume. */ - void computeFlux(PrimaryVarVector &flux, int faceId) const + void computeFlux(PrimaryVariables &flux, int faceId) const { - FluxVars vars(this->problem_(), + FluxVariables vars(this->problem_(), this->elem_(), this->fvElemGeom_(), faceId, - this->curSecVars_()); + this->curVolVars_()); // data attached to upstream and the downstream vertices - const SecondaryVars &up = this->curSecVars_(vars.upstreamIdx); - const SecondaryVars &dn = this->curSecVars_(vars.downstreamIdx); + const VolumeVariables &up = this->curVolVars_(vars.upstreamIdx); + const VolumeVariables &dn = this->curVolVars_(vars.downstreamIdx); flux[pW] = vars.vDarcyNormal* @@ -130,7 +130,7 @@ public: /*! * \brief Calculate the source term of the equation */ - void computeSource(PrimaryVarVector &q, int localVertexIdx) + void computeSource(PrimaryVariables &q, int localVertexIdx) { this->problem_().source(q, this->elem_(), @@ -142,8 +142,8 @@ public: * \brief Return the temperature given the solution vector of a * finite volume. */ - template <class PrimaryVarVector> - Scalar temperature(const PrimaryVarVector &sol) + template <class PrimaryVariables> + Scalar temperature(const PrimaryVariables &sol) { return this->problem_.temperature(); /* constant temperature */ } private: diff --git a/dumux/boxmodels/richards/richardsmodel.hh b/dumux/boxmodels/richards/richardsmodel.hh index f6e6c82c41..0d123c8386 100644 --- a/dumux/boxmodels/richards/richardsmodel.hh +++ b/dumux/boxmodels/richards/richardsmodel.hh @@ -73,10 +73,10 @@ class RichardsModel : public BoxModel<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GridView::template Codim<0>::Entity Element; typedef typename GridView::template Codim<0>::Iterator ElementIterator; - + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementBoundaryTypes)) ElementBoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementMapper)) ElementMapper; @@ -107,7 +107,7 @@ public: ScalarField *mobW = writer.template createField<Scalar, 1>(numVertices); FVElementGeometry fvElemGeom; - SecondaryVars secVars; + VolumeVariables volVars; ElementBoundaryTypes elemBcTypes; ElementIterator elemIt = this->gridView_().template begin<0>(); @@ -121,20 +121,20 @@ public: for (int i = 0; i < numVerts; ++i) { int globalIdx = this->vertexMapper().map(*elemIt, i, dim); - secVars.update(sol[globalIdx], + volVars.update(sol[globalIdx], this->problem_(), *elemIt, - fvElemGeom, + fvElemGeom, i, false); - - (*Sw)[globalIdx] = secVars.Sw; - (*Sn)[globalIdx] = 1.0 - secVars.Sw; - (*pC)[globalIdx] = secVars.pC; - (*pW)[globalIdx] = secVars.pW; - (*dSwdpC)[globalIdx] = secVars.dSwdpC; - (*rhoW)[globalIdx] = secVars.densityW; - (*mobW)[globalIdx] = secVars.mobilityW; + + (*Sw)[globalIdx] = volVars.Sw; + (*Sn)[globalIdx] = 1.0 - volVars.Sw; + (*pC)[globalIdx] = volVars.pC; + (*pW)[globalIdx] = volVars.pW; + (*dSwdpC)[globalIdx] = volVars.dSwdpC; + (*rhoW)[globalIdx] = volVars.densityW; + (*mobW)[globalIdx] = volVars.mobilityW; }; } diff --git a/dumux/boxmodels/richards/richardsproperties.hh b/dumux/boxmodels/richards/richardsproperties.hh index 404ca2f897..39e1544a24 100644 --- a/dumux/boxmodels/richards/richardsproperties.hh +++ b/dumux/boxmodels/richards/richardsproperties.hh @@ -37,10 +37,10 @@ template<class TypeTag> class RichardsLocalResidual; template <class TypeTag> -class RichardsSecondaryVars; +class RichardsVolumeVariables; template <class TypeTag> -class RichardsFluxVars; +class RichardsFluxVariables; /*! * \brief Indices for the single phase model. @@ -70,9 +70,9 @@ NEW_TYPE_TAG(BoxRichards, INHERITS_FROM(BoxModel)); NEW_PROP_TAG(NumPhases); //!< Number of fluid phases in the system NEW_PROP_TAG(RichardsIndices); //!< Enumerations for the richards models -NEW_PROP_TAG(SpatialParameters); //!< The type of the soil properties object -NEW_PROP_TAG(MaterialLaw); //!< The material law which ought to be used (extracted from the soil) -NEW_PROP_TAG(MaterialLawParams); //!< The context material law (extracted from the soil) +NEW_PROP_TAG(SpatialParameters); //!< The type of the spatial parameters object +NEW_PROP_TAG(MaterialLaw); //!< The material law which ought to be used (extracted from the spatial parameters) +NEW_PROP_TAG(MaterialLawParams); //!< The context material law (extracted from the spatial parameters) NEW_PROP_TAG(WettingPhase); //!< The wetting phase for the richards model NEW_PROP_TAG(EnableGravity); //!< Returns whether gravity is considered in the problem NEW_PROP_TAG(MobilityUpwindAlpha); //!< The value of the upwind parameter for the mobility @@ -91,14 +91,14 @@ SET_TYPE_PROP(BoxRichards, //! the Model property SET_TYPE_PROP(BoxRichards, Model, RichardsModel<TypeTag>); -//! the SecondaryVars property -SET_TYPE_PROP(BoxRichards, SecondaryVars, RichardsSecondaryVars<TypeTag>); +//! the VolumeVariables property +SET_TYPE_PROP(BoxRichards, VolumeVariables, RichardsVolumeVariables<TypeTag>); -//! the FluxVars property -SET_TYPE_PROP(BoxRichards, FluxVars, RichardsFluxVars<TypeTag>); +//! the FluxVariables property +SET_TYPE_PROP(BoxRichards, FluxVariables, RichardsFluxVariables<TypeTag>); //! the weight of the upwind vertex for the mobility SET_SCALAR_PROP(BoxRichards, diff --git a/dumux/boxmodels/richards/richardssecondaryvars.hh b/dumux/boxmodels/richards/richardsvolumevariables.hh similarity index 87% rename from dumux/boxmodels/richards/richardssecondaryvars.hh rename to dumux/boxmodels/richards/richardsvolumevariables.hh index 995840bb0e..c9dcfeb4f8 100644 --- a/dumux/boxmodels/richards/richardssecondaryvars.hh +++ b/dumux/boxmodels/richards/richardsvolumevariables.hh @@ -1,4 +1,4 @@ -// $Id: richardssecondaryvars.hh 3840 2010-07-15 10:14:15Z bernd $ +// $Id: richardsvolumevariables.hh 3840 2010-07-15 10:14:15Z bernd $ /***************************************************************************** * Copyright (C) 2009 by Onur Dogan * * Copyright (C) 2009 by Andreas Lauser * @@ -19,8 +19,8 @@ * * \brief Quantities required by the richards box model defined on a vertex. */ -#ifndef DUMUX_RICHARDS_SECONDARY_VARS_HH -#define DUMUX_RICHARDS_SECONDARY_VARS_HH +#ifndef DUMUX_RICHARDS_VOLUME_VARIABLES_HH +#define DUMUX_RICHARDS_VOLUME_VARIABLES_HH #include "richardsproperties.hh" @@ -33,17 +33,17 @@ namespace Dumux * finite volume in the Richards model. */ template <class TypeTag> -class RichardsSecondaryVars +class RichardsVolumeVariables { typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GridView::template Codim<0>::Entity Element; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) Implementation; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) Implementation; enum { - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, }; typedef typename GET_PROP(TypeTag, PTAG(ReferenceElements)) RefElemProp; @@ -52,7 +52,7 @@ class RichardsSecondaryVars typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(RichardsIndices)) Indices; typedef typename GET_PROP_TYPE(TypeTag, PTAG(WettingPhase)) WettingPhase; typedef typename GET_PROP_TYPE(TypeTag, PTAG(MaterialLaw)) MaterialLaw; @@ -65,14 +65,14 @@ public: /*! * \brief Update all quantities for a given control volume. */ - void update(const PrimaryVarVector &priVars, + void update(const PrimaryVariables &priVars, const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, int vertIdx, bool isOldSol) { - primaryVars_ = priVars; + primaryVars_ = priVars; // material law parameters const MaterialLawParams &materialParams = @@ -97,7 +97,7 @@ public: /*! * \brief Return the vector of primary variables */ - const PrimaryVarVector &primaryVars() const + const PrimaryVariables &primaryVars() const { return primaryVars_; } /*! @@ -118,7 +118,7 @@ public: Scalar temperature; protected: - PrimaryVarVector primaryVars_; + PrimaryVariables primaryVars_; }; } diff --git a/dumux/common/boundaryconditions.hh b/dumux/common/boundaryconditions.hh index 2fd9d64a3d..f762330eeb 100644 --- a/dumux/common/boundaryconditions.hh +++ b/dumux/common/boundaryconditions.hh @@ -40,9 +40,9 @@ struct BoundaryConditions couplingOutflow = -2, couplingInflow = -1, outflow = 0, - neumann = 1, //!< Neumann boundary - process = 2, //!< Processor boundary - dirichlet = 3 //!< Dirichlet boundary + neumann = 1, //!< Neumann boundary + process = 2, //!< Processor boundary + dirichlet = 3 //!< Dirichlet boundary }; }; diff --git a/dumux/common/pardiso.hh b/dumux/common/pardiso.hh index 2f4cbf8614..76ebfa0fab 100644 --- a/dumux/common/pardiso.hh +++ b/dumux/common/pardiso.hh @@ -26,9 +26,9 @@ #ifdef HAVE_PARDISO #ifdef AIX -#define F77_FUN(func) func +#define F77_FUN(func) func #else -#define F77_FUN(func) func ## _ +#define F77_FUN(func) func ## _ #endif @@ -81,11 +81,11 @@ public: nrhs_ = 1; num_procs_ = 1; maxfct_ = 1; - mnum_ = 1; + mnum_ = 1; msglvl_ = 0; - error_ = 0; + error_ = 0; - //F77_FUN(pardisoinit) (pt_, &mtype_, iparm_); + //F77_FUN(pardisoinit) (pt_, &mtype_, iparm_); #else DUNE_THROW(Dune::NotImplemented, "no Pardiso library available, reconfigure with correct --with-pardiso options"); #endif @@ -153,7 +153,7 @@ public: std::cout << a_[i] << std::endl; */ - F77_FUN(pardisoinit) (pt_, &mtype_, iparm_); + F77_FUN(pardisoinit) (pt_, &mtype_, iparm_); phase_ = 11; @@ -169,7 +169,7 @@ public: DUNE_THROW(Dune::MathError, "Constructor SeqPardiso: Reordering failed. Error code " << error_); if (verbose_) - std::cout << " Reordering completed. Number of nonzeros in factors = " << iparm_[17] << std::endl; + std::cout << " Reordering completed. Number of nonzeros in factors = " << iparm_[17] << std::endl; phase_ = 22; @@ -193,9 +193,9 @@ public: nrhs_ = 1; num_procs_ = 1; maxfct_ = 1; - mnum_ = 1; + mnum_ = 1; msglvl_ = 0; - error_ = 0; + error_ = 0; RowIterator i0 = A.begin(); ColIterator j0 = (*i0).begin(); @@ -258,7 +258,7 @@ public: std::cout << a_[i] << std::endl; */ - F77_FUN(pardisoinit) (pt_, &mtype_, iparm_); + F77_FUN(pardisoinit) (pt_, &mtype_, iparm_); phase_ = 11; int idum; @@ -273,7 +273,7 @@ public: DUNE_THROW(Dune::MathError, "Constructor SeqPardiso: Reordering failed. Error code " << error_); if (verbose_) - std::cout << " Reordering completed. Number of nonzeros in factors = " << iparm_[17] << std::endl; + std::cout << " Reordering completed. Number of nonzeros in factors = " << iparm_[17] << std::endl; phase_ = 22; diff --git a/dumux/common/pdelabpreconditioner.hh b/dumux/common/pdelabpreconditioner.hh index c8124867f7..a15d7bb6e0 100644 --- a/dumux/common/pdelabpreconditioner.hh +++ b/dumux/common/pdelabpreconditioner.hh @@ -28,11 +28,11 @@ class Exchanger typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Model; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), - dim = GridView::dimension + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + dim = GridView::dimension }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(VertexMapper)) VertexMapper; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridOperatorSpace)) GridOperatorSpace; typedef typename GET_PROP_TYPE(TypeTag, PTAG(JacobianMatrix)) JacobianMatrix; @@ -82,10 +82,10 @@ public: MatEntry (const IdType& f, const BlockType& s) : first(f),second(s) {} MatEntry () {} }; - + // A DataHandle class to exchange matrix entries class MatEntryExchange - : public Dune::CommDataHandleIF<MatEntryExchange,MatEntry> + : public Dune::CommDataHandleIF<MatEntryExchange,MatEntry> { typedef typename JacobianMatrix::RowIterator RowIterator; typedef typename JacobianMatrix::ColIterator ColIterator; @@ -240,7 +240,7 @@ public: //! Constructor. NonoverlappingWrappedPreconditioner (const GFS& gfs_, P& prec_, const CC& cc_, - const std::vector<int>& borderIndices, + const std::vector<int>& borderIndices, const Dune::PDELab::ParallelISTLHelper<GFS>& helper_) : gfs(gfs_), prec(prec_), cc(cc_), borderIndices_(borderIndices), helper(helper_) {} @@ -309,10 +309,10 @@ public: \param[in] verbose print messages if true */ explicit ISTLBackend_NoOverlap_BCGS_ILU (Problem& problem, unsigned maxiter_=5000, int verbose_=1) - : gfs(problem.model().jacobianAssembler().gridFunctionSpace()), + : gfs(problem.model().jacobianAssembler().gridFunctionSpace()), phelper(gfs), maxiter(maxiter_), - verbose(verbose_), + verbose(verbose_), constraintsTrafo_(problem.model().jacobianAssembler().constraintsTrafo()), exchanger_(problem) {} @@ -358,10 +358,10 @@ public: Dune::BiCGSTABSolver<SolVector> solver(pop,psp,parPreCond,reduction,maxiter,verb); Dune::InverseOperatorResult stat; solver.apply(z,r,stat); - res.converged = stat.converged; + res.converged = stat.converged; res.iterations = stat.iterations; - res.elapsed = stat.elapsed; - res.reduction = stat.reduction; + res.elapsed = stat.elapsed; + res.reduction = stat.reduction; } /*! \brief Return access to result data */ @@ -397,10 +397,10 @@ public: \param[in] verbose print messages if true */ explicit ISTLBackend_NoOverlap_Loop_Pardiso (Problem& problem, unsigned maxiter_=5000, int verbose_=1) - : gfs(problem.model().jacobianAssembler().gridFunctionSpace()), + : gfs(problem.model().jacobianAssembler().gridFunctionSpace()), phelper(gfs), - maxiter(maxiter_), - verbose(verbose_), + maxiter(maxiter_), + verbose(verbose_), constraintsTrafo_(problem.model().jacobianAssembler().constraintsTrafo()), exchanger_(problem) {} @@ -448,10 +448,10 @@ public: Dune::BiCGSTABSolver<SolVector> solver(pop,psp,parPreCond,reduction,maxiter,verb); Dune::InverseOperatorResult stat; solver.apply(z,r,stat); - res.converged = stat.converged; + res.converged = stat.converged; res.iterations = stat.iterations; - res.elapsed = stat.elapsed; - res.reduction = stat.reduction; + res.elapsed = stat.elapsed; + res.reduction = stat.reduction; } /*! \brief Return access to result data */ diff --git a/dumux/common/propertysystem.hh b/dumux/common/propertysystem.hh index 34e2f73f57..c3a5e7de4e 100644 --- a/dumux/common/propertysystem.hh +++ b/dumux/common/propertysystem.hh @@ -52,7 +52,7 @@ namespace Properties { #if !defined NO_PROPERTY_INTROSPECTION //! Internal macro which is only required if the property introspection is enabled -#define PROP_INFO_(EffTypeTagName, PropTagName) \ +#define PROP_INFO_(EffTypeTagName, PropTagName) \ template <> \ struct PropertyInfo< TTAG(EffTypeTagName), PTAG(PropTagName) > \ { \ @@ -70,12 +70,12 @@ namespace Properties /*! * \brief Makes a type out of a type tag name */ -#define TTAG(TypeTagName) ::Dumux::Properties::TTag::TypeTagName +#define TTAG(TypeTagName) ::Dumux::Properties::TTag::TypeTagName /*! * \brief Makes a type out of a property tag name */ -#define PTAG(PropTagName) ::Dumux::Properties::PTag::PropTagName +#define PTAG(PropTagName) ::Dumux::Properties::PTag::PropTagName /*! * \brief Define a new type tag. @@ -94,7 +94,7 @@ namespace Properties * // preceedence over those defined for FooTypeTag: * NEW_TYPE_TAG(FooBarTypeTag, INHERITS_FROM(FooTypeTag, BarTypeTag)); */ -#define NEW_TYPE_TAG(TypeTagName, ...) \ +#define NEW_TYPE_TAG(TypeTagName, ...) \ namespace TTag { \ struct TypeTagName : public TypeTag<TypeTagName, ##__VA_ARGS__> \ { \ @@ -107,7 +107,7 @@ namespace Properties * * See the documentation for NEW_TYPE_TAG. */ -#define INHERITS_FROM(...) __VA_ARGS__ +#define INHERITS_FROM(...) __VA_ARGS__ /*! * \brief Define a property tag. @@ -121,7 +121,7 @@ namespace Properties * NEW_PROP_TAG(blubbPropTag); * NEW_PROP_TAG(blabbPropTag); */ -#define NEW_PROP_TAG(PTagName) \ +#define NEW_PROP_TAG(PTagName) \ namespace PTag { \ struct PTagName; } extern int semicolonHack_ /* \ @@ -159,15 +159,15 @@ namespace Properties * { return arg * blabb::value; }; * }; */ -#define SET_PROP(EffTypeTagName, PropTagName) \ +#define SET_PROP(EffTypeTagName, PropTagName) \ template <class TypeTag> \ - struct Property<TypeTag, \ - TTAG(EffTypeTagName), \ + struct Property<TypeTag, \ + TTAG(EffTypeTagName), \ PTAG(PropTagName)>; \ - PROP_INFO_(EffTypeTagName, PropTagName) \ + PROP_INFO_(EffTypeTagName, PropTagName) \ template <class TypeTag> \ - struct Property<TypeTag, \ - TTAG(EffTypeTagName), \ + struct Property<TypeTag, \ + TTAG(EffTypeTagName), \ PTAG(PropTagName) > /*! @@ -185,7 +185,7 @@ namespace Properties * static const int value = 3; * }; */ -#define SET_PROP_DEFAULT(PropTagName) \ +#define SET_PROP_DEFAULT(PropTagName) \ template <class TypeTag> \ struct DefaultProperty<TypeTag, PTAG(PropTagName)>; \ template <> \ @@ -210,15 +210,15 @@ namespace Properties * // make the blabbPropTag property undefined for the BarTypeTag. * UNSET_PROP(BarTypeTag, blabbPropTag); */ -#define UNSET_PROP(EffTypeTagName, PropTagName) \ +#define UNSET_PROP(EffTypeTagName, PropTagName) \ template <> \ - struct PropertyUnset<TTAG(EffTypeTagName), \ + struct PropertyUnset<TTAG(EffTypeTagName), \ PTAG(PropTagName) >; \ - PROP_INFO_(EffTypeTagName, PropTagName) \ + PROP_INFO_(EffTypeTagName, PropTagName) \ template <> \ - struct PropertyUnset<TTAG(EffTypeTagName), \ + struct PropertyUnset<TTAG(EffTypeTagName), \ PTAG(PropTagName) > \ - : public PropertyExplicitlyUnset \ + : public PropertyExplicitlyUnset \ {} /*! @@ -226,8 +226,8 @@ namespace Properties * * The constant can be accessed by the 'value' attribute. */ -#define SET_INT_PROP(EffTypeTagName, PropTagName, Value) \ - SET_PROP(EffTypeTagName, PropTagName) \ +#define SET_INT_PROP(EffTypeTagName, PropTagName, Value) \ + SET_PROP(EffTypeTagName, PropTagName) \ { \ typedef int type; \ static const int value = Value; \ @@ -238,8 +238,8 @@ namespace Properties * * The constant can be accessed by the 'value' attribute. */ -#define SET_BOOL_PROP(EffTypeTagName, PropTagName, Value) \ - SET_PROP(EffTypeTagName, PropTagName) \ +#define SET_BOOL_PROP(EffTypeTagName, PropTagName, Value) \ + SET_PROP(EffTypeTagName, PropTagName) \ { \ typedef bool type; \ static const bool value = Value; \ @@ -250,8 +250,8 @@ namespace Properties * * The type can be accessed by the 'type' attribute. */ -#define SET_TYPE_PROP(EffTypeTagName, PropTagName, Type) \ - SET_PROP(EffTypeTagName, PropTagName) \ +#define SET_TYPE_PROP(EffTypeTagName, PropTagName, Type) \ + SET_PROP(EffTypeTagName, PropTagName) \ { \ typedef Type type; \ } @@ -263,8 +263,8 @@ namespace Properties * use this macro, the property tag "Scalar" needs to be defined for * the real type tag. */ -#define SET_SCALAR_PROP(EffTypeTagName, PropTagName, Value) \ - SET_PROP(EffTypeTagName, PropTagName) \ +#define SET_SCALAR_PROP(EffTypeTagName, PropTagName, Value) \ + SET_PROP(EffTypeTagName, PropTagName) \ { \ typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; \ public: \ @@ -279,7 +279,7 @@ namespace Properties * type (including the property itself), GET_PROP must be preceeded by * the 'typename' keyword. */ -#define GET_PROP(TypeTag, PropTag) \ +#define GET_PROP(TypeTag, PropTag) \ ::Dumux::Properties::GetProperty< TypeTag, PropTag>::p /*! @@ -289,7 +289,7 @@ namespace Properties * PropTag)::value. If the property doesn't have an attribute named * 'value', this yields a compiler error. */ -#define GET_PROP_VALUE(TypeTag, PropTag) \ +#define GET_PROP_VALUE(TypeTag, PropTag) \ ::Dumux::Properties::GetProperty< TypeTag, PropTag>::p::value /*! @@ -300,7 +300,7 @@ namespace Properties * 'type', this yields a compiler error. Also, if you use this macro * within a template, it must be preceeded by the 'typename' keyword. */ -#define GET_PROP_TYPE(TypeTag, PropTag) \ +#define GET_PROP_TYPE(TypeTag, PropTag) \ ::Dumux::Properties::GetProperty< TypeTag, \ PropTag>::p::type @@ -319,7 +319,7 @@ namespace Properties * std::cout << PROP_DIAGNOSTIC(FooBarTypeTag, blabbPropTag) << "\n"; * }; */ -#define PROP_DIAGNOSTIC(TypeTag, PropTag) \ +#define PROP_DIAGNOSTIC(TypeTag, PropTag) \ ::Dumux::Properties::propertyDiagnostic< TypeTag, \ TypeTag, \ PropTag>::message() @@ -338,7 +338,7 @@ namespace Properties * std::cout << PROP_DIAGNOSTIC(FooBarTypeTag, blabbPropTag) << "\n"; * }; */ -#define PROP_DIAGNOSTIC(TypeTag, PropTag) "Property introspection disabled by NO_PROPERTY_INTROSPECTION" +#define PROP_DIAGNOSTIC(TypeTag, PropTag) "Property introspection disabled by NO_PROPERTY_INTROSPECTION" #endif @@ -516,7 +516,7 @@ template <class RealTypeTag, class Tree, class PropertyTag> class propertyDefined { public: - static const bool onSelf = propertyDefinedOnSelf<RealTypeTag,Tree,PropertyTag>::value; + static const bool onSelf = propertyDefinedOnSelf<RealTypeTag,Tree,PropertyTag>::value; static const bool onChild1 = propertyDefinedOnTree<RealTypeTag,typename Tree::Child1,PropertyTag>::value; static const bool onChild2 = propertyDefinedOnTree<RealTypeTag,typename Tree::Child2,PropertyTag>::value; @@ -536,7 +536,7 @@ public: >::value; static const bool value = - ice_or<onSelf , + ice_or<onSelf , onChildren>::value; @@ -569,13 +569,13 @@ template <class SelfT, class TypeTag { public: - typedef SelfT SelfType; + typedef SelfT SelfType; - typedef Child1T Child1; - typedef Child2T Child2; - typedef Child3T Child3; - typedef Child4T Child4; - typedef Child5T Child5; + typedef Child1T Child1; + typedef Child2T Child2; + typedef Child3T Child3; + typedef Child4T Child4; + typedef Child5T Child5; }; template <class EffectiveTypeTag, @@ -603,31 +603,31 @@ struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 0> template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 1> { - typedef typename GetProperty<typename TypeTag::Child1, PropertyTag, RealTypeTag>::p p; + typedef typename GetProperty<typename TypeTag::Child1, PropertyTag, RealTypeTag>::p p; }; template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 2> { - typedef typename GetProperty<typename TypeTag::Child2, PropertyTag, RealTypeTag>::p p; + typedef typename GetProperty<typename TypeTag::Child2, PropertyTag, RealTypeTag>::p p; }; template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 3> { - typedef typename GetProperty<typename TypeTag::Child3, PropertyTag, RealTypeTag>::p p; + typedef typename GetProperty<typename TypeTag::Child3, PropertyTag, RealTypeTag>::p p; }; template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 4> { - typedef typename GetProperty<typename TypeTag::Child4, PropertyTag, RealTypeTag>::p p; + typedef typename GetProperty<typename TypeTag::Child4, PropertyTag, RealTypeTag>::p p; }; template <class TypeTag, class PropertyTag, class RealTypeTag> struct GetProperty<TypeTag, PropertyTag, RealTypeTag, 5> { - typedef typename GetProperty<typename TypeTag::Child5, PropertyTag, RealTypeTag>::p p; + typedef typename GetProperty<typename TypeTag::Child5, PropertyTag, RealTypeTag>::p p; }; #if !defined NO_PROPERTY_INTROSPECTION @@ -699,7 +699,7 @@ struct propertyDiagnostic switch (inheritedFrom) { case -1: result += newIndent; - result += (boost::format("default from %s:%d\n") + result += (boost::format("default from %s:%d\n") %propInfoDefault::fileDefined() %propInfoDefault::lineDefined()).str(); break; diff --git a/dumux/common/spline.hh b/dumux/common/spline.hh index 0d719d77b0..31ddc822ff 100644 --- a/dumux/common/spline.hh +++ b/dumux/common/spline.hh @@ -285,7 +285,7 @@ public: gnuplot gnuplot> plot "spline.csv" using 1:2 w l ti "Curve", \ - "spline.csv" using 1:3 w l ti "Derivative", \ + "spline.csv" using 1:3 w l ti "Derivative", \ "spline.csv" using 1:4 w p ti "Monotonic" ----------- snap ----------- */ @@ -491,10 +491,10 @@ public: * \brief Return true iff the given x is in range [x1, xn]. */ bool applies(Scalar x) const - { + { return x_[0] <= x && x <= x_[numSamples() - 1]; }; - + /*! * \brief Return the x value of the leftmost sampling point. */ @@ -643,7 +643,7 @@ public: gnuplot gnuplot> plot "spline.csv" using 1:2 w l ti "Curve", \ - "spline.csv" using 1:3 w l ti "Derivative", \ + "spline.csv" using 1:3 w l ti "Derivative", \ "spline.csv" using 1:4 w p ti "Monotonic" ----------- snap ----------- */ @@ -695,7 +695,7 @@ private: x_.resize(numSamples); y_.resize(numSamples); moments_.resize(numSamples); - + // copy sample points, make sure that the first x value is // smaller than the last one for (int i = 0; i < numSamples; ++i) { @@ -928,7 +928,7 @@ public: c_ = tmpRight/tmpLeft; tmpRight = y1 - (x1*x1*x1*a_ + x1*x1*b_ + x1*c_); - tmpLeft = 1; + tmpLeft = 1; d_ = tmpRight/tmpLeft; assert(fabs(eval(x1) - y1) < std::max(1e-11, fabs(1e-8*y1))); @@ -1045,7 +1045,7 @@ public: gnuplot gnuplot> plot "spline.csv" using 1:2 w l ti "Curve", \ - "spline.csv" using 1:3 w l ti "Derivative", \ + "spline.csv" using 1:3 w l ti "Derivative", \ "spline.csv" using 1:4 w p ti "Monotonic" ----------- snap ----------- */ diff --git a/dumux/common/start.hh b/dumux/common/start.hh index 4e82b7037c..e3ea578e0b 100644 --- a/dumux/common/start.hh +++ b/dumux/common/start.hh @@ -88,12 +88,12 @@ int startFromDGF(int argc, char **argv) // create grid // -> load the grid from file - GridPointer gridPtr = GridPointer(dgfFileName); + GridPointer gridPtr = GridPointer(dgfFileName); Dune::gridinfo(*gridPtr); // instantiate and run the concrete problem TimeManager timeManager; - Problem problem(timeManager, gridPtr->leafView()); + Problem problem(timeManager, gridPtr->leafView()); timeManager.init(problem, 0, dt, tEnd, !restart); if (restart) problem.restart(restartTime); diff --git a/dumux/common/timemanager.hh b/dumux/common/timemanager.hh index f297c57074..16d31364dc 100644 --- a/dumux/common/timemanager.hh +++ b/dumux/common/timemanager.hh @@ -94,7 +94,7 @@ public: * \brief Initialize the model and problem and write the initial * condition to disk. */ - void init(Problem &problem, + void init(Problem &problem, Scalar tStart, Scalar dtInitial, Scalar tEnd, @@ -109,7 +109,7 @@ public: // initialize the problem problem_->init(); - + // initialize the problem if (writeInitialSol) { time_ -= timeStepSize_; @@ -310,16 +310,16 @@ public: while (!finished()) { // pre-process the current solution - problem_->preProcess(); + problem_->preTimeStep(); // execute the time integration scheme problem_->timeIntegration(); - + // post-process the current solution - problem_->postProcess(); - + problem_->postTimeStep(); + // write the result to disk - if (problem_->doOutput()) + if (problem_->shouldWriteOutput()) problem_->writeOutput(); // advance the simulated time by the current time step @@ -328,12 +328,12 @@ public: time_ += timeStepSize_; ++timeStepIdx_; - if (problem_->doSerialize()) + if (problem_->shouldWriteRestartFile()) problem_->serialize(); if (episodeIsOver()) problem_->episodeEnd(); - + // notify the problem that the timestep is done and ask it // for a suggestion for the next timestep size Scalar nextDt = @@ -354,7 +354,7 @@ public: std::cout << "Simulation took " << timer.elapsed() <<" seconds.\n" << "We hope that you enjoyed simulating with us\n" << "and that you will chose us next time, too.\n"; - + } /*! diff --git a/dumux/decoupled/2p/2pfluidstate.hh b/dumux/decoupled/2p/2pfluidstate.hh index 5b6445e1b2..ad81d4f04e 100644 --- a/dumux/decoupled/2p/2pfluidstate.hh +++ b/dumux/decoupled/2p/2pfluidstate.hh @@ -35,7 +35,7 @@ class TwoPFluidState : public FluidState<typename GET_PROP_TYPE(TypeTag, PTAG(Sc TwoPFluidState<TypeTag> > { typedef TwoPFluidState<TypeTag> ThisType; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; diff --git a/dumux/decoupled/2p/2pproperties.hh b/dumux/decoupled/2p/2pproperties.hh index 9c04172afb..0b5ea018ca 100644 --- a/dumux/decoupled/2p/2pproperties.hh +++ b/dumux/decoupled/2p/2pproperties.hh @@ -84,7 +84,7 @@ NEW_TYPE_TAG(DecoupledTwoP, INHERITS_FROM(IMPES, Transport)) NEW_PROP_TAG ( TwoPIndices ) ; NEW_PROP_TAG( SpatialParameters ) -; //!< The type of the soil properties object +; //!< The type of the spatial parameters object NEW_PROP_TAG( EnableGravity) ; //!< Returns whether gravity is considered in the problem NEW_PROP_TAG( PressureFormulation) diff --git a/dumux/decoupled/2p/diffusion/diffusionproblem2p.hh b/dumux/decoupled/2p/diffusion/diffusionproblem2p.hh index 1966086074..cf69e6a179 100644 --- a/dumux/decoupled/2p/diffusion/diffusionproblem2p.hh +++ b/dumux/decoupled/2p/diffusion/diffusionproblem2p.hh @@ -85,7 +85,7 @@ public: * \name Problem parameters */ // \{ - + void timeIntegration() { // set the initial condition of the model diff --git a/dumux/decoupled/2p/diffusion/fv/fvpressure2p.hh b/dumux/decoupled/2p/diffusion/fv/fvpressure2p.hh index ebea888e15..62cddb5029 100644 --- a/dumux/decoupled/2p/diffusion/fv/fvpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fv/fvpressure2p.hh @@ -55,10 +55,10 @@ namespace Dumux * * Template parameters are: * - - GridView a DUNE gridview type - - Scalar type used for scalar quantities - - VC type of a class containing different variables of the model - - Problem class defining the physical problem + - GridView a DUNE gridview type + - Scalar type used for scalar quantities + - VC type of a class containing different variables of the model + - Problem class defining the physical problem */ template<class TypeTag> class FVPressure2P { diff --git a/dumux/decoupled/2p/diffusion/fv/fvvelocity2p.hh b/dumux/decoupled/2p/diffusion/fv/fvvelocity2p.hh index d6853c0618..2f7ca7ba5d 100644 --- a/dumux/decoupled/2p/diffusion/fv/fvvelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fv/fvvelocity2p.hh @@ -40,16 +40,16 @@ namespace Dumux * * Template parameters are: * - - GridView a DUNE gridview type - - Scalar type used for scalar quantities - - VC type of a class containing different variables of the model - - Problem class defining the physical problem + - GridView a DUNE gridview type + - Scalar type used for scalar quantities + - VC type of a class containing different variables of the model + - Problem class defining the physical problem */ template<class TypeTag> class FVVelocity2P: public FVPressure2P<TypeTag> { - typedef FVVelocity2P<TypeTag> ThisType; + typedef FVVelocity2P<TypeTag> ThisType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; @@ -58,14 +58,14 @@ class FVVelocity2P: public FVPressure2P<TypeTag> typedef typename ReferenceElements::ContainerFaces ReferenceElementFaceContainer; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SpatialParameters)) SpatialParameters; - typedef typename SpatialParameters::MaterialLaw MaterialLaw; + typedef typename SpatialParameters::MaterialLaw MaterialLaw; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidState)) FluidState; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidState)) FluidState; -typedef typename GridView::Traits::template Codim<0>::Entity Element; +typedef typename GridView::Traits::template Codim<0>::Entity Element; typedef typename GridView::Grid Grid; typedef typename GridView::IndexSet IndexSet; typedef typename GridView::template Codim<0>::Iterator ElementIterator; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p.hh index e95bab53e1..a64de2660d 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p.hh @@ -54,8 +54,8 @@ namespace Dumux * saturation. Template parameters are: - - GridView a DUNE gridView type - - Scalar type used for return values + - GridView a DUNE gridView type + - Scalar type used for return values */ template<class TypeTag> class FVMPFAOPressure2P @@ -72,7 +72,7 @@ class FVMPFAOPressure2P typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidState)) FluidState; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridTypeIndices)) GridTypeIndices; @@ -1649,7 +1649,7 @@ void FVMPFAOPressure2P<TypeTag>::assemble() r1[0] = -J1 * face12vol/2.0; r1[1] = -J2 * isIt34->geometry().volume()/2.0; - // compute r = CA^{-1}r1 + // compute r = CA^{-1}r1 Dune::FieldVector<Scalar,2*dim-1> r(0); CAinv.umv(r1, r); @@ -1783,7 +1783,7 @@ void FVMPFAOPressure2P<TypeTag>::assemble() r2[0] = -J1 * face12vol/2.0; r2[1] = g213 * g2; - // compute r = CA^{-1}r1 + // compute r = CA^{-1}r1 FieldVector r(0); CAinv.umv(r2, r); r += r1; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p_new.hh b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p_new.hh index 615ab156b4..00475f62bc 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p_new.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaopressure2p_new.hh @@ -51,8 +51,8 @@ namespace Dumux * saturation. Template parameters are: - - GridView a DUNE gridView type - - Scalar type used for return values + - GridView a DUNE gridView type + - Scalar type used for return values */ template<class TypeTag> class FVMPFAOPressure2P @@ -433,22 +433,22 @@ void FVMPFAOPressure2P<TypeTag>::initializeMatrix() // Indices used in a interaction volume of the MPFA-o method // ___________________________________________________ // | | | -// | nuxy: cell geometry | nxy: face normal | -// | vectors (see MPFA) | +// | nuxy: cell geometry | nxy: face normal | +// | vectors (see MPFA) | // | | | -// | 4-----------3-----------3 | -// | | --> nu43 | nu34 <--| | -// | | |nu41 1|--> n43 ||nu32 | -// | | v ^ |0 ^ v| | +// | 4-----------3-----------3 | +// | | --> nu43 | nu34 <--| | +// | | |nu41 1|--> n43 ||nu32 | +// | | v ^ |0 ^ v| | // |____________4__0__|n14__|__n23_|_1__2____________| -// | | 1 | 0 | | -// | | ^ |1 nu23 ^ | | -// | | |nu14 0|--> n12 | | | -// | | -->nu12 | nu21<-- | | -// | 1-----------1-----------2 | -// | elementnumber |inter- | +// | | 1 | 0 | | +// | | ^ |1 nu23 ^ | | +// | | |nu14 0|--> n12 | | | +// | | -->nu12 | nu21<-- | | +// | 1-----------1-----------2 | +// | elementnumber |inter- | // | |face- | -// | |number | +// | |number | // |________________________|________________________| diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh index 1eda0c7b7c..b5dbb598d7 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/fvmpfaovelocity2p.hh @@ -1382,7 +1382,7 @@ void FVMPFAOVelocity2P<TypeTag>::calculateVelocity() r1[0] = -J1 * face12vol / 2.0; r1[1] = -J2 * isIt34->geometry().volume() / 2.0; - // compute r = CA^{-1}r1 + // compute r = CA^{-1}r1 Dune::FieldVector<Scalar, 2 * dim - 1> r(0); CAinv.umv(r1, r); @@ -1518,7 +1518,7 @@ void FVMPFAOVelocity2P<TypeTag>::calculateVelocity() r2[0] = -J1 * face12vol / 2.0; r2[1] = g213 * g2; - // compute r = CA^{-1}r1 + // compute r = CA^{-1}r1 FieldVector r(0); CAinv.umv(r2, r); r += r1; diff --git a/dumux/decoupled/2p/diffusion/mimetic/croperator.hh b/dumux/decoupled/2p/diffusion/mimetic/croperator.hh index 3b02552576..86ddd4c8cd 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/croperator.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/croperator.hh @@ -237,15 +237,15 @@ public: This method takes an object that can compute local stiffness matrices and assembles the global linear system Au=f. - @param[in] loc the local assembler providing element stiffness and boundary conditions for all elements - @param[in,out] u solution, contains initial values on input, Dirichlet values are set. The + @param[in] loc the local assembler providing element stiffness and boundary conditions for all elements + @param[in,out] u solution, contains initial values on input, Dirichlet values are set. The type of boundary condition for a node is inferred from the values returned by the local assembler. A node is of Neumann type if all elements referring to that node report a Neumann boundary condition, it is set to Dirichlet if a least one element reports a process or Dirichlet boundary condition. The difference between process and Dirichlet is that process always denotes a homogeneous Dirichlet value. - @param[in] f right hand side is filled by this method + @param[in] f right hand side is filled by this method Note that the rows corresponding to nodes at the Dirichlet boundary are filled with trivial equations of the form \f[1\cdot u_i = f_i \f] where \f$u_i\f$ and \f$f_i\f$ are both set to the diff --git a/dumux/decoupled/2p/diffusion/mimetic/localstiffness.hh b/dumux/decoupled/2p/diffusion/mimetic/localstiffness.hh index ae876099d7..1910399f73 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/localstiffness.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/localstiffness.hh @@ -55,9 +55,9 @@ namespace Dumux space and access to the local stiffness matrix. The actual assembling is done in a derived class via the virtual assemble method. - \tparam GV A grid view type - \tparam RT The field type used in the elements of the stiffness matrix - \tparam m number of degrees of freedom per node (system size) + \tparam GV A grid view type + \tparam RT The field type used in the elements of the stiffness matrix + \tparam m number of degrees of freedom per node (system size) */ template<class GV, class RT, int m> class LocalStiffness @@ -92,8 +92,8 @@ namespace Dumux condition or the assembled source term and neumann boundary condition. It is accessible via the rhs() method. - @param[in] e a codim 0 entity reference - @param[in] k order of Lagrange basis (default is 1) + @param[in] e a codim 0 entity reference + @param[in] k order of Lagrange basis (default is 1) */ virtual void assemble (const Entity& e, int k=1) = 0; @@ -116,9 +116,9 @@ namespace Dumux condition or the assembled source term and neumann boundary condition. It is accessible via the rhs() method. - @param[in] e a codim 0 entity reference + @param[in] e a codim 0 entity reference @param[in] localSolution The current solution on the entity, which is needed by nonlinear assemblers - @param[in] k order of Lagrange basis (default is 1) + @param[in] k order of Lagrange basis (default is 1) */ virtual void assemble (const Entity& e, const Dune::BlockVector<VBlockType>& localSolution, int k=1) = 0; @@ -137,8 +137,8 @@ namespace Dumux condition or the assembled neumann boundary condition. It is accessible via the rhs() method. - @param[in] e a codim 0 entity reference - @param[in] k order of Lagrange basis (default is 1) + @param[in] e a codim 0 entity reference + @param[in] k order of Lagrange basis (default is 1) */ virtual void assembleBoundaryCondition (const Entity& e, int k=1) = 0; @@ -233,9 +233,9 @@ namespace Dumux space and access to the local stiffness matrix. The actual assembling is done in a derived class via the virtual assemble method. - \tparam GV A grid view type - \tparam RT The field type used in the elements of the stiffness matrix - \tparam m number of degrees of freedom per node (system size) + \tparam GV A grid view type + \tparam RT The field type used in the elements of the stiffness matrix + \tparam m number of degrees of freedom per node (system size) */ template<class GV, class RT, int m> class LinearLocalStiffness : public LocalStiffness<GV,RT,m> @@ -274,8 +274,8 @@ namespace Dumux condition or the assembled source term and neumann boundary condition. It is accessible via the rhs() method. - @param[in] e a codim 0 entity reference - @param[in] k order of Lagrange basis (default is 1) + @param[in] e a codim 0 entity reference + @param[in] k order of Lagrange basis (default is 1) */ virtual void assemble (const Entity& e, int k=1) = 0; @@ -283,9 +283,9 @@ namespace Dumux Since this is a base class for linear assemblers, the local solution will be ignored. - @param[in] e a codim 0 entity reference + @param[in] e a codim 0 entity reference @param[in] localSolution The current solution on the entity, which is needed by nonlinear assemblers - @param[in] k order of Lagrange basis (default is 1) + @param[in] k order of Lagrange basis (default is 1) */ virtual void assemble (const Entity& e, const Dune::BlockVector<VBlockType>& localSolution, int k=1) { diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticgroundwater.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticgroundwater.hh index a040ec8701..5caa3a126b 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/mimeticgroundwater.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticgroundwater.hh @@ -58,8 +58,8 @@ u = g on Gamma1; j*n = J on Gamma2. Template parameters are: -- Grid a DUNE grid type -- RT type used for return values +- Grid a DUNE grid type +- RT type used for return values */ template<class GridView, class Scalar, class VC, class Problem> class MimeticGroundwaterEquationLocalStiffness @@ -100,8 +100,8 @@ public: - The boundary conditions have been evaluated and are accessible with the bc() method - The right hand side has been assembled. It contains either the value of the essential boundary condition or the assembled source term and neumann boundary condition. It is accessible via the rhs() method. - @param[in] e a codim 0 entity reference - @param[in] k order of CR basis + @param[in] e a codim 0 entity reference + @param[in] k order of CR basis */ void assemble (const Element& element, int k=1) { @@ -136,8 +136,8 @@ public: - The boundary conditions have been evaluated and are accessible with the bc() method - The right hand side contains either the value of the essential boundary condition or the assembled neumann boundary condition. It is accessible via the rhs() method. - @param[in] element a codim 0 entity reference - @param[in] k order of CR basis + @param[in] element a codim 0 entity reference + @param[in] k order of CR basis */ void assembleBoundaryCondition (const Element& element, int k=1) { diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticoperator.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticoperator.hh index 3bea188c96..8da814263e 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/mimeticoperator.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticoperator.hh @@ -48,7 +48,7 @@ namespace Dumux The template parameters are: - - Scalar The field type used in the elements of the stiffness matrix + - Scalar The field type used in the elements of the stiffness matrix */ template<class Scalar, class GridView> class MimeticOperatorAssembler : public CROperatorAssembler<Scalar, GridView> diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh index 186e2252c6..1978de6367 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh @@ -55,10 +55,10 @@ namespace Dumux * * Template parameters are: * - - GridView a DUNE gridview type - - Scalar type used for scalar quantities - - VC type of a class containing different variables of the model - - Problem class defining the physical problem + - GridView a DUNE gridview type + - Scalar type used for scalar quantities + - VC type of a class containing different variables of the model + - Problem class defining the physical problem */ template<class TypeTag> class MimeticPressure2P { @@ -74,7 +74,7 @@ template<class TypeTag> class MimeticPressure2P typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidState)) FluidState; enum diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticvelocity2p.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticvelocity2p.hh index 7fc6608b3b..ec526eb28d 100644 --- a/dumux/decoupled/2p/diffusion/mimetic/mimeticvelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticvelocity2p.hh @@ -40,16 +40,16 @@ namespace Dumux * * Template parameters are: * - - GridView a DUNE gridview type - - Scalar type used for scalar quantities - - VC type of a class containing different variables of the model - - Problem class defining the physical problem + - GridView a DUNE gridview type + - Scalar type used for scalar quantities + - VC type of a class containing different variables of the model + - Problem class defining the physical problem */ template<class TypeTag> class FVVelocity2P: public FVPressure2P<TypeTag> { - typedef FVVelocity2P<TypeTag> ThisType; + typedef FVVelocity2P<TypeTag> ThisType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef typename GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; @@ -58,14 +58,14 @@ class FVVelocity2P: public FVPressure2P<TypeTag> typedef typename ReferenceElements::ContainerFaces ReferenceElementFaceContainer; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SpatialParameters)) SpatialParameters; - typedef typename SpatialParameters::MaterialLaw MaterialLaw; + typedef typename SpatialParameters::MaterialLaw MaterialLaw; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidState)) FluidState; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidState)) FluidState; -typedef typename GridView::Traits::template Codim<0>::Entity Element; +typedef typename GridView::Traits::template Codim<0>::Entity Element; typedef typename GridView::Grid Grid; typedef typename GridView::IndexSet IndexSet; typedef typename GridView::template Codim<0>::Iterator ElementIterator; diff --git a/dumux/decoupled/2p/impes/impesproblem2p.hh b/dumux/decoupled/2p/impes/impesproblem2p.hh index 6b7be953d5..f1c82e0841 100644 --- a/dumux/decoupled/2p/impes/impesproblem2p.hh +++ b/dumux/decoupled/2p/impes/impesproblem2p.hh @@ -42,12 +42,12 @@ class IMPESProblem2P : public IMPESProblem<TypeTag, Implementation> typedef IMPESProblem<TypeTag, Implementation> ParentType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; - typedef typename GridView::Grid Grid; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename GridView::Grid Grid; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; // material properties - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SpatialParameters)) SpatialParameters; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(SpatialParameters)) SpatialParameters; enum { @@ -133,7 +133,7 @@ private: const Implementation *asImp_() const { return static_cast<const Implementation *>(this); } - GlobalPosition gravity_; + GlobalPosition gravity_; // fluids and material properties SpatialParameters* spatialParameters_; diff --git a/dumux/decoupled/2p/transport/fv/capillarydiffusion.hh b/dumux/decoupled/2p/transport/fv/capillarydiffusion.hh index 6f2b2672e4..60b1ebfcc8 100644 --- a/dumux/decoupled/2p/transport/fv/capillarydiffusion.hh +++ b/dumux/decoupled/2p/transport/fv/capillarydiffusion.hh @@ -38,10 +38,10 @@ namespace Dumux * * Template parameters are: - - GridView a DUNE gridview type - - Scalar type used for scalar quantities - - VC type of a class containing different variables of the model - - Problem class defining the physical problem + - GridView a DUNE gridview type + - Scalar type used for scalar quantities + - VC type of a class containing different variables of the model + - Problem class defining the physical problem */ template<class TypeTag> class CapillaryDiffusion: public DiffusivePart<TypeTag> @@ -226,7 +226,7 @@ public: /*! @brief Constructs a CapillaryDiffusion object * @param problem an object of class Dumux::TransportProblem or derived - * @param soil implementation of the solid matrix + * @param spatial parameters implementation of the solid matrix * @param preComput if preCompute = true previous calculated mobilities are taken, if preCompute = false new mobilities will be computed (for implicit Scheme) */ CapillaryDiffusion (Problem& problem, const bool preComput = true) diff --git a/dumux/decoupled/2p/transport/fv/convectivepart.hh b/dumux/decoupled/2p/transport/fv/convectivepart.hh index e8cf07fbd5..c836e108ec 100644 --- a/dumux/decoupled/2p/transport/fv/convectivepart.hh +++ b/dumux/decoupled/2p/transport/fv/convectivepart.hh @@ -32,8 +32,8 @@ namespace Dumux * * Template parameters are: - - GridView a DUNE gridview type - - Scalar type used for scalar quantities + - GridView a DUNE gridview type + - Scalar type used for scalar quantities */ template<class TypeTag> diff --git a/dumux/decoupled/2p/transport/fv/diffusivepart.hh b/dumux/decoupled/2p/transport/fv/diffusivepart.hh index bbf799708d..b8a5a81fb9 100644 --- a/dumux/decoupled/2p/transport/fv/diffusivepart.hh +++ b/dumux/decoupled/2p/transport/fv/diffusivepart.hh @@ -31,8 +31,8 @@ namespace Dumux * * Template parameters are: - - GridView a DUNE gridview type - - Scalar type used for scalar quantities + - GridView a DUNE gridview type + - Scalar type used for scalar quantities */ template<class TypeTag> class DiffusivePart diff --git a/dumux/decoupled/2p/transport/fv/fvsaturation2p.hh b/dumux/decoupled/2p/transport/fv/fvsaturation2p.hh index c08a44bbf8..117d88fcd4 100644 --- a/dumux/decoupled/2p/transport/fv/fvsaturation2p.hh +++ b/dumux/decoupled/2p/transport/fv/fvsaturation2p.hh @@ -48,10 +48,10 @@ namespace Dumux Template parameters are: - - GridView a DUNE gridview type - - Scalar type used for scalar quantities - - VC type of a class containing different variables of the model - - Problem class defining the physical problem + - GridView a DUNE gridview type + - Scalar type used for scalar quantities + - VC type of a class containing different variables of the model + - Problem class defining the physical problem */ template<class TypeTag> diff --git a/dumux/decoupled/2p/transport/fv/gravitypart.hh b/dumux/decoupled/2p/transport/fv/gravitypart.hh index 413025dff2..330a1933be 100644 --- a/dumux/decoupled/2p/transport/fv/gravitypart.hh +++ b/dumux/decoupled/2p/transport/fv/gravitypart.hh @@ -40,10 +40,10 @@ namespace Dumux * Template parameters are: - - GridView a DUNE gridview type - - Scalar type used for scalar quantities - - VC type of a class containing different variables of the model - - Problem class defining the physical problem + - GridView a DUNE gridview type + - Scalar type used for scalar quantities + - VC type of a class containing different variables of the model + - Problem class defining the physical problem */ template<class TypeTag> class GravityPart: public ConvectivePart<TypeTag> @@ -218,7 +218,7 @@ public: } /*! @brief Constructs a GravityPart object * @param problem an object of class Dumux::TransportProblem or derived - * @param soil implementation of the solid matrix + * @param spatial parameters implementation of the solid matrix * @param preComput if preCompute = true previous calculated mobilities are taken, if preCompute = false new mobilities will be computed (for implicit Scheme) */ GravityPart (Problem& problem, const bool preComput = true) diff --git a/dumux/decoupled/2p/transport/transportproblem2p.hh b/dumux/decoupled/2p/transport/transportproblem2p.hh index 71e4cb53a1..795cad9bd1 100644 --- a/dumux/decoupled/2p/transport/transportproblem2p.hh +++ b/dumux/decoupled/2p/transport/transportproblem2p.hh @@ -41,12 +41,12 @@ class TransportProblem2P : public OneModelProblem<TypeTag, Implementation> typedef OneModelProblem<TypeTag, Implementation> ParentType; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; - typedef typename GridView::Grid Grid; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename GridView::Grid Grid; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; // material properties - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SpatialParameters)) SpatialParameters; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(SpatialParameters)) SpatialParameters; enum { @@ -112,10 +112,10 @@ private: const Implementation *asImp_() const { return static_cast<const Implementation *>(this); } - GlobalPosition gravity_; + GlobalPosition gravity_; // fluids and material properties - SpatialParameters spatialParameters_; + SpatialParameters spatialParameters_; }; } diff --git a/dumux/decoupled/2p/variableclass2p.hh b/dumux/decoupled/2p/variableclass2p.hh index 3a8597b66c..daee0e3b58 100644 --- a/dumux/decoupled/2p/variableclass2p.hh +++ b/dumux/decoupled/2p/variableclass2p.hh @@ -38,8 +38,8 @@ namespace Dumux * * Template parameters are: - - GridView a DUNE gridview type - - Scalar type used for scalar quantities + - GridView a DUNE gridview type + - Scalar type used for scalar quantities */ template<class TypeTag> class VariableClass2P: public VariableClass<TypeTag> @@ -366,8 +366,8 @@ public: //! Get saturation /*! evaluate saturation at given element - @param element entity of codim 0 - \return value of saturation + @param element entity of codim 0 + \return value of saturation */ Dune::FieldVector<Scalar, 1>& satElement(const Element& element) { diff --git a/dumux/decoupled/common/impesproblem.hh b/dumux/decoupled/common/impesproblem.hh index 8261912c09..4f3706ca5b 100644 --- a/dumux/decoupled/common/impesproblem.hh +++ b/dumux/decoupled/common/impesproblem.hh @@ -64,7 +64,7 @@ private: typedef typename GET_PROP_TYPE(TypeTag, PTAG(PressureModel)) PressureModel; typedef typename GET_PROP_TYPE(TypeTag, PTAG(SaturationModel)) SaturationModel; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; enum { @@ -78,7 +78,7 @@ private: typedef Dune::FieldVector<Scalar,dim> LocalPosition; typedef Dune::FieldVector<Scalar,dimWorld> GlobalPosition; - typedef typename GridView::template Codim<dim>::Iterator VertexIterator; + typedef typename GridView::template Codim<dim>::Iterator VertexIterator; public: @@ -86,7 +86,7 @@ public: /** @param variables object of class VariableClass. * @param wettingPhase implementation of a wetting phase. * @param nonWettingPhase implementation of a non-wetting phase. - * @param soil implementation of the solid matrix + * @param spatial parameters implementation of the solid matrix * @param materialLaw implementation of Material laws. Class TwoPhaseRelations or derived. */ IMPESProblem(const GridView &gridView, bool verbose = true) @@ -138,7 +138,7 @@ public: /*! * \brief Called by the time manager before the time integration. */ - void preProcess() + void preTimeStep() {} /*! @@ -180,7 +180,7 @@ public: * This is used to do some janitorial tasks like writing the * current solution to disk. */ - void postProcess() + void postTimeStep() { }; /*! @@ -211,9 +211,9 @@ public: * steps. This file is intented to be overwritten by the * implementation. */ - bool doSerialize() const + bool shouldWriteRestartFile() const { - return + return timeManager().timeStepIndex() > 0 && (timeManager().timeStepIndex() % 5 == 0); } @@ -226,7 +226,7 @@ public: * very time step. This file is intented to be overwritten by the * implementation. */ - bool doOutput() const + bool shouldWriteOutput() const { return true; } /*! @@ -397,7 +397,7 @@ public: { if (gridView().comm().rank() == 0) std::cout << "Writing result file for current time step\n"; - + resultWriter_.beginTimestep(timeManager_.time() + timeManager_.timeStepSize(), gridView()); model().addOutputVtkFields(resultWriter_); @@ -429,12 +429,12 @@ private: static std::string simname_; // a string for the name of the current simulation, // which could be set by means of an program argument, // for example. - const GridView gridView_; + const GridView gridView_; - GlobalPosition bboxMin_; - GlobalPosition bboxMax_; + GlobalPosition bboxMin_; + GlobalPosition bboxMax_; - TimeManager timeManager_; + TimeManager timeManager_; Variables variables_; @@ -444,7 +444,7 @@ private: SaturationModel* satModel_;//!< object including the saturation model IMPESModel* model_; - VtkMultiWriter resultWriter_; + VtkMultiWriter resultWriter_; }; // definition of the static class member simname_, // which is necessary because it is of type string. diff --git a/dumux/decoupled/common/onemodelproblem.hh b/dumux/decoupled/common/onemodelproblem.hh index 52cf158b7c..5d70c800b2 100644 --- a/dumux/decoupled/common/onemodelproblem.hh +++ b/dumux/decoupled/common/onemodelproblem.hh @@ -65,7 +65,7 @@ private: typedef typename GET_PROP_TYPE(TypeTag, PTAG(Model)) Model; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; enum { @@ -79,7 +79,7 @@ private: typedef Dune::FieldVector<Scalar,dim> LocalPosition; typedef Dune::FieldVector<Scalar,dimWorld> GlobalPosition; - typedef typename GridView::template Codim<dim>::Iterator VertexIterator; + typedef typename GridView::template Codim<dim>::Iterator VertexIterator; public: @@ -87,7 +87,7 @@ public: /** @param variables object of class VariableClass. * @param wettingPhase implementation of a wetting phase. * @param nonWettingPhase implementation of a non-wetting phase. - * @param soil implementation of the solid matrix + * @param spatial parameters implementation of the solid matrix * @param materialLaw implementation of Material laws. Class TwoPhaseRelations or derived. */ OneModelProblem(const GridView &gridView, bool verbose = true) @@ -156,7 +156,7 @@ public: * \brief Called by Dumux::TimeManager just before the time * integration. */ - void preProcess() + void preTimeStep() { }; /*! @@ -194,7 +194,7 @@ public: * \brief Called by Dumux::TimeManager just before the time * integration. */ - void postProcess() + void postTimeStep() { }; /*! @@ -225,9 +225,9 @@ public: * steps. This file is intented to be overwritten by the * implementation. */ - bool doSerialize() const + bool shouldWriteRestartFile() const { - return + return timeManager().timeStepIndex() > 0 && (timeManager().timeStepIndex() % 5 == 0); } @@ -240,7 +240,7 @@ public: * very time step. This file is intented to be overwritten by the * implementation. */ - bool doOutput() const + bool shouldWriteOutput() const { return true; } //! Write the fields current solution into an VTK output file. @@ -248,7 +248,7 @@ public: { if (gridView().comm().rank() == 0) std::cout << "Writing result file for current time step\n"; - + resultWriter_.beginTimestep(timeManager_.time(), gridView()); model().addOutputVtkFields(resultWriter_); resultWriter_.endTimestep(); @@ -263,7 +263,7 @@ public: << "does not override the episodeEnd() method. " << "Doing nothing!\n"; }; - + // \} /*! @@ -419,12 +419,12 @@ private: static std::string simname_; // a string for the name of the current simulation, // which could be set by means of an program argument, // for example. - const GridView gridView_; + const GridView gridView_; - GlobalPosition bboxMin_; - GlobalPosition bboxMax_; + GlobalPosition bboxMin_; + GlobalPosition bboxMax_; - TimeManager timeManager_; + TimeManager timeManager_; Variables variables_; @@ -432,7 +432,7 @@ private: Model* model_; - VtkMultiWriter resultWriter_; + VtkMultiWriter resultWriter_; }; // definition of the static class member simname_, // which is necessary because it is of type string. diff --git a/dumux/decoupled/common/variableclass.hh b/dumux/decoupled/common/variableclass.hh index c2dbcbbeae..c1a4b0e6b5 100644 --- a/dumux/decoupled/common/variableclass.hh +++ b/dumux/decoupled/common/variableclass.hh @@ -42,8 +42,8 @@ namespace Dumux * * Template parameters are: - - GridView a DUNE gridview type - - Scalar type used for scalar quantities + - GridView a DUNE gridview type + - Scalar type used for scalar quantities */ template<class TypeTag> class VariableClass @@ -297,8 +297,8 @@ public: //! Get pressure /*! evaluate pressure at given element - @param element entity of codim 0 - \return value of pressure + @param element entity of codim 0 + \return value of pressure */ Dune::FieldVector<Scalar, 1>& pressElement(const Element& element) { @@ -312,9 +312,9 @@ public: //! Get velocity at given element face /*! evaluate velocity at given location - @param element entity of codim 0 - @param indexInInside index in reference element - \return vector of velocity + @param element entity of codim 0 + @param indexInInside index in reference element + \return vector of velocity */ Dune::FieldVector<Scalar, dim>& velocityElementFace(const Element& element, const int indexInInside) { diff --git a/dumux/io/restart.hh b/dumux/io/restart.hh index cf3c4a71cd..afb7b612b9 100644 --- a/dumux/io/restart.hh +++ b/dumux/io/restart.hh @@ -95,7 +95,7 @@ public: void serializeBegin(Problem &problem) { const std::string magicCookie = magicRestartCookie_(problem.gridView()); - fileName_ = restartFileName_(problem.gridView(), + fileName_ = restartFileName_(problem.gridView(), problem.name(), problem.timeManager().time()); @@ -194,7 +194,7 @@ public: } inStream_.seekg(0, std::ios::beg); - const std::string magicCookie = + const std::string magicCookie = magicRestartCookie_(problem.gridView()); deserializeSectionBegin(magicCookie); diff --git a/dumux/io/vtkmultiwriter.hh b/dumux/io/vtkmultiwriter.hh index 6f939970fd..975c39d578 100644 --- a/dumux/io/vtkmultiwriter.hh +++ b/dumux/io/vtkmultiwriter.hh @@ -143,10 +143,10 @@ public: { /* // useful typedefs - typedef typename Function::RangeFieldType Scalar; + typedef typename Function::RangeFieldType Scalar; typedef typename GridView::Traits::template Codim<GridView::dimension> VertexTraits; - typedef typename VertexTraits::Entity Vertex; - typedef typename VertexTraits::LeafIterator VertexIterator; + typedef typename VertexTraits::Entity Vertex; + typedef typename VertexTraits::LeafIterator VertexIterator; typedef Dune::ReferenceElement<typename GridView::ctype, 0> VertexReferenceElement; typedef Dune::ReferenceElements<typename GridView::ctype, 0> VertexReferenceElements; typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; @@ -177,7 +177,7 @@ public: // this is pretty hacky as it assumes that the mapping // to the vertices is the same for the function a and // the vertex mapper - typedef typename Function::RangeFieldType Scalar; + typedef typename Function::RangeFieldType Scalar; typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; unsigned nVerts = (*fn).size(); @@ -201,9 +201,9 @@ public: { // some typedefs - typedef typename Function::RT Scalar; - typedef typename GridView::template Codim<0>::Entity Cell; - typedef typename GridView::template Codim<0>::Iterator CellIterator; + typedef typename Function::RT Scalar; + typedef typename GridView::template Codim<0>::Entity Cell; + typedef typename GridView::template Codim<0>::Iterator CellIterator; typedef Dune::GenericReferenceElement<typename GridView::ctype, GridView::dimgrid> CellReferenceElement; typedef Dune::GenericReferenceElements<typename GridView::ctype, GridView::dimgrid> CellReferenceElements; typedef Dune::BlockVector<Dune::FieldVector<Scalar, 1> > ScalarField; @@ -253,7 +253,7 @@ public: << "\" file=\"" << fileName << "." << suffix << "\"/>\n"; } - if (commSize_ > 1 && commRank_ == 0) { + if (commSize_ > 1 && commRank_ == 0) { // only the first process updates the multi-file for (int part=0; part < commSize_; ++part) { fileName = fileName_(part); @@ -457,18 +457,18 @@ private: bool wasRestarted_; - std::string simName_; - std::ofstream multiFile_; - std::string multiFileName_; + std::string simName_; + std::ofstream multiFile_; + std::string multiFileName_; int commSize_; // number of processes in the communicator int commRank_; // rank of the current process in the communicator VtkWriter * curWriter_; - double curTime_; + double curTime_; const GridView* curGridView_; - std::string curOutFileName_; - int writerNum_; + std::string curOutFileName_; + int writerNum_; std::list<VtkVectorFieldStoreBase_*> vectorFields_; }; diff --git a/dumux/material/binarycoefficients/henryiapws.hh b/dumux/material/binarycoefficients/henryiapws.hh index df4c30afdc..3698f28646 100644 --- a/dumux/material/binarycoefficients/henryiapws.hh +++ b/dumux/material/binarycoefficients/henryiapws.hh @@ -55,7 +55,7 @@ inline Scalar henryIAPWS(Scalar E, -1.75493479,-45.5170352, -6.7469445e5 }; const Scalar d[6] = { - 1/3.0, 2/3.0, 5/3.0, + 1/3.0, 2/3.0, 5/3.0, 16/3.0, 43/3.0, 110/3.0 }; const Scalar q = -0.023767; diff --git a/dumux/material/components/brine.hh b/dumux/material/components/brine.hh index 7a7418c488..cad93e6797 100644 --- a/dumux/material/components/brine.hh +++ b/dumux/material/components/brine.hh @@ -115,8 +115,8 @@ public: /*Numerical coefficents from MICHAELIDES for the enthalpy of brine*/ static const Scalar a[4][3] = { - { -9633.6, -4080.0, +286.49 }, - { +166.58, +68.577, -4.6856 }, + { -9633.6, -4080.0, +286.49 }, + { +166.58, +68.577, -4.6856 }, { -0.90963, -0.36524, +0.249667E-1 }, { +0.17965E-2, +0.71924E-3, -0.4900E-4 } }; @@ -240,7 +240,7 @@ public: Scalar f = liquidDensity(temperature, pressure) - density; Scalar df_dp; - df_dp = liquidDensity(temperature, pressure + eps); + df_dp = liquidDensity(temperature, pressure + eps); df_dp -= liquidDensity(temperature, pressure - eps); df_dp /= 2*eps; diff --git a/dumux/material/components/ch4.hh b/dumux/material/components/ch4.hh index 2d3cc6e632..f0cf690415 100644 --- a/dumux/material/components/ch4.hh +++ b/dumux/material/components/ch4.hh @@ -125,9 +125,9 @@ public: Scalar pressure) { // method of Joback - const Scalar cpVapA = 19.25; - const Scalar cpVapB = 0.05213; - const Scalar cpVapC = 1.197e-5; + const Scalar cpVapA = 19.25; + const Scalar cpVapB = 0.05213; + const Scalar cpVapC = 1.197e-5; const Scalar cpVapD = -1.132e-8; //Scalar cp = diff --git a/dumux/material/components/h2.hh b/dumux/material/components/h2.hh index 31d707bb74..30f1d1ea49 100644 --- a/dumux/material/components/h2.hh +++ b/dumux/material/components/h2.hh @@ -131,10 +131,10 @@ public: Scalar pressure) { // method of Joback - const Scalar cpVapA = 27.14; - const Scalar cpVapB = 9.273e-3; + const Scalar cpVapA = 27.14; + const Scalar cpVapB = 9.273e-3; const Scalar cpVapC = -1.381e-5; - const Scalar cpVapD = 7.645e-9; + const Scalar cpVapD = 7.645e-9; //Scalar cp = // cpVapA + T*(cpVapB + T*(cpVapC + T*cpVapD)); diff --git a/dumux/material/components/h2o.hh b/dumux/material/components/h2o.hh index 53dd670ad5..d7af489398 100644 --- a/dumux/material/components/h2o.hh +++ b/dumux/material/components/h2o.hh @@ -510,7 +510,7 @@ public: Scalar f = gasDensity(temperature, pressure) - density; Scalar df_dp; - df_dp = gasDensity(temperature, pressure + eps); + df_dp = gasDensity(temperature, pressure + eps); df_dp -= gasDensity(temperature, pressure - eps); df_dp /= 2*eps; @@ -587,7 +587,7 @@ public: Scalar f = liquidDensity(temperature, pressure) - density; Scalar df_dp; - df_dp = liquidDensity(temperature, pressure + eps); + df_dp = liquidDensity(temperature, pressure + eps); df_dp -= liquidDensity(temperature, pressure - eps); df_dp /= 2*eps; diff --git a/dumux/material/components/iapws/common.hh b/dumux/material/components/iapws/common.hh index 991cca533e..3d7d4001e8 100644 --- a/dumux/material/components/iapws/common.hh +++ b/dumux/material/components/iapws/common.hh @@ -89,12 +89,12 @@ public: // muBar = muBar_1 const Scalar Hij[6][7] = { - { 5.20094e-1, 2.22531e-1,-2.81378e-1, 1.61913e-1,-3.25372e-2, 0, 0 }, - { 8.50895e-2, 9.99115e-1,-9.06851e-1, 2.57399e-1, 0, 0, 0 }, - {-1.08374 , 1.88797 ,-7.72479e-1, 0, 0, 0, 0 }, - {-2.89555e-1, 1.26613 ,-4.89837e-1, 0, 6.98452e-2, 0,-4.35673e-3 }, - { 0, 0,-2.57040e-1, 0, 0, 8.72102e-3, 0 }, - { 0, 1.20573e-1, 0, 0, 0, 0,-5.93264e-4 } + { 5.20094e-1, 2.22531e-1,-2.81378e-1, 1.61913e-1,-3.25372e-2, 0, 0 }, + { 8.50895e-2, 9.99115e-1,-9.06851e-1, 2.57399e-1, 0, 0, 0 }, + {-1.08374 , 1.88797 ,-7.72479e-1, 0, 0, 0, 0 }, + {-2.89555e-1, 1.26613 ,-4.89837e-1, 0, 6.98452e-2, 0,-4.35673e-3 }, + { 0, 0,-2.57040e-1, 0, 0, 8.72102e-3, 0 }, + { 0, 1.20573e-1, 0, 0, 0, 0,-5.93264e-4 } }; Scalar tmp, tmp2, tmp3 = 1; diff --git a/dumux/material/components/iapws/region1.hh b/dumux/material/components/iapws/region1.hh index cbcb8be2fe..f746b6490f 100644 --- a/dumux/material/components/iapws/region1.hh +++ b/dumux/material/components/iapws/region1.hh @@ -161,7 +161,7 @@ public: -n(i) * I(i) * std::pow(7.1 - pi_, I(i) - 1) * - std::pow(tau_ - 1.222, J(i)); + std::pow(tau_ - 1.222, J(i)); } return result; @@ -188,7 +188,7 @@ public: I(i) * J(i) * std::pow(7.1 - pi_, I(i) - 1) * - std::pow(tau_ - 1.222, J(i) - 1); + std::pow(tau_ - 1.222, J(i) - 1); } return result; @@ -215,7 +215,7 @@ public: I(i) * (I(i) - 1) * std::pow(7.1 - pi_, I(i) - 2) * - std::pow(tau_ - 1.222, J(i)); + std::pow(tau_ - 1.222, J(i)); } return result; @@ -224,13 +224,13 @@ public: private: static Scalar n(int i) { - static const Scalar n[34] = { - 0.14632971213167, -0.84548187169114, -0.37563603672040e1, - 0.33855169168385e1, -0.95791963387872, 0.15772038513228, - -0.16616417199501e-1, 0.81214629983568e-3, 0.28319080123804e-3, + static const Scalar n[34] = { + 0.14632971213167, -0.84548187169114, -0.37563603672040e1, + 0.33855169168385e1, -0.95791963387872, 0.15772038513228, + -0.16616417199501e-1, 0.81214629983568e-3, 0.28319080123804e-3, -0.60706301565874e-3, -0.18990068218419e-1, -0.32529748770505e-1, -0.21841717175414e-1, -0.52838357969930e-4, -0.47184321073267e-3, - -0.30001780793026e-3, 0.47661393906987e-4, -0.44141845330846e-5, + -0.30001780793026e-3, 0.47661393906987e-4, -0.44141845330846e-5, -0.72694996297594e-15,-0.31679644845054e-4, -0.28270797985312e-5, -0.85205128120103e-9, -0.22425281908000e-5, -0.65171222895601e-6, -0.14341729937924e-12,-0.40516996860117e-6, -0.12734301741641e-8, @@ -244,16 +244,16 @@ private: static short int I(int i) { static const short int I[34] = { - 0, 0, 0, - 0, 0, 0, - 0, 0, 1, - 1, 1, 1, - 1, 1, 2, - 2, 2, 2, - 2, 3, 3, - 3, 4, 4, - 4, 5, 8, - 8, 21, 23, + 0, 0, 0, + 0, 0, 0, + 0, 0, 1, + 1, 1, 1, + 1, 1, 2, + 2, 2, 2, + 2, 3, 3, + 3, 4, 4, + 4, 5, 8, + 8, 21, 23, 29, 30, 31, 32 }; @@ -263,17 +263,17 @@ private: static short int J(int i) { static const short int J[34] = { - -2, -1, 0, - 1, 2, 3, - 4, 5, -9, - -7, -1, 0, - 1, 3, -3, - 0, 1, 3, - 17, -4, 0, - 6, -5, -2, - 10, -8, -11, - -6, -29, -31, - -38, -39, -40, + -2, -1, 0, + 1, 2, 3, + 4, 5, -9, + -7, -1, 0, + 1, 3, -3, + 0, 1, 3, + 17, -4, 0, + 6, -5, -2, + 10, -8, -11, + -6, -29, -31, + -38, -39, -40, -41 }; return J[i]; diff --git a/dumux/material/components/iapws/region2.hh b/dumux/material/components/iapws/region2.hh index f045998814..39dbc9e971 100644 --- a/dumux/material/components/iapws/region2.hh +++ b/dumux/material/components/iapws/region2.hh @@ -140,7 +140,7 @@ public: result += n_g(i) * J_g(i) * - std::pow(tau_, J_g(i) - 1); + std::pow(tau_, J_g(i) - 1); } // residual part @@ -149,7 +149,7 @@ public: n_r(i) * std::pow(pi_, I_r(i)) * J_r(i) * - std::pow(tau_ - 0.5, J_r(i) - 1); + std::pow(tau_ - 0.5, J_r(i) - 1); } return result; @@ -248,7 +248,7 @@ public: private: static Scalar n_g(int i) { - static const Scalar n[9] = { + static const Scalar n[9] = { -0.96927686500217e1, 0.10086655968018e2, -0.56087911283020e-2, 0.71452738081455e-1, -0.40710498223928, 0.14240819171444e1, -0.43839511319450e1, -0.28408632460772, 0.21268463753307e-1 @@ -258,21 +258,21 @@ private: static Scalar n_r(int i) { - static const Scalar n[43] = { - -0.17731742473213e-2, -0.17834862292358e-1, -0.45996013696365e-1, - -0.57581259083432e-1, -0.50325278727930e-1, -0.33032641670203e-4, - -0.18948987516315e-3, -0.39392777243355e-2, -0.43797295650573e-1, - -0.26674547914087e-4, 0.20481737692309e-7, 0.43870667284435e-6, - -0.32277677238570e-4, -0.15033924542148e-2, -0.40668253562649e-1, - -0.78847309559367e-9, 0.12790717852285e-7, 0.48225372718507e-6, + static const Scalar n[43] = { + -0.17731742473213e-2, -0.17834862292358e-1, -0.45996013696365e-1, + -0.57581259083432e-1, -0.50325278727930e-1, -0.33032641670203e-4, + -0.18948987516315e-3, -0.39392777243355e-2, -0.43797295650573e-1, + -0.26674547914087e-4, 0.20481737692309e-7, 0.43870667284435e-6, + -0.32277677238570e-4, -0.15033924542148e-2, -0.40668253562649e-1, + -0.78847309559367e-9, 0.12790717852285e-7, 0.48225372718507e-6, 0.22922076337661e-5, -0.16714766451061e-10, -0.21171472321355e-2, - -0.23895741934104e2, -0.59059564324270e-17, -0.12621808899101e-5, - -0.38946842435739e-1, 0.11256211360459e-10, -0.82311340897998e1, - 0.19809712802088e-7, 0.10406965210174e-18, -0.10234747095929e-12, - -0.10018179379511e-8, -0.80882908646985e-10, 0.10693031879409, - -0.33662250574171, 0.89185845355421e-24, 0.30629316876232e-12, - -0.42002467698208e-5, -0.59056029685639e-25, 0.37826947613457e-5, - -0.12768608934681e-14, 0.73087610595061e-28, 0.55414715350778e-16, + -0.23895741934104e2, -0.59059564324270e-17, -0.12621808899101e-5, + -0.38946842435739e-1, 0.11256211360459e-10, -0.82311340897998e1, + 0.19809712802088e-7, 0.10406965210174e-18, -0.10234747095929e-12, + -0.10018179379511e-8, -0.80882908646985e-10, 0.10693031879409, + -0.33662250574171, 0.89185845355421e-24, 0.30629316876232e-12, + -0.42002467698208e-5, -0.59056029685639e-25, 0.37826947613457e-5, + -0.12768608934681e-14, 0.73087610595061e-28, 0.55414715350778e-16, -0.94369707241210e-6 }; return n[i]; @@ -303,9 +303,9 @@ private: static Scalar J_g(int i) { static const short int J[9] = { - 0, 1, -5, + 0, 1, -5, -4, -3, -2, - -1, 2, 3 + -1, 2, 3 }; return J[i]; } diff --git a/dumux/material/components/iapws/region4.hh b/dumux/material/components/iapws/region4.hh index c527846b33..1cfa76efeb 100644 --- a/dumux/material/components/iapws/region4.hh +++ b/dumux/material/components/iapws/region4.hh @@ -57,9 +57,9 @@ public: static Scalar saturationPressure(Scalar temperature) { static const Scalar n[10] = { - 0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2, - 0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2, - -0.48232657361591e4, 0.40511340542057e6, -0.23855557567849, + 0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2, + 0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2, + -0.48232657361591e4, 0.40511340542057e6, -0.23855557567849, 0.65017534844798e3 }; diff --git a/dumux/material/components/n2.hh b/dumux/material/components/n2.hh index c40943810d..0640d6c781 100644 --- a/dumux/material/components/n2.hh +++ b/dumux/material/components/n2.hh @@ -154,9 +154,9 @@ public: Scalar pressure) { // method of Joback - const Scalar cpVapA = 31.15; + const Scalar cpVapA = 31.15; const Scalar cpVapB = -0.01357; - const Scalar cpVapC = 2.680e-5; + const Scalar cpVapC = 2.680e-5; const Scalar cpVapD = -1.168e-8; //Scalar cp = diff --git a/dumux/material/components/o2.hh b/dumux/material/components/o2.hh index 6cef5df49a..73be4d2a3e 100644 --- a/dumux/material/components/o2.hh +++ b/dumux/material/components/o2.hh @@ -97,10 +97,10 @@ public: Scalar X = (1 - tripleTemperature()/T) / (1 - tripleTemperature()/criticalTemperature()); - const Scalar A = 7.568956; - const Scalar B = 5.004836; + const Scalar A = 7.568956; + const Scalar B = 5.004836; const Scalar C = -2.137460; - const Scalar D = 3.454481; + const Scalar D = 3.454481; const Scalar epsilon = 1.514; return @@ -141,9 +141,9 @@ public: Scalar pressure) { // method of Joback - const Scalar cpVapA = 28.11; + const Scalar cpVapA = 28.11; const Scalar cpVapB = -3.680e-6; - const Scalar cpVapC = 1.746e-5; + const Scalar cpVapC = 1.746e-5; const Scalar cpVapD = -1.065e-8; //Scalar cp = diff --git a/dumux/material/components/simpleh2o.hh b/dumux/material/components/simpleh2o.hh index 601b209932..20df9f76ac 100644 --- a/dumux/material/components/simpleh2o.hh +++ b/dumux/material/components/simpleh2o.hh @@ -99,9 +99,9 @@ public: return 0; // water is solid: We don't take sublimation into account static const Scalar n[10] = { - 0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2, - 0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2, - -0.48232657361591e4, 0.40511340542057e6, -0.23855557567849, + 0.11670521452767e4, -0.72421316703206e6, -0.17073846940092e2, + 0.12020824702470e5, -0.32325550322333e7, 0.14915108613530e2, + -0.48232657361591e4, 0.40511340542057e6, -0.23855557567849, 0.65017534844798e3 }; diff --git a/dumux/material/components/tabulatedcomponent.hh b/dumux/material/components/tabulatedcomponent.hh index 7cf871f744..e754f6cd50 100644 --- a/dumux/material/components/tabulatedcomponent.hh +++ b/dumux/material/components/tabulatedcomponent.hh @@ -624,16 +624,16 @@ private: static Scalar *liquidPressure_; // temperature, pressure and density ranges - static Scalar tempMin_; - static Scalar tempMax_; + static Scalar tempMin_; + static Scalar tempMax_; static unsigned nTemp_; - static Scalar pressMin_; - static Scalar pressMax_; + static Scalar pressMin_; + static Scalar pressMax_; static unsigned nPress_; - static Scalar densityMin_; - static Scalar densityMax_; + static Scalar densityMin_; + static Scalar densityMax_; static unsigned nDensity_; }; @@ -668,21 +668,21 @@ Scalar* TabulatedComponent<Scalar, RawComponent, verbose>::gasPressure_; template <class Scalar, class RawComponent, bool verbose> Scalar* TabulatedComponent<Scalar, RawComponent, verbose>::liquidPressure_; template <class Scalar, class RawComponent, bool verbose> -Scalar TabulatedComponent<Scalar, RawComponent, verbose>::tempMin_; +Scalar TabulatedComponent<Scalar, RawComponent, verbose>::tempMin_; template <class Scalar, class RawComponent, bool verbose> -Scalar TabulatedComponent<Scalar, RawComponent, verbose>::tempMax_; +Scalar TabulatedComponent<Scalar, RawComponent, verbose>::tempMax_; template <class Scalar, class RawComponent, bool verbose> unsigned TabulatedComponent<Scalar, RawComponent, verbose>::nTemp_; template <class Scalar, class RawComponent, bool verbose> -Scalar TabulatedComponent<Scalar, RawComponent, verbose>::pressMin_; +Scalar TabulatedComponent<Scalar, RawComponent, verbose>::pressMin_; template <class Scalar, class RawComponent, bool verbose> -Scalar TabulatedComponent<Scalar, RawComponent, verbose>::pressMax_; +Scalar TabulatedComponent<Scalar, RawComponent, verbose>::pressMax_; template <class Scalar, class RawComponent, bool verbose> unsigned TabulatedComponent<Scalar, RawComponent, verbose>::nPress_; template <class Scalar, class RawComponent, bool verbose> -Scalar TabulatedComponent<Scalar, RawComponent, verbose>::densityMin_; +Scalar TabulatedComponent<Scalar, RawComponent, verbose>::densityMin_; template <class Scalar, class RawComponent, bool verbose> -Scalar TabulatedComponent<Scalar, RawComponent, verbose>::densityMax_; +Scalar TabulatedComponent<Scalar, RawComponent, verbose>::densityMax_; template <class Scalar, class RawComponent, bool verbose> unsigned TabulatedComponent<Scalar, RawComponent, verbose>::nDensity_; diff --git a/dumux/material/fluidmatrixinteractions/2p/efftoabslawparams.hh b/dumux/material/fluidmatrixinteractions/2p/efftoabslawparams.hh index 4ef0655952..df36d5052b 100644 --- a/dumux/material/fluidmatrixinteractions/2p/efftoabslawparams.hh +++ b/dumux/material/fluidmatrixinteractions/2p/efftoabslawparams.hh @@ -35,9 +35,9 @@ namespace Dumux template <class EffLawParamsT> class EffToAbsLawParams : public EffLawParamsT { - typedef EffLawParamsT EffLawParams; + typedef EffLawParamsT EffLawParams; public: - typedef typename EffLawParams::Scalar Scalar; + typedef typename EffLawParams::Scalar Scalar; EffToAbsLawParams() : EffLawParams() diff --git a/dumux/material/fluidmatrixinteractions/2p/regularizedlinearmaterial.hh b/dumux/material/fluidmatrixinteractions/2p/regularizedlinearmaterial.hh index 48ffca37d4..be33b5fb71 100644 --- a/dumux/material/fluidmatrixinteractions/2p/regularizedlinearmaterial.hh +++ b/dumux/material/fluidmatrixinteractions/2p/regularizedlinearmaterial.hh @@ -144,16 +144,16 @@ private: // check wether the permeability needs to be regularized else if (S < lowS) { typedef Dumux::Spline<Scalar> Spline; - Spline sp(0, lowS, - 0, lowS/2, - 0, m); + Spline sp(0, lowS, + 0, lowS/2, + 0, m); return sp.eval(S); } else if (S > highS) { typedef Dumux::Spline<Scalar> Spline; - Spline sp(highS, 1, + Spline sp(highS, 1, 1 - (1 - highS)/2, 1, - m, 0); + m, 0); return sp.eval(S); } diff --git a/dumux/material/fluidsystems/defaultcomponents.hh b/dumux/material/fluidsystems/defaultcomponents.hh index 3eb95ea89b..a8167dcb14 100644 --- a/dumux/material/fluidsystems/defaultcomponents.hh +++ b/dumux/material/fluidsystems/defaultcomponents.hh @@ -53,7 +53,7 @@ SET_PROP_DEFAULT(DefaultComponents) { private: typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; typedef Dumux::H2O<Scalar> H2O_IAPWS; - + public: typedef Dumux::TabulatedComponent<Scalar, H2O_IAPWS> H2O; typedef Dumux::N2<Scalar> N2; @@ -62,7 +62,7 @@ public: typedef Dumux::CH4<Scalar> CH4; typedef Dumux::SimpleCO2<Scalar> SimpleCO2; typedef Dumux::Brine<Scalar, H2O> Brine; - + static void init() { int nT = 100; @@ -74,7 +74,7 @@ public: } }; -SET_PROP_DEFAULT(Components) +SET_PROP_DEFAULT(Components) : public GET_PROP(TypeTag, PTAG(DefaultComponents)) {}; diff --git a/dumux/material/fluidsystems/h2o_n2_system.hh b/dumux/material/fluidsystems/h2o_n2_system.hh index 17ee05c908..fe3c0bb049 100644 --- a/dumux/material/fluidsystems/h2o_n2_system.hh +++ b/dumux/material/fluidsystems/h2o_n2_system.hh @@ -107,7 +107,7 @@ public: // \todo: proper citation Scalar rholH2O = H2O::liquidDensity(temperature, pressure); Scalar clH2O = rholH2O/H2O::molarMass(); - + // this assumes each nitrogen molecule displaces exactly one // water molecule in the liquid return @@ -118,7 +118,7 @@ public: else if (phaseIdx == gPhaseIdx) { Scalar fugH2O = fluidState.fugacity(H2OIdx); Scalar fugN2 = fluidState.fugacity(N2Idx); - return + return H2O::gasDensity(temperature, fugH2O) + N2::gasDensity(temperature, fugN2); } @@ -314,14 +314,14 @@ public: Scalar fugN2 = std::max(1e-3, state.fugacity(N2Idx)); Scalar cH2O = H2O::gasDensity(temperature, fugH2O) / H2O::molarMass(); Scalar cN2 = N2::gasDensity(temperature, fugN2) / N2::molarMass(); - + Scalar alpha = (fugH2O + fugN2)/pressure; if (compIdx == H2OIdx) return fugH2O/(alpha*cH2O/(cH2O + cN2)); else if (compIdx == N2Idx) return fugN2/(alpha*cN2/(cH2O + cN2)); - + DUNE_THROW(Dune::InvalidStateException, "Invalid component index " << compIdx); } @@ -400,7 +400,7 @@ public: Scalar pressure, const FluidState &fluidState) { - if (phaseIdx == lPhaseIdx) { + if (phaseIdx == lPhaseIdx) { Scalar cN2 = fluidState.concentration(lPhaseIdx, N2Idx); Scalar pN2 = N2::gasPressure(temperature, cN2*N2::molarMass()); @@ -450,7 +450,7 @@ private: // \todo: proper citation Scalar rholH2O = H2O::liquidDensity(T, pl); Scalar clH2O = rholH2O/H2O::molarMass(); - + // this assumes each nitrogen molecule displaces exactly one // water molecule in the liquid return diff --git a/dumux/material/spatialparameters/boxspatialparameters.hh b/dumux/material/spatialparameters/boxspatialparameters.hh index cfafa844c0..421f15fd54 100644 --- a/dumux/material/spatialparameters/boxspatialparameters.hh +++ b/dumux/material/spatialparameters/boxspatialparameters.hh @@ -46,7 +46,7 @@ class BoxSpatialParameters enum { dimWorld = GridView::dimensionworld }; - + typedef typename GridView::template Codim<0>::Entity Element; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; @@ -83,15 +83,15 @@ public: Scalar extrusionFactorScvf(const Element &element, const FVElementGeometry &fvElemGeom, int scvfIdx) const - { + { return 0.5 * - (asImp_().extrusionFactorScv(element, - fvElemGeom, + (asImp_().extrusionFactorScv(element, + fvElemGeom, fvElemGeom.subContVolFace[scvfIdx].i) + - asImp_().extrusionFactorScv(element, - fvElemGeom, + asImp_().extrusionFactorScv(element, + fvElemGeom, fvElemGeom.subContVolFace[scvfIdx].j)); } @@ -127,7 +127,7 @@ public: protected: Implementation &asImp_() { return *static_cast<Implementation*>(this); } - + const Implementation &asImp_() const { return *static_cast<const Implementation*>(this); } }; diff --git a/dumux/nonlinear/newtoncontroller.hh b/dumux/nonlinear/newtoncontroller.hh index 0029169ed7..0ebe6860fc 100644 --- a/dumux/nonlinear/newtoncontroller.hh +++ b/dumux/nonlinear/newtoncontroller.hh @@ -92,7 +92,7 @@ struct NewtonConvergenceWriter NewtonConvergenceWriter(NewtonController &ctl) : ctl_(ctl) { - timeStepNum_ = 0; + timeStepIndex_ = 0; iteration_ = 0; vtkMultiWriter_ = new VtkMultiWriter("convergence"); } @@ -102,14 +102,14 @@ struct NewtonConvergenceWriter void beginTimestep() { - ++timeStepNum_; + ++timeStepIndex_; iteration_ = 0; }; void beginIteration(const GridView &gv) { ++ iteration_; - vtkMultiWriter_->beginTimestep(timeStepNum_ + iteration_ / 100.0, + vtkMultiWriter_->beginTimestep(timeStepIndex_ + iteration_ / 100.0, gv); }; @@ -124,12 +124,12 @@ struct NewtonConvergenceWriter void endTimestep() { - ++timeStepNum_; + ++timeStepIndex_; iteration_ = 0; }; private: - int timeStepNum_; + int timeStepIndex_; int iteration_; VtkMultiWriter *vtkMultiWriter_; NewtonController &ctl_; @@ -513,7 +513,7 @@ public: /*! * \brief Returns true iff the newton method ought to be chatty. */ - bool verbose() const + bool verbose() const { return gridView_().comm().rank() == 0; } protected: @@ -578,16 +578,16 @@ protected: verbosity = 0; #if HAVE_PARDISO - typedef Dumux::PDELab::ISTLBackend_NoOverlap_Loop_Pardiso<TypeTag> Solver; + typedef Dumux::PDELab::ISTLBackend_NoOverlap_Loop_Pardiso<TypeTag> Solver; Solver solver(problem_(), 500, verbosity); #else // !HAVE_PARDISO #if HAVE_MPI -// typedef Dune::PDELab::ISTLBackend_NOVLP_BCGS_NOPREC<GridFunctionSpace> Solver; +// typedef Dune::PDELab::ISTLBackend_NOVLP_BCGS_NOPREC<GridFunctionSpace> Solver; // Solver solver(model_().jacobianAssembler().gridFunctionSpace(), 50000, verbosity); - typedef Dumux::PDELab::ISTLBackend_NoOverlap_BCGS_ILU<TypeTag> Solver; + typedef Dumux::PDELab::ISTLBackend_NoOverlap_BCGS_ILU<TypeTag> Solver; Solver solver(problem_(), 500, verbosity); #else - typedef Dumux::PDELab::ISTLBackend_SEQ_BCGS_SSOR Solver; + typedef Dumux::PDELab::ISTLBackend_SEQ_BCGS_SSOR Solver; Solver solver(500, verbosity); #endif // HAVE_MPI #endif // HAVE_PARDISO @@ -638,14 +638,14 @@ protected: Scalar curPhysicalness_; Scalar error_; Scalar lastError_; - int probationCount_; + int probationCount_; // optimal number of iterations we want to achive - int targetSteps_; + int targetSteps_; // maximum number of iterations we do before giving up - int maxSteps_; + int maxSteps_; // actual number of steps done so far - int numSteps_; + int numSteps_; }; } // namespace Dumux diff --git a/dumux/nonlinear/newtonmethod.hh b/dumux/nonlinear/newtonmethod.hh index 3ff95481b7..022dd287c4 100644 --- a/dumux/nonlinear/newtonmethod.hh +++ b/dumux/nonlinear/newtonmethod.hh @@ -129,7 +129,7 @@ protected: // solve the resultuing linear equation system if (ctl.verbose()) { - std::cout << "\rSolve Mx = r "; + std::cout << "\rSolve Mx = r "; std::cout.flush(); } diff --git a/test/boxmodels/1p/1pspatialparameters.hh b/test/boxmodels/1p/1pspatialparameters.hh index fe4a16c2ea..61a7e4135e 100644 --- a/test/boxmodels/1p/1pspatialparameters.hh +++ b/test/boxmodels/1p/1pspatialparameters.hh @@ -53,14 +53,14 @@ public: * \param scvIdx The index sub-control volume face where the * intrinsic velocity ought to be calculated. */ - Scalar intrinsicPermeability(const Element &element, + Scalar intrinsicPermeability(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { return 1e-10; } - Scalar porosity(const Element &element, + Scalar porosity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { diff --git a/test/boxmodels/1p/1ptestproblem.hh b/test/boxmodels/1p/1ptestproblem.hh index d241b48dfa..8716db2b96 100644 --- a/test/boxmodels/1p/1ptestproblem.hh +++ b/test/boxmodels/1p/1ptestproblem.hh @@ -88,8 +88,8 @@ SET_PROP(OnePTestProblem, Problem) // typedef typename Grid::LevelGridView type; //}; -// Set the soil properties -// Set the soil properties +// Set the spatial parameters +// Set the spatial parameters SET_PROP(OnePTestProblem, SpatialParameters) { typedef Dumux::OnePSpatialParameters<TypeTag> type; @@ -127,15 +127,15 @@ class OnePTestProblem : public OnePBoxProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePIndices)) Indices; enum { // Grid and world dimension - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, // indices of the primary variables pressureIdx = Indices::pressureIdx, }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; @@ -172,7 +172,7 @@ public: * * This problem assumes a temperature of 36 degrees Celsius. */ - Scalar temperature(const Element &element, + Scalar temperature(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -190,10 +190,10 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. */ - void boundaryTypes(BoundaryTypes &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void boundaryTypes(BoundaryTypes &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -213,10 +213,10 @@ public: * * For this method, the \a values parameter stores primary variables. */ - void dirichlet(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void dirichlet(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -239,10 +239,10 @@ public: * in normal direction of each component. Negative values mean * influx. */ - void neumann(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void neumann(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -267,8 +267,8 @@ public: * unit. Positive values mean that mass is created, negative ones * mean that it vanishes. */ - void source(PrimaryVarVector &values, - const Element &element, + void source(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -281,8 +281,8 @@ public: * For this method, the \a values parameter stores primary * variables. */ - void initial(PrimaryVarVector &values, - const Element &element, + void initial(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { diff --git a/test/boxmodels/1p2c/tissue_tumor_problem.hh b/test/boxmodels/1p2c/tissue_tumor_problem.hh index 738bcb768e..cd9b643fb7 100644 --- a/test/boxmodels/1p2c/tissue_tumor_problem.hh +++ b/test/boxmodels/1p2c/tissue_tumor_problem.hh @@ -77,7 +77,7 @@ SET_PROP(TissueTumorProblem, FluidSystem) typedef Dumux::ISFluid_Trail_System<TypeTag> type; }; -// Set the soil properties +// Set the spatial parameters SET_TYPE_PROP(TissueTumorProblem, SpatialParameters, Dumux::TissueTumorSpatialParameters<TypeTag>); @@ -126,16 +126,16 @@ class TissueTumorProblem : public OnePTwoCBoxProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(OnePTwoCIndices)) Indices; enum { // Grid and world dimension - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, // indices of the primary variables - konti = Indices::konti, - transport = Indices::transport, + konti = Indices::konti, + transport = Indices::transport, }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; @@ -172,7 +172,7 @@ public: * * This problem assumes a temperature of 36 degrees Celsius. */ - Scalar temperature(const Element &element, + Scalar temperature(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -190,10 +190,10 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. */ - void boundaryTypes(BoundaryTypes &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void boundaryTypes(BoundaryTypes &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -206,10 +206,10 @@ public: * * For this method, the \a values parameter stores primary variables. */ - void dirichlet(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void dirichlet(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -227,10 +227,10 @@ public: * in normal direction of each component. Negative values mean * influx. */ - void neumann(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void neumann(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -265,8 +265,8 @@ public: * unit. Positive values mean that mass is created, negative ones * mean that it vanishes. */ - void source(PrimaryVarVector &values, - const Element &element, + void source(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -285,8 +285,8 @@ public: * For this method, the \a values parameter stores primary * variables. */ - void initial(PrimaryVarVector &values, - const Element &element, + void initial(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -300,8 +300,8 @@ public: private: // the internal method for the initial condition - void initial_(PrimaryVarVector &values, - const GlobalPosition &globalPos) const + void initial_(PrimaryVariables &values, + const GlobalPosition &globalPos) const { values[konti] = -1067; //initial condition for the pressure diff --git a/test/boxmodels/1p2c/tissue_tumor_spatialparameters.hh b/test/boxmodels/1p2c/tissue_tumor_spatialparameters.hh index c5c4289bd4..6e1f11d82a 100644 --- a/test/boxmodels/1p2c/tissue_tumor_spatialparameters.hh +++ b/test/boxmodels/1p2c/tissue_tumor_spatialparameters.hh @@ -26,7 +26,7 @@ namespace Dumux { /** - * \brief Definition of the soil properties for the injection problem + * \brief Definition of the spatial parameters for the injection problem * */ template<class TypeTag> @@ -49,9 +49,9 @@ class TissueTumorSpatialParameters : public BoxSpatialParameters<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; typedef typename GridView::template Codim<0>::Entity Element; @@ -91,7 +91,7 @@ public: * \param fvElemGeom The current finite volume geometry of the element * \param scvfIdx The index sub-control volume face where the */ - const Scalar intrinsicPermeability(const Element &element, + const Scalar intrinsicPermeability(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -109,7 +109,7 @@ public: * \param fvElemGeom The finite volume geometry * \param scvIdx The local index of the sub-control volume where */ - double porosity(const Element &element, + double porosity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -127,7 +127,7 @@ public: * \param fvElemGeom The finite volume geometry * \param scvIdx The local index of the sub-control volume where */ - double tortuosity(const Element &element, + double tortuosity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -145,7 +145,7 @@ public: * \param fvElemGeom The finite volume geometry * \param scvIdx The local index of the sub-control volume where */ - double dispersivity(const Element &element, + double dispersivity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { diff --git a/test/boxmodels/2p/lensproblem.hh b/test/boxmodels/2p/lensproblem.hh index 8336e970b9..9fdc2f380a 100644 --- a/test/boxmodels/2p/lensproblem.hh +++ b/test/boxmodels/2p/lensproblem.hh @@ -95,7 +95,7 @@ public: typedef Dumux::LiquidPhase<Scalar, Dumux::SimpleDNAPL<Scalar> > type; }; -// Set the soil properties +// Set the spatial parameters SET_PROP(LensProblem, SpatialParameters) { typedef Dumux::LensSpatialParameters<TypeTag> type; @@ -137,7 +137,7 @@ SET_BOOL_PROP(LensProblem, EnableGravity, true); * <tt>./test_2p 50000 1000</tt> */ template <class TypeTag > -class LensProblem : public TwoPProblem<TypeTag> +class LensProblem : public TwoPProblem<TypeTag> { typedef LensProblem<TypeTag> ThisType; typedef TwoPProblem<TypeTag> ParentType; @@ -149,10 +149,10 @@ class LensProblem : public TwoPProblem<TypeTag> typedef TwoPFluidState<TypeTag> FluidState; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), // primary variable indices - pressureIdx = Indices::pressureIdx, + pressureIdx = Indices::pressureIdx, saturationIdx = Indices::saturationIdx, pwIdx = Indices::pwIdx, SnIdx = Indices::SnIdx, @@ -167,12 +167,12 @@ class LensProblem : public TwoPProblem<TypeTag> // Grid and world dimension - dim = GridView::dimension, - dimWorld = GridView::dimensionworld + dim = GridView::dimension, + dimWorld = GridView::dimensionworld }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; @@ -187,7 +187,7 @@ class LensProblem : public TwoPProblem<TypeTag> typedef Dune::FieldVector<Scalar, dimWorld> GlobalPosition; public: - LensProblem(TimeManager &timeManager, + LensProblem(TimeManager &timeManager, const GridView &gridView, const GlobalPosition &lensLowerLeft, const GlobalPosition &lensUpperRight) @@ -214,7 +214,7 @@ public: * * This problem assumes a temperature of 10 degrees Celsius. */ - Scalar temperature(const Element &element, + Scalar temperature(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -232,10 +232,10 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. */ - void boundaryTypes(BoundaryTypes &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void boundaryTypes(BoundaryTypes &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -258,10 +258,10 @@ public: * * For this method, the \a values parameter stores primary variables. */ - void dirichlet(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void dirichlet(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -302,10 +302,10 @@ public: * For this method, the \a values parameter stores the mass flux * in normal direction of each phase. Negative values mean influx. */ - void neumann(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void neumann(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -332,8 +332,8 @@ public: * generated or annihilate per volume unit. Positive values mean * that mass is created, negative ones mean that it vanishes. */ - void source(PrimaryVarVector &values, - const Element &element, + void source(PrimaryVariables &values, + const Element &element, const FVElementGeometry &, int subControlVolumeIdx) const { @@ -346,8 +346,8 @@ public: * For this method, the \a values parameter stores primary * variables. */ - void initial(PrimaryVarVector &values, - const Element &element, + void initial(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -383,7 +383,7 @@ private: { Scalar width = this->bboxMax()[0] - this->bboxMin()[0]; Scalar lambda = (this->bboxMax()[0] - globalPos[0])/width; - return onUpperBoundary_(globalPos) && 0.5 < lambda && lambda < 2.0/3.0; + return onUpperBoundary_(globalPos) && 0.5 < lambda && lambda < 2.0/3.0; } static const Scalar eps_ = 3e-6; diff --git a/test/boxmodels/2p/lensspatialparameters.hh b/test/boxmodels/2p/lensspatialparameters.hh index 582068512c..d970a81e54 100644 --- a/test/boxmodels/2p/lensspatialparameters.hh +++ b/test/boxmodels/2p/lensspatialparameters.hh @@ -104,7 +104,7 @@ public: * \param scvIdx The index sub-control volume face where the * intrinsic velocity ought to be calculated. */ - Scalar intrinsicPermeability(const Element &element, + Scalar intrinsicPermeability(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -114,13 +114,13 @@ public: return outerK_; } - Scalar porosity(const Element &element, + Scalar porosity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { return 0.4; } // return the brooks-corey context depending on the position - const MaterialLawParams& materialLawParams(const Element &element, + const MaterialLawParams& materialLawParams(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { diff --git a/test/boxmodels/2p/test_2p.cc b/test/boxmodels/2p/test_2p.cc index c2a50f53d1..50511015b9 100644 --- a/test/boxmodels/2p/test_2p.cc +++ b/test/boxmodels/2p/test_2p.cc @@ -141,12 +141,12 @@ int main(int argc, char** argv) { try { typedef TTAG(LensProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; + typedef GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; typedef GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; typedef Dune::FieldVector<Scalar, Grid::dimensionworld> GlobalPosition; - + static const int dim = Grid::dimension; // initialize MPI, finalize is done automatically on exit diff --git a/test/boxmodels/2p2c/injectionproblem.hh b/test/boxmodels/2p2c/injectionproblem.hh index f9757c7d6e..2e79b5d483 100644 --- a/test/boxmodels/2p2c/injectionproblem.hh +++ b/test/boxmodels/2p2c/injectionproblem.hh @@ -79,7 +79,7 @@ SET_PROP(InjectionProblem, typedef Dumux::H2O_N2_System<TypeTag> type; }; -// Set the soil properties +// Set the spatial parameters SET_TYPE_PROP(InjectionProblem, SpatialParameters, Dumux::InjectionSpatialParameters<TypeTag>); @@ -97,7 +97,7 @@ SET_INT_PROP(InjectionProblem, NewtonLinearSolverVerbosity, 0); * \brief Problem where air is injected under a low permeable layer in a depth of 800m. * * The domain is sized 60m times 40m and consists of two layers, a moderately - * permeable soil (\f$ K=10e-12\f$) for \f$ y>22m\f$ and one with a lower permeablility (\f$ K=10e-13\f$) + * permeable spatial parameters (\f$ K=10e-12\f$) for \f$ y>22m\f$ and one with a lower permeablility (\f$ K=10e-13\f$) * in the rest of the domain. * * Air enters a water-filled aquifer, which is situated 800m below sea level, at the right boundary @@ -116,8 +116,8 @@ class InjectionProblem : public TwoPTwoCProblem<TypeTag> enum { // Grid and world dimension - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, }; // copy some indices for convenience @@ -134,7 +134,7 @@ class InjectionProblem : public TwoPTwoCProblem<TypeTag> }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; @@ -174,7 +174,7 @@ public: * * This problem assumes a temperature of 10 degrees Celsius. */ - Scalar temperature(const Element &element, + Scalar temperature(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -192,10 +192,10 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. */ - void boundaryTypes(BoundaryTypes &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void boundaryTypes(BoundaryTypes &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -213,10 +213,10 @@ public: * * For this method, the \a values parameter stores primary variables. */ - void dirichlet(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void dirichlet(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -233,10 +233,10 @@ public: * in normal direction of each component. Negative values mean * influx. */ - void neumann(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void neumann(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -264,8 +264,8 @@ public: * unit. Positive values mean that mass is created, negative ones * mean that it vanishes. */ - void source(PrimaryVarVector &values, - const Element &element, + void source(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -278,8 +278,8 @@ public: * For this method, the \a values parameter stores primary * variables. */ - void initial(PrimaryVarVector &values, - const Element &element, + void initial(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -291,8 +291,8 @@ public: /*! * \brief Return the initial phase state inside a control volume. */ - int initialPhasePresence(const Vertex &vert, - int &globalIdx, + int initialPhasePresence(const Vertex &vert, + int &globalIdx, const GlobalPosition &globalPos) const { return Indices::lPhaseOnly; } @@ -300,8 +300,8 @@ public: private: // the internal method for the initial condition - void initial_(PrimaryVarVector &values, - const GlobalPosition &globalPos) const + void initial_(PrimaryVariables &values, + const GlobalPosition &globalPos) const { Scalar densityW = FluidSystem::H2O::liquidDensity(temperature_, 1e5); diff --git a/test/boxmodels/2p2c/injectionspatialparameters.hh b/test/boxmodels/2p2c/injectionspatialparameters.hh index d5ac9694c1..12dcc5323b 100644 --- a/test/boxmodels/2p2c/injectionspatialparameters.hh +++ b/test/boxmodels/2p2c/injectionspatialparameters.hh @@ -26,7 +26,7 @@ namespace Dumux { /** - * \brief Definition of the soil properties for the injection problem + * \brief Definition of the spatial parameters for the injection problem * */ template<class TypeTag> @@ -55,9 +55,9 @@ class InjectionSpatialParameters : public BoxSpatialParameters<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; typedef typename GridView::template Codim<0>::Entity Element; @@ -117,7 +117,7 @@ public: * \param scvfIdx The index sub-control volume face where the * intrinsic velocity ought to be calculated. */ - const Scalar intrinsicPermeability(const Element &element, + const Scalar intrinsicPermeability(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -128,7 +128,7 @@ public: } /*! - * \brief Define the porosity \f$[-]\f$ of the soil + * \brief Define the porosity \f$[-]\f$ of the spatial parameters * * \param vDat The data defined on the sub-control volume * \param element The finite element @@ -136,7 +136,7 @@ public: * \param scvIdx The local index of the sub-control volume where * the porosity needs to be defined */ - double porosity(const Element &element, + double porosity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -148,7 +148,7 @@ public: // return the brooks-corey context depending on the position - const MaterialLawParams& materialLawParams(const Element &element, + const MaterialLawParams& materialLawParams(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -168,7 +168,7 @@ public: * \param scvIdx The local index of the sub-control volume where * the heat capacity needs to be defined */ - double heatCapacity(const Element &element, + double heatCapacity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -191,11 +191,11 @@ public: * \param scvfIdx The local index of the sub-control volume face where * the matrix heat flux should be calculated */ - void matrixHeatFlux(Vector &heatFlux, - const FluxVars &fluxDat, - const ElementSecondaryVars &vDat, - const Vector &tempGrad, - const Element &element, + void matrixHeatFlux(Vector &heatFlux, + const FluxVariables &fluxDat, + const ElementVolumeVariables &vDat, + const Vector &tempGrad, + const Element &element, const FVElementGeometry &fvElemGeom, int scvfIdx) const { @@ -205,7 +205,7 @@ public: // arithmetic mean of the liquid saturation and the porosity const int i = fvElemGeom.subContVolFace[scvfIdx].i; const int j = fvElemGeom.subContVolFace[scvfIdx].j; - Scalar Sl = std::max(0.0, (vDat[i].saturation(lPhaseIdx) + + Scalar Sl = std::max(0.0, (vDat[i].saturation(lPhaseIdx) + vDat[j].saturation(lPhaseIdx)) / 2); Scalar poro = (porosity(element, fvElemGeom, i) + porosity(element, fvElemGeom, j)) / 2; @@ -219,7 +219,7 @@ public: // the matrix heat flux is the negative temperature gradient // times the heat conductivity. - heatFlux = tempGrad; + heatFlux = tempGrad; heatFlux *= -heatCond; } diff --git a/test/boxmodels/2p2cni/waterairproblem.hh b/test/boxmodels/2p2cni/waterairproblem.hh index c21325b7fa..21c4644287 100644 --- a/test/boxmodels/2p2cni/waterairproblem.hh +++ b/test/boxmodels/2p2cni/waterairproblem.hh @@ -73,7 +73,7 @@ SET_PROP(WaterAirProblem, Problem) // Set the wetting phase SET_TYPE_PROP(WaterAirProblem, FluidSystem, Dumux::H2O_N2_System<TypeTag>); -// Set the soil properties +// Set the spatial parameters SET_TYPE_PROP(WaterAirProblem, SpatialParameters, Dumux::WaterAirSpatialParameters<TypeTag>); @@ -130,27 +130,27 @@ class WaterAirProblem : public TwoPTwoCNIProblem<TypeTag> // copy some indices for convenience typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPTwoCIndices)) Indices; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), pressureIdx = Indices::pressureIdx, - switchIdx = Indices::switchIdx, + switchIdx = Indices::switchIdx, #if !ISOTHERMAL temperatureIdx = Indices::temperatureIdx, energyEqIdx = Indices::energyEqIdx, #endif // Phase State - lPhaseOnly = Indices::lPhaseOnly, - gPhaseOnly = Indices::gPhaseOnly, - bothPhases = Indices::bothPhases, + lPhaseOnly = Indices::lPhaseOnly, + gPhaseOnly = Indices::gPhaseOnly, + bothPhases = Indices::bothPhases, // Grid and world dimension - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; @@ -190,7 +190,7 @@ public: * * This problem assumes a temperature of 10 degrees Celsius. */ - Scalar temperature(const Element &element, + Scalar temperature(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -209,14 +209,14 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. */ - void boundaryTypes(BoundaryTypes &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void boundaryTypes(BoundaryTypes &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { - const GlobalPosition &globalPos = element.geometry().corner(scvIdx); + const GlobalPosition &globalPos = element.geometry().corner(scvIdx); if(globalPos[0] > 40 - eps_ || globalPos[0] < eps_) values.setAllDirichlet(); @@ -234,10 +234,10 @@ public: * * For this method, the \a values parameter stores primary variables. */ - void dirichlet(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void dirichlet(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -257,10 +257,10 @@ public: * in normal direction of each component. Negative values mean * influx. */ - void neumann(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void neumann(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -291,8 +291,8 @@ public: * unit. Positive values mean that mass is created, negative ones * mean that it vanishes. */ - void source(PrimaryVarVector &values, - const Element &element, + void source(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -305,8 +305,8 @@ public: * For this method, the \a values parameter stores primary * variables. */ - void initial(PrimaryVarVector &values, - const Element &element, + void initial(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -323,8 +323,8 @@ public: /*! * \brief Return the initial phase state inside a control volume. */ - int initialPhasePresence(const Vertex &vert, - int &globalIdx, + int initialPhasePresence(const Vertex &vert, + int &globalIdx, const GlobalPosition &globalPos) const { return lPhaseOnly; @@ -333,7 +333,7 @@ public: private: // internal method for the initial condition (reused for the // dirichlet conditions!) - void initial_(PrimaryVarVector &values, + void initial_(PrimaryVariables &values, const GlobalPosition &globalPos) const { Scalar densityW = 1000.0; diff --git a/test/boxmodels/2p2cni/waterairspatialparameters.hh b/test/boxmodels/2p2cni/waterairspatialparameters.hh index e6df25eee8..9dabf9a155 100644 --- a/test/boxmodels/2p2cni/waterairspatialparameters.hh +++ b/test/boxmodels/2p2cni/waterairspatialparameters.hh @@ -26,7 +26,7 @@ namespace Dumux { /** - * \brief Definition of the soil properties for the water-air problem + * \brief Definition of the spatial parameters for the water-air problem * */ template<class TypeTag> @@ -56,9 +56,9 @@ class WaterAirSpatialParameters : public BoxSpatialParameters<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(SolutionVector)) SolutionVector; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(SecondaryVars)) SecondaryVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVars)) FluxVars; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementSecondaryVars)) ElementSecondaryVars; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) VolumeVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluxVariables)) FluxVariables; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(ElementVolumeVariables)) ElementVolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; typedef typename GridView::template Codim<0>::Entity Element; @@ -119,7 +119,7 @@ public: * \param scvfIdx The index sub-control volume face where the * intrinsic velocity ought to be calculated. */ - const Scalar intrinsicPermeability(const Element &element, + const Scalar intrinsicPermeability(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -130,7 +130,7 @@ public: } /*! - * \brief Define the porosity \f$[-]\f$ of the soil + * \brief Define the porosity \f$[-]\f$ of the spatial parameters * * \param vDat The data defined on the sub-control volume * \param element The finite element @@ -138,7 +138,7 @@ public: * \param scvIdx The local index of the sub-control volume where * the porosity needs to be defined */ - double porosity(const Element &element, + double porosity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -151,7 +151,7 @@ public: // return the brooks-corey context depending on the position - const MaterialLawParams& materialLawParams(const Element &element, + const MaterialLawParams& materialLawParams(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -172,7 +172,7 @@ public: * \param scvIdx The local index of the sub-control volume where * the heat capacity needs to be defined */ - double heatCapacity(const Element &element, + double heatCapacity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -195,11 +195,11 @@ public: * \param scvfIdx The local index of the sub-control volume face where * the matrix heat flux should be calculated */ - void matrixHeatFlux(Vector &heatFlux, - const FluxVars &fluxDat, - const ElementSecondaryVars &vDat, - const Vector &tempGrad, - const Element &element, + void matrixHeatFlux(Vector &heatFlux, + const FluxVariables &fluxDat, + const ElementVolumeVariables &vDat, + const Vector &tempGrad, + const Element &element, const FVElementGeometry &fvElemGeom, int scvfIdx) const { @@ -209,7 +209,7 @@ public: // arithmetic mean of the liquid saturation and the porosity const int i = fvElemGeom.subContVolFace[scvfIdx].i; const int j = fvElemGeom.subContVolFace[scvfIdx].j; - Scalar Sl = std::max(0.0, (vDat[i].saturation(lPhaseIdx) + + Scalar Sl = std::max(0.0, (vDat[i].saturation(lPhaseIdx) + vDat[j].saturation(lPhaseIdx)) / 2); Scalar poro = (porosity(element, fvElemGeom, i) + porosity(element, fvElemGeom, j)) / 2; @@ -223,7 +223,7 @@ public: // the matrix heat flux is the negative temperature gradient // times the heat conductivity. - heatFlux = tempGrad; + heatFlux = tempGrad; heatFlux *= -heatCond; } diff --git a/test/boxmodels/2pni/injectionproblem2pni.hh b/test/boxmodels/2pni/injectionproblem2pni.hh index d086ec78f9..38c6387bcb 100644 --- a/test/boxmodels/2pni/injectionproblem2pni.hh +++ b/test/boxmodels/2pni/injectionproblem2pni.hh @@ -72,7 +72,7 @@ SET_PROP(InjectionProblem2PNI, Problem) typedef Dumux::InjectionProblem2PNI<TypeTag> type; }; -// Set the soil properties. we use the same spatial parameters as the +// Set the spatial parameters. we use the same spatial parameters as the // 2p2c injection problem SET_PROP(InjectionProblem2PNI, SpatialParameters) { typedef InjectionSpatialParameters<TypeTag> type; }; @@ -177,7 +177,7 @@ class InjectionProblem2PNI }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; @@ -250,7 +250,7 @@ public: * * For this method, the \a values parameter stores primary variables. */ - void dirichlet(PrimaryVarVector &values, + void dirichlet(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvElemGeom, const Intersection &is, @@ -274,7 +274,7 @@ public: * For this method, the \a values parameter stores the mass flux * in normal direction of each phase. Negative values mean influx. */ - void neumann(PrimaryVarVector &values, + void neumann(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvElemGeom, const Intersection &is, @@ -303,7 +303,7 @@ public: * * This problem assumes a temperature of 30 degrees Celsius. */ - Scalar temperature(const Element &element, + Scalar temperature(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -319,7 +319,7 @@ public: * generated or annihilate per volume unit. Positive values mean * that mass is created, negative ones mean that it vanishes. */ - void source(PrimaryVarVector &values, + void source(PrimaryVariables &values, const Element &element, const FVElementGeometry &, int subControlVolumeIdx) const @@ -333,7 +333,7 @@ public: * For this method, the \a values parameter stores primary * variables. */ - void initial(PrimaryVarVector &values, + void initial(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const diff --git a/test/boxmodels/richards/richardslensproblem.hh b/test/boxmodels/richards/richardslensproblem.hh index 6acee080c2..422e295fad 100644 --- a/test/boxmodels/richards/richardslensproblem.hh +++ b/test/boxmodels/richards/richardslensproblem.hh @@ -74,7 +74,7 @@ public: typedef Dumux::LiquidPhase<Scalar, Dumux::SimpleH2O<Scalar> > type; }; -// Set the soil properties +// Set the spatial parameters SET_PROP(RichardsLensProblem, SpatialParameters) { typedef Dumux::RichardsLensSpatialParameters<TypeTag> type; @@ -106,18 +106,18 @@ class RichardsLensProblem : public RichardsBoxProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(RichardsIndices)) Indices; enum { - numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), + numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)), // copy some indices for convenience pW = Indices::pW, // Grid and world dimension - dim = GridView::dimension, - dimWorld = GridView::dimensionworld, + dim = GridView::dimension, + dimWorld = GridView::dimensionworld, }; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(TimeManager)) TimeManager; @@ -161,7 +161,7 @@ public: * * This problem assumes a temperature of 10 degrees Celsius. */ - Scalar temperature(const Element &element, + Scalar temperature(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -189,19 +189,19 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. */ - void boundaryTypes(BoundaryTypes &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void boundaryTypes(BoundaryTypes &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { const GlobalPosition &globalPos = element.geometry().corner(scvIdx); - if (onLeftBoundary_(globalPos) || onRightBoundary_(globalPos)) + if (onLeftBoundary_(globalPos) || onRightBoundary_(globalPos)) values.setAllDirichlet(); - else + else values.setAllNeumann(); } @@ -211,10 +211,10 @@ public: * * For this method, the \a values parameter stores primary variables. */ - void dirichlet(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void dirichlet(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -242,10 +242,10 @@ public: * For this method, the \a values parameter stores the mass flux * in normal direction of each phase. Negative values mean influx. */ - void neumann(PrimaryVarVector &values, - const Element &element, - const FVElementGeometry &fvElemGeom, - const Intersection &is, + void neumann(PrimaryVariables &values, + const Element &element, + const FVElementGeometry &fvElemGeom, + const Intersection &is, int scvIdx, int boundaryFaceIdx) const { @@ -272,8 +272,8 @@ public: * unit. Positive values mean that mass is created, negative ones * mean that it vanishes. */ - void source(PrimaryVarVector &values, - const Element &element, + void source(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -286,8 +286,8 @@ public: * For this method, the \a values parameter stores primary * variables. */ - void initial(PrimaryVarVector &values, - const Element &element, + void initial(PrimaryVariables &values, + const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -330,7 +330,7 @@ private: { Scalar width = this->bboxMax()[0] - this->bboxMin()[0]; Scalar lambda = (this->bboxMax()[0] - globalPos[0])/width; - return onUpperBoundary_(globalPos) && 0.5 < lambda && lambda < 2.0/3.0; + return onUpperBoundary_(globalPos) && 0.5 < lambda && lambda < 2.0/3.0; } static const Scalar eps_ = 3e-6; diff --git a/test/boxmodels/richards/richardslensspatialparameters.hh b/test/boxmodels/richards/richardslensspatialparameters.hh index 597b732d25..6cb94765ea 100644 --- a/test/boxmodels/richards/richardslensspatialparameters.hh +++ b/test/boxmodels/richards/richardslensspatialparameters.hh @@ -99,7 +99,7 @@ public: * \param scvIdx The index sub-control volume face where the * intrinsic velocity ought to be calculated. */ - Scalar intrinsicPermeability(const Element &element, + Scalar intrinsicPermeability(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { @@ -109,13 +109,13 @@ public: return outerK_; } - Scalar porosity(const Element &element, + Scalar porosity(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { return 0.4; } // return the brooks-corey context depending on the position - const MaterialLawParams& materialLawParams(const Element &element, + const MaterialLawParams& materialLawParams(const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const { diff --git a/test/boxmodels/richards/test_richards.cc b/test/boxmodels/richards/test_richards.cc index 1cf4041922..f967971877 100644 --- a/test/boxmodels/richards/test_richards.cc +++ b/test/boxmodels/richards/test_richards.cc @@ -72,7 +72,7 @@ int main(int argc, char** argv) // create grid // -> load the grid from file - GridPointer gridPtr = GridPointer(dgfFileName); + GridPointer gridPtr = GridPointer(dgfFileName); (*gridPtr).loadBalance(); Dune::gridinfo(*gridPtr); diff --git a/test/common/pardiso/test_pardiso.cc b/test/common/pardiso/test_pardiso.cc index 880026cf55..f0216dc07a 100644 --- a/test/common/pardiso/test_pardiso.cc +++ b/test/common/pardiso/test_pardiso.cc @@ -16,30 +16,30 @@ int main(int argc, char** argv) { #ifdef HAVE_PARDISO /* Matrix data. */ - int n = 8; - int ia[ 9] = { 0, 4, 7, 9, 11, 12, 15, 17, 20 }; - int ja[20] = { 0, 2, 5, 6, - 1, 2, 4, - 2, 7, - 3, 6, + int n = 8; + int ia[ 9] = { 0, 4, 7, 9, 11, 12, 15, 17, 20 }; + int ja[20] = { 0, 2, 5, 6, + 1, 2, 4, + 2, 7, + 3, 6, 4, - 2, 5, 7, - 1, 6, - 2, 6, 7 }; - double a[20] = { 7.0, 1.0, 2.0, 7.0, - -4.0, 8.0, 2.0, - 1.0, 5.0, - 7.0, 9.0, + 2, 5, 7, + 1, 6, + 2, 6, 7 }; + double a[20] = { 7.0, 1.0, 2.0, 7.0, + -4.0, 8.0, 2.0, + 1.0, 5.0, + 7.0, 9.0, -4.0, - 7.0, 3.0, 8.0, - 1.0, 11.0, - -3.0, 2.0, 5.0 }; + 7.0, 3.0, 8.0, + 1.0, 11.0, + -3.0, 2.0, 5.0 }; - int nnz = ia[n]; + int nnz = ia[n]; int mtype = 11; /* Real unsymmetric matrix */ /* RHS and solution vectors. */ - double b[8], x[8]; + double b[8], x[8]; int nrhs = 1; /* Number of right hand sides. */ /* Internal solver memory pointer pt, */ @@ -48,15 +48,15 @@ int main(int argc, char** argv) void *pt[64]; /* Pardiso control parameters. */ - int iparm[64]; - int maxfct, mnum, phase, error, msglvl; + int iparm[64]; + int maxfct, mnum, phase, error, msglvl; /* Number of processors. */ - //int num_procs; + //int num_procs; /* Auxiliary variables. */ //char *var; - int i; + int i; double ddum; /* Double dummy */ int idum; /* Integer dummy. */ @@ -65,7 +65,7 @@ int main(int argc, char** argv) /* .. Setup Pardiso control parameters. */ /* -------------------------------------------------------------------- */ - F77_FUN(pardisoinit) (pt, &mtype, iparm); + F77_FUN(pardisoinit) (pt, &mtype, iparm); iparm[2] = 1; diff --git a/test/common/spline/test_spline.cc b/test/common/spline/test_spline.cc index 41ebc4ce3a..770242b63c 100644 --- a/test/common/spline/test_spline.cc +++ b/test/common/spline/test_spline.cc @@ -47,7 +47,7 @@ void plot(bool reallyPlot) double x_[] = { 0, 5, 7.5, 8.75, 9.375 }; double y_[] = { 10, 0, 10, 0, 10 }; - double m1 = 10; + double m1 = 10; double m2 = -10; FV &xs = *reinterpret_cast<FV*>(x_); FV &ys = *reinterpret_cast<FV*>(y_); diff --git a/test/decoupled/1p/benchmarkresult.hh b/test/decoupled/1p/benchmarkresult.hh index dd0476f9d5..80e9caec13 100644 --- a/test/decoupled/1p/benchmarkresult.hh +++ b/test/decoupled/1p/benchmarkresult.hh @@ -157,7 +157,7 @@ struct BenchmarkResult sumf += volume*(problem.source(global, element, local)[0]); // get the absolute permeability - Dune::FieldMatrix<double,dim,dim> K = problem.soil().K(global, element, local); + Dune::FieldMatrix<double,dim,dim> K = problem.spatialParameters().K(global, element, local); numerator += volume*(exactValue - approximateValue)*(exactValue - approximateValue); denominator += volume*exactValue*exactValue; @@ -558,7 +558,7 @@ struct ResultEvaluation sumf += volume*problem.source(global, element, local)[0]; // get the absolute permeability - Dune::FieldMatrix<Scalar,dim,dim> K = problem.soil().K(global, element, local); + Dune::FieldMatrix<Scalar,dim,dim> K = problem.spatialParameters().K(global, element, local); int i = -1; Dune::FieldVector<Scalar,dim> exactGradient; diff --git a/test/decoupled/1p/test_diffusion.cc b/test/decoupled/1p/test_diffusion.cc index 330a7a08bc..1223a25d82 100644 --- a/test/decoupled/1p/test_diffusion.cc +++ b/test/decoupled/1p/test_diffusion.cc @@ -39,8 +39,8 @@ int main(int argc, char** argv) { try { typedef TTAG(DiffusionTestProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; + typedef GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; static const int dim = Grid::dimension; typedef Dune::FieldVector<Scalar, dim> GlobalPosition; diff --git a/test/decoupled/1p/test_diffusion_problem.hh b/test/decoupled/1p/test_diffusion_problem.hh index 459ebbde44..280c848e74 100644 --- a/test/decoupled/1p/test_diffusion_problem.hh +++ b/test/decoupled/1p/test_diffusion_problem.hh @@ -97,7 +97,7 @@ public: typedef Dumux::LiquidPhase<Scalar, Dumux::Unit<Scalar> > type; }; -// Set the soil properties +// Set the spatial parameters SET_PROP(DiffusionTestProblem, SpatialParameters) { private: @@ -200,7 +200,7 @@ public: return "test_diffusion"; } - bool doSerialize() const + bool shouldWriteRestartFile() const { return false; } /*! diff --git a/test/decoupled/1p/test_diffusion_spatialparams.hh b/test/decoupled/1p/test_diffusion_spatialparams.hh index f532c83535..5e1813b473 100644 --- a/test/decoupled/1p/test_diffusion_spatialparams.hh +++ b/test/decoupled/1p/test_diffusion_spatialparams.hh @@ -28,14 +28,14 @@ namespace Dumux template<class TypeTag> class TestDiffusionSpatialParams { - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename Grid::ctype CoordScalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename Grid::ctype CoordScalar; enum {dim=Grid::dimension, dimWorld=Grid::dimensionworld, numEq=1}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + typedef typename Grid::Traits::template Codim<0>::Entity Element; typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; typedef Dune::FieldVector<CoordScalar, dim> LocalPosition; @@ -51,7 +51,7 @@ public: } - const FieldMatrix& intrinsicPermeability (const GlobalPosition& globalPos, const Element& element) const + const FieldMatrix& intrinsicPermeability (const GlobalPosition& globalPos, const Element& element) const { double rt = globalPos[0]*globalPos[0]+globalPos[1]*globalPos[1]; permeability_[0][0] = (delta_*globalPos[0]*globalPos[0] + globalPos[1]*globalPos[1])/rt; diff --git a/test/decoupled/2p/test_2p.cc b/test/decoupled/2p/test_2p.cc index 14ca61e8fe..45a956f9c1 100644 --- a/test/decoupled/2p/test_2p.cc +++ b/test/decoupled/2p/test_2p.cc @@ -41,8 +41,8 @@ int main(int argc, char** argv) { try { typedef TTAG(TwoPTestProblem) TypeTag; - typedef GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; + typedef GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; typedef GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef Dune::FieldVector<Scalar, Grid::dimensionworld> GlobalPosition; diff --git a/test/decoupled/2p/test_2p_problem.hh b/test/decoupled/2p/test_2p_problem.hh index 7574bc341b..42fbbc32e7 100644 --- a/test/decoupled/2p/test_2p_problem.hh +++ b/test/decoupled/2p/test_2p_problem.hh @@ -103,7 +103,7 @@ public: typedef Dumux::LiquidPhase<Scalar, Dumux::SimpleH2O<Scalar> > type; }; -// Set the soil properties +// Set the spatial parameters SET_PROP(TwoPTestProblem, SpatialParameters) { private: diff --git a/test/decoupled/2p/test_2p_spatialparams.hh b/test/decoupled/2p/test_2p_spatialparams.hh index effd44dd19..867e28cbec 100644 --- a/test/decoupled/2p/test_2p_spatialparams.hh +++ b/test/decoupled/2p/test_2p_spatialparams.hh @@ -30,14 +30,14 @@ namespace Dumux template<class TypeTag> class Test2PSpatialParams { - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename Grid::ctype CoordScalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename Grid::ctype CoordScalar; enum {dim=Grid::dimension, dimWorld=Grid::dimensionworld, numEq=1}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + typedef typename Grid::Traits::template Codim<0>::Entity Element; typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; typedef Dune::FieldVector<CoordScalar, dim> LocalPosition; @@ -54,7 +54,7 @@ public: } - const FieldMatrix& intrinsicPermeability (const GlobalPosition& globalPos, const Element& element) const + const FieldMatrix& intrinsicPermeability (const GlobalPosition& globalPos, const Element& element) const { return constPermeability_; } diff --git a/tutorial/tutorial_decoupled.cc b/tutorial/tutorial_decoupled.cc index 37b7f5c630..78b1babf35 100644 --- a/tutorial/tutorial_decoupled.cc +++ b/tutorial/tutorial_decoupled.cc @@ -41,8 +41,8 @@ int main(int argc, char** argv) { try { typedef TTAG(TutorialProblemDecoupled) TypeTag; - typedef GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; + typedef GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; typedef GET_PROP_TYPE(TypeTag, PTAG(Problem)) Problem; typedef Dune::FieldVector<Scalar, Grid::dimensionworld> GlobalPosition; diff --git a/tutorial/tutorialproblem_coupled.hh b/tutorial/tutorialproblem_coupled.hh index 702192355b..c01132abb5 100644 --- a/tutorial/tutorialproblem_coupled.hh +++ b/tutorial/tutorialproblem_coupled.hh @@ -27,7 +27,7 @@ #include <dune/grid/yaspgrid.hh> #include <dune/grid/io/file/dgfparser/dgfs.hh> -// assign parameters dependent on space (e.g. soil properties) +// assign parameters dependent on space (e.g. spatial parameters) #include "tutorialspatialparameters_coupled.hh" namespace Dumux @@ -109,10 +109,10 @@ class TutorialProblemCoupled : public TwoPProblem<TypeTag> /*@\label{tutorial-co typedef Dune::FieldVector<CoordScalar, dim> LocalPosition; typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVarVector)) PrimaryVarVector; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables; typedef typename GET_PROP_TYPE(TypeTag, PTAG(BoundaryTypes)) BoundaryTypes; typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry; - + public: TutorialProblemCoupled(TimeManager &timeManager, const GridView &gridView) @@ -145,7 +145,7 @@ public: // Evaluate the boundary conditions for a dirichlet boundary // segment. For this method, the 'values' parameter stores // primary variables. - void dirichlet(PrimaryVarVector &values, + void dirichlet(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvElemGeom, const Intersection &isIt, @@ -160,7 +160,7 @@ public: // segment. For this method, the 'values' parameter stores the // mass flux in normal direction of each phase. Negative values // mean influx. - void neumann(PrimaryVarVector &values, + void neumann(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvElemGeom, const Intersection &isIt, @@ -184,7 +184,7 @@ public: // Evaluate the initial value for a control volume. For this // method, the 'values' parameter stores primary variables. - void initial(PrimaryVarVector &values, + void initial(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const @@ -198,7 +198,7 @@ public: // stores the rate mass generated or annihilate per volume // unit. Positive values mean that mass is created, negative ones // mean that it vanishes. - void source(PrimaryVarVector &values, + void source(PrimaryVariables &values, const Element &element, const FVElementGeometry &fvElemGeom, int scvIdx) const diff --git a/tutorial/tutorialproblem_decoupled.hh b/tutorial/tutorialproblem_decoupled.hh index 273e9cacba..31117dfa07 100644 --- a/tutorial/tutorialproblem_decoupled.hh +++ b/tutorial/tutorialproblem_decoupled.hh @@ -99,7 +99,7 @@ public: typedef Dumux::LiquidPhase<Scalar, Dumux::Oil<Scalar> > type; }; -// Set the soil properties +// Set the spatial parameters SET_PROP(TutorialProblemDecoupled, SpatialParameters) { private: diff --git a/tutorial/tutorialspatialparameters_decoupled.hh b/tutorial/tutorialspatialparameters_decoupled.hh index f6da7012ea..545dfdaf51 100644 --- a/tutorial/tutorialspatialparameters_decoupled.hh +++ b/tutorial/tutorialspatialparameters_decoupled.hh @@ -29,14 +29,14 @@ namespace Dumux template<class TypeTag> class TutorialSpatialParametersDecoupled { - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Grid)) Grid; typedef typename GET_PROP_TYPE(TypeTag, PTAG(GridView)) GridView; - typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - typedef typename Grid::ctype CoordScalar; + typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; + typedef typename Grid::ctype CoordScalar; enum {dim=Grid::dimension, dimWorld=Grid::dimensionworld, numEq=1}; - typedef typename Grid::Traits::template Codim<0>::Entity Element; + typedef typename Grid::Traits::template Codim<0>::Entity Element; typedef Dune::FieldVector<CoordScalar, dimWorld> GlobalPosition; typedef Dune::FieldVector<CoordScalar, dim> LocalPosition; @@ -53,7 +53,7 @@ public: } - const FieldMatrix& intrinsicPermeability (const GlobalPosition& globalPos, const Element& element) const + const FieldMatrix& intrinsicPermeability (const GlobalPosition& globalPos, const Element& element) const { return K_; } -- GitLab