Commit 82dd0ac4 authored by Andreas Lauser's avatar Andreas Lauser
Browse files

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
parent df743a4f
// $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;
......
......@@ -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:
......
......@@ -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;
};
}
......
......@@ -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;
......
......@@ -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);
......
// $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_;
};
}
......
......@@ -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);
......
// $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);
......
......@@ -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_(),
......
......@@ -43,7 +43,7 @@ namespace Dumux
* approach (neglecting gravitation) as the equation for the conservation of momentum: