mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -375,7 +375,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar temperature(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (inHighTemperatureRegion_(pos))
|
if (inHighTemperatureRegion_(pos))
|
||||||
@@ -387,8 +387,8 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -400,7 +400,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -413,7 +413,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -427,8 +427,8 @@ public:
|
|||||||
* In this case, we assume the rock-matrix to be granite.
|
* In this case, we assume the rock-matrix to be granite.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar heatCapacitySolid(const Context &context, int spaceIdx,
|
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
return 790 // specific heat capacity of granite [J / (kg K)]
|
return 790 // specific heat capacity of granite [J / (kg K)]
|
||||||
* 2700; // density of granite [kg/m^3]
|
* 2700; // density of granite [kg/m^3]
|
||||||
@@ -439,7 +439,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const HeatConductionLawParams &
|
const HeatConductionLawParams &
|
||||||
heatConductionParams(const Context &context, int spaceIdx, int timeIdx) const
|
heatConductionParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -459,7 +459,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &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);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -505,8 +505,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
|
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
|
||||||
initialFluidState_(fs, context, spaceIdx, timeIdx);
|
initialFluidState_(fs, context, spaceIdx, timeIdx);
|
||||||
@@ -524,8 +524,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -533,7 +533,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
template <class Context, class FluidState>
|
template <class Context, class FluidState>
|
||||||
void initialFluidState_(FluidState &fs, const Context &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);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
|
|||||||
@@ -316,15 +316,15 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar temperature(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 293.15; /* [K] */ }
|
{ return 293.15; /* [K] */ }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -336,7 +336,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -350,7 +350,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -364,15 +364,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const HeatConductionLawParams &
|
const HeatConductionLawParams &
|
||||||
heatConductionParams(const Context &context, int spaceIdx, int timeIdx) const
|
heatConductionParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return heatCondParams_; }
|
{ return heatCondParams_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::heatCapacitySolid
|
* \copydoc FvBaseMultiPhaseProblem::heatCapacitySolid
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar heatCapacitySolid(const Context &context, int spaceIdx,
|
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
return 850 // specific heat capacity [J / (kg K)]
|
return 850 // specific heat capacity [J / (kg K)]
|
||||||
* 2650; // density of sand [kg/m^3]
|
* 2650; // density of sand [kg/m^3]
|
||||||
@@ -390,7 +390,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &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);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -409,7 +409,7 @@ public:
|
|||||||
// inject with the same composition as the gas phase of
|
// inject with the same composition as the gas phase of
|
||||||
// the injection fluid state
|
// the injection fluid state
|
||||||
Scalar molarInjectionRate = 0.3435; // [mol/(m^2 s)]
|
Scalar molarInjectionRate = 0.3435; // [mol/(m^2 s)]
|
||||||
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
|
for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
|
||||||
molarRate[conti0EqIdx + compIdx] =
|
molarRate[conti0EqIdx + compIdx] =
|
||||||
-molarInjectionRate
|
-molarInjectionRate
|
||||||
* injectFluidState_.moleFraction(gasPhaseIdx, compIdx);
|
* injectFluidState_.moleFraction(gasPhaseIdx, compIdx);
|
||||||
@@ -438,8 +438,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
|
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
|
||||||
|
|
||||||
@@ -456,8 +456,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -493,7 +493,7 @@ private:
|
|||||||
|
|
||||||
template <class FluidState, class Context>
|
template <class FluidState, class Context>
|
||||||
void initialFluidState_(FluidState &fs, const Context &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);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -510,7 +510,7 @@ private:
|
|||||||
const auto &matParams = materialLawParams(context, spaceIdx, timeIdx);
|
const auto &matParams = materialLawParams(context, spaceIdx, timeIdx);
|
||||||
Scalar pc[numPhases];
|
Scalar pc[numPhases];
|
||||||
MaterialLaw::capillaryPressures(pc, matParams, fs);
|
MaterialLaw::capillaryPressures(pc, matParams, fs);
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||||
fs.setPressure(phaseIdx, pw + (pc[phaseIdx] - pc[waterPhaseIdx]));
|
fs.setPressure(phaseIdx, pw + (pc[phaseIdx] - pc[waterPhaseIdx]));
|
||||||
|
|
||||||
// compute the phase compositions
|
// compute the phase compositions
|
||||||
@@ -528,7 +528,7 @@ private:
|
|||||||
const auto &matParams = materialLawParams(context, spaceIdx, timeIdx);
|
const auto &matParams = materialLawParams(context, spaceIdx, timeIdx);
|
||||||
Scalar pc[numPhases];
|
Scalar pc[numPhases];
|
||||||
MaterialLaw::capillaryPressures(pc, matParams, fs);
|
MaterialLaw::capillaryPressures(pc, matParams, fs);
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||||
fs.setPressure(phaseIdx, pw + (pc[phaseIdx] - pc[waterPhaseIdx]));
|
fs.setPressure(phaseIdx, pw + (pc[phaseIdx] - pc[waterPhaseIdx]));
|
||||||
|
|
||||||
// compute the phase compositions
|
// compute the phase compositions
|
||||||
@@ -539,17 +539,17 @@ private:
|
|||||||
|
|
||||||
// set the contaminant mole fractions to zero. this is a
|
// set the contaminant mole fractions to zero. this is a
|
||||||
// little bit hacky...
|
// little bit hacky...
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
fs.setMoleFraction(phaseIdx, NAPLIdx, 0.0);
|
fs.setMoleFraction(phaseIdx, NAPLIdx, 0.0);
|
||||||
|
|
||||||
if (phaseIdx == naplPhaseIdx)
|
if (phaseIdx == naplPhaseIdx)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Scalar sumx = 0;
|
Scalar sumx = 0;
|
||||||
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
|
for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
|
||||||
sumx += fs.moleFraction(phaseIdx, compIdx);
|
sumx += fs.moleFraction(phaseIdx, compIdx);
|
||||||
|
|
||||||
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
|
for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
|
||||||
fs.setMoleFraction(phaseIdx, compIdx,
|
fs.setMoleFraction(phaseIdx, compIdx,
|
||||||
fs.moleFraction(phaseIdx, compIdx) / sumx);
|
fs.moleFraction(phaseIdx, compIdx) / sumx);
|
||||||
}
|
}
|
||||||
@@ -563,18 +563,18 @@ private:
|
|||||||
// create a Fluid state which has all phases present
|
// create a Fluid state which has all phases present
|
||||||
Opm::ImmiscibleFluidState<Scalar, FluidSystem> fs;
|
Opm::ImmiscibleFluidState<Scalar, FluidSystem> fs;
|
||||||
fs.setTemperature(293.15);
|
fs.setTemperature(293.15);
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
fs.setPressure(phaseIdx, 1.0135e5);
|
fs.setPressure(phaseIdx, 1.0135e5);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename FluidSystem::ParameterCache paramCache;
|
typename FluidSystem::ParameterCache paramCache;
|
||||||
paramCache.updateAll(fs);
|
paramCache.updateAll(fs);
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
Scalar rho = FluidSystem::density(fs, paramCache, phaseIdx);
|
Scalar rho = FluidSystem::density(fs, paramCache, phaseIdx);
|
||||||
fs.setDensity(phaseIdx, rho);
|
fs.setDensity(phaseIdx, rho);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
Scalar lambdaSaturated;
|
Scalar lambdaSaturated;
|
||||||
if (FluidSystem::isLiquid(phaseIdx)) {
|
if (FluidSystem::isLiquid(phaseIdx)) {
|
||||||
Scalar lambdaFluid = FluidSystem::thermalConductivity(fs, paramCache, phaseIdx);
|
Scalar lambdaFluid = FluidSystem::thermalConductivity(fs, paramCache, phaseIdx);
|
||||||
|
|||||||
@@ -235,15 +235,15 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return K_; }
|
{ return K_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 0.35; }
|
{ return 0.35; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -251,14 +251,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return materialParams_; }
|
{ return materialParams_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return temperature_; }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -275,7 +275,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ values.setNoFlow(); }
|
{ values.setNoFlow(); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -289,8 +289,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (onLeftSide_(pos))
|
if (onLeftSide_(pos))
|
||||||
@@ -306,8 +306,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|||||||
@@ -242,9 +242,9 @@ public:
|
|||||||
|
|
||||||
// initialize the material parameter objects of the individual
|
// initialize the material parameter objects of the individual
|
||||||
// finite volumes
|
// finite volumes
|
||||||
int n = this->model().numGridDof();
|
unsigned n = this->model().numGridDof();
|
||||||
materialParams_.resize(n);
|
materialParams_.resize(n);
|
||||||
for (int i = 0; i < n; ++i) {
|
for (unsigned i = 0; i < n; ++i) {
|
||||||
materialParams_[i].setMicParams(&micParams_);
|
materialParams_[i].setMicParams(&micParams_);
|
||||||
materialParams_[i].setMdcParams(&mdcParams_);
|
materialParams_[i].setMdcParams(&mdcParams_);
|
||||||
materialParams_[i].setSwr(0.0);
|
materialParams_[i].setSwr(0.0);
|
||||||
@@ -285,8 +285,8 @@ public:
|
|||||||
const auto &elemEndIt = this->gridView().template end<0>();
|
const auto &elemEndIt = this->gridView().template end<0>();
|
||||||
for (; elemIt != elemEndIt; ++elemIt) {
|
for (; elemIt != elemEndIt; ++elemIt) {
|
||||||
elemCtx.updateAll(*elemIt);
|
elemCtx.updateAll(*elemIt);
|
||||||
for (int scvIdx = 0; scvIdx < elemCtx.numDof(/*timeIdx=*/0); ++scvIdx) {
|
for (unsigned scvIdx = 0; scvIdx < elemCtx.numDof(/*timeIdx=*/0); ++scvIdx) {
|
||||||
int globalIdx = elemCtx.globalSpaceIndex(scvIdx, /*timeIdx=*/0);
|
unsigned globalIdx = elemCtx.globalSpaceIndex(scvIdx, /*timeIdx=*/0);
|
||||||
const auto &fs = elemCtx.intensiveQuantities(scvIdx, /*timeIdx=*/0).fluidState();
|
const auto &fs = elemCtx.intensiveQuantities(scvIdx, /*timeIdx=*/0).fluidState();
|
||||||
ParkerLenhard::update(materialParams_[globalIdx], fs);
|
ParkerLenhard::update(materialParams_[globalIdx], fs);
|
||||||
}
|
}
|
||||||
@@ -304,22 +304,22 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return temperature_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return K_; }
|
{ return K_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 0.4; }
|
{ return 0.4; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -327,9 +327,9 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
int globalSpaceIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
unsigned globalSpaceIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
||||||
return materialParams_[globalSpaceIdx];
|
return materialParams_[globalSpaceIdx];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -345,7 +345,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.cvCenter(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.cvCenter(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -377,8 +377,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
// assign the primary variables
|
// assign the primary variables
|
||||||
values.assignNaive(initialFluidState_);
|
values.assignNaive(initialFluidState_);
|
||||||
@@ -389,7 +389,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void constraints(Constraints &constraints, const Context &context,
|
void constraints(Constraints &constraints, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -410,8 +410,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
//! \}
|
//! \}
|
||||||
|
|
||||||
|
|||||||
@@ -317,7 +317,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return temperature_; }
|
||||||
|
|
||||||
// \}
|
// \}
|
||||||
@@ -331,8 +331,8 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return matrixK_; }
|
{ return matrixK_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -342,15 +342,15 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &fractureIntrinsicPermeability(const Context &context,
|
const DimMatrix &fractureIntrinsicPermeability(const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return fractureK_; }
|
{ return fractureK_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return matrixPorosity_; }
|
{ return matrixPorosity_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -359,8 +359,8 @@ public:
|
|||||||
* \copydoc Doxygen::contextParams
|
* \copydoc Doxygen::contextParams
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar fracturePorosity(const Context &context, int spaceIdx,
|
Scalar fracturePorosity(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return fracturePorosity_; }
|
{ return fracturePorosity_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -368,7 +368,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return matrixMaterialParams_; }
|
{ return matrixMaterialParams_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -378,8 +378,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &fractureMaterialLawParams(const Context &context,
|
const MaterialLawParams &fractureMaterialLawParams(const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return fractureMaterialParams_; }
|
{ return fractureMaterialParams_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -401,8 +401,8 @@ public:
|
|||||||
* \param timeIdx The index used by the time discretization.
|
* \param timeIdx The index used by the time discretization.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar fractureWidth(const Context &context, int spaceIdx1, int spaceIdx2,
|
Scalar fractureWidth(const Context &context, unsigned spaceIdx1, unsigned spaceIdx2,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return fractureWidth_; }
|
{ return fractureWidth_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -410,7 +410,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const HeatConductionLawParams &
|
const HeatConductionLawParams &
|
||||||
heatConductionParams(const Context &context, int spaceIdx, int timeIdx) const
|
heatConductionParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return heatCondParams_; }
|
{ return heatCondParams_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -419,8 +419,8 @@ public:
|
|||||||
* In this case, we assume the rock-matrix to be granite.
|
* In this case, we assume the rock-matrix to be granite.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar heatCapacitySolid(const Context &context, int spaceIdx,
|
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
return 790 // specific heat capacity of granite [J / (kg K)]
|
return 790 // specific heat capacity of granite [J / (kg K)]
|
||||||
* 2700; // density of granite [kg/m^3]
|
* 2700; // density of granite [kg/m^3]
|
||||||
@@ -438,7 +438,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -476,7 +476,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void constraints(Constraints &constraints, const Context &context,
|
void constraints(Constraints &constraints, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -484,7 +484,7 @@ public:
|
|||||||
// only impose constraints adjacent to the left boundary
|
// only impose constraints adjacent to the left boundary
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int globalIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
unsigned globalIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
||||||
if (!fractureMapper().isFractureVertex(globalIdx)) {
|
if (!fractureMapper().isFractureVertex(globalIdx)) {
|
||||||
// do not impose constraints if the finite volume does
|
// do not impose constraints if the finite volume does
|
||||||
// not contain fractures.
|
// not contain fractures.
|
||||||
@@ -521,8 +521,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
FluidState fluidState;
|
FluidState fluidState;
|
||||||
fluidState.setTemperature(temperature_);
|
fluidState.setTemperature(temperature_);
|
||||||
@@ -543,8 +543,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
// \}
|
// \}
|
||||||
@@ -569,18 +569,18 @@ private:
|
|||||||
// create a Fluid state which has all phases present
|
// create a Fluid state which has all phases present
|
||||||
Opm::ImmiscibleFluidState<Scalar, FluidSystem> fs;
|
Opm::ImmiscibleFluidState<Scalar, FluidSystem> fs;
|
||||||
fs.setTemperature(293.15);
|
fs.setTemperature(293.15);
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
fs.setPressure(phaseIdx, 1.0135e5);
|
fs.setPressure(phaseIdx, 1.0135e5);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename FluidSystem::ParameterCache paramCache;
|
typename FluidSystem::ParameterCache paramCache;
|
||||||
paramCache.updateAll(fs);
|
paramCache.updateAll(fs);
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
Scalar rho = FluidSystem::density(fs, paramCache, phaseIdx);
|
Scalar rho = FluidSystem::density(fs, paramCache, phaseIdx);
|
||||||
fs.setDensity(phaseIdx, rho);
|
fs.setDensity(phaseIdx, rho);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
Scalar lambdaSaturated;
|
Scalar lambdaSaturated;
|
||||||
if (FluidSystem::isLiquid(phaseIdx)) {
|
if (FluidSystem::isLiquid(phaseIdx)) {
|
||||||
Scalar lambdaFluid = FluidSystem::thermalConductivity(fs, paramCache, phaseIdx);
|
Scalar lambdaFluid = FluidSystem::thermalConductivity(fs, paramCache, phaseIdx);
|
||||||
|
|||||||
@@ -261,22 +261,22 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar temperature(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 273.15 + 10; } // 10C
|
{ return 273.15 + 10; } // 10C
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 0.4; }
|
{ return 0.4; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
return isInLens_(context.pos(spaceIdx, timeIdx)) ? intrinsicPermLens_
|
return isInLens_(context.pos(spaceIdx, timeIdx)) ? intrinsicPermLens_
|
||||||
: intrinsicPerm_;
|
: intrinsicPerm_;
|
||||||
@@ -293,7 +293,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -331,8 +331,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
// const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
// const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
||||||
values[pressure0Idx] = 1.0e+5; // + 9.81*1.23*(20-globalPos[dim-1]);
|
values[pressure0Idx] = 1.0e+5; // + 9.81*1.23*(20-globalPos[dim-1]);
|
||||||
@@ -342,8 +342,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::source
|
* \copydoc FvBaseProblem::source
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|||||||
@@ -275,15 +275,15 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return temperature_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -295,7 +295,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return porosity_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -303,7 +303,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return materialParams_; }
|
{ return materialParams_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -312,8 +312,8 @@ public:
|
|||||||
* In this case, we assume the rock-matrix to be quartz.
|
* In this case, we assume the rock-matrix to be quartz.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar heatCapacitySolid(const Context &context, int spaceIdx,
|
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
return 850. // specific heat capacity [J / (kg K)]
|
return 850. // specific heat capacity [J / (kg K)]
|
||||||
* 2650.; // density of sand [kg/m^3]
|
* 2650.; // density of sand [kg/m^3]
|
||||||
@@ -331,7 +331,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &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);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -364,8 +364,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
|
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
|
||||||
|
|
||||||
@@ -383,8 +383,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -407,7 +407,7 @@ private:
|
|||||||
|
|
||||||
template <class FluidState, class Context>
|
template <class FluidState, class Context>
|
||||||
void initialFluidState_(FluidState &fs, const Context &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);
|
const GlobalPosition pos = context.pos(spaceIdx, timeIdx);
|
||||||
Scalar y = pos[1];
|
Scalar y = pos[1];
|
||||||
@@ -445,7 +445,7 @@ private:
|
|||||||
if (onLeftBoundary_(pos))
|
if (onLeftBoundary_(pos))
|
||||||
pg += 10e3;
|
pg += 10e3;
|
||||||
MaterialLaw::capillaryPressures(pcAll, matParams, fs);
|
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]));
|
fs.setPressure(phaseIdx, pg + (pcAll[phaseIdx] - pcAll[gasPhaseIdx]));
|
||||||
|
|
||||||
// set composition of gas phase
|
// set composition of gas phase
|
||||||
|
|||||||
@@ -309,8 +309,8 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -323,7 +323,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 0.4; }
|
{ return 0.4; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -331,7 +331,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -344,7 +344,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return temperature_; }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -408,7 +408,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values,
|
void boundary(BoundaryRateVector &values,
|
||||||
const Context &context, int spaceIdx, int timeIdx) const
|
const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -479,7 +479,7 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
Scalar depth = this->boundingBoxMax()[1] - pos[1];
|
Scalar depth = this->boundingBoxMax()[1] - pos[1];
|
||||||
@@ -520,8 +520,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -529,7 +529,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool isInLens_(const GlobalPosition &pos) const
|
bool isInLens_(const GlobalPosition &pos) const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < dim; ++i) {
|
for (unsigned i = 0; i < dim; ++i) {
|
||||||
if (pos[i] < lensLowerLeft_[i] - eps_ || pos[i] > lensUpperRight_[i]
|
if (pos[i] < lensLowerLeft_[i] - eps_ || pos[i] > lensUpperRight_[i]
|
||||||
+ eps_)
|
+ eps_)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public:
|
|||||||
* This problem assumes a constant temperature of 10 degrees Celsius.
|
* This problem assumes a constant temperature of 10 degrees Celsius.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar temperature(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 273.15 + 10; }
|
{ return 273.15 + 10; }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -194,7 +194,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
/* const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
/* const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -220,8 +220,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ initial_(values); }
|
{ initial_(values); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -231,7 +231,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void constraints(Constraints &constraints, const Context &context,
|
void constraints(Constraints &constraints, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -249,8 +249,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::source
|
* \copydoc FvBaseProblem::source
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|||||||
@@ -251,7 +251,7 @@ public:
|
|||||||
this->model().checkConservativeness();
|
this->model().checkConservativeness();
|
||||||
|
|
||||||
// Calculate storage terms of the individual phases
|
// Calculate storage terms of the individual phases
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
PrimaryVariables phaseStorage;
|
PrimaryVariables phaseStorage;
|
||||||
this->model().globalPhaseStorage(phaseStorage, phaseIdx);
|
this->model().globalPhaseStorage(phaseStorage, phaseIdx);
|
||||||
|
|
||||||
@@ -296,15 +296,15 @@ public:
|
|||||||
* This problem simply assumes a constant temperature.
|
* This problem simply assumes a constant temperature.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return temperature_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
if (isFineMaterial_(context.pos(spaceIdx, timeIdx)))
|
if (isFineMaterial_(context.pos(spaceIdx, timeIdx)))
|
||||||
return fineK_;
|
return fineK_;
|
||||||
@@ -315,7 +315,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -329,7 +329,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -345,8 +345,8 @@ public:
|
|||||||
* medium is granite.
|
* medium is granite.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar heatCapacitySolid(const Context &context, int spaceIdx,
|
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
return 790 // specific heat capacity of granite [J / (kg K)]
|
return 790 // specific heat capacity of granite [J / (kg K)]
|
||||||
* 2700; // density of granite [kg/m^3]
|
* 2700; // density of granite [kg/m^3]
|
||||||
@@ -357,7 +357,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const HeatConductionLawParams &
|
const HeatConductionLawParams &
|
||||||
heatConductionParams(const Context &context, int spaceIdx, int timeIdx) const
|
heatConductionParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -377,7 +377,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &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);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -400,8 +400,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &matParams = materialLawParams(context, spaceIdx, timeIdx);
|
const auto &matParams = materialLawParams(context, spaceIdx, timeIdx);
|
||||||
values.assignMassConservative(outletFluidState_, matParams);
|
values.assignMassConservative(outletFluidState_, matParams);
|
||||||
@@ -414,8 +414,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = 0.0; }
|
{ rate = 0.0; }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -454,8 +454,8 @@ private:
|
|||||||
void initFluidState_(FluidState &fs, const MaterialLawParams &matParams,
|
void initFluidState_(FluidState &fs, const MaterialLawParams &matParams,
|
||||||
bool isInlet)
|
bool isInlet)
|
||||||
{
|
{
|
||||||
int refPhaseIdx;
|
unsigned refPhaseIdx;
|
||||||
int otherPhaseIdx;
|
unsigned otherPhaseIdx;
|
||||||
|
|
||||||
// set the fluid temperatures
|
// set the fluid temperatures
|
||||||
fs.setTemperature(temperature_);
|
fs.setTemperature(temperature_);
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ public:
|
|||||||
* This problem assumes a temperature.
|
* This problem assumes a temperature.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; } // in [K]
|
{ return temperature_; } // in [K]
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -201,8 +201,8 @@ public:
|
|||||||
* This problem uses a constant intrinsic permeability.
|
* This problem uses a constant intrinsic permeability.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return perm_; }
|
{ return perm_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -211,7 +211,7 @@ public:
|
|||||||
* This problem uses a constant porosity.
|
* This problem uses a constant porosity.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return porosity_; }
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -220,7 +220,7 @@ public:
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar tortuosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar tortuosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return tortuosity_; }
|
{ return tortuosity_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -229,7 +229,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar dispersivity(const Context &context,
|
Scalar dispersivity(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -245,7 +245,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -286,8 +286,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
Opm::CompositionalFluidState<Scalar, FluidSystem, /*storeEnthalpy=*/false> fs;
|
Opm::CompositionalFluidState<Scalar, FluidSystem, /*storeEnthalpy=*/false> fs;
|
||||||
initialFluidState_(fs, context, spaceIdx, timeIdx);
|
initialFluidState_(fs, context, spaceIdx, timeIdx);
|
||||||
@@ -302,8 +302,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -317,7 +317,7 @@ private:
|
|||||||
|
|
||||||
template <class FluidState, class Context>
|
template <class FluidState, class Context>
|
||||||
void initialFluidState_(FluidState &fs, const Context &context,
|
void initialFluidState_(FluidState &fs, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
Scalar T = temperature(context, spaceIdx, timeIdx);
|
Scalar T = temperature(context, spaceIdx, timeIdx);
|
||||||
// Scalar rho = FluidSystem::H2O::liquidDensity(T, /*pressure=*/1.5e5);
|
// Scalar rho = FluidSystem::H2O::liquidDensity(T, /*pressure=*/1.5e5);
|
||||||
|
|||||||
@@ -268,23 +268,23 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
* \copydoc FvBaseMultiPhaseProblem::intrinsicPermeability
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return K_; }
|
{ return K_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc ForchheimerBaseProblem::ergunCoefficient
|
* \copydoc ForchheimerBaseProblem::ergunCoefficient
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar ergunCoefficient(const Context &context, int spaceIdx,
|
Scalar ergunCoefficient(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return 0.3866; }
|
{ return 0.3866; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 0.558; }
|
{ return 0.558; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -292,14 +292,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return materialParams_; }
|
{ return materialParams_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return temperature_; }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -317,7 +317,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -347,8 +347,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
// assign the primary variables
|
// assign the primary variables
|
||||||
values.assignNaive(initialFluidState_);
|
values.assignNaive(initialFluidState_);
|
||||||
@@ -361,8 +361,8 @@ public:
|
|||||||
* everywhere.
|
* everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
|
|||||||
@@ -314,7 +314,7 @@ public:
|
|||||||
finePorosity_ = 0.2;
|
finePorosity_ = 0.2;
|
||||||
coarsePorosity_ = 0.3;
|
coarsePorosity_ = 0.3;
|
||||||
|
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
fineMaterialParams_.setPcMinSat(phaseIdx, 0.0);
|
fineMaterialParams_.setPcMinSat(phaseIdx, 0.0);
|
||||||
fineMaterialParams_.setPcMaxSat(phaseIdx, 0.0);
|
fineMaterialParams_.setPcMaxSat(phaseIdx, 0.0);
|
||||||
|
|
||||||
@@ -379,8 +379,8 @@ public:
|
|||||||
* above one with low permeability.
|
* above one with low permeability.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context, int spaceIdx,
|
const DimMatrix &intrinsicPermeability(const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -392,7 +392,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -405,7 +405,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -428,7 +428,7 @@ public:
|
|||||||
* will need it one day?
|
* will need it one day?
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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_; }
|
{ return temperature_; }
|
||||||
|
|
||||||
// \}
|
// \}
|
||||||
@@ -446,7 +446,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
// no flow on top and bottom
|
// no flow on top and bottom
|
||||||
values.setNoFlow();
|
values.setNoFlow();
|
||||||
@@ -466,7 +466,7 @@ public:
|
|||||||
* the whole domain.
|
* the whole domain.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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
|
||||||
{
|
{
|
||||||
values.assignNaive(initialFluidState_);
|
values.assignNaive(initialFluidState_);
|
||||||
|
|
||||||
@@ -488,7 +488,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void constraints(Constraints &constraints, const Context &context,
|
void constraints(Constraints &constraints, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
Scalar x = pos[0] - this->boundingBoxMin()[0];
|
Scalar x = pos[0] - this->boundingBoxMin()[0];
|
||||||
@@ -508,13 +508,13 @@ public:
|
|||||||
fs.setSaturation(gasPhaseIdx, 0.0);
|
fs.setSaturation(gasPhaseIdx, 0.0);
|
||||||
|
|
||||||
// set the compositions to only water
|
// set the compositions to only water
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||||
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
|
for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
|
||||||
fs.setMoleFraction(phaseIdx, compIdx, 0.0);
|
fs.setMoleFraction(phaseIdx, compIdx, 0.0);
|
||||||
|
|
||||||
// set the composition of the oil phase to the initial
|
// set the composition of the oil phase to the initial
|
||||||
// composition
|
// composition
|
||||||
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
|
for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
|
||||||
fs.setMoleFraction(oilPhaseIdx, compIdx,
|
fs.setMoleFraction(oilPhaseIdx, compIdx,
|
||||||
initialFluidState_.moleFraction(oilPhaseIdx,
|
initialFluidState_.moleFraction(oilPhaseIdx,
|
||||||
compIdx));
|
compIdx));
|
||||||
@@ -537,8 +537,8 @@ public:
|
|||||||
fs.setSaturation(gasPhaseIdx, 0.0);
|
fs.setSaturation(gasPhaseIdx, 0.0);
|
||||||
|
|
||||||
// set the compositions to the initial composition
|
// set the compositions to the initial composition
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||||
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
|
for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
|
||||||
fs.setMoleFraction(phaseIdx, compIdx,
|
fs.setMoleFraction(phaseIdx, compIdx,
|
||||||
initialFluidState_.moleFraction(phaseIdx,
|
initialFluidState_.moleFraction(phaseIdx,
|
||||||
compIdx));
|
compIdx));
|
||||||
@@ -554,8 +554,8 @@ public:
|
|||||||
* For this problem, the source term of all components is 0 everywhere.
|
* For this problem, the source term of all components is 0 everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -591,8 +591,8 @@ private:
|
|||||||
fs.setPressure(gasPhaseIdx, pw + (pC[gasPhaseIdx] - pC[waterPhaseIdx]));
|
fs.setPressure(gasPhaseIdx, pw + (pC[gasPhaseIdx] - pC[waterPhaseIdx]));
|
||||||
|
|
||||||
// reset all mole fractions to 0
|
// reset all mole fractions to 0
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||||
for (int compIdx = 0; compIdx < numComponents; ++compIdx)
|
for (unsigned compIdx = 0; compIdx < numComponents; ++compIdx)
|
||||||
fs.setMoleFraction(phaseIdx, compIdx, 0.0);
|
fs.setMoleFraction(phaseIdx, compIdx, 0.0);
|
||||||
|
|
||||||
//////
|
//////
|
||||||
|
|||||||
@@ -228,8 +228,8 @@ public:
|
|||||||
auto elemEndIt = this->gridView().template end</*codim=*/0>();
|
auto elemEndIt = this->gridView().template end</*codim=*/0>();
|
||||||
for (; elemIt != elemEndIt; ++elemIt) {
|
for (; elemIt != elemEndIt; ++elemIt) {
|
||||||
stencil.update(*elemIt);
|
stencil.update(*elemIt);
|
||||||
for (int dofIdx = 0; dofIdx < stencil.numPrimaryDof(); ++ dofIdx) {
|
for (unsigned dofIdx = 0; dofIdx < stencil.numPrimaryDof(); ++ dofIdx) {
|
||||||
int globalDofIdx = stencil.globalSpaceIndex(dofIdx);
|
unsigned globalDofIdx = stencil.globalSpaceIndex(dofIdx);
|
||||||
const auto& dofPos = stencil.subControlVolume(dofIdx).center();
|
const auto& dofPos = stencil.subControlVolume(dofIdx).center();
|
||||||
dofIsInLens_[globalDofIdx] = isInLens_(dofPos);
|
dofIsInLens_[globalDofIdx] = isInLens_(dofPos);
|
||||||
}
|
}
|
||||||
@@ -275,10 +275,10 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::temperature
|
* \copydoc FvBaseMultiPhaseProblem::temperature
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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(context.globalSpaceIndex(spaceIdx, timeIdx), timeIdx); }
|
{ return temperature(context.globalSpaceIndex(spaceIdx, timeIdx), timeIdx); }
|
||||||
|
|
||||||
Scalar temperature(int globalSpaceIdx, int timeIdx) const
|
Scalar temperature(unsigned globalSpaceIdx, unsigned timeIdx) const
|
||||||
{ return 273.15 + 10; } // -> 10°C
|
{ return 273.15 + 10; } // -> 10°C
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -286,8 +286,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const DimMatrix &intrinsicPermeability(const Context &context,
|
const DimMatrix &intrinsicPermeability(const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isInLens_(pos))
|
if (isInLens_(pos))
|
||||||
@@ -299,7 +299,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 0.4; }
|
{ return 0.4; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -307,14 +307,14 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams &materialLawParams(const Context &context,
|
const MaterialLawParams &materialLawParams(const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
int globalSpaceIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
unsigned globalSpaceIdx = context.globalSpaceIndex(spaceIdx, timeIdx);
|
||||||
return materialLawParams(globalSpaceIdx, timeIdx);
|
return materialLawParams(globalSpaceIdx, timeIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
const MaterialLawParams& materialLawParams(int globalSpaceIdx, int timeIdx) const
|
const MaterialLawParams& materialLawParams(unsigned globalSpaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
if (dofIsInLens_[globalSpaceIdx])
|
if (dofIsInLens_[globalSpaceIdx])
|
||||||
return lensMaterialParams_;
|
return lensMaterialParams_;
|
||||||
@@ -328,13 +328,13 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar referencePressure(const Context &context,
|
Scalar referencePressure(const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ return referencePressure(context.globalSpaceIndex(spaceIdx, timeIdx), timeIdx); }
|
{ return referencePressure(context.globalSpaceIndex(spaceIdx, timeIdx), timeIdx); }
|
||||||
|
|
||||||
// the Richards model does not have an element context available at all places
|
// the Richards model does not have an element context available at all places
|
||||||
// where the reference pressure is required...
|
// where the reference pressure is required...
|
||||||
Scalar referencePressure(int globalSpaceIdx, int timeIdx) const
|
Scalar referencePressure(unsigned globalSpaceIdx, unsigned timeIdx) const
|
||||||
{ return pnRef_; }
|
{ return pnRef_; }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -350,8 +350,8 @@ public:
|
|||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values,
|
void boundary(BoundaryRateVector &values,
|
||||||
const Context &context,
|
const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -395,8 +395,8 @@ public:
|
|||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values,
|
void initial(PrimaryVariables &values,
|
||||||
const Context &context,
|
const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &materialParams = this->materialLawParams(context, spaceIdx, timeIdx);
|
const auto &materialParams = this->materialLawParams(context, spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -419,8 +419,8 @@ public:
|
|||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate,
|
void source(RateVector &rate,
|
||||||
const Context &context,
|
const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -447,7 +447,7 @@ private:
|
|||||||
|
|
||||||
bool isInLens_(const GlobalPosition &pos) const
|
bool isInLens_(const GlobalPosition &pos) const
|
||||||
{
|
{
|
||||||
for (int i = 0; i < dimWorld; ++i) {
|
for (unsigned i = 0; i < dimWorld; ++i) {
|
||||||
if (pos[i] < lensLowerLeft_[i] || pos[i] > lensUpperRight_[i])
|
if (pos[i] < lensLowerLeft_[i] || pos[i] > lensUpperRight_[i])
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,7 +179,7 @@ public:
|
|||||||
* This problem assumes a temperature of 10 degrees Celsius.
|
* This problem assumes a temperature of 10 degrees Celsius.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar temperature(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 273.15 + 10; /* -> 10 deg C */ }
|
{ return 273.15 + 10; /* -> 10 deg C */ }
|
||||||
|
|
||||||
// \}
|
// \}
|
||||||
@@ -198,7 +198,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -229,8 +229,8 @@ public:
|
|||||||
* 0.5% is set.
|
* 0.5% is set.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &globalPos = context.pos(spaceIdx, timeIdx);
|
||||||
values = 0.0;
|
values = 0.0;
|
||||||
@@ -264,8 +264,8 @@ public:
|
|||||||
* is 0 everywhere.
|
* is 0 everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -276,7 +276,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void constraints(Constraints &constraints, const Context &context,
|
void constraints(Constraints &constraints, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -289,7 +289,7 @@ public:
|
|||||||
;
|
;
|
||||||
constraints.setConstraint(moleFrac1Idx, conti0EqIdx + 1,
|
constraints.setConstraint(moleFrac1Idx, conti0EqIdx + 1,
|
||||||
initCond[moleFrac1Idx]);
|
initCond[moleFrac1Idx]);
|
||||||
for (int axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
for (unsigned axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
||||||
constraints.setConstraint(velocity0Idx + axisIdx,
|
constraints.setConstraint(velocity0Idx + axisIdx,
|
||||||
momentum0EqIdx + axisIdx,
|
momentum0EqIdx + axisIdx,
|
||||||
initCond[velocity0Idx + axisIdx]);
|
initCond[velocity0Idx + axisIdx]);
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -225,8 +225,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ public:
|
|||||||
Scalar rho = 1.189;
|
Scalar rho = 1.189;
|
||||||
Scalar pressure = 1e5 - rho * this->gravity()[1] * y;
|
Scalar pressure = 1e5 - rho * this->gravity()[1] * y;
|
||||||
|
|
||||||
for (int axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
for (unsigned axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
||||||
values[velocity0Idx + axisIdx] = velocity[axisIdx];
|
values[velocity0Idx + axisIdx] = velocity[axisIdx];
|
||||||
|
|
||||||
values[pressureIdx] = pressure;
|
values[pressureIdx] = pressure;
|
||||||
@@ -274,8 +274,8 @@ public:
|
|||||||
* is 0 everywhere.
|
* is 0 everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -286,7 +286,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void constraints(Constraints &constraints, const Context &context,
|
void constraints(Constraints &constraints, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ public:
|
|||||||
constraints.setConstraint(moleFrac1Idx, conti0EqIdx + 1,
|
constraints.setConstraint(moleFrac1Idx, conti0EqIdx + 1,
|
||||||
initCond[moleFrac1Idx]);
|
initCond[moleFrac1Idx]);
|
||||||
;
|
;
|
||||||
for (int axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
for (unsigned axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
||||||
constraints.setConstraint(velocity0Idx + axisIdx,
|
constraints.setConstraint(velocity0Idx + axisIdx,
|
||||||
momentum0EqIdx + axisIdx,
|
momentum0EqIdx + axisIdx,
|
||||||
initCond[momentum0EqIdx + axisIdx]);
|
initCond[momentum0EqIdx + axisIdx]);
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public:
|
|||||||
* This problem assumes a constant temperature of 10 degrees Celsius.
|
* This problem assumes a constant temperature of 10 degrees Celsius.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar temperature(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar temperature(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ return 273.15 + 10; } // -> 10 deg C
|
{ return 273.15 + 10; } // -> 10 deg C
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -193,7 +193,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values, const Context &context,
|
void boundary(BoundaryRateVector &values, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -233,8 +233,8 @@ public:
|
|||||||
* \copydoc FvBaseProblem::initial
|
* \copydoc FvBaseProblem::initial
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void initial(PrimaryVariables &values, const Context &context, int spaceIdx,
|
void initial(PrimaryVariables &values, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ public:
|
|||||||
DimVector velocity(0.0);
|
DimVector velocity(0.0);
|
||||||
velocity[0] = a * y * y + b * y + c;
|
velocity[0] = a * y * y + b * y + c;
|
||||||
|
|
||||||
for (int axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
for (unsigned axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
||||||
values[velocity0Idx + axisIdx] = velocity[axisIdx];
|
values[velocity0Idx + axisIdx] = velocity[axisIdx];
|
||||||
values[pressureIdx] = 1e5;
|
values[pressureIdx] = 1e5;
|
||||||
}
|
}
|
||||||
@@ -263,8 +263,8 @@ public:
|
|||||||
* is 0 everywhere.
|
* is 0 everywhere.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate, const Context &context, int spaceIdx,
|
void source(RateVector &rate, const Context &context, unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{ rate = Scalar(0.0); }
|
{ rate = Scalar(0.0); }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -275,7 +275,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void constraints(Constraints &constraints, const Context &context,
|
void constraints(Constraints &constraints, const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -286,7 +286,7 @@ public:
|
|||||||
constraints.setConstraint(pressureIdx, conti0EqIdx,
|
constraints.setConstraint(pressureIdx, conti0EqIdx,
|
||||||
initCond[pressureIdx]);
|
initCond[pressureIdx]);
|
||||||
;
|
;
|
||||||
for (int axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
for (unsigned axisIdx = 0; axisIdx < dimWorld; ++axisIdx)
|
||||||
constraints.setConstraint(velocity0Idx + axisIdx,
|
constraints.setConstraint(velocity0Idx + axisIdx,
|
||||||
momentum0EqIdx + axisIdx,
|
momentum0EqIdx + axisIdx,
|
||||||
initCond[velocity0Idx + axisIdx]);
|
initCond[velocity0Idx + axisIdx]);
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ public:
|
|||||||
* permeable than the lower one.
|
* permeable than the lower one.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -314,7 +314,7 @@ public:
|
|||||||
* \copydoc FvBaseMultiPhaseProblem::porosity
|
* \copydoc FvBaseMultiPhaseProblem::porosity
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar porosity(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar porosity(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -328,8 +328,8 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const MaterialLawParams& materialLawParams(const Context &context,
|
const MaterialLawParams& materialLawParams(const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -344,7 +344,7 @@ public:
|
|||||||
* In this case, we assume the rock-matrix to be granite.
|
* In this case, we assume the rock-matrix to be granite.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
Scalar heatCapacitySolid(const Context &context, int spaceIdx, int timeIdx) const
|
Scalar heatCapacitySolid(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
790 // specific heat capacity of granite [J / (kg K)]
|
790 // specific heat capacity of granite [J / (kg K)]
|
||||||
@@ -356,7 +356,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
const HeatConductionLawParams&
|
const HeatConductionLawParams&
|
||||||
heatConductionParams(const Context &context, int spaceIdx, int timeIdx) const
|
heatConductionParams(const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
if (isFineMaterial_(pos))
|
if (isFineMaterial_(pos))
|
||||||
@@ -382,7 +382,7 @@ public:
|
|||||||
template <class Context>
|
template <class Context>
|
||||||
void boundary(BoundaryRateVector &values,
|
void boundary(BoundaryRateVector &values,
|
||||||
const Context &context,
|
const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.cvCenter(spaceIdx, timeIdx);
|
const auto &pos = context.cvCenter(spaceIdx, timeIdx);
|
||||||
assert(onLeftBoundary_(pos) ||
|
assert(onLeftBoundary_(pos) ||
|
||||||
@@ -433,7 +433,7 @@ public:
|
|||||||
* liquid water and assume hydrostatic pressure.
|
* liquid water and assume hydrostatic pressure.
|
||||||
*/
|
*/
|
||||||
template <class Context>
|
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;
|
Opm::CompositionalFluidState<Scalar, FluidSystem> fs;
|
||||||
initialFluidState_(fs, context, spaceIdx, timeIdx);
|
initialFluidState_(fs, context, spaceIdx, timeIdx);
|
||||||
@@ -451,7 +451,7 @@ public:
|
|||||||
template <class Context>
|
template <class Context>
|
||||||
void constraints(Constraints &constraints,
|
void constraints(Constraints &constraints,
|
||||||
const Context &context,
|
const Context &context,
|
||||||
int spaceIdx, int timeIdx) const
|
unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const auto &pos = context.pos(spaceIdx, timeIdx);
|
const auto &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -468,7 +468,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
template <class Context>
|
template <class Context>
|
||||||
void source(RateVector &rate,
|
void source(RateVector &rate,
|
||||||
const Context &context, int spaceIdx, int timeIdx) const
|
const Context &context, unsigned spaceIdx, unsigned timeIdx) const
|
||||||
{ rate = 0; }
|
{ rate = 0; }
|
||||||
|
|
||||||
//! \}
|
//! \}
|
||||||
@@ -495,8 +495,8 @@ private:
|
|||||||
template <class Context, class FluidState>
|
template <class Context, class FluidState>
|
||||||
void initialFluidState_(FluidState &fs,
|
void initialFluidState_(FluidState &fs,
|
||||||
const Context &context,
|
const Context &context,
|
||||||
int spaceIdx,
|
unsigned spaceIdx,
|
||||||
int timeIdx) const
|
unsigned timeIdx) const
|
||||||
{
|
{
|
||||||
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
const GlobalPosition &pos = context.pos(spaceIdx, timeIdx);
|
||||||
|
|
||||||
@@ -530,18 +530,18 @@ private:
|
|||||||
// create a Fluid state which has all phases present
|
// create a Fluid state which has all phases present
|
||||||
Opm::ImmiscibleFluidState<Scalar, FluidSystem> fs;
|
Opm::ImmiscibleFluidState<Scalar, FluidSystem> fs;
|
||||||
fs.setTemperature(293.15);
|
fs.setTemperature(293.15);
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
fs.setPressure(phaseIdx, 1.0135e5);
|
fs.setPressure(phaseIdx, 1.0135e5);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename FluidSystem::ParameterCache paramCache;
|
typename FluidSystem::ParameterCache paramCache;
|
||||||
paramCache.updateAll(fs);
|
paramCache.updateAll(fs);
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
Scalar rho = FluidSystem::density(fs, paramCache, phaseIdx);
|
Scalar rho = FluidSystem::density(fs, paramCache, phaseIdx);
|
||||||
fs.setDensity(phaseIdx, rho);
|
fs.setDensity(phaseIdx, rho);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
|
||||||
Scalar lambdaSaturated;
|
Scalar lambdaSaturated;
|
||||||
if (FluidSystem::isLiquid(phaseIdx)) {
|
if (FluidSystem::isLiquid(phaseIdx)) {
|
||||||
Scalar lambdaFluid =
|
Scalar lambdaFluid =
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ void testQuadrature();
|
|||||||
GlobalPosition::field_type f(const GlobalPosition &pos)
|
GlobalPosition::field_type f(const GlobalPosition &pos)
|
||||||
{
|
{
|
||||||
GlobalPosition::field_type result = 1;
|
GlobalPosition::field_type result = 1;
|
||||||
for (int i = 0; i < GlobalPosition::dimension; ++i)
|
for (unsigned i = 0; i < GlobalPosition::dimension; ++i)
|
||||||
result *= pos[i];
|
result *= pos[i];
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -80,10 +80,10 @@ void testIdenityMapping()
|
|||||||
foo.setCorners(corners, 8);
|
foo.setCorners(corners, 8);
|
||||||
|
|
||||||
std::cout << "testing identity mapping...\n";
|
std::cout << "testing identity mapping...\n";
|
||||||
int n = 100;
|
unsigned n = 100;
|
||||||
for (int i = 0; i < n; ++i) {
|
for (unsigned i = 0; i < n; ++i) {
|
||||||
for (int j = 0; j < n; ++j) {
|
for (unsigned j = 0; j < n; ++j) {
|
||||||
for (int k = 0; k < n; ++k) {
|
for (unsigned k = 0; k < n; ++k) {
|
||||||
LocalPosition localPos;
|
LocalPosition localPos;
|
||||||
|
|
||||||
localPos[0] = Scalar(i) / (n - 1);
|
localPos[0] = Scalar(i) / (n - 1);
|
||||||
@@ -119,10 +119,10 @@ void writeTetrahedronSubControlVolumes(const Grid &grid)
|
|||||||
const auto &eEndIt = gridView.template end<0>();
|
const auto &eEndIt = gridView.template end<0>();
|
||||||
for (; eIt != eEndIt; ++eIt) {
|
for (; eIt != eEndIt; ++eIt) {
|
||||||
stencil.update(*eIt);
|
stencil.update(*eIt);
|
||||||
for (int scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
for (unsigned scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
||||||
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
||||||
|
|
||||||
for (int i = 0; i < scvLocalGeom.numCorners; ++i) {
|
for (unsigned i = 0; i < scvLocalGeom.numCorners; ++i) {
|
||||||
GlobalPosition pos(
|
GlobalPosition pos(
|
||||||
eIt->geometry().global(scvLocalGeom.corner(i)));
|
eIt->geometry().global(scvLocalGeom.corner(i)));
|
||||||
gf2.insertVertex(pos);
|
gf2.insertVertex(pos);
|
||||||
@@ -134,11 +134,11 @@ void writeTetrahedronSubControlVolumes(const Grid &grid)
|
|||||||
eIt = gridView.template begin<0>();
|
eIt = gridView.template begin<0>();
|
||||||
for (; eIt != eEndIt; ++eIt) {
|
for (; eIt != eEndIt; ++eIt) {
|
||||||
stencil.update(*eIt);
|
stencil.update(*eIt);
|
||||||
for (int scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
for (unsigned scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
||||||
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
||||||
|
|
||||||
std::vector<unsigned int> vertexIndices;
|
std::vector<unsigned int> vertexIndices;
|
||||||
for (int i = 0; i < scvLocalGeom.numCorners; ++i) {
|
for (unsigned i = 0; i < scvLocalGeom.numCorners; ++i) {
|
||||||
vertexIndices.push_back(cornerOffset);
|
vertexIndices.push_back(cornerOffset);
|
||||||
++cornerOffset;
|
++cornerOffset;
|
||||||
}
|
}
|
||||||
@@ -198,10 +198,10 @@ void writeCubeSubControlVolumes(const Grid &grid)
|
|||||||
const auto &eEndIt = gridView.template end<0>();
|
const auto &eEndIt = gridView.template end<0>();
|
||||||
for (; eIt != eEndIt; ++eIt) {
|
for (; eIt != eEndIt; ++eIt) {
|
||||||
stencil.update(*eIt);
|
stencil.update(*eIt);
|
||||||
for (int scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
for (unsigned scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
||||||
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
||||||
|
|
||||||
for (int i = 0; i < scvLocalGeom.numCorners; ++i) {
|
for (unsigned i = 0; i < scvLocalGeom.numCorners; ++i) {
|
||||||
GlobalPosition pos(
|
GlobalPosition pos(
|
||||||
eIt->geometry().global(scvLocalGeom.corner(i)));
|
eIt->geometry().global(scvLocalGeom.corner(i)));
|
||||||
gf2.insertVertex(pos);
|
gf2.insertVertex(pos);
|
||||||
@@ -213,11 +213,11 @@ void writeCubeSubControlVolumes(const Grid &grid)
|
|||||||
eIt = gridView.template begin<0>();
|
eIt = gridView.template begin<0>();
|
||||||
for (; eIt != eEndIt; ++eIt) {
|
for (; eIt != eEndIt; ++eIt) {
|
||||||
stencil.update(*eIt);
|
stencil.update(*eIt);
|
||||||
for (int scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
for (unsigned scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
||||||
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
||||||
|
|
||||||
std::vector<unsigned int> vertexIndices;
|
std::vector<unsigned int> vertexIndices;
|
||||||
for (int i = 0; i < scvLocalGeom.numCorners; ++i) {
|
for (unsigned i = 0; i < scvLocalGeom.numCorners; ++i) {
|
||||||
vertexIndices.push_back(cornerOffset);
|
vertexIndices.push_back(cornerOffset);
|
||||||
++cornerOffset;
|
++cornerOffset;
|
||||||
}
|
}
|
||||||
@@ -313,7 +313,7 @@ void testQuadrature()
|
|||||||
stencil.update(*eIt);
|
stencil.update(*eIt);
|
||||||
|
|
||||||
// loop over all sub-control volumes
|
// loop over all sub-control volumes
|
||||||
for (int scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
for (unsigned scvIdx = 0; scvIdx < stencil.numDof(); ++scvIdx) {
|
||||||
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
const auto &scvLocalGeom = stencil.subControlVolume(scvIdx).localGeometry();
|
||||||
|
|
||||||
Dune::GeometryType geomType = scvLocalGeom.type();
|
Dune::GeometryType geomType = scvLocalGeom.type();
|
||||||
|
|||||||
Reference in New Issue
Block a user