Commit f7ffa662 authored by Andreas Lauser's avatar Andreas Lauser
Browse files

remove trailing white space. really.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@5054 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent b5b4378b
......@@ -151,7 +151,7 @@ class LensProblem : public TwoPProblem<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FluidSystem)) FluidSystem;
typedef TwoPFluidState<TypeTag> FluidState;
enum
enum
{
numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)),
......
......@@ -24,7 +24,7 @@
*
* \brief This file contains the data which is required to calculate
* the flux of the fluid over a face of a finite volume for the one-phase model.
*
*
* This means pressure and temperature gradients, phase densities at
* the integration point, etc.
*/
......@@ -118,10 +118,10 @@ public:
* potential gradient and SCV face normal for a phase,
* return the local index of the upstream control volume
* for a given phase.
*
*
* \param normalFlux The normal flux i.e. the given intrinsic permeability
* times the pressure potential gradient and SCV face normal.
*
*
*/
int upstreamIdx(Scalar normalFlux) const
{ return (normalFlux >= 0)?face().i:face().j; }
......@@ -131,10 +131,10 @@ public:
* potential gradient and SCV face normal for a phase,
* return the local index of the downstream control volume
* for a given phase.
*
*
* \param normalFlux The normal flux i.e. the given intrinsic permeability
* times the pressure potential gradient and SCV face normal.
*
*
*/
int downstreamIdx(Scalar normalFlux) const
{ return (normalFlux >= 0)?face().j:face().i; }
......@@ -159,7 +159,7 @@ private:
Vector tmp(feGrad);
tmp *= elemDat[idx].pressure();
potentialGrad_ += tmp;
// fluid density
densityAtIP +=
elemDat[idx].density()*face().shapeValue[idx];
......
......@@ -113,8 +113,8 @@ public:
/*!
* \brief Evaluates the mass flux over a face of a subcontrol
* volume.
*
* \param flux The flux over the SCV (sub-control-volume) face
*
* \param flux The flux over the SCV (sub-control-volume) face
* \param faceIdx The index of the SCV face
*/
void computeFlux(PrimaryVariables &flux, int faceIdx) const
......@@ -124,7 +124,7 @@ public:
this->fvElemGeom_(),
faceIdx,
this->curVolVars_());
Vector tmpVec;
fluxVars.intrinsicPermeability().mv(fluxVars.potentialGrad(),
tmpVec);
......@@ -132,8 +132,8 @@ public:
const VolumeVariables &up = this->curVolVars_(fluxVars.upstreamIdx(normalFlux));
const VolumeVariables &dn = this->curVolVars_(fluxVars.downstreamIdx(normalFlux));
flux[pressureIdx] =
(( upwindWeight)*(up.density()/up.viscosity())
flux[pressureIdx] =
(( upwindWeight)*(up.density()/up.viscosity())
+
(1 - upwindWeight)*(dn.density()/dn.viscosity()))
*
......@@ -143,7 +143,7 @@ public:
/*!
* \brief Calculate the source term of the equation
*
* \param q The source/sink in the SCV
* \param q The source/sink in the SCV
* \param localVertexIdx The index of the SCV
*
*/
......
......@@ -67,7 +67,7 @@ class OnePVolumeVariables : public BoxVolumeVariables<TypeTag>
public:
/*!
* \brief Update all quantities for a given control volume.
*
*
* \param priVars The local primary variable vector
* \param problem The problem object
* \param element The current element
......@@ -99,7 +99,7 @@ public:
elemGeom,
scvIdx);
};
/*!
* \brief Returns temperature inside the sub-control volume.
*
......
......@@ -52,7 +52,7 @@ class OnePTwoCFluidState : public FluidState<typename GET_PROP_TYPE(TypeTag, PTA
contiEqIdx = Indices::contiEqIdx,
transEqIdx = Indices::transEqIdx,
phaseIndex = GET_PROP_VALUE(TypeTag, PTAG(PhaseIndex)),
comp1Index = GET_PROP_VALUE(TypeTag, PTAG(Comp1Index)),
comp2Index = GET_PROP_VALUE(TypeTag, PTAG(Comp2Index)),
......@@ -77,10 +77,10 @@ public:
phasePressure_ = primaryVars[pressureIdx];
x1_ = primaryVars[x1Idx];
meanMolarMass_ =
meanMolarMass_ =
(1 - x1_)*FluidSystem::molarMass(comp1Index) +
(x1_ )*FluidSystem::molarMass(comp2Index);
density_ = FluidSystem::phaseDensity(phaseIndex, temperature_, phasePressure_, *this);
Valgrind::CheckDefined(x1_);
......@@ -106,10 +106,10 @@ public:
* \param compIdx The index of the considered component
*/
Scalar moleFrac(int phaseIdx, int compIdx) const
{
{
// we are a single phase model!
if (phaseIdx != phaseIndex) return 0.0;
if (compIdx==comp1Index)
return 1-x1_;
else if (compIdx==comp2Index)
......@@ -124,8 +124,8 @@ public:
* \param phaseIdx The index of the considered phase
*/
Scalar phaseConcentration(int phaseIdx) const
{
if (phaseIdx != phaseIndex)
{
if (phaseIdx != phaseIndex)
return 0;
return density_/meanMolarMass_;
};
......@@ -148,7 +148,7 @@ public:
*/
Scalar massFrac(int phaseIdx, int compIdx) const
{
if (phaseIdx != phaseIndex)
if (phaseIdx != phaseIndex)
return 0;
return
moleFrac(phaseIdx, compIdx)*
......@@ -164,7 +164,7 @@ public:
*
*/
Scalar density(int phaseIdx) const
{
{
if (phaseIdx != phaseIndex)
return 0;
return density_;
......@@ -179,19 +179,19 @@ public:
* \param phaseIdx The index of the considered phase
*/
Scalar meanMolarMass(int phaseIdx) const
{
if (phaseIdx != phaseIndex)
{
if (phaseIdx != phaseIndex)
return 0;
return meanMolarMass_;
};
/*!
* \brief Returns the pressure of a fluid phase \f$\mathrm{[Pa]}\f$.
*
* \param phaseIdx The index of the considered phase
*/
Scalar phasePressure(int phaseIdx) const
{
{
return phasePressure_;
}
......
......@@ -28,7 +28,7 @@
*
* This means pressure and temperature gradients, phase densities at
* the integration point, etc.
*
*
* \ingroup OnePTwoCBoxModel
*/
#ifndef DUMUX_1P2C_FLUX_VARIABLES_HH
......@@ -124,9 +124,9 @@ public:
* \param compIdx The index of the considered component
*/
const Vector &concentrationGrad(int compIdx) const
{
if (compIdx != 1)
{ DUNE_THROW(Dune::InvalidStateException,
{
if (compIdx != 1)
{ DUNE_THROW(Dune::InvalidStateException,
"The 1p2c model is supposed to need "
"only the concentration gradient of "
"the second component!"); }
......@@ -177,7 +177,7 @@ protected:
{
const VolumeVariables &vVars_i = elemDat[face().i];
const VolumeVariables &vVars_j = elemDat[face().j];
potentialGrad_ = 0.0;
concentrationGrad_ = 0.0;
......@@ -302,7 +302,7 @@ protected:
for (int i=0; i<dim; i++)
for (int j = 0; j<dim; j++)
dispersionTensor_[i][j]=velocity[i]*velocity[j];
//normalize velocity product --> vv^T/||v||, [m/s]
Scalar vNorm = velocity.two_norm();
......@@ -328,7 +328,7 @@ protected:
//! the effective diffusion coefficent in the porous medium
Scalar diffCoeffPM_;
//! the dispersion tensor in the porous medium
Tensor dispersionTensor_;
......
......@@ -43,12 +43,12 @@
namespace Dumux
{
/*!
*
*
* \ingroup OnePTwoCBoxModel
*
*
* \brief Calculate the local Jacobian for the single-phase,
* two-component model in the BOX scheme.
*
*
* This class is used to fill the gaps in BoxLocalResidual for the 1P-2C flow.
*/
template<class TypeTag>
......@@ -104,18 +104,18 @@ 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 VolumeVariables &volVars =
const VolumeVariables &volVars =
usePrevSol ?
this->prevVolVars_(scvIdx) :
this->prevVolVars_(scvIdx) :
this->curVolVars_(scvIdx);
// storage term of continuity equation
result[contiEqIdx] =
result[contiEqIdx] =
volVars.density()*volVars.porosity();
// storage term of the transport equation
result[transEqIdx] =
volVars.concentration(1) *
result[transEqIdx] =
volVars.concentration(1) *
volVars.porosity();
}
......@@ -134,7 +134,7 @@ public:
this->fvElemGeom_(),
faceId,
this->curVolVars_());
Vector tmpVec;
fluxVars.intrinsicPermeability().mv(fluxVars.potentialGrad(), tmpVec);
......@@ -143,23 +143,23 @@ public:
Scalar normalFlux = - (tmpVec*fluxVars.face().normal);
const VolumeVariables &up = this->curVolVars_(fluxVars.upstreamIdx(normalFlux));
const VolumeVariables &dn = this->curVolVars_(fluxVars.downstreamIdx(normalFlux));
// total mass flux
flux[contiEqIdx] =
normalFlux *
flux[contiEqIdx] =
normalFlux *
(( upwindAlpha)*up.density()/up.viscosity()
+
((1 - upwindAlpha)*dn.density()/dn.viscosity()));
// advective flux of the second component
flux[transEqIdx] +=
normalFlux *
normalFlux *
(( upwindAlpha)*up.concentration(1)/up.viscosity()
+
(1 - upwindAlpha)*dn.concentration(1)/dn.viscosity());
// diffusive flux of second component
flux[transEqIdx] -=
flux[transEqIdx] -=
fluxVars.porousDiffCoeff() *
(fluxVars.concentrationGrad(1) * fluxVars.face().normal);
......
......@@ -65,7 +65,7 @@ class OnePTwoCVolumeVariables : public BoxVolumeVariables<TypeTag>
phaseIndex = GET_PROP_VALUE(TypeTag, PTAG(PhaseIndex)),
comp1Index = GET_PROP_VALUE(TypeTag, PTAG(Comp1Index)),
comp2Index = GET_PROP_VALUE(TypeTag, PTAG(Comp2Index)),
contiEqIdx = Indices::contiEqIdx,
transEqIdx = Indices::transEqIdx
};
......@@ -105,7 +105,7 @@ public:
temperature,
pressure(),
fluidState_);
diffCoeff_ = FluidSystem::diffCoeff(phaseIndex,
diffCoeff_ = FluidSystem::diffCoeff(phaseIndex,
comp1Index,
comp2Index,
temperature,
......@@ -120,7 +120,7 @@ public:
Valgrind::CheckDefined(fluidState_);
Valgrind::CheckDefined(*this);
}
/*!
* \brief Return the fluid configuration at the given primary
* variables
......@@ -155,7 +155,7 @@ public:
*/
Scalar concentration(int compIdx) const
{ return fluidState_.concentration(phaseIndex, (compIdx==0)?comp1Index:comp2Index); }
/*!
* \brief Returns the effective pressure of a given phase within
* the control volume.
......@@ -202,7 +202,7 @@ public:
* \brief Returns the average porosity within the control volume.
*/
Scalar porosity() const
{ return porosity_; }
{ return porosity_; }
protected:
Scalar porosity_;
......
......@@ -119,7 +119,7 @@ public:
{
return massFrac(phaseIdx, compIdx);
}
/*!
* \brief Returns the molar density of a phase \f$\mathrm{[mol/m^3]}\f$.
*
......@@ -142,7 +142,7 @@ public:
return phaseConcentration(phaseIdx);
return 0;
};
/*!
* \brief Returns the density of a phase \f$\mathrm{[kg/m^3]}\f$.
*
......@@ -168,7 +168,7 @@ public:
return 0;
return phasePressure_[nPhaseIdx];
}
/*!
* \brief Returns the pressure of a fluid phase \f$\mathrm{[Pa]}\f$.
*
......
......@@ -174,10 +174,10 @@ public:
// add advective flux of current component in current
// phase
int eqIdx = (phaseIdx == wPhaseIdx) ? contiWEqIdx : contiNEqIdx;
flux[eqIdx] +=
flux[eqIdx] +=
normalFlux
*
(( mobilityUpwindAlpha)*up.density(phaseIdx)*up.mobility(phaseIdx)
(( mobilityUpwindAlpha)*up.density(phaseIdx)*up.mobility(phaseIdx)
+
(1 - mobilityUpwindAlpha)*dn.density(phaseIdx)*dn.mobility(phaseIdx));
}
......
......@@ -58,7 +58,7 @@ class TwoPVolumeVariables : public BoxVolumeVariables<TypeTag>
typedef typename GET_PROP_TYPE(TypeTag, PTAG(FVElementGeometry)) FVElementGeometry;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(PrimaryVariables)) PrimaryVariables;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(TwoPIndices)) Indices;
enum {
numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq)),
numPhases = GET_PROP_VALUE(TypeTag, PTAG(NumPhases)),
......
......@@ -141,7 +141,7 @@ public:
bcTypes.update(this->problem_(), element, fvGeom);
ElementVolumeVariables volVars;
volVars.update(this->problem_(), element, fvGeom, false);
this->residual_.resize(fvGeom.numVertices);
this->residual_ = 0;
......@@ -152,7 +152,7 @@ public:
this->curVolVarsPtr_ = &volVars;
evalPhaseStorage_(phaseIdx);
}
/*!
* \brief Evaluate the amount all conservation quantities
* (e.g. phase mass) within a sub-control volume.
......@@ -300,7 +300,7 @@ protected:
PrimaryVariables &result = this->residual_[i];
const ElementVolumeVariables &elemVolVars = this->curVolVars_();
const VolumeVariables &volVars = elemVolVars[i];
// compute storage term of all components within all phases
result = 0;
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
......
......@@ -238,8 +238,8 @@ public:
/*!
* \brief Called by the problem if a time integration was
* successful, post processing of the solution is done and the
* result has been written to disk.
* successful, post processing of the solution is done and the
* result has been written to disk.
*
* This should prepare the model for the next time integration.
*/
......@@ -560,7 +560,7 @@ public:
const GlobalPosition &global = it->geometry().corner(i);
if (primaryVarSwitch_(curGlobalSol,
volVars,
globalIdx,
globalIdx,
global))
wasSwitched = true;
}
......
......@@ -146,7 +146,7 @@ public:
};
private:
void lineSearchUpdate_(SolutionVector &uCurrentIter,
void lineSearchUpdate_(SolutionVector &uCurrentIter,
const SolutionVector &uLastIter,
const SolutionVector &deltaU)
{
......
......@@ -52,7 +52,7 @@ class TwoPTwoCVolumeVariables : public BoxVolumeVariables<TypeTag>
{
typedef BoxVolumeVariables<TypeTag> ParentType;
typedef typename GET_PROP_TYPE(TypeTag, PTAG(VolumeVariables)) Implementation;
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;
......
......@@ -27,7 +27,7 @@
/*!
* \file
*
* \brief Defines default values for most properties required by the 2p2cni
* \brief Defines default values for most properties required by the 2p2cni
* box model.
*/
#ifndef DUMUX_2P2CNI_PROPERTY_DEFAULTS_HH
......
......@@ -153,7 +153,7 @@ public:
const VolumeVariables &dn = this->curVolVars_(fluxVars.downstreamIdx(normalFlux));
// add advective energy flux in current phase
flux[energyEqIdx] +=
flux[energyEqIdx] +=
normalFlux
*
(( mobilityUpwindAlpha)*
......
......@@ -66,7 +66,7 @@ class TwoPNIVolumeVariables : public TwoPVolumeVariables<TypeTag>
public:
/*!
* \brief Update all quantities for a given control volume.
*
*
* \param priVars The local primary variable vector
* \param problem The problem object
* \param element The current element
......
......@@ -96,8 +96,8 @@ public:
* Vertex/element that needs to be reassembled because some
* relative error is above the tolerance
*/
Red,
Red,
/*!
* Vertex/element that needs to be reassembled because a
* neighboring element/vertex is red
......@@ -106,7 +106,7 @@ public:
/*!
* Yellow vertex has only non-green neighbor elements.
*
*
* This means that its relative error is below the tolerance,
* but its defect can be linearized without any additional
* cost. This is just an "internal" color which is not used
......@@ -198,13 +198,13 @@ public:
// vector
*matrix_ = 0;
reuseMatrix_ = false;
int numVerts = gridView_().size(dim);
int numElems = gridView_().size(0);
residual_.resize(numVerts);
totalElems_ = gridView_().comm().sum(numElems);
// initialize data needed for partial reassembly
if (enablePartialReassemble) {
vertexColor_.resize(numVerts);
......@@ -213,7 +213,7 @@ public:
}
reassembleAll();
}
/*!
* \brief Assemble the local jacobian of the problem.
*
......@@ -223,7 +223,7 @@ public:
void assemble()
{
resetSystem_();
greenElems_ = 0;
ElementIterator elemIt = gridView_().template begin<0>();
......@@ -235,21 +235,21 @@ public:
else
assembleElement_(elem);
};
if (enablePartialReassemble) {
greenElems_ = gridView_().comm().sum(greenElems_);
reassembleTolerance_ = nextReassembleTolerance_;
// print some information at the end of the iteration
problem_().newtonController().endIterMsg()
<< ", reassembled "
<< ", reassembled "
<< totalElems_ - greenElems_ << "/" << totalElems_
<< " (" << 100*Scalar(totalElems_ - greenElems_)/totalElems_ << "%) elems";
}
return;
}
/*!
* \brief If Jacobian matrix recycling is enabled, this method
* specifies whether the next call to assemble() just
......@@ -277,14 +277,14 @@ public:
vertexColor_.end(),
Red);
std::fill(elementColor_.begin(),
elementColor_.end(),
elementColor_.end(),
Red);
std::fill(vertexDelta_.begin(),
vertexDelta_.end(),
vertexDelta_.end(),
0.0);
}
}
/*!
* \brief Returns the relative error below which a vertex is
* considered to be "green" if partial Jacobian reassembly
......@@ -319,10 +319,10 @@ public:
// we need to add the distance the solution was moved for
// this vertex
Scalar dist = model_().relativeErrorVertex(i,
Scalar dist = model_().relativeErrorVertex(i,
uCurrent,