Skip to content
Snippets Groups Projects
Commit 5727d7bd authored by Alexander Kissinger's avatar Alexander Kissinger
Browse files

new naming convention second session

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@8203 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent b212e37f
No related branches found
No related tags found
No related merge requests found
...@@ -59,7 +59,7 @@ class RichardsFluxVariables ...@@ -59,7 +59,7 @@ class RichardsFluxVariables
typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar;
typedef Dune::FieldVector<Scalar, dim> DimVector; typedef Dune::FieldVector<Scalar, dim> DimVector;
typedef Dune::FieldMatrix<Scalar, dim, dim> DimTensor; typedef Dune::FieldMatrix<Scalar, dim, dim> DimMatrix;
typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry; typedef typename GET_PROP_TYPE(TypeTag, FVElementGeometry) FVElementGeometry;
typedef typename FVElementGeometry::SubControlVolumeFace SCVFace; typedef typename FVElementGeometry::SubControlVolumeFace SCVFace;
...@@ -95,7 +95,7 @@ public: ...@@ -95,7 +95,7 @@ public:
/*! /*!
* \brief Return the intrinsic permeability \f$\mathrm{[m^2]}\f$. * \brief Return the intrinsic permeability \f$\mathrm{[m^2]}\f$.
*/ */
const DimTensor &intrinsicPermeability() const const DimMatrix &intrinsicPermeability() const
{ return K_; } { return K_; }
/*! /*!
...@@ -220,7 +220,7 @@ protected: ...@@ -220,7 +220,7 @@ protected:
DimVector potentialGrad_; DimVector potentialGrad_;
// intrinsic permeability // intrinsic permeability
DimTensor K_; DimMatrix K_;
}; };
} // end namepace } // end namepace
......
...@@ -85,7 +85,7 @@ public: ...@@ -85,7 +85,7 @@ public:
* \param usePrevSol Calculate the storage term of the previous solution * \param usePrevSol Calculate the storage term of the previous solution
* instead of the model's current solution. * instead of the model's current solution.
*/ */
void computeStorage(PrimaryVariables &storage, int scvIdx, bool usePrevSol) const void computeStorage(PrimaryVariables &storage, const int scvIdx, bool usePrevSol) const
{ {
// if flag usePrevSol is set, the solution from the previous // if flag usePrevSol is set, the solution from the previous
// time step is used, otherwise the current solution is // time step is used, otherwise the current solution is
...@@ -117,7 +117,7 @@ public: ...@@ -117,7 +117,7 @@ public:
* \param onBoundary A boolean variable to specify whether the flux variables * \param onBoundary A boolean variable to specify whether the flux variables
* are calculated for interior SCV faces or boundary faces, default=false * are calculated for interior SCV faces or boundary faces, default=false
*/ */
void computeFlux(PrimaryVariables &flux, int faceIdx, bool onBoundary=false) const void computeFlux(PrimaryVariables &flux, const int faceIdx, bool onBoundary=false) const
{ {
FluxVariables fluxVars(this->problem_(), FluxVariables fluxVars(this->problem_(),
this->element_(), this->element_(),
...@@ -154,7 +154,7 @@ public: ...@@ -154,7 +154,7 @@ public:
* \param scvIdx The sub control volume index inside the current * \param scvIdx The sub control volume index inside the current
* element * element
*/ */
void computeSource(PrimaryVariables &source, int scvIdx) void computeSource(PrimaryVariables &source, const int scvIdx)
{ {
this->problem_().boxSDSource(source, this->problem_().boxSDSource(source,
this->element_(), this->element_(),
......
...@@ -117,7 +117,7 @@ public: ...@@ -117,7 +117,7 @@ public:
* \param vertIdx The global index of the vertex in question * \param vertIdx The global index of the vertex in question
* \param pvIdx The index of the primary variable * \param pvIdx The index of the primary variable
*/ */
Scalar primaryVarWeight(int vertIdx, int pvIdx) const Scalar primaryVarWeight(const int vertIdx, const int pvIdx) const
{ {
if (Indices::pwIdx == pvIdx) if (Indices::pwIdx == pvIdx)
return 1e-6; return 1e-6;
......
...@@ -91,20 +91,20 @@ public: ...@@ -91,20 +91,20 @@ public:
// clamp saturation change to at most 20% per iteration // clamp saturation change to at most 20% per iteration
FVElementGeometry fvGeomtry; FVElementGeometry fvGeomtry;
const GridView &gv = this->problem_().gridView(); const GridView &gridView = this->problem_().gridView();
ElementIterator eIt = gv.template begin<0>(); ElementIterator elemIt = gridView.template begin<0>();
const ElementIterator eEndIt = gv.template end<0>(); const ElementIterator elemEndIt = gridView.template end<0>();
for (; eIt != eEndIt; ++eIt) { for (; elemIt != elemEndIt; ++elemIt) {
fvGeomtry.update(gv, *eIt); fvGeomtry.update(gridView, *elemIt);
for (int i = 0; i < fvGeomtry.numVertices; ++i) { for (int i = 0; i < fvGeomtry.numVertices; ++i) {
int globI = this->problem_().vertexMapper().map(*eIt, i, dim); int globI = this->problem_().vertexMapper().map(*elemIt, i, dim);
// calculate the old wetting phase saturation // calculate the old wetting phase saturation
const SpatialParams &spatialParams = this->problem_().spatialParams(); const SpatialParams &spatialParams = this->problem_().spatialParams();
const MaterialLawParams &mp = spatialParams.materialLawParams(*eIt, fvGeomtry, i); const MaterialLawParams &mp = spatialParams.materialLawParams(*elemIt, fvGeomtry, i);
Scalar pcMin = MaterialLaw::pC(mp, 1.0); Scalar pcMin = MaterialLaw::pC(mp, 1.0);
Scalar pW = uLastIter[globI][pwIdx]; Scalar pW = uLastIter[globI][pwIdx];
Scalar pN = std::max(this->problem_().referencePressure(*eIt, fvGeomtry, i), Scalar pN = std::max(this->problem_().referencePressure(*elemIt, fvGeomtry, i),
pW + pcMin); pW + pcMin);
Scalar pcOld = pN - pW; Scalar pcOld = pN - pW;
Scalar SwOld = std::max<Scalar>(0.0, MaterialLaw::Sw(mp, pcOld)); Scalar SwOld = std::max<Scalar>(0.0, MaterialLaw::Sw(mp, pcOld));
......
...@@ -85,7 +85,7 @@ public: ...@@ -85,7 +85,7 @@ public:
*/ */
Scalar referencePressure(const Element &element, Scalar referencePressure(const Element &element,
const FVElementGeometry fvGeometry, const FVElementGeometry fvGeometry,
int scvIdx) const const int scvIdx) const
{ DUNE_THROW(Dune::NotImplemented, "referencePressure() method not implemented by the actual problem"); }; { DUNE_THROW(Dune::NotImplemented, "referencePressure() method not implemented by the actual problem"); };
// \} // \}
}; };
......
...@@ -85,23 +85,23 @@ public: ...@@ -85,23 +85,23 @@ public:
* \param isOldSol Specifies whether the solution is from * \param isOldSol Specifies whether the solution is from
* the previous time step or from the current one * the previous time step or from the current one
*/ */
void update(const PrimaryVariables &primaryVariables, void update(const PrimaryVariables &priVars,
const Problem &problem, const Problem &problem,
const Element &element, const Element &element,
const FVElementGeometry &fvGeometry, const FVElementGeometry &fvGeometry,
int scvIdx, const int scvIdx,
bool isOldSol) const bool isOldSol)
{ {
assert(!FluidSystem::isLiquid(nPhaseIdx)); assert(!FluidSystem::isLiquid(nPhaseIdx));
ParentType::update(primaryVariables, ParentType::update(priVars,
problem, problem,
element, element,
fvGeometry, fvGeometry,
scvIdx, scvIdx,
isOldSol); isOldSol);
completeFluidState(primaryVariables, problem, element, fvGeometry, scvIdx, fluidState_); completeFluidState(priVars, problem, element, fvGeometry, scvIdx, fluidState_);
////////// //////////
// specify the other parameters // specify the other parameters
...@@ -115,21 +115,21 @@ public: ...@@ -115,21 +115,21 @@ public:
porosity_ = problem.spatialParams().porosity(element, fvGeometry, scvIdx); porosity_ = problem.spatialParams().porosity(element, fvGeometry, scvIdx);
// energy related quantities not contained in the fluid state // energy related quantities not contained in the fluid state
asImp_().updateEnergy_(primaryVariables, problem, element, fvGeometry, scvIdx, isOldSol); asImp_().updateEnergy_(priVars, problem, element, fvGeometry, scvIdx, isOldSol);
} }
/*! /*!
* \copydoc BoxModel::completeFluidState * \copydoc BoxModel::completeFluidState
*/ */
static void completeFluidState(const PrimaryVariables& primaryVariables, static void completeFluidState(const PrimaryVariables& priVars,
const Problem& problem, const Problem& problem,
const Element& element, const Element& element,
const FVElementGeometry& fvGeometry, const FVElementGeometry& fvGeometry,
int scvIdx, const int scvIdx,
FluidState& fluidState) FluidState& fluidState)
{ {
// temperature // temperature
Scalar t = Implementation::temperature_(primaryVariables, problem, element, Scalar t = Implementation::temperature_(priVars, problem, element,
fvGeometry, scvIdx); fvGeometry, scvIdx);
fluidState.setTemperature(t); fluidState.setTemperature(t);
...@@ -138,8 +138,8 @@ public: ...@@ -138,8 +138,8 @@ public:
const MaterialLawParams &matParams = const MaterialLawParams &matParams =
problem.spatialParams().materialLawParams(element, fvGeometry, scvIdx); problem.spatialParams().materialLawParams(element, fvGeometry, scvIdx);
Scalar minPc = MaterialLaw::pC(matParams, 1.0); Scalar minPc = MaterialLaw::pC(matParams, 1.0);
fluidState.setPressure(wPhaseIdx, primaryVariables[pwIdx]); fluidState.setPressure(wPhaseIdx, priVars[pwIdx]);
fluidState.setPressure(nPhaseIdx, std::max(pnRef, primaryVariables[pwIdx] + minPc)); fluidState.setPressure(nPhaseIdx, std::max(pnRef, priVars[pwIdx] + minPc));
// saturations // saturations
Scalar Sw = MaterialLaw::Sw(matParams, fluidState.pressure(nPhaseIdx) - fluidState.pressure(wPhaseIdx)); Scalar Sw = MaterialLaw::Sw(matParams, fluidState.pressure(nPhaseIdx) - fluidState.pressure(wPhaseIdx));
...@@ -182,7 +182,7 @@ public: ...@@ -182,7 +182,7 @@ public:
* *
* \param phaseIdx The index of the fluid phase * \param phaseIdx The index of the fluid phase
*/ */
Scalar saturation(int phaseIdx) const Scalar saturation(const int phaseIdx) const
{ return fluidState_.saturation(phaseIdx); } { return fluidState_.saturation(phaseIdx); }
/*! /*!
...@@ -191,7 +191,7 @@ public: ...@@ -191,7 +191,7 @@ public:
* *
* \param phaseIdx The index of the fluid phase * \param phaseIdx The index of the fluid phase
*/ */
Scalar density(int phaseIdx) const Scalar density(const int phaseIdx) const
{ return fluidState_.density(phaseIdx); } { return fluidState_.density(phaseIdx); }
/*! /*!
...@@ -205,7 +205,7 @@ public: ...@@ -205,7 +205,7 @@ public:
* *
* \param phaseIdx The index of the fluid phase * \param phaseIdx The index of the fluid phase
*/ */
Scalar pressure(int phaseIdx) const Scalar pressure(const int phaseIdx) const
{ return fluidState_.pressure(phaseIdx); } { return fluidState_.pressure(phaseIdx); }
/*! /*!
...@@ -229,7 +229,7 @@ public: ...@@ -229,7 +229,7 @@ public:
* *
* \param phaseIdx The index of the fluid phase * \param phaseIdx The index of the fluid phase
*/ */
Scalar mobility(int phaseIdx) const Scalar mobility(const int phaseIdx) const
{ return relativePermeability(phaseIdx)/fluidState_.viscosity(phaseIdx); } { return relativePermeability(phaseIdx)/fluidState_.viscosity(phaseIdx); }
/*! /*!
...@@ -238,7 +238,7 @@ public: ...@@ -238,7 +238,7 @@ public:
* *
* \param phaseIdx The index of the fluid phase * \param phaseIdx The index of the fluid phase
*/ */
Scalar relativePermeability(int phaseIdx) const Scalar relativePermeability(const int phaseIdx) const
{ {
if (phaseIdx == wPhaseIdx) if (phaseIdx == wPhaseIdx)
return relativePermeabilityWetting_; return relativePermeabilityWetting_;
...@@ -261,7 +261,7 @@ protected: ...@@ -261,7 +261,7 @@ protected:
const Problem& problem, const Problem& problem,
const Element &element, const Element &element,
const FVElementGeometry &fvGeometry, const FVElementGeometry &fvGeometry,
int scvIdx) const int scvIdx)
{ {
return problem.boxTemperature(element, fvGeometry, scvIdx); return problem.boxTemperature(element, fvGeometry, scvIdx);
} }
...@@ -269,12 +269,12 @@ protected: ...@@ -269,12 +269,12 @@ protected:
/*! /*!
* \brief Called by update() to compute the energy related quantities * \brief Called by update() to compute the energy related quantities
*/ */
void updateEnergy_(const PrimaryVariables &sol, void updateEnergy_(const PrimaryVariables &priVars,
const Problem &problem, const Problem &problem,
const Element &element, const Element &element,
const FVElementGeometry &fvGeometry, const FVElementGeometry &fvGeometry,
int scvIdx, const int scvIdx,
bool isOldSol) const bool isOldSol)
{ } { }
FluidState fluidState_; FluidState fluidState_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment