make most indices unsigned

(instead of using 'int'.) This triggered quite a few compiler warnings
which are also dealt-with by this patch.
This commit is contained in:
Andreas Lauser
2015-11-18 11:54:35 +01:00
parent a26a4ec880
commit 2c97e90a79
19 changed files with 262 additions and 262 deletions

View File

@@ -275,15 +275,15 @@ public:
* \copydoc FvBaseMultiPhaseProblem::temperature
*/
template <class Context>
Scalar temperature(const Context &context, int spaceIdx, int timeIdx) const
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
{ return temperature_; }
/*!
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
*/
template <class Context>
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
int timeIdx) const
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
unsigned timeIdx) const
{
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
if (isFineMaterial_(pos))
@@ -295,7 +295,7 @@ public:
* \copydoc FvBaseMultiPhaseProblem::porosity
*/
template <class Context>
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
{ return porosity_; }
/*!
@@ -303,7 +303,7 @@ public:
*/
template <class Context>
const MaterialLawParams &materialLawParams(const Context &context,
int spaceIdx, int timeIdx) const
unsigned spaceIdx, unsigned timeIdx) const
{ return materialParams_; }
/*!
@@ -312,8 +312,8 @@ public:
* In this case, we assume the rock-matrix to be quartz.
*/
template <class Context>
Scalar heatCapacitySolid(const Context &context, int spaceIdx,
int timeIdx) const
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
unsigned timeIdx) const
{
return 850. // specific heat capacity [J / (kg K)]
* 2650.; // density of sand [kg/m^3]
@@ -331,7 +331,7 @@ public:
*/
template <class Context>
void boundary(BoundaryRateVector &values, const Context &context,
int spaceIdx, int timeIdx) const
unsigned spaceIdx, unsigned timeIdx) const
{
const auto &pos = context.pos(spaceIdx, timeIdx);
@@ -364,8 +364,8 @@ public:
* \copydoc FvBaseProblem::initial
*/
template <class Context>
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
int timeIdx) const
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
unsigned timeIdx) const
{
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
@@ -383,8 +383,8 @@ public:
* everywhere.
*/
template <class Context>
void source(RateVector &rate, const Context &context, int spaceIdx,
int timeIdx) const
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
unsigned timeIdx) const
{ rate = Scalar(0.0); }
//! \}
@@ -407,7 +407,7 @@ private:
template <class FluidState, class Context>
void initialFluidState_(FluidState &fs, const Context &context,
int spaceIdx, int timeIdx) const
unsigned spaceIdx, unsigned timeIdx) const
{
const GlobalPosition pos = context.pos(spaceIdx, timeIdx);
Scalar y = pos[1];
@@ -445,7 +445,7 @@ private:
if (onLeftBoundary_(pos))
pg += 10e3;
MaterialLaw::capillaryPressures(pcAll, matParams, fs);
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
fs.setPressure(phaseIdx, pg + (pcAll[phaseIdx] - pcAll[gasPhaseIdx]));
// set composition of gas phase