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

remove trailing white space

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@6080 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 6ce8e577
......@@ -135,7 +135,7 @@ public:
else
{
// storage term of continuity equation- molefractions
//careful: molarDensity changes with moleFrac!
//careful: molarDensity changes with moleFrac!
result[contiEqIdx] += volVars.molarDensity()*volVars.porosity();
// storage term of the transport equation - molefractions
result[transEqIdx] +=
......@@ -270,7 +270,7 @@ public:
this->fvElemGeom_(),
localVertexIdx);
}
void evalBoundary_()
{
ParentType::evalBoundary_();
......
......@@ -92,15 +92,15 @@ public:
bool isOldSol)
{
ParentType::update(priVars, problem, element, elemGeom, scvIdx, isOldSol);
asImp().updateTemperature_(priVars,
element,
elemGeom,
scvIdx,
problem);
fluidState_.update(priVars, temperature_);
porosity_ = problem.spatialParameters().porosity(element, elemGeom, scvIdx);
tortuosity_ = problem.spatialParameters().tortuosity(element, elemGeom, scvIdx);
dispersivity_ = problem.spatialParameters().dispersivity(element, elemGeom, scvIdx);
......@@ -109,7 +109,7 @@ public:
temperature_,
pressure(),
fluidState_);
diffCoeff_ = FluidSystem::diffCoeff(phaseIdx,
comp0Idx,
comp1Idx,
......@@ -230,7 +230,7 @@ protected:
Vector dispersivity_;
Scalar diffCoeff_;
FluidState fluidState_;
private:
Implementation &asImp()
{ return *static_cast<Implementation*>(this); }
......
......@@ -570,7 +570,7 @@ public:
if (primaryVarSwitch_(curGlobalSol,
volVars,
globalIdx,
global))
global))
{
this->jacobianAssembler().markVertexRed(globalIdx);
wasSwitched = true;
......
......@@ -135,7 +135,7 @@ public:
kr = MaterialLaw::krn(materialParams, saturation(lPhaseIdx));
mobility_[phaseIdx] = kr / mu;
Valgrind::CheckDefined(mobility_[phaseIdx]);
// binary diffusion coefficents
diffCoeff_[phaseIdx] =
FluidSystem::diffCoeff(phaseIdx,
......
......@@ -200,7 +200,7 @@ public:
}
if (!succeeded) {
DUNE_THROW(NumericalProblem,
DUNE_THROW(NumericalProblem,
"A process did not succeed in linearizing the system");
};
......@@ -208,20 +208,20 @@ public:
{
greenElems_ = gridView_().comm().sum(greenElems_);
reassembleAccuracy_ = gridView_().comm().max(nextReassembleAccuracy_);
problem_().newtonController().endIterMsg()
<< ", reassembled "
<< totalElems_ - greenElems_ << "/" << totalElems_
<< " (" << 100*Scalar(totalElems_ - greenElems_)/totalElems_ << "%) elems @accuracy="
<< reassembleAccuracy_;
}
// reset all vertex colors to green
for (int i = 0; i < vertexColor_.size(); ++i) {
vertexColor_[i] = Green;
}
}
/*!
* \brief If Jacobian matrix recycling is enabled, this method
* specifies whether the next call to assemble() just
......@@ -303,7 +303,7 @@ public:
}
}
/*!
* \brief Force to reassemble a given vertex next time the
* assemble() method is called.
......@@ -354,7 +354,7 @@ public:
// the relative tolerance
vertexColor_[i] = Red;
else
nextReassembleAccuracy_ =
nextReassembleAccuracy_ =
std::max(nextReassembleAccuracy_, vertexDelta_[i]);
};
......@@ -405,10 +405,10 @@ public:
// the red vertex for yellow border vertices
VertexHandleMin<EntityColor, std::vector<EntityColor>, VertexMapper>
minHandle(vertexColor_, vertexMapper_());
gridView_().communicate(minHandle,
gridView_().communicate(minHandle,
Dune::InteriorBorder_InteriorBorder_Interface,
Dune::ForwardCommunication);
// Mark yellow elements
elemIt = gridView_().template begin<0>();
for (; elemIt != elemEndIt; ++elemIt) {
......@@ -455,7 +455,7 @@ public:
VertexHandleMax<EntityColor, std::vector<EntityColor>, VertexMapper>
maxHandle(vertexColor_,
vertexMapper_());
gridView_().communicate(maxHandle,
gridView_().communicate(maxHandle,
Dune::InteriorBorder_InteriorBorder_Interface,
Dune::ForwardCommunication);
......@@ -559,11 +559,11 @@ private:
for (; eIt != eEndIt; ++eIt) {
const Element &elem = *eIt;
int n = elem.template count<dim>();
// if the element is not in the interior or the process
// border, all dofs just contain main-diagonal entries
if (elem.partitionType() != Dune::InteriorEntity &&
elem.partitionType() != Dune::BorderEntity)
elem.partitionType() != Dune::BorderEntity)
{
for (int i = 0; i < n; ++i) {
int globalI = vertexMapper_().map(*eIt, i, dim);
......@@ -633,7 +633,7 @@ private:
storageTerm_[i] = 0;
};
}
return;
}
......@@ -663,7 +663,7 @@ private:
void assemble_()
{
resetSystem_();
// if we can "recycle" the current linearization, we do it
// here and be done with it...
Scalar curDt = problem_().timeManager().timeStepSize();
......@@ -672,7 +672,7 @@ private:
for (int i = 0; i < numVertices; ++i) {
// rescale the mass term of the jacobian matrix
MatrixBlock &J_i_i = (*matrix_)[i][i];
J_i_i -= storageJacobian_[i];
storageJacobian_[i] *= oldDt_/curDt;
J_i_i += storageJacobian_[i];
......@@ -687,7 +687,7 @@ private:
residual_[i] = storageTerm_[i];
residual_[i] *= -1;
};
reuseMatrix_ = false;
oldDt_ = curDt;
return;
......@@ -695,7 +695,7 @@ private:
oldDt_ = curDt;
greenElems_ = 0;
// reassemble the elements...
ElementIterator elemIt = gridView_().template begin<0>();
ElementIterator elemEndIt = gridView_().template end<0>();
......@@ -762,7 +762,7 @@ private:
int n = elem.template count<dim>();
for (int i=0; i < n; ++i) {
const VertexPointer vp = elem.template subEntity<dim>(i);
if (vp->partitionType() == Dune::InteriorEntity ||
vp->partitionType() == Dune::BorderEntity)
{
......@@ -807,7 +807,7 @@ private:
// attributes required for jacobian matrix recycling
bool reuseMatrix_;
// The storage part of the local Jacobian
// The storage part of the local Jacobian
std::vector<MatrixBlock> storageJacobian_;
std::vector<VectorBlock> storageTerm_;
// time step size of last assembly
......@@ -821,7 +821,7 @@ private:
int totalElems_;
int greenElems_;
Scalar nextReassembleAccuracy_;
Scalar reassembleAccuracy_;
};
......
......@@ -173,14 +173,14 @@ public:
// set the hints for the volume variables
model_().setHints(element, prevVolVars_, curVolVars_);
// update the secondary variables for the element at the last
// and the current time levels
prevVolVars_.update(problem_(),
elem_(),
fvElemGeom_,
true /* isOldSol? */);
curVolVars_.update(problem_(),
elem_(),
fvElemGeom_,
......@@ -209,7 +209,7 @@ public:
storageDeriv,
j,
pvIdx);
// update the local stiffness matrix with the current partial
// derivatives
updateLocalJacobian_(j,
......@@ -531,7 +531,7 @@ protected:
// levels
ElementVolumeVariables prevVolVars_;
ElementVolumeVariables curVolVars_;
LocalResidual localResidual_;
LocalBlockMatrix A_;
......
......@@ -291,7 +291,7 @@ public:
int numVerts = fvElemGeom_().numVertices;
residual_.resize(numVerts);
storageTerm_.resize(numVerts);
residual_ = 0.0;
storageTerm_ = 0.0;
......@@ -345,7 +345,7 @@ public:
protected:
Implementation &asImp_()
{
{
assert(static_cast<Implementation*>(this) != 0);
return *static_cast<Implementation*>(this);
}
......@@ -398,7 +398,7 @@ protected:
Valgrind::CheckDefined(pvIdx);
Valgrind::CheckDefined(curPrimaryVar_(i, pvIdx));
Valgrind::CheckDefined(tmp[pvIdx]);
this->residual_[i][eqIdx] =
curPrimaryVar_(i, pvIdx) - tmp[pvIdx];
......
......@@ -145,7 +145,7 @@ public:
curHints_.resize(nVerts);
prevHints_.resize(nVerts);
hintsUsable_.resize(nVerts);
std::fill(hintsUsable_.begin(),
std::fill(hintsUsable_.begin(),
hintsUsable_.end(),
false);
}
......@@ -156,9 +156,9 @@ public:
}
void setHints(const Element &elem,
ElementVolumeVariables &prevVolVars,
ElementVolumeVariables &prevVolVars,
ElementVolumeVariables &curVolVars) const
{
{
if (!enableHints)
return;
......@@ -167,7 +167,7 @@ public:
curVolVars.resize(n);
for (int i = 0; i < n; ++i) {
int globalIdx = problem_().vertexMapper().map(elem, i, dim);
if (!hintsUsable_[globalIdx]) {
curVolVars[i].setHint(NULL);
prevVolVars[i].setHint(NULL);
......@@ -181,7 +181,7 @@ public:
void setHints(const Element &elem,
ElementVolumeVariables &curVolVars) const
{
{
if (!enableHints)
return;
......@@ -189,7 +189,7 @@ public:
curVolVars.resize(n);
for (int i = 0; i < n; ++i) {
int globalIdx = problem_().vertexMapper().map(elem, i, dim);
if (!hintsUsable_[globalIdx])
curVolVars[i].setHint(NULL);
else
......@@ -205,7 +205,7 @@ public:
prevHints_ = curHints_;
};
void updateCurHints(const Element &elem,
void updateCurHints(const Element &elem,
const ElementVolumeVariables &ev) const
{
if (!enableHints)
......@@ -265,9 +265,9 @@ public:
// add up the residuals on the process borders
if (gridView().comm().size() > 1) {
VertexHandleSum<PrimaryVariables, SolutionVector, VertexMapper>
VertexHandleSum<PrimaryVariables, SolutionVector, VertexMapper>
sumHandle(dest, vertexMapper());
gridView().communicate(sumHandle,
gridView().communicate(sumHandle,
Dune::InteriorBorder_InteriorBorder_Interface,
Dune::ForwardCommunication);
}
......@@ -499,7 +499,7 @@ public:
// make the current solution the previous one.
uPrev_ = uCur_;
prevHints_ = curHints_;
updatePrevHints();
}
......@@ -825,14 +825,14 @@ protected:
// add up the primary variables and the volumes of the boxes
// which cross process borders
if (gridView().comm().size() > 1) {
VertexHandleSum<Dune::FieldVector<Scalar, 1>,
VertexHandleSum<Dune::FieldVector<Scalar, 1>,
Dune::BlockVector<Dune::FieldVector<Scalar, 1> >,
VertexMapper> sumVolumeHandle(boxVolume_, vertexMapper());
gridView().communicate(sumVolumeHandle,
gridView().communicate(sumVolumeHandle,
Dune::InteriorBorder_InteriorBorder_Interface,
Dune::ForwardCommunication);
VertexHandleSum<PrimaryVariables, SolutionVector, VertexMapper>
VertexHandleSum<PrimaryVariables, SolutionVector, VertexMapper>
sumPVHandle(uCur_, vertexMapper());
gridView().communicate(sumPVHandle,
Dune::InteriorBorder_InteriorBorder_Interface,
......
......@@ -144,7 +144,7 @@ public:
*
* By default this the time step size is unrestricted.
*/
Scalar maxTimeStepSize() const
Scalar maxTimeStepSize() const
{ return std::numeric_limits<Scalar>::infinity(); }
/*!
......@@ -772,7 +772,7 @@ private:
void createResultWriter_()
{ if (!resultWriter_) resultWriter_ = new VtkMultiWriter(gridView_, asImp_().name()); };
std::string simName_;
std::string simName_;
const GridView gridView_;
GlobalPosition bboxMin_;
......
......@@ -106,7 +106,7 @@ NEW_PROP_TAG(EnableTimeStepRampUp);
NEW_PROP_TAG(NumericDifferenceMethod);
/*!
* \brief Specify whether to use the already calculated solutions as
* \brief Specify whether to use the already calculated solutions as
* starting values of the volume variables.
*
* This only makes sense if the calculation of the volume variables is
......
......@@ -138,7 +138,7 @@ public:
* \param pvIdx The index of the primary variable of interest
*/
Scalar primaryVar(int pvIdx) const
{
{
return primaryVars_[pvIdx];
}
......
......@@ -20,7 +20,7 @@
/*!
* \file
*
* \brief This file provides wrappers which allow the Dumux box models to
* \brief This file provides wrappers which allow the Dumux box models to
* be used with dune pdelab
*/
#ifndef DUMUX_PDELAB_ADAPTER_HH
......@@ -120,7 +120,7 @@ public:
};
// set the local operator used for submodels
SET_PROP(BoxPDELab, LocalOperator)
SET_PROP(BoxPDELab, LocalOperator)
{ typedef Dumux::PDELab::BoxLocalOperator<TypeTag> type; };
// set the grid operator space used for submodels
......
......@@ -98,7 +98,7 @@ public:
DUNE_DEPRECATED // use setXYArrays
void set(const ScalarContainer &x,
const ScalarContainer &y,
Scalar m0,
Scalar m0,
Scalar m1)
{ setXYArrays(numSamples(), x, y, m0, m1); }
......@@ -107,7 +107,7 @@ public:
void set(int numberSamples,
const ScalarArray &x,
const ScalarArray &y,
Scalar m0,
Scalar m0,
Scalar m1)
{ setXYArrays(numberSamples, x, y, m0, m1); }
......@@ -134,7 +134,7 @@ public:
std::copy(y.begin(), y.end(), yPos_.begin());
makeFullSpline_(m0, m1);
}
/*!
* \brief Set the sampling points and the boundary slopes of a
* full spline using a C-style array.
......@@ -148,9 +148,9 @@ public:
* the number of sampling points must be larger than 1.
*/
template <class PointArray>
void setArrayOfPoints(int numberSamples,
void setArrayOfPoints(int numberSamples,
const PointArray &points,
Scalar m0,
Scalar m0,
Scalar m1)
{
// a spline with no or just one sampling points? what an
......@@ -167,7 +167,7 @@ public:
template <class XYContainer>
DUNE_DEPRECATED // use setArrayOfPoints instead
void set(const XYContainer &points,
Scalar m0,
Scalar m0,
Scalar m1)
{ setArrayOfPoints(numSamples(), points, m0, m1); }
......@@ -186,7 +186,7 @@ public:
*/
template <class XYContainer>
void setContainerOfPoints(const XYContainer &points,
Scalar m0,
Scalar m0,
Scalar m1)
{
assert(points.size() == numSamples());
......@@ -219,7 +219,7 @@ public:
*/
template <class XYContainer>
void setContainerOfTuples(const XYContainer &points,
Scalar m0,
Scalar m0,
Scalar m1)
{
assert(points.size() == numSamples());
......@@ -234,7 +234,7 @@ public:
// make a full spline
makeFullSpline_(m0, m1);
}
///////////////////////////////////////
///////////////////////////////////////
///////////////////////////////////////
......@@ -263,7 +263,7 @@ public:
xPos_[i] = x[i];
yPos_[i] = y[i];
}
makeNaturalSpline_();
}
......@@ -303,8 +303,8 @@ public:
std::copy(y.begin(), y.end(), yPos_.begin());
makeNaturalSpline_();
}
/*!
* \brief Set the sampling points of a natural spline using a
* C-style array.
......@@ -318,7 +318,7 @@ public:
* the number of sampling points must be larger than 1.
*/
template <class PointArray>
void setArrayOfPoints(int numberSamples,
void setArrayOfPoints(int numberSamples,
const PointArray &points)
{
assert(numberSamples == numSamples());
......
......@@ -349,14 +349,14 @@ void invertCubicPolynomialPostProcess_(SolContainer &sol,
for (int i = 0; i < numSol; ++i) {
Scalar x = sol[i];
Scalar fOld = d + x*(c + x*(b + x*a));
Scalar fPrime = c + x*(2*b + x*3*a);
if (fPrime == 0.0)
continue;
x -= fOld/fPrime;
Scalar fNew = d + x*(c + x*(b + x*a));
if (std::abs(fNew) < std::abs(fOld))
if (std::abs(fNew) < std::abs(fOld))
sol[i] = x;
};
};
......
......@@ -423,7 +423,7 @@ public:
* \param m1 The slope of the spline at \f$x_1\f$
*/
template <class PointArray>
void setArrayOfPoints(int nSamples,
void setArrayOfPoints(int nSamples,
const PointArray &points,
Scalar m0,
Scalar m1)
......@@ -433,7 +433,7 @@ public:
set(points[0][0],
points[1][0],
points[0][1],
points[1][1],
points[1][1],
m0, m1);
}
......@@ -464,7 +464,7 @@ public:
typename PointContainer::const_iterator it0 = points.begin();
typename PointContainer::const_iterator it1 = it0;
++it1;
set((*it0)[0],
(*it0)[1],
(*it1)[0],
......@@ -490,7 +490,7 @@ public:
typename TupleContainer::const_iterator it0 = tuples.begin();
typename TupleContainer::const_iterator it1 = it0;
++it1;
set(std::get<0>(*it0),
std::get<1>(*it0),
std::get<0>(*it1),
......
......@@ -180,10 +180,10 @@ public:
else if (x > xMax())
evalDerivative_(xMax(), numSamples_() - 1);
}
return evalDerivative_(x, segmentIdx_(x));
}
/*!
* \brief Find the intersections of the spline with a cubic
* polynomial in the whole intervall, throws
......@@ -360,7 +360,7 @@ protected:
int numSamples)
{
assert(numSamples >= 2);
// copy sample points, make sure that the first x value is
// smaller than the last one
......
......@@ -400,7 +400,7 @@ public:
if (verbose_) {
int numProcesses = Dune::MPIHelper::getCollectiveCommunication().size();
std::cout << "Simulation took " << timer.elapsed() <<" seconds on "