Merge pull request #659 from akva2/no_opm_in_opm

fixed: do not use Opm:: prefix when inside namespace Opm
This commit is contained in:
Markus Blatt 2021-05-26 16:08:05 +02:00 committed by GitHub
commit eab6faeea3
47 changed files with 489 additions and 489 deletions

View File

@ -65,7 +65,7 @@ class BlackOilBoundaryRateVector : public GetPropType<TypeTag, Properties::RateV
static constexpr bool blackoilConserveSurfaceVolume = getPropValue<TypeTag, Properties::BlackoilConserveSurfaceVolume>();
using EnergyModule = Opm::BlackOilEnergyModule<TypeTag, enableEnergy>;
using EnergyModule = BlackOilEnergyModule<TypeTag, enableEnergy>;
public:
/*!
@ -146,8 +146,8 @@ public:
specificEnthalpy = fluidState.enthalpy(phaseIdx);
}
else {
density = Opm::getValue(fluidState.density(phaseIdx));
specificEnthalpy = Opm::getValue(fluidState.enthalpy(phaseIdx));
density = getValue(fluidState.density(phaseIdx));
specificEnthalpy = getValue(fluidState.enthalpy(phaseIdx));
}
}
else if (focusDofIdx == interiorDofIdx) {
@ -155,8 +155,8 @@ public:
specificEnthalpy = insideIntQuants.fluidState().enthalpy(phaseIdx);
}
else {
density = Opm::getValue(insideIntQuants.fluidState().density(phaseIdx));
specificEnthalpy = Opm::getValue(insideIntQuants.fluidState().enthalpy(phaseIdx));
density = getValue(insideIntQuants.fluidState().density(phaseIdx));
specificEnthalpy = getValue(insideIntQuants.fluidState().enthalpy(phaseIdx));
}
Evaluation enthalpyRate = density*extQuants.volumeFlux(phaseIdx)*specificEnthalpy;
@ -186,9 +186,9 @@ public:
#ifndef NDEBUG
for (unsigned i = 0; i < numEq; ++i) {
Opm::Valgrind::CheckDefined((*this)[i]);
Valgrind::CheckDefined((*this)[i]);
}
Opm::Valgrind::CheckDefined(*this);
Valgrind::CheckDefined(*this);
#endif
}
@ -263,8 +263,8 @@ public:
#ifndef NDEBUG
for (unsigned i = 0; i < numEq; ++i)
Opm::Valgrind::CheckDefined((*this)[i]);
Opm::Valgrind::CheckDefined(*this);
Valgrind::CheckDefined((*this)[i]);
Valgrind::CheckDefined(*this);
#endif
}
};

View File

@ -70,10 +70,10 @@ class BlackOilBrineModule
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
using Indices = GetPropType<TypeTag, Properties::Indices>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
using TabulatedTwoDFunction = typename Opm::IntervalTabulated2DFunction<Scalar>;
using TabulatedFunction = Tabulated1DFunction<Scalar>;
using TabulatedTwoDFunction = IntervalTabulated2DFunction<Scalar>;
static constexpr unsigned saltConcentrationIdx = Indices::saltConcentrationIdx;
static constexpr unsigned contiBrineEqIdx = Indices::contiBrineEqIdx;
@ -90,7 +90,7 @@ public:
/*!
* \brief Initialize all internal data structures needed by the brine module
*/
static void initFromState(const Opm::EclipseState& eclState)
static void initFromState(const EclipseState& eclState)
{
// some sanity checks: if brine are enabled, the BRINE keyword must be
// present, if brine are disabled the keyword must not be present.
@ -216,7 +216,7 @@ public:
* Toolbox::template decay<LhsEval>(intQuants.porosity());
// avoid singular matrix if no water is present.
surfaceVolumeWater = Opm::max(surfaceVolumeWater, 1e-10);
surfaceVolumeWater = max(surfaceVolumeWater, 1e-10);
// Brine in water phase
const LhsEval massBrine = surfaceVolumeWater
@ -249,8 +249,8 @@ public:
else {
flux[contiBrineEqIdx] =
extQuants.volumeFlux(waterPhaseIdx)
*Opm::decay<Scalar>(up.fluidState().invB(waterPhaseIdx))
*Opm::decay<Scalar>(up.fluidState().saltConcentration());
*decay<Scalar>(up.fluidState().invB(waterPhaseIdx))
*decay<Scalar>(up.fluidState().saltConcentration());
}
}

View File

@ -36,6 +36,7 @@
#include <dune/common/fvector.hh>
#include <stdexcept>
namespace Opm {
/*!
@ -92,7 +93,7 @@ class BlackOilDiffusionModule<TypeTag, /*enableDiffusion=*/true>
enum { numComponents = FluidSystem::numComponents };
enum { conti0EqIdx = Indices::conti0EqIdx };
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
public:
/*!
@ -270,7 +271,7 @@ protected:
if(!FluidSystem::enableDiffusion())
return;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, timeIdx);
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
if (!FluidSystem::phaseIsActive(phaseIdx)) {
@ -424,7 +425,7 @@ protected:
-
intQuantsInside.fluidState().moleFraction(phaseIdx, compIdx))
* diffusivity / faceArea; //opm-models expects pr area flux
Opm::Valgrind::CheckDefined(moleFractionGradientNormal_[phaseIdx][compIdx]);
Valgrind::CheckDefined(moleFractionGradientNormal_[phaseIdx][compIdx]);
// use the arithmetic average for the effective
// diffusion coefficients.
@ -434,7 +435,7 @@ protected:
intQuantsOutside.effectiveDiffusionCoefficient(phaseIdx, compIdx))
/ 2;
Opm::Valgrind::CheckDefined(effectiveDiffusionCoefficient_[phaseIdx][compIdx]);
Valgrind::CheckDefined(effectiveDiffusionCoefficient_[phaseIdx][compIdx]);
}
}
}

View File

@ -80,7 +80,7 @@ public:
// energys have been disabled at compile time
return;
Opm::VtkBlackOilEnergyModule<TypeTag>::registerParameters();
VtkBlackOilEnergyModule<TypeTag>::registerParameters();
}
/*!
@ -93,7 +93,7 @@ public:
// energys have been disabled at compile time
return;
model.addOutputModule(new Opm::VtkBlackOilEnergyModule<TypeTag>(simulator));
model.addOutputModule(new VtkBlackOilEnergyModule<TypeTag>(simulator));
}
static bool primaryVarApplies(unsigned pvIdx)
@ -150,7 +150,7 @@ public:
if (!enableEnergy)
return;
const auto& poro = Opm::decay<LhsEval>(intQuants.porosity());
const auto& poro = decay<LhsEval>(intQuants.porosity());
// accumulate the internal energy of the fluids
const auto& fs = intQuants.fluidState();
@ -158,16 +158,16 @@ public:
if (!FluidSystem::phaseIsActive(phaseIdx))
continue;
const auto& u = Opm::decay<LhsEval>(fs.internalEnergy(phaseIdx));
const auto& S = Opm::decay<LhsEval>(fs.saturation(phaseIdx));
const auto& rho = Opm::decay<LhsEval>(fs.density(phaseIdx));
const auto& u = decay<LhsEval>(fs.internalEnergy(phaseIdx));
const auto& S = decay<LhsEval>(fs.saturation(phaseIdx));
const auto& rho = decay<LhsEval>(fs.density(phaseIdx));
storage[contiEnergyEqIdx] += poro*S*u*rho;
}
// add the internal energy of the rock
Scalar refPoro = intQuants.referencePorosity();
const auto& uRock = Opm::decay<LhsEval>(intQuants.rockInternalEnergy());
const auto& uRock = decay<LhsEval>(intQuants.rockInternalEnergy());
storage[contiEnergyEqIdx] += (1.0 - refPoro)*uRock;
storage[contiEnergyEqIdx] *= getPropValue<TypeTag, Properties::BlackOilEnergyScalingFactor>();
}
@ -214,8 +214,8 @@ public:
const auto& volFlux = extQuants.volumeFlux(phaseIdx);
flux[contiEnergyEqIdx] +=
Opm::decay<UpstreamEval>(fs.enthalpy(phaseIdx))
* Opm::decay<UpstreamEval>(fs.density(phaseIdx))
decay<UpstreamEval>(fs.enthalpy(phaseIdx))
* decay<UpstreamEval>(fs.density(phaseIdx))
* volFlux;
}
@ -285,7 +285,7 @@ public:
static Scalar computeResidualError(const EqVector& resid)
{
// do not weight the residual of energy when it comes to convergence
return std::abs(Opm::scalarValue(resid[contiEnergyEqIdx]));
return std::abs(scalarValue(resid[contiEnergyEqIdx]));
}
template <class DofEntity>
@ -469,7 +469,7 @@ class BlackOilEnergyExtensiveQuantities
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using EnergyModule = BlackOilEnergyModule<TypeTag>;
@ -496,28 +496,28 @@ public:
Evaluation deltaT;
if (elemCtx.focusDofIndex() == inIdx)
deltaT =
Opm::decay<Scalar>(exFs.temperature(/*phaseIdx=*/0))
decay<Scalar>(exFs.temperature(/*phaseIdx=*/0))
- inFs.temperature(/*phaseIdx=*/0);
else if (elemCtx.focusDofIndex() == exIdx)
deltaT =
exFs.temperature(/*phaseIdx=*/0)
- Opm::decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
- decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
else
deltaT =
Opm::decay<Scalar>(exFs.temperature(/*phaseIdx=*/0))
- Opm::decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
decay<Scalar>(exFs.temperature(/*phaseIdx=*/0))
- decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
Evaluation inLambda;
if (elemCtx.focusDofIndex() == inIdx)
inLambda = inIq.totalThermalConductivity();
else
inLambda = Opm::decay<Scalar>(inIq.totalThermalConductivity());
inLambda = decay<Scalar>(inIq.totalThermalConductivity());
Evaluation exLambda;
if (elemCtx.focusDofIndex() == exIdx)
exLambda = exIq.totalThermalConductivity();
else
exLambda = Opm::decay<Scalar>(exIq.totalThermalConductivity());
exLambda = decay<Scalar>(exIq.totalThermalConductivity());
auto distVec = elemCtx.pos(exIdx, timeIdx);
distVec -= elemCtx.pos(inIdx, timeIdx);
@ -560,14 +560,14 @@ public:
- inFs.temperature(/*phaseIdx=*/0);
else
deltaT =
Opm::decay<Scalar>(boundaryFs.temperature(/*phaseIdx=*/0))
- Opm::decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
decay<Scalar>(boundaryFs.temperature(/*phaseIdx=*/0))
- decay<Scalar>(inFs.temperature(/*phaseIdx=*/0));
Evaluation lambda;
if (ctx.focusDofIndex() == inIdx)
lambda = inIq.totalThermalConductivity();
else
lambda = Opm::decay<Scalar>(inIq.totalThermalConductivity());
lambda = decay<Scalar>(inIq.totalThermalConductivity());
auto distVec = scvf.integrationPos();
distVec -= ctx.pos(inIdx, timeIdx);

View File

@ -83,10 +83,10 @@ class BlackOilExtboModule
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
using Indices = GetPropType<TypeTag, Properties::Indices>;
typedef Opm::MathToolbox<Evaluation> Toolbox;
using Toolbox = MathToolbox<Evaluation>;
typedef typename Opm::Tabulated1DFunction<Scalar> TabulatedFunction;
typedef typename Opm::UniformXTabulated2DFunction<Scalar> Tabulated2DFunction;
using TabulatedFunction = Tabulated1DFunction<Scalar>;
using Tabulated2DFunction = UniformXTabulated2DFunction<Scalar>;
static constexpr unsigned zFractionIdx = Indices::zFractionIdx;
static constexpr unsigned contiZfracEqIdx = Indices::contiZfracEqIdx;
@ -103,7 +103,7 @@ public:
/*!
* \brief Initialize all internal data structures needed by the solvent module
*/
static void initFromState(const Opm::EclipseState& eclState)
static void initFromState(const EclipseState& eclState)
{
// some sanity checks: if extended BO is enabled, the PVTSOL keyword must be
// present, if extended BO is disabled the keyword must not be present.
@ -267,7 +267,7 @@ public:
// extBO have disabled at compile time
return;
//Opm::VtkBlackOilExtboModule<TypeTag>::registerParameters();
//VtkBlackOilExtboModule<TypeTag>::registerParameters();
}
/*!
@ -280,7 +280,7 @@ public:
// extBO have disabled at compile time
return;
//model.addOutputModule(new Opm::VtkBlackOilExtboModule<TypeTag>(simulator));
//model.addOutputModule(new VtkBlackOilExtboModule<TypeTag>(simulator));
}
static bool primaryVarApplies(unsigned pvIdx)
@ -393,8 +393,8 @@ public:
else {
flux[contiZfracEqIdx] =
extQuants.volumeFlux(gasPhaseIdx)
* (Opm::decay<Scalar>(upGas.yVolume()))
* Opm::decay<Scalar>(fsGas.invB(gasPhaseIdx));
* (decay<Scalar>(upGas.yVolume()))
* decay<Scalar>(fsGas.invB(gasPhaseIdx));
}
if (FluidSystem::enableDissolvedGas()) { // account for dissolved z in oil phase
unsigned upIdxOil = static_cast<unsigned>(extQuants.upstreamIndex(oilPhaseIdx));
@ -410,9 +410,9 @@ public:
else {
flux[contiZfracEqIdx] +=
extQuants.volumeFlux(oilPhaseIdx)
* Opm::decay<Scalar>(upOil.xVolume())
* Opm::decay<Scalar>(fsOil.Rs())
* Opm::decay<Scalar>(fsOil.invB(oilPhaseIdx));
* decay<Scalar>(upOil.xVolume())
* decay<Scalar>(fsOil.Rs())
* decay<Scalar>(fsOil.invB(oilPhaseIdx));
}
}
}
@ -898,7 +898,7 @@ class BlackOilExtboExtensiveQuantities
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
static constexpr unsigned gasPhaseIdx = FluidSystem::gasPhaseIdx;
static constexpr int dimWorld = GridView::dimensionworld;

View File

@ -63,7 +63,7 @@ class BlackOilExtensiveQuantities
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
enum { enableDiffusion = getPropValue<TypeTag, Properties::EnableDiffusion>() };
using DiffusionExtensiveQuantities = Opm::BlackOilDiffusionExtensiveQuantities<TypeTag, enableDiffusion>;
using DiffusionExtensiveQuantities = BlackOilDiffusionExtensiveQuantities<TypeTag, enableDiffusion>;
public:

View File

@ -72,9 +72,9 @@ class BlackOilFoamModule
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
using Indices = GetPropType<TypeTag, Properties::Indices>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
using TabulatedFunction = Tabulated1DFunction<Scalar>;
static constexpr unsigned foamConcentrationIdx = Indices::foamConcentrationIdx;
static constexpr unsigned contiFoamEqIdx = Indices::contiFoamEqIdx;
@ -114,7 +114,7 @@ public:
/*!
* \brief Initialize all internal data structures needed by the foam module
*/
static void initFromState(const Opm::EclipseState& eclState)
static void initFromState(const EclipseState& eclState)
{
// some sanity checks: if foam is enabled, the FOAM keyword must be
// present, if foam is disabled the keyword must not be present.
@ -147,7 +147,7 @@ public:
setNumPvtRegions(numPvtRegions);
// Get and check FOAMROCK data.
const Opm::FoamConfig& foamConf = eclState.getInitConfig().getFoamConfig();
const FoamConfig& foamConf = eclState.getInitConfig().getFoamConfig();
if (numSatRegions != foamConf.size()) {
throw std::runtime_error("Inconsistent sizes, number of saturation regions differ from the number of elements "
"in FoamConfig, which typically corresponds to the number of records in FOAMROCK.");
@ -172,7 +172,7 @@ public:
foamCoefficients_[satReg].ep_surf = rec.exponent();
foamRockDensity_[satReg] = rec.rockDensity();
foamAllowDesorption_[satReg] = rec.allowDesorption();
const auto& foamadsTable = foamadsTables.template getTable<Opm::FoamadsTable>(satReg);
const auto& foamadsTable = foamadsTables.template getTable<FoamadsTable>(satReg);
const auto& conc = foamadsTable.getFoamConcentrationColumn();
const auto& ads = foamadsTable.getAdsorbedFoamColumn();
adsorbedFoamTable_[satReg].setXYContainers(conc, ads);
@ -193,7 +193,7 @@ public:
// Set data that vary with PVT region.
for (std::size_t pvtReg = 0; pvtReg < numPvtRegions; ++pvtReg) {
const auto& foammobTable = foammobTables.template getTable<Opm::FoammobTable>(pvtReg);
const auto& foammobTable = foammobTables.template getTable<FoammobTable>(pvtReg);
const auto& conc = foammobTable.getFoamConcentrationColumn();
const auto& mobMult = foammobTable.getMobilityMultiplierColumn();
gasMobilityMultiplierTable_[pvtReg].setXYContainers(conc, mobMult);
@ -231,7 +231,7 @@ public:
// foam has been disabled at compile time
return;
//Opm::VtkBlackOilFoamModule<TypeTag>::registerParameters();
//VtkBlackOilFoamModule<TypeTag>::registerParameters();
}
/*!
@ -245,9 +245,9 @@ public:
return;
if (enableVtkOutput) {
Opm::OpmLog::warning("VTK output requested, currently unsupported by the foam module.");
OpmLog::warning("VTK output requested, currently unsupported by the foam module.");
}
//model.addOutputModule(new Opm::VtkBlackOilFoamModule<TypeTag>(simulator));
//model.addOutputModule(new VtkBlackOilFoamModule<TypeTag>(simulator));
}
static bool primaryVarApplies(unsigned pvIdx)
@ -313,7 +313,7 @@ public:
* Toolbox::template decay<LhsEval>(intQuants.porosity());
// Avoid singular matrix if no gas is present.
surfaceVolumeFreeGas = Opm::max(surfaceVolumeFreeGas, 1e-10);
surfaceVolumeFreeGas = max(surfaceVolumeFreeGas, 1e-10);
// Foam/surfactant in gas phase.
const LhsEval gasFoam = surfaceVolumeFreeGas
@ -355,8 +355,8 @@ public:
} else {
flux[contiFoamEqIdx] =
extQuants.volumeFlux(gasPhaseIdx)
*Opm::decay<Scalar>(up.fluidState().invB(gasPhaseIdx))
*Opm::decay<Scalar>(up.foamConcentration());
*decay<Scalar>(up.fluidState().invB(gasPhaseIdx))
*decay<Scalar>(up.foamConcentration());
}
}

View File

@ -99,11 +99,11 @@ class BlackOilIntensiveQuantities
static const bool compositionSwitchEnabled = Indices::gasEnabled;
static const bool waterEnabled = Indices::waterEnabled;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using DimMatrix = Dune::FieldMatrix<Scalar, dimWorld, dimWorld>;
using FluxIntensiveQuantities = typename FluxModule::FluxIntensiveQuantities;
using FluidState = Opm::BlackOilFluidState<Evaluation, FluidSystem, enableTemperature, enableEnergy, compositionSwitchEnabled, enableBrine, Indices::numPhases >;
using DiffusionIntensiveQuantities = Opm::BlackOilDiffusionIntensiveQuantities<TypeTag, enableDiffusion>;
using FluidState = BlackOilFluidState<Evaluation, FluidSystem, enableTemperature, enableEnergy, compositionSwitchEnabled, enableBrine, Indices::numPhases >;
using DiffusionIntensiveQuantities = BlackOilDiffusionIntensiveQuantities<TypeTag, enableDiffusion>;
public:
BlackOilIntensiveQuantities()
@ -168,8 +168,8 @@ public:
}
}
Opm::Valgrind::CheckDefined(Sg);
Opm::Valgrind::CheckDefined(Sw);
Valgrind::CheckDefined(Sg);
Valgrind::CheckDefined(Sw);
Evaluation So = 1.0 - Sw - Sg;
@ -211,7 +211,7 @@ public:
// calculate relative permeabilities. note that we store the result into the
// mobility_ class attribute. the division by the phase viscosity happens later.
MaterialLaw::relativePermeabilities(mobility_, materialParams, fluidState_);
Opm::Valgrind::CheckDefined(mobility_);
Valgrind::CheckDefined(mobility_);
// update the Saturation functions for the blackoil solvent module.
asImp_().solventPostSatFuncUpdate_(elemCtx, dofIdx, timeIdx);
@ -221,8 +221,8 @@ public:
Evaluation SoMax = 0.0;
if (FluidSystem::phaseIsActive(FluidSystem::oilPhaseIdx)) {
SoMax = Opm::max(fluidState_.saturation(oilPhaseIdx),
elemCtx.problem().maxOilSaturation(globalSpaceIdx));
SoMax = max(fluidState_.saturation(oilPhaseIdx),
elemCtx.problem().maxOilSaturation(globalSpaceIdx));
}
// take the meaning of the switiching primary variable into account for the gas
@ -237,7 +237,7 @@ public:
oilPhaseIdx,
pvtRegionIdx,
SoMax);
fluidState_.setRs(Opm::min(RsMax, RsSat));
fluidState_.setRs(min(RsMax, RsSat));
}
else if (compositionSwitchEnabled)
fluidState_.setRs(0.0);
@ -249,7 +249,7 @@ public:
gasPhaseIdx,
pvtRegionIdx,
SoMax);
fluidState_.setRv(Opm::min(RvMax, RvSat));
fluidState_.setRv(min(RvMax, RvSat));
}
else if (compositionSwitchEnabled)
fluidState_.setRv(0.0);
@ -260,7 +260,7 @@ public:
// oil phase, we can directly set the composition of the oil phase
const auto& Rs = priVars.makeEvaluation(Indices::compositionSwitchIdx, timeIdx);
fluidState_.setRs(Opm::min(RsMax, Rs));
fluidState_.setRs(min(RsMax, Rs));
if (FluidSystem::enableVaporizedOil()) {
// the gas phase is not present, but we need to compute its "composition"
@ -272,7 +272,7 @@ public:
pvtRegionIdx,
SoMax);
fluidState_.setRv(Opm::min(RvMax, RvSat));
fluidState_.setRv(min(RvMax, RvSat));
}
else
fluidState_.setRv(0.0);
@ -291,7 +291,7 @@ public:
pvtRegionIdx,
SoMax);
fluidState_.setRs(Opm::min(RsMax, RsSat));
fluidState_.setRs(min(RsMax, RsSat));
} else {
fluidState_.setRs(0.0);
}
@ -322,7 +322,7 @@ public:
else
mobility_[phaseIdx] /= mu;
}
Opm::Valgrind::CheckDefined(mobility_);
Valgrind::CheckDefined(mobility_);
// calculate the phase densities
Evaluation rho;
@ -398,14 +398,14 @@ public:
if (!FluidSystem::phaseIsActive(phaseIdx))
continue;
assert(Opm::isfinite(fluidState_.density(phaseIdx)));
assert(Opm::isfinite(fluidState_.saturation(phaseIdx)));
assert(Opm::isfinite(fluidState_.temperature(phaseIdx)));
assert(Opm::isfinite(fluidState_.pressure(phaseIdx)));
assert(Opm::isfinite(fluidState_.invB(phaseIdx)));
assert(isfinite(fluidState_.density(phaseIdx)));
assert(isfinite(fluidState_.saturation(phaseIdx)));
assert(isfinite(fluidState_.temperature(phaseIdx)));
assert(isfinite(fluidState_.pressure(phaseIdx)));
assert(isfinite(fluidState_.invB(phaseIdx)));
}
assert(Opm::isfinite(fluidState_.Rs()));
assert(Opm::isfinite(fluidState_.Rv()));
assert(isfinite(fluidState_.Rs()));
assert(isfinite(fluidState_.Rv()));
#endif
}

View File

@ -80,14 +80,14 @@ class BlackOilLocalResidual : public GetPropType<TypeTag, Properties::DiscLocalR
static constexpr bool enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>();
static constexpr bool enableDiffusion = getPropValue<TypeTag, Properties::EnableDiffusion>();
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using SolventModule = BlackOilSolventModule<TypeTag>;
using ExtboModule = BlackOilExtboModule<TypeTag>;
using PolymerModule = BlackOilPolymerModule<TypeTag>;
using EnergyModule = BlackOilEnergyModule<TypeTag>;
using FoamModule = BlackOilFoamModule<TypeTag>;
using BrineModule = BlackOilBrineModule<TypeTag>;
using DiffusionModule = Opm::BlackOilDiffusionModule<TypeTag, enableDiffusion>;
using DiffusionModule = BlackOilDiffusionModule<TypeTag, enableDiffusion>;
public:
/*!
@ -110,7 +110,7 @@ public:
if (Indices::numPhases == 3) { // add trivial equation for the pseudo phase
unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
if (timeIdx == 0)
storage[conti0EqIdx + activeCompIdx] = Opm::variable<LhsEval>(0.0, conti0EqIdx + activeCompIdx);
storage[conti0EqIdx + activeCompIdx] = variable<LhsEval>(0.0, conti0EqIdx + activeCompIdx);
else
storage[conti0EqIdx + activeCompIdx] = 0.0;
}
@ -238,7 +238,7 @@ public:
const ExtensiveQuantities& extQuants,
const FluidState& upFs)
{
const auto& invB = Opm::getInvB_<FluidSystem, FluidState, UpEval>(upFs, phaseIdx, pvtRegionIdx);
const auto& invB = getInvB_<FluidSystem, FluidState, UpEval>(upFs, phaseIdx, pvtRegionIdx);
const auto& surfaceVolumeFlux = invB*extQuants.volumeFlux(phaseIdx);
unsigned activeCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::solventComponentIndex(phaseIdx));
@ -250,7 +250,7 @@ public:
if (phaseIdx == oilPhaseIdx) {
// dissolved gas (in the oil phase).
if (FluidSystem::enableDissolvedGas()) {
const auto& Rs = Opm::BlackOil::getRs_<FluidSystem, FluidState, UpEval>(upFs, pvtRegionIdx);
const auto& Rs = BlackOil::getRs_<FluidSystem, FluidState, UpEval>(upFs, pvtRegionIdx);
unsigned activeGasCompIdx = Indices::canonicalToActiveComponentIndex(gasCompIdx);
if (blackoilConserveSurfaceVolume)
@ -262,7 +262,7 @@ public:
else if (phaseIdx == gasPhaseIdx) {
// vaporized oil (in the gas phase).
if (FluidSystem::enableVaporizedOil()) {
const auto& Rv = Opm::BlackOil::getRv_<FluidSystem, FluidState, UpEval>(upFs, pvtRegionIdx);
const auto& Rv = BlackOil::getRv_<FluidSystem, FluidState, UpEval>(upFs, pvtRegionIdx);
unsigned activeOilCompIdx = Indices::canonicalToActiveComponentIndex(oilCompIdx);
if (blackoilConserveSurfaceVolume)

View File

@ -83,55 +83,55 @@ struct BlackOilModel { using InheritsFrom = std::tuple<VtkComposition,
//! Set the local residual function
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilLocalResidual<TypeTag>; };
struct LocalResidual<TypeTag, TTag::BlackOilModel> { using type = BlackOilLocalResidual<TypeTag>; };
//! Use the black-oil specific newton method
template<class TypeTag>
struct NewtonMethod<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilNewtonMethod<TypeTag>; };
struct NewtonMethod<TypeTag, TTag::BlackOilModel> { using type = BlackOilNewtonMethod<TypeTag>; };
//! The Model property
template<class TypeTag>
struct Model<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilModel<TypeTag>; };
struct Model<TypeTag, TTag::BlackOilModel> { using type = BlackOilModel<TypeTag>; };
//! The Problem property
template<class TypeTag>
struct BaseProblem<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilProblem<TypeTag>; };
struct BaseProblem<TypeTag, TTag::BlackOilModel> { using type = BlackOilProblem<TypeTag>; };
//! the RateVector property
template<class TypeTag>
struct RateVector<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilRateVector<TypeTag>; };
struct RateVector<TypeTag, TTag::BlackOilModel> { using type = BlackOilRateVector<TypeTag>; };
//! the BoundaryRateVector property
template<class TypeTag>
struct BoundaryRateVector<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilBoundaryRateVector<TypeTag>; };
struct BoundaryRateVector<TypeTag, TTag::BlackOilModel> { using type = BlackOilBoundaryRateVector<TypeTag>; };
//! the PrimaryVariables property
template<class TypeTag>
struct PrimaryVariables<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilPrimaryVariables<TypeTag>; };
struct PrimaryVariables<TypeTag, TTag::BlackOilModel> { using type = BlackOilPrimaryVariables<TypeTag>; };
//! the IntensiveQuantities property
template<class TypeTag>
struct IntensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilIntensiveQuantities<TypeTag>; };
struct IntensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = BlackOilIntensiveQuantities<TypeTag>; };
//! the ExtensiveQuantities property
template<class TypeTag>
struct ExtensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilExtensiveQuantities<TypeTag>; };
struct ExtensiveQuantities<TypeTag, TTag::BlackOilModel> { using type = BlackOilExtensiveQuantities<TypeTag>; };
//! Use the the velocity module which is aware of the black-oil specific model extensions
//! (i.e., the polymer and solvent extensions)
template<class TypeTag>
struct FluxModule<TypeTag, TTag::BlackOilModel> { using type = Opm::BlackOilDarcyFluxModule<TypeTag>; };
struct FluxModule<TypeTag, TTag::BlackOilModel> { using type = BlackOilDarcyFluxModule<TypeTag>; };
//! The indices required by the model
template<class TypeTag>
struct Indices<TypeTag, TTag::BlackOilModel>
{ using type = Opm::BlackOilIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
getPropValue<TypeTag, Properties::EnableExtbo>(),
getPropValue<TypeTag, Properties::EnablePolymer>(),
getPropValue<TypeTag, Properties::EnableEnergy>(),
getPropValue<TypeTag, Properties::EnableFoam>(),
getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0>; };
{ using type = BlackOilIndices<getPropValue<TypeTag, Properties::EnableSolvent>(),
getPropValue<TypeTag, Properties::EnableExtbo>(),
getPropValue<TypeTag, Properties::EnablePolymer>(),
getPropValue<TypeTag, Properties::EnableEnergy>(),
getPropValue<TypeTag, Properties::EnableFoam>(),
getPropValue<TypeTag, Properties::EnableBrine>(),
/*PVOffset=*/0>; };
//! Set the fluid system to the black-oil fluid system by default
template<class TypeTag>
@ -142,7 +142,7 @@ private:
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
public:
using type = Opm::BlackOilFluidSystem<Scalar>;
using type = BlackOilFluidSystem<Scalar>;
};
// by default, all ECL extension modules are disabled
@ -286,7 +286,7 @@ class BlackOilModel
using ExtboModule = BlackOilExtboModule<TypeTag>;
using PolymerModule = BlackOilPolymerModule<TypeTag>;
using EnergyModule = BlackOilEnergyModule<TypeTag>;
using DiffusionModule = Opm::BlackOilDiffusionModule<TypeTag, enableDiffusion>;
using DiffusionModule = BlackOilDiffusionModule<TypeTag, enableDiffusion>;
public:
BlackOilModel(Simulator& simulator)
@ -307,11 +307,11 @@ public:
DiffusionModule::registerParameters();
// register runtime parameters of the VTK output modules
Opm::VtkBlackOilModule<TypeTag>::registerParameters();
Opm::VtkCompositionModule<TypeTag>::registerParameters();
VtkBlackOilModule<TypeTag>::registerParameters();
VtkCompositionModule<TypeTag>::registerParameters();
if (enableDiffusion)
Opm::VtkDiffusionModule<TypeTag>::registerParameters();
VtkDiffusionModule<TypeTag>::registerParameters();
}
/*!
@ -596,11 +596,11 @@ protected:
PolymerModule::registerOutputModules(*this, this->simulator_);
EnergyModule::registerOutputModules(*this, this->simulator_);
this->addOutputModule(new Opm::VtkBlackOilModule<TypeTag>(this->simulator_));
this->addOutputModule(new Opm::VtkCompositionModule<TypeTag>(this->simulator_));
this->addOutputModule(new VtkBlackOilModule<TypeTag>(this->simulator_));
this->addOutputModule(new VtkCompositionModule<TypeTag>(this->simulator_));
if (enableDiffusion)
this->addOutputModule(new Opm::VtkDiffusionModule<TypeTag>(this->simulator_));
this->addOutputModule(new VtkDiffusionModule<TypeTag>(this->simulator_));
}
private:

View File

@ -225,7 +225,7 @@ public:
succeeded = comm.min(succeeded);
if (!succeeded)
throw Opm::NumericalIssue("A process did not succeed in adapting the primary variables");
throw NumericalIssue("A process did not succeed in adapting the primary variables");
numPriVarsSwitched_ = comm.sum(numPriVarsSwitched_);
}
@ -249,8 +249,8 @@ protected:
static constexpr bool enableBrine = Indices::saltConcentrationIdx >= 0;
currentValue.checkDefined();
Opm::Valgrind::CheckDefined(update);
Opm::Valgrind::CheckDefined(currentResidual);
Valgrind::CheckDefined(update);
Valgrind::CheckDefined(currentResidual);
// saturation delta for each phase
Scalar deltaSw = 0.0;
@ -296,7 +296,7 @@ protected:
// limit pressure delta
if (pvIdx == Indices::pressureSwitchIdx) {
if (std::abs(delta) > dpMaxRel_*currentValue[pvIdx])
delta = Opm::signum(delta)*dpMaxRel_*currentValue[pvIdx];
delta = signum(delta)*dpMaxRel_*currentValue[pvIdx];
}
// water saturation delta
else if (pvIdx == Indices::waterSaturationIdx)

View File

@ -75,10 +75,10 @@ class BlackOilPolymerModule
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
using Indices = GetPropType<TypeTag, Properties::Indices>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
using TabulatedTwoDFunction = typename Opm::IntervalTabulated2DFunction<Scalar>;
using TabulatedFunction = Tabulated1DFunction<Scalar>;
using TabulatedTwoDFunction = IntervalTabulated2DFunction<Scalar>;
static constexpr unsigned polymerConcentrationIdx = Indices::polymerConcentrationIdx;
static constexpr unsigned polymerMoleWeightIdx = Indices::polymerMoleWeightIdx;
@ -115,7 +115,7 @@ public:
/*!
* \brief Initialize all internal data structures needed by the polymer module
*/
static void initFromState(const Opm::EclipseState& eclState)
static void initFromState(const EclipseState& eclState)
{
// some sanity checks: if polymers are enabled, the POLYMER keyword must be
// present, if polymers are disabled the keyword must not be present.
@ -155,7 +155,7 @@ public:
if (!plyrockTables.empty()) {
assert(numSatRegions == plyrockTables.size());
for (unsigned satRegionIdx = 0; satRegionIdx < numSatRegions; ++ satRegionIdx) {
const auto& plyrockTable = plyrockTables.template getTable<Opm::PlyrockTable>(satRegionIdx);
const auto& plyrockTable = plyrockTables.template getTable<PlyrockTable>(satRegionIdx);
setPlyrock(satRegionIdx,
plyrockTable.getDeadPoreVolumeColumn()[0],
plyrockTable.getResidualResistanceFactorColumn()[0],
@ -173,7 +173,7 @@ public:
if (!plyadsTables.empty()) {
assert(numSatRegions == plyadsTables.size());
for (unsigned satRegionIdx = 0; satRegionIdx < numSatRegions; ++ satRegionIdx) {
const auto& plyadsTable = plyadsTables.template getTable<Opm::PlyadsTable>(satRegionIdx);
const auto& plyadsTable = plyadsTables.template getTable<PlyadsTable>(satRegionIdx);
// Copy data
const auto& c = plyadsTable.getPolymerConcentrationColumn();
const auto& ads = plyadsTable.getAdsorbedPolymerColumn();
@ -193,14 +193,14 @@ public:
if (!plyviscTables.empty()) {
// different viscosity model is used for POLYMW
if (enablePolymerMolarWeight) {
Opm::OpmLog::warning("PLYVISC should not be used in POLYMW runs, "
OpmLog::warning("PLYVISC should not be used in POLYMW runs, "
"it will have no effect. A viscosity model based on PLYVMH is used instead.\n");
}
else {
assert(numPvtRegions == plyviscTables.size());
for (unsigned pvtRegionIdx = 0; pvtRegionIdx < numPvtRegions; ++ pvtRegionIdx) {
const auto& plyadsTable = plyviscTables.template getTable<Opm::PlyviscTable>(pvtRegionIdx);
const auto& plyadsTable = plyviscTables.template getTable<PlyviscTable>(pvtRegionIdx);
// Copy data
const auto& c = plyadsTable.getPolymerConcentrationColumn();
const auto& visc = plyadsTable.getViscosityMultiplierColumn();
@ -218,7 +218,7 @@ public:
setNumMixRegions(numMixRegions);
if (!plymaxTables.empty()) {
for (unsigned mixRegionIdx = 0; mixRegionIdx < numMixRegions; ++ mixRegionIdx) {
const auto& plymaxTable = plymaxTables.template getTable<Opm::PlymaxTable>(mixRegionIdx);
const auto& plymaxTable = plymaxTables.template getTable<PlymaxTable>(mixRegionIdx);
setPlymax(mixRegionIdx, plymaxTable.getPolymerConcentrationColumn()[0]);
}
}
@ -228,7 +228,7 @@ public:
if (!eclState.getTableManager().getPlmixparTable().empty()) {
if (enablePolymerMolarWeight) {
Opm::OpmLog::warning("PLMIXPAR should not be used in POLYMW runs, it will have no effect.\n");
OpmLog::warning("PLMIXPAR should not be used in POLYMW runs, it will have no effect.\n");
}
else {
const auto& plmixparTable = eclState.getTableManager().getPlmixparTable();
@ -246,7 +246,7 @@ public:
hasShrate_ = eclState.getTableManager().useShrate();
if ((hasPlyshlog_ || hasShrate_) && enablePolymerMolarWeight) {
Opm::OpmLog::warning("PLYSHLOG and SHRATE should not be used in POLYMW runs, they will have no effect.\n");
OpmLog::warning("PLYSHLOG and SHRATE should not be used in POLYMW runs, they will have no effect.\n");
}
if (hasPlyshlog_ && !enablePolymerMolarWeight) {
@ -255,14 +255,14 @@ public:
plyshlogShearEffectRefMultiplier_.resize(numPvtRegions);
plyshlogShearEffectRefLogVelocity_.resize(numPvtRegions);
for (unsigned pvtRegionIdx = 0; pvtRegionIdx < numPvtRegions; ++ pvtRegionIdx) {
const auto& plyshlogTable = plyshlogTables.template getTable<Opm::PlyshlogTable>(pvtRegionIdx);
const auto& plyshlogTable = plyshlogTables.template getTable<PlyshlogTable>(pvtRegionIdx);
Scalar plyshlogRefPolymerConcentration = plyshlogTable.getRefPolymerConcentration();
auto waterVelocity = plyshlogTable.getWaterVelocityColumn().vectorCopy();
auto shearMultiplier = plyshlogTable.getShearMultiplierColumn().vectorCopy();
// do the unit version here for the waterVelocity
Opm::UnitSystem unitSystem = eclState.getDeckUnitSystem();
UnitSystem unitSystem = eclState.getDeckUnitSystem();
double siFactor = hasShrate_? unitSystem.parse("1/Time").getSIScaling() : unitSystem.parse("Length/Time").getSIScaling();
for (size_t i = 0; i < waterVelocity.size(); ++i) {
waterVelocity[i] *= siFactor;
@ -507,7 +507,7 @@ public:
// polymers have been disabled at compile time
return;
Opm::VtkBlackOilPolymerModule<TypeTag>::registerParameters();
VtkBlackOilPolymerModule<TypeTag>::registerParameters();
}
/*!
@ -520,7 +520,7 @@ public:
// polymers have been disabled at compile time
return;
model.addOutputModule(new Opm::VtkBlackOilPolymerModule<TypeTag>(simulator));
model.addOutputModule(new VtkBlackOilPolymerModule<TypeTag>(simulator));
}
static bool primaryVarApplies(unsigned pvIdx)
@ -602,7 +602,7 @@ public:
* Toolbox::template decay<LhsEval>(intQuants.porosity());
// avoid singular matrix if no water is present.
surfaceVolumeWater = Opm::max(surfaceVolumeWater, 1e-10);
surfaceVolumeWater = max(surfaceVolumeWater, 1e-10);
// polymer in water phase
const LhsEval massPolymer = surfaceVolumeWater
@ -621,7 +621,7 @@ public:
// tracking the polymer molecular weight
if (enablePolymerMolarWeight) {
accumulationPolymer = Opm::max(accumulationPolymer, 1e-10);
accumulationPolymer = max(accumulationPolymer, 1e-10);
storage[contiPolymerMolarWeightEqIdx] += accumulationPolymer
* Toolbox::template decay<LhsEval> (intQuants.polymerMoleWeight());
@ -660,14 +660,14 @@ public:
else {
flux[contiPolymerEqIdx] =
extQuants.volumeFlux(waterPhaseIdx)
*Opm::decay<Scalar>(up.fluidState().invB(waterPhaseIdx))
*Opm::decay<Scalar>(up.polymerViscosityCorrection())
/Opm::decay<Scalar>(extQuants.polymerShearFactor())
*Opm::decay<Scalar>(up.polymerConcentration());
*decay<Scalar>(up.fluidState().invB(waterPhaseIdx))
*decay<Scalar>(up.polymerViscosityCorrection())
/decay<Scalar>(extQuants.polymerShearFactor())
*decay<Scalar>(up.polymerConcentration());
// modify water
flux[contiWaterEqIdx] /=
Opm::decay<Scalar>(extQuants.waterShearFactor());
decay<Scalar>(extQuants.waterShearFactor());
}
// flux related to transport of polymer molecular weight
@ -677,7 +677,7 @@ public:
flux[contiPolymerEqIdx]*up.polymerMoleWeight();
else
flux[contiPolymerMolarWeightEqIdx] =
flux[contiPolymerEqIdx]*Opm::decay<Scalar>(up.polymerMoleWeight());
flux[contiPolymerEqIdx]*decay<Scalar>(up.polymerMoleWeight());
}
}
@ -835,10 +835,10 @@ public:
unsigned pvtnumRegionIdx,
const Evaluation& v0)
{
using ToolboxLocal = Opm::MathToolbox<Evaluation>;
using ToolboxLocal = MathToolbox<Evaluation>;
const auto& viscosityMultiplierTable = plyviscViscosityMultiplierTable_[pvtnumRegionIdx];
Scalar viscosityMultiplier = viscosityMultiplierTable.eval(Opm::scalarValue(polymerConcentration), /*extrapolate=*/true);
Scalar viscosityMultiplier = viscosityMultiplierTable.eval(scalarValue(polymerConcentration), /*extrapolate=*/true);
const Scalar eps = 1e-14;
// return 1.0 if the polymer has no effect on the water.
@ -846,7 +846,7 @@ public:
return ToolboxLocal::createConstant(v0, 1.0);
const std::vector<Scalar>& shearEffectRefLogVelocity = plyshlogShearEffectRefLogVelocity_[pvtnumRegionIdx];
auto v0AbsLog = Opm::log(Opm::abs(v0));
auto v0AbsLog = log(abs(v0));
// return 1.0 if the velocity /sharte is smaller than the first velocity entry.
if (v0AbsLog < shearEffectRefLogVelocity[0])
return ToolboxLocal::createConstant(v0, 1.0);
@ -862,7 +862,7 @@ public:
std::vector<Scalar> shearEffectMultiplier(numTableEntries, 1.0);
for (size_t i = 0; i < numTableEntries; ++i) {
shearEffectMultiplier[i] = (1.0 + (viscosityMultiplier - 1.0)*shearEffectRefMultiplier[i]) / viscosityMultiplier;
shearEffectMultiplier[i] = Opm::log(shearEffectMultiplier[i]);
shearEffectMultiplier[i] = log(shearEffectMultiplier[i]);
}
// store the logarithmic velocity and logarithmic multipliers in a table for easy look up and
// linear interpolation in the logarithmic space.
@ -890,7 +890,7 @@ public:
auto f = F(u);
auto df = dF(u);
u -= f/df;
if (std::abs(Opm::scalarValue(f)) < 1e-12) {
if (std::abs(scalarValue(f)) < 1e-12) {
converged = true;
break;
}
@ -900,7 +900,7 @@ public:
}
// return the shear factor
return Opm::exp(logShearEffectMultiplier.eval(u, /*extrapolate=*/true));
return exp(logShearEffectMultiplier.eval(u, /*extrapolate=*/true));
}
@ -1214,7 +1214,7 @@ class BlackOilPolymerExtensiveQuantities
static constexpr int dimWorld = GridView::dimensionworld;
static constexpr unsigned waterPhaseIdx = FluidSystem::waterPhaseIdx;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using PolymerModule = BlackOilPolymerModule<TypeTag>;
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
using DimEvalVector = Dune::FieldVector<Evaluation, dimWorld>;
@ -1274,7 +1274,7 @@ public:
const Scalar& Swcr = scaledDrainageInfo.Swcr;
// guard against zero porosity and no mobile water
Evaluation denom = Opm::max(poroAvg * (Sw - Swcr), 1e-12);
Evaluation denom = max(poroAvg * (Sw - Swcr), 1e-12);
Evaluation waterVolumeVelocity = extQuants.volumeFlux(waterPhaseIdx) / denom;
// if shrate is specified. Compute shrate based on the water velocity
@ -1287,8 +1287,8 @@ public:
// compute permeability from transmissibility.
Scalar absPerm = trans / faceArea * dist.two_norm();
waterVolumeVelocity *=
PolymerModule::shrate(pvtnumRegionIdx)*Opm::sqrt(poroAvg*Sw / (relWater*absPerm));
assert(Opm::isfinite(waterVolumeVelocity));
PolymerModule::shrate(pvtnumRegionIdx)*sqrt(poroAvg*Sw / (relWater*absPerm));
assert(isfinite(waterVolumeVelocity));
}
}

View File

@ -107,7 +107,7 @@ class BlackOilPrimaryVariables : public FvBasePrimaryVariables<TypeTag>
enum { waterCompIdx = FluidSystem::waterCompIdx };
enum { oilCompIdx = FluidSystem::oilCompIdx };
using Toolbox = typename Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using ComponentVector = Dune::FieldVector<Scalar, numComponents>;
using SolventModule = BlackOilSolventModule<TypeTag, enableSolvent>;
using ExtboModule = BlackOilExtboModule<TypeTag, enableExtbo>;
@ -130,7 +130,7 @@ public:
BlackOilPrimaryVariables()
: ParentType()
{
Opm::Valgrind::SetUndefined(*this);
Valgrind::SetUndefined(*this);
pvtRegionIdx_ = 0;
}
@ -140,7 +140,7 @@ public:
BlackOilPrimaryVariables(Scalar value)
: ParentType(value)
{
Opm::Valgrind::SetUndefined(primaryVarsMeaning_);
Valgrind::SetUndefined(primaryVarsMeaning_);
pvtRegionIdx_ = 0;
}
@ -190,13 +190,13 @@ public:
{
using ConstEvaluation = typename std::remove_reference<typename FluidState::Scalar>::type;
using FsEvaluation = typename std::remove_const<ConstEvaluation>::type;
using FsToolbox = typename Opm::MathToolbox<FsEvaluation>;
using FsToolbox = MathToolbox<FsEvaluation>;
#ifndef NDEBUG
// make sure the temperature is the same in all fluid phases
for (unsigned phaseIdx = 1; phaseIdx < numPhases; ++phaseIdx) {
Opm::Valgrind::CheckDefined(fluidState.temperature(0));
Opm::Valgrind::CheckDefined(fluidState.temperature(phaseIdx));
Valgrind::CheckDefined(fluidState.temperature(0));
Valgrind::CheckDefined(fluidState.temperature(phaseIdx));
assert(fluidState.temperature(0) == fluidState.temperature(phaseIdx));
}
@ -216,8 +216,8 @@ public:
paramCache.setMaxOilSat(FsToolbox::value(fluidState.saturation(oilPhaseIdx)));
// create a mutable fluid state with well defined densities based on the input
using NcpFlash = Opm::NcpFlash<Scalar, FluidSystem>;
using FlashFluidState = Opm::CompositionalFluidState<Scalar, FluidSystem>;
using NcpFlash = NcpFlash<Scalar, FluidSystem>;
using FlashFluidState = CompositionalFluidState<Scalar, FluidSystem>;
FlashFluidState fsFlash;
fsFlash.setTemperature(FsToolbox::value(fluidState.temperature(/*phaseIdx=*/0)));
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
@ -266,7 +266,7 @@ public:
{
using ConstEvaluation = typename std::remove_reference<typename FluidState::Scalar>::type;
using FsEvaluation = typename std::remove_const<ConstEvaluation>::type;
using FsToolbox = typename Opm::MathToolbox<FsEvaluation>;
using FsToolbox = MathToolbox<FsEvaluation>;
bool gasPresent = FluidSystem::phaseIsActive(gasPhaseIdx)?(fluidState.saturation(gasPhaseIdx) > 0.0):false;
bool oilPresent = FluidSystem::phaseIsActive(oilPhaseIdx)?(fluidState.saturation(oilPhaseIdx) > 0.0):false;
@ -320,7 +320,7 @@ public:
(*this)[compositionSwitchIdx] = FsToolbox::value(fluidState.saturation(gasPhaseIdx));
}
else if (primaryVarsMeaning() == Sw_po_Rs) {
const auto& Rs = Opm::BlackOil::getRs_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
const auto& Rs = BlackOil::getRs_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
if (waterEnabled)
(*this)[waterSaturationIdx] = FsToolbox::value(fluidState.saturation(waterPhaseIdx));
@ -331,7 +331,7 @@ public:
else {
assert(primaryVarsMeaning() == Sw_pg_Rv);
const auto& Rv = Opm::BlackOil::getRv_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
const auto& Rv = BlackOil::getRv_<FluidSystem, FluidState, Scalar>(fluidState, pvtRegionIdx_);
if (waterEnabled)
(*this)[waterSaturationIdx] = FsToolbox::value(fluidState.saturation(waterPhaseIdx));
@ -678,11 +678,11 @@ public:
#ifndef NDEBUG
// check the "real" primary variables
for (unsigned i = 0; i < this->size(); ++i)
Opm::Valgrind::CheckDefined((*this)[i]);
Valgrind::CheckDefined((*this)[i]);
// check the "pseudo" primary variables
Opm::Valgrind::CheckDefined(primaryVarsMeaning_);
Opm::Valgrind::CheckDefined(pvtRegionIdx_);
Valgrind::CheckDefined(primaryVarsMeaning_);
Valgrind::CheckDefined(pvtRegionIdx_);
#endif // NDEBUG
}
@ -748,18 +748,18 @@ private:
Scalar Sw,
const MaterialLawParams& matParams) const
{
using SatOnlyFluidState = Opm::SimpleModularFluidState<Scalar,
numPhases,
numComponents,
FluidSystem,
/*storePressure=*/false,
/*storeTemperature=*/false,
/*storeComposition=*/false,
/*storeFugacity=*/false,
/*storeSaturation=*/true,
/*storeDensity=*/false,
/*storeViscosity=*/false,
/*storeEnthalpy=*/false>;
using SatOnlyFluidState = SimpleModularFluidState<Scalar,
numPhases,
numComponents,
FluidSystem,
/*storePressure=*/false,
/*storeTemperature=*/false,
/*storeComposition=*/false,
/*storeFugacity=*/false,
/*storeSaturation=*/true,
/*storeDensity=*/false,
/*storeViscosity=*/false,
/*storeEnthalpy=*/false>;
SatOnlyFluidState fluidState;
fluidState.setSaturation(waterPhaseIdx, Sw);
fluidState.setSaturation(oilPhaseIdx, So);

View File

@ -71,12 +71,12 @@ class BlackOilRateVector
enum { enablePolymerMolarWeight = getPropValue<TypeTag, Properties::EnablePolymerMW>() };
enum { enableFoam = getPropValue<TypeTag, Properties::EnableFoam>() };
enum { enableBrine = getPropValue<TypeTag, Properties::EnableBrine>() };
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using ParentType = Dune::FieldVector<Evaluation, numEq>;
public:
BlackOilRateVector() : ParentType()
{ Opm::Valgrind::SetUndefined(*this); }
{ Valgrind::SetUndefined(*this); }
/*!
* \copydoc ImmiscibleRateVector::ImmiscibleRateVector(Scalar)

View File

@ -78,10 +78,10 @@ class BlackOilSolventModule
using RateVector = GetPropType<TypeTag, Properties::RateVector>;
using Indices = GetPropType<TypeTag, Properties::Indices>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using SolventPvt = Opm::SolventPvt<Scalar>;
using Toolbox = MathToolbox<Evaluation>;
using SolventPvt = ::Opm::SolventPvt<Scalar>;
using TabulatedFunction = typename Opm::Tabulated1DFunction<Scalar>;
using TabulatedFunction = Tabulated1DFunction<Scalar>;
static constexpr unsigned solventSaturationIdx = Indices::solventSaturationIdx;
static constexpr unsigned contiSolventEqIdx = Indices::contiSolventEqIdx;
@ -96,7 +96,7 @@ public:
/*!
* \brief Initialize all internal data structures needed by the solvent module
*/
static void initFromState(const Opm::EclipseState& eclState, const Schedule& schedule)
static void initFromState(const EclipseState& eclState, const Schedule& schedule)
{
// some sanity checks: if solvents are enabled, the SOLVENT keyword must be
// present, if solvents are disabled the keyword must not be present.
@ -118,7 +118,7 @@ public:
unsigned numSatRegions = tableManager.getTabdims().getNumSatTables();
setNumSatRegions(numSatRegions);
for (unsigned satRegionIdx = 0; satRegionIdx < numSatRegions; ++ satRegionIdx) {
const auto& ssfnTable = ssfnTables.template getTable<Opm::SsfnTable>(satRegionIdx);
const auto& ssfnTable = ssfnTables.template getTable<SsfnTable>(satRegionIdx);
ssfnKrg_[satRegionIdx].setXYContainers(ssfnTable.getSolventFractionColumn(),
ssfnTable.getGasRelPermMultiplierColumn(),
/*sortInput=*/true);
@ -141,7 +141,7 @@ public:
// resize the attributes of the object
sof2Krn_.resize(numSatRegions);
for (unsigned satRegionIdx = 0; satRegionIdx < numSatRegions; ++ satRegionIdx) {
const auto& sof2Table = sof2Tables.template getTable<Opm::Sof2Table>(satRegionIdx);
const auto& sof2Table = sof2Tables.template getTable<Sof2Table>(satRegionIdx);
sof2Krn_[satRegionIdx].setXYContainers(sof2Table.getSoColumn(),
sof2Table.getKroColumn(),
/*sortInput=*/true);
@ -159,7 +159,7 @@ public:
// resize the attributes of the object
misc_.resize(numMiscRegions);
for (unsigned miscRegionIdx = 0; miscRegionIdx < numMiscRegions; ++miscRegionIdx) {
const auto& miscTable = miscTables.template getTable<Opm::MiscTable>(miscRegionIdx);
const auto& miscTable = miscTables.template getTable<MiscTable>(miscRegionIdx);
// solventFraction = Ss / (Ss + Sg);
const auto& solventFraction = miscTable.getSolventFractionColumn();
@ -179,7 +179,7 @@ public:
assert(numMiscRegions == pmiscTables.size());
for (unsigned regionIdx = 0; regionIdx < numMiscRegions; ++regionIdx) {
const auto& pmiscTable = pmiscTables.template getTable<Opm::PmiscTable>(regionIdx);
const auto& pmiscTable = pmiscTables.template getTable<PmiscTable>(regionIdx);
// Copy data
const auto& po = pmiscTable.getOilPhasePressureColumn();
@ -209,7 +209,7 @@ public:
for (unsigned regionIdx = 0; regionIdx < numSatRegions; ++regionIdx) {
const Opm::MsfnTable& msfnTable = msfnTables.template getTable<Opm::MsfnTable>(regionIdx);
const MsfnTable& msfnTable = msfnTables.template getTable<MsfnTable>(regionIdx);
// Copy data
// Ssg = Ss + Sg;
@ -239,7 +239,7 @@ public:
assert(numMiscRegions == sorwmisTables.size());
for (unsigned regionIdx = 0; regionIdx < numMiscRegions; ++regionIdx) {
const auto& sorwmisTable = sorwmisTables.template getTable<Opm::SorwmisTable>(regionIdx);
const auto& sorwmisTable = sorwmisTables.template getTable<SorwmisTable>(regionIdx);
// Copy data
const auto& sw = sorwmisTable.getWaterSaturationColumn();
@ -266,7 +266,7 @@ public:
assert(numMiscRegions ==sgcwmisTables.size());
for (unsigned regionIdx = 0; regionIdx < numMiscRegions; ++regionIdx) {
const auto& sgcwmisTable = sgcwmisTables.template getTable<Opm::SgcwmisTable>(regionIdx);
const auto& sgcwmisTable = sgcwmisTables.template getTable<SgcwmisTable>(regionIdx);
// Copy data
const auto& sw = sgcwmisTable.getWaterSaturationColumn();
@ -308,7 +308,7 @@ public:
assert(numMiscRegions == tlpmixparTables.size());
for (unsigned regionIdx = 0; regionIdx < numMiscRegions; ++regionIdx) {
const auto& tlpmixparTable = tlpmixparTables.template getTable<Opm::TlpmixpaTable>(regionIdx);
const auto& tlpmixparTable = tlpmixparTables.template getTable<TlpmixpaTable>(regionIdx);
// Copy data
const auto& po = tlpmixparTable.getOilPhasePressureColumn();
@ -475,7 +475,7 @@ public:
// solvents have disabled at compile time
return;
Opm::VtkBlackOilSolventModule<TypeTag>::registerParameters();
VtkBlackOilSolventModule<TypeTag>::registerParameters();
}
/*!
@ -488,7 +488,7 @@ public:
// solvents have disabled at compile time
return;
model.addOutputModule(new Opm::VtkBlackOilSolventModule<TypeTag>(simulator));
model.addOutputModule(new VtkBlackOilSolventModule<TypeTag>(simulator));
}
static bool primaryVarApplies(unsigned pvIdx)
@ -582,7 +582,7 @@ public:
else
flux[contiSolventEqIdx] =
extQuants.solventVolumeFlux()
*Opm::decay<Scalar>(up.solventInverseFormationVolumeFactor());
*decay<Scalar>(up.solventInverseFormationVolumeFactor());
}
else {
if (upIdx == inIdx)
@ -592,7 +592,7 @@ public:
else
flux[contiSolventEqIdx] =
extQuants.solventVolumeFlux()
*Opm::decay<Scalar>(up.solventDensity());
*decay<Scalar>(up.solventDensity());
}
}
@ -1321,7 +1321,7 @@ class BlackOilSolventExtensiveQuantities
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
static constexpr unsigned gasPhaseIdx = FluidSystem::gasPhaseIdx;
static constexpr int dimWorld = GridView::dimensionworld;
@ -1341,7 +1341,7 @@ public:
unsigned timeIdx)
{
const auto& gradCalc = elemCtx.gradientCalculator();
Opm::PressureCallback<TypeTag> pressureCallback(elemCtx);
PressureCallback<TypeTag> pressureCallback(elemCtx);
const auto& scvf = elemCtx.stencil(timeIdx).interiorFace(scvfIdx);
const auto& faceNormal = scvf.normal();
@ -1356,7 +1356,7 @@ public:
elemCtx,
scvfIdx,
pressureCallback);
Opm::Valgrind::CheckDefined(solventPGrad);
Valgrind::CheckDefined(solventPGrad);
// correct the pressure gradients by the gravitational acceleration
if (EWOMS_GET_PARAM(TypeTag, bool, EnableGravity)) {
@ -1402,8 +1402,8 @@ public:
for (unsigned dimIdx = 0; dimIdx < dimWorld; ++dimIdx) {
solventPGrad[dimIdx] += f[dimIdx];
if (!Opm::isfinite(solventPGrad[dimIdx]))
throw Opm::NumericalIssue("Non-finite potential gradient for solvent 'phase'");
if (!isfinite(solventPGrad[dimIdx]))
throw NumericalIssue("Non-finite potential gradient for solvent 'phase'");
}
}
@ -1430,7 +1430,7 @@ public:
if (solventUpstreamDofIdx_ == i)
solventVolumeFlux_ = solventPGradNormal*up.solventMobility();
else
solventVolumeFlux_ = solventPGradNormal*Opm::scalarValue(up.solventMobility());
solventVolumeFlux_ = solventPGradNormal*scalarValue(up.solventMobility());
}
/*!
@ -1472,7 +1472,7 @@ public:
pressureExterior += distZ*g*rhoAvg;
Evaluation pressureDiffSolvent = pressureExterior - pressureInterior;
if (std::abs(Opm::scalarValue(pressureDiffSolvent)) > thpres) {
if (std::abs(scalarValue(pressureDiffSolvent)) > thpres) {
if (pressureDiffSolvent < 0.0)
pressureDiffSolvent += thpres;
else
@ -1508,7 +1508,7 @@ public:
*pressureDiffSolvent;
else
solventVolumeFlux_ =
Opm::scalarValue(up.solventMobility())
scalarValue(up.solventMobility())
*(-trans/faceArea)
*pressureDiffSolvent;
}

View File

@ -125,7 +125,7 @@ class DarcyExtensiveQuantities
enum { dimWorld = GridView::dimensionworld };
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
using Toolbox = typename Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using ParameterCache = typename FluidSystem::template ParameterCache<Evaluation>;
using EvalDimVector = Dune::FieldVector<Evaluation, dimWorld>;
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
@ -186,7 +186,7 @@ protected:
unsigned timeIdx)
{
const auto& gradCalc = elemCtx.gradientCalculator();
Opm::PressureCallback<TypeTag> pressureCallback(elemCtx);
PressureCallback<TypeTag> pressureCallback(elemCtx);
const auto& scvf = elemCtx.stencil(timeIdx).interiorFace(faceIdx);
const auto& faceNormal = scvf.normal();
@ -200,7 +200,7 @@ protected:
// calculate the "raw" pressure gradient
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
if (!elemCtx.model().phaseIsConsidered(phaseIdx)) {
Opm::Valgrind::SetUndefined(potentialGrad_[phaseIdx]);
Valgrind::SetUndefined(potentialGrad_[phaseIdx]);
continue;
}
@ -209,7 +209,7 @@ protected:
elemCtx,
faceIdx,
pressureCallback);
Opm::Valgrind::CheckDefined(potentialGrad_[phaseIdx]);
Valgrind::CheckDefined(potentialGrad_[phaseIdx]);
}
// correct the pressure gradients by the gravitational acceleration
@ -280,21 +280,21 @@ protected:
potentialGrad_[phaseIdx][dimIdx] += f[dimIdx];
for (unsigned dimIdx = 0; dimIdx < potentialGrad_[phaseIdx].size(); ++dimIdx) {
if (!Opm::isfinite(potentialGrad_[phaseIdx][dimIdx])) {
throw Opm::NumericalIssue("Non-finite potential gradient for phase '"
+std::string(FluidSystem::phaseName(phaseIdx))+"'");
if (!isfinite(potentialGrad_[phaseIdx][dimIdx])) {
throw NumericalIssue("Non-finite potential gradient for phase '"
+std::string(FluidSystem::phaseName(phaseIdx))+"'");
}
}
}
}
Opm::Valgrind::SetUndefined(K_);
Valgrind::SetUndefined(K_);
elemCtx.problem().intersectionIntrinsicPermeability(K_, elemCtx, faceIdx, timeIdx);
Opm::Valgrind::CheckDefined(K_);
Valgrind::CheckDefined(K_);
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
if (!elemCtx.model().phaseIsConsidered(phaseIdx)) {
Opm::Valgrind::SetUndefined(potentialGrad_[phaseIdx]);
Valgrind::SetUndefined(potentialGrad_[phaseIdx]);
continue;
}
@ -335,12 +335,12 @@ protected:
const FluidState& fluidState)
{
const auto& gradCalc = elemCtx.gradientCalculator();
Opm::BoundaryPressureCallback<TypeTag, FluidState> pressureCallback(elemCtx, fluidState);
BoundaryPressureCallback<TypeTag, FluidState> pressureCallback(elemCtx, fluidState);
// calculate the pressure gradient
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
if (!elemCtx.model().phaseIsConsidered(phaseIdx)) {
Opm::Valgrind::SetUndefined(potentialGrad_[phaseIdx]);
Valgrind::SetUndefined(potentialGrad_[phaseIdx]);
continue;
}
@ -349,7 +349,7 @@ protected:
elemCtx,
boundaryFaceIdx,
pressureCallback);
Opm::Valgrind::CheckDefined(potentialGrad_[phaseIdx]);
Valgrind::CheckDefined(potentialGrad_[phaseIdx]);
}
const auto& scvf = elemCtx.stencil(timeIdx).boundaryFace(boundaryFaceIdx);
@ -384,7 +384,7 @@ protected:
Evaluation rhoIn = intQuantsIn.fluidState().density(phaseIdx);
Evaluation pStatIn = - gTimesDist*rhoIn;
Opm::Valgrind::CheckDefined(pStatIn);
Valgrind::CheckDefined(pStatIn);
// compute the hydrostatic gradient between the control volume and face integration
// point. This gradient exhibitis the same direction as the vector between the
// control volume center and face integration point (-distVecIn / absDist) and the
@ -397,11 +397,11 @@ protected:
for (unsigned dimIdx = 0; dimIdx < dimWorld; ++dimIdx)
potentialGrad_[phaseIdx][dimIdx] += f[dimIdx];
Opm::Valgrind::CheckDefined(potentialGrad_[phaseIdx]);
Valgrind::CheckDefined(potentialGrad_[phaseIdx]);
for (unsigned dimIdx = 0; dimIdx < potentialGrad_[phaseIdx].size(); ++dimIdx) {
if (!Opm::isfinite(potentialGrad_[phaseIdx][dimIdx])) {
throw Opm::NumericalIssue("Non finite potential gradient for phase '"
+std::string(FluidSystem::phaseName(phaseIdx))+"'");
if (!isfinite(potentialGrad_[phaseIdx][dimIdx])) {
throw NumericalIssue("Non finite potential gradient for phase '"
+std::string(FluidSystem::phaseName(phaseIdx))+"'");
}
}
}
@ -414,7 +414,7 @@ protected:
Scalar kr[numPhases];
MaterialLaw::relativePermeabilities(kr, matParams, fluidState);
Opm::Valgrind::CheckDefined(kr);
Valgrind::CheckDefined(kr);
for (unsigned phaseIdx=0; phaseIdx < numPhases; phaseIdx++) {
if (!elemCtx.model().phaseIsConsidered(phaseIdx))
@ -447,7 +447,7 @@ protected:
mobility_[phaseIdx] = Toolbox::value(intQuantsIn.mobility(phaseIdx));
else
mobility_[phaseIdx] = intQuantsIn.mobility(phaseIdx);
Opm::Valgrind::CheckDefined(mobility_[phaseIdx]);
Valgrind::CheckDefined(mobility_[phaseIdx]);
}
}
@ -461,7 +461,7 @@ protected:
{
const auto& scvf = elemCtx.stencil(timeIdx).interiorFace(scvfIdx);
const DimVector& normal = scvf.normal();
Opm::Valgrind::CheckDefined(normal);
Valgrind::CheckDefined(normal);
for (unsigned phaseIdx=0; phaseIdx < numPhases; phaseIdx++) {
filterVelocity_[phaseIdx] = 0.0;
@ -470,7 +470,7 @@ protected:
continue;
asImp_().calculateFilterVelocity_(phaseIdx);
Opm::Valgrind::CheckDefined(filterVelocity_[phaseIdx]);
Valgrind::CheckDefined(filterVelocity_[phaseIdx]);
volumeFlux_[phaseIdx] = 0.0;
for (unsigned i = 0; i < normal.size(); ++i)
@ -490,7 +490,7 @@ protected:
{
const auto& scvf = elemCtx.stencil(timeIdx).boundaryFace(boundaryFaceIdx);
const DimVector& normal = scvf.normal();
Opm::Valgrind::CheckDefined(normal);
Valgrind::CheckDefined(normal);
for (unsigned phaseIdx=0; phaseIdx < numPhases; phaseIdx++) {
if (!elemCtx.model().phaseIsConsidered(phaseIdx)) {
@ -500,7 +500,7 @@ protected:
}
asImp_().calculateFilterVelocity_(phaseIdx);
Opm::Valgrind::CheckDefined(filterVelocity_[phaseIdx]);
Valgrind::CheckDefined(filterVelocity_[phaseIdx]);
volumeFlux_[phaseIdx] = 0.0;
for (unsigned i = 0; i < normal.size(); ++i)
volumeFlux_[phaseIdx] += filterVelocity_[phaseIdx][i] * normal[i];
@ -510,7 +510,7 @@ protected:
void calculateFilterVelocity_(unsigned phaseIdx)
{
#ifndef NDEBUG
assert(Opm::isfinite(mobility_[phaseIdx]));
assert(isfinite(mobility_[phaseIdx]));
for (unsigned i = 0; i < K_.M(); ++ i)
for (unsigned j = 0; j < K_.N(); ++ j)
assert(std::isfinite(K_[i][j]));
@ -521,7 +521,7 @@ protected:
#ifndef NDEBUG
for (unsigned i = 0; i < filterVelocity_[phaseIdx].size(); ++ i)
assert(Opm::isfinite(filterVelocity_[phaseIdx][i]));
assert(isfinite(filterVelocity_[phaseIdx][i]));
#endif
}

View File

@ -225,7 +225,7 @@ class ForchheimerExtensiveQuantities
enum { dimWorld = GridView::dimensionworld };
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using DimVector = Dune::FieldVector<Scalar, dimWorld>;
using DimEvalVector = Dune::FieldVector<Evaluation, dimWorld>;
@ -271,16 +271,16 @@ protected:
if (focusDofIdx == i) {
ergunCoefficient_ =
(intQuantsIn.ergunCoefficient() +
Opm::getValue(intQuantsEx.ergunCoefficient()))/2;
getValue(intQuantsEx.ergunCoefficient()))/2;
}
else if (focusDofIdx == j)
ergunCoefficient_ =
(Opm::getValue(intQuantsIn.ergunCoefficient()) +
(getValue(intQuantsIn.ergunCoefficient()) +
intQuantsEx.ergunCoefficient())/2;
else
ergunCoefficient_ =
(Opm::getValue(intQuantsIn.ergunCoefficient()) +
Opm::getValue(intQuantsEx.ergunCoefficient()))/2;
(getValue(intQuantsIn.ergunCoefficient()) +
getValue(intQuantsEx.ergunCoefficient()))/2;
// obtain the mobility to passability ratio for each phase.
for (unsigned phaseIdx=0; phaseIdx < numPhases; phaseIdx++) {
@ -298,9 +298,9 @@ protected:
}
else {
density_[phaseIdx] =
Opm::getValue(up.fluidState().density(phaseIdx));
getValue(up.fluidState().density(phaseIdx));
mobilityPassabilityRatio_[phaseIdx] =
Opm::getValue(up.mobilityPassabilityRatio(phaseIdx));
getValue(up.mobilityPassabilityRatio(phaseIdx));
}
}
}
@ -325,7 +325,7 @@ protected:
if (focusDofIdx == i)
ergunCoefficient_ = intQuantsIn.ergunCoefficient();
else
ergunCoefficient_ = Opm::getValue(intQuantsIn.ergunCoefficient());
ergunCoefficient_ = getValue(intQuantsIn.ergunCoefficient());
// calculate the square root of the intrinsic permeability
assert(isDiagonal_(this->K_));
@ -343,9 +343,9 @@ protected:
}
else {
density_[phaseIdx] =
Opm::getValue(intQuantsIn.fluidState().density(phaseIdx));
getValue(intQuantsIn.fluidState().density(phaseIdx));
mobilityPassabilityRatio_[phaseIdx] =
Opm::getValue(intQuantsIn.mobilityPassabilityRatio(phaseIdx));
getValue(intQuantsIn.mobilityPassabilityRatio(phaseIdx));
}
}
}
@ -366,22 +366,22 @@ protected:
const auto& scvf = elemCtx.stencil(timeIdx).interiorFace(scvfIdx);
const auto& normal = scvf.normal();
Opm::Valgrind::CheckDefined(normal);
Valgrind::CheckDefined(normal);
// obtain the Ergun coefficient from the intensive quantity object. Until a
// better method comes along, we use arithmetic averaging.
if (focusDofIdx == i)
ergunCoefficient_ =
(intQuantsI.ergunCoefficient() +
Opm::getValue(intQuantsJ.ergunCoefficient())) / 2;
getValue(intQuantsJ.ergunCoefficient())) / 2;
else if (focusDofIdx == j)
ergunCoefficient_ =
(Opm::getValue(intQuantsI.ergunCoefficient()) +
(getValue(intQuantsI.ergunCoefficient()) +
intQuantsJ.ergunCoefficient()) / 2;
else
ergunCoefficient_ =
(Opm::getValue(intQuantsI.ergunCoefficient()) +
Opm::getValue(intQuantsJ.ergunCoefficient())) / 2;
(getValue(intQuantsI.ergunCoefficient()) +
getValue(intQuantsJ.ergunCoefficient())) / 2;
///////////////
// calculate the weights of the upstream and the downstream control volumes
@ -449,8 +449,8 @@ protected:
unsigned newtonIter = 0;
while (deltaV.one_norm() > 1e-11) {
if (newtonIter >= 50)
throw Opm::NumericalIssue("Could not determine Forchheimer velocity within "
+std::to_string(newtonIter)+" iterations");
throw NumericalIssue("Could not determine Forchheimer velocity within "
+std::to_string(newtonIter)+" iterations");
++newtonIter;
// calculate the residual and its Jacobian matrix
@ -506,7 +506,7 @@ protected:
const auto& alpha = density*mobilityPassabilityRatio*ergunCoefficient_*absVel;
for (unsigned dimIdx = 0; dimIdx < dimWorld; ++dimIdx)
residual[dimIdx] += sqrtK_[dimIdx]*alpha*velocity[dimIdx];
Opm::Valgrind::CheckDefined(residual);
Valgrind::CheckDefined(residual);
}
void gradForchheimerResid_(DimEvalVector& residual,

View File

@ -89,8 +89,8 @@ public:
// normal or in the opposite one
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
if (!elemCtx.model().phaseIsConsidered(phaseIdx)) {
Opm::Valgrind::SetUndefined(upstreamScvIdx_[phaseIdx]);
Opm::Valgrind::SetUndefined(downstreamScvIdx_[phaseIdx]);
Valgrind::SetUndefined(upstreamScvIdx_[phaseIdx]);
Valgrind::SetUndefined(downstreamScvIdx_[phaseIdx]);
continue;
}

View File

@ -83,11 +83,11 @@ struct NumComponents<TypeTag, TTag::MultiPhaseBaseModel> { static constexpr int
//! The type of the base base class for actual problems
template<class TypeTag>
struct BaseProblem<TypeTag, TTag::MultiPhaseBaseModel> { using type = Opm::MultiPhaseBaseProblem<TypeTag>; };
struct BaseProblem<TypeTag, TTag::MultiPhaseBaseModel> { using type = MultiPhaseBaseProblem<TypeTag>; };
//! By default, use the Darcy relation to determine the phase velocity
template<class TypeTag>
struct FluxModule<TypeTag, TTag::MultiPhaseBaseModel> { using type = Opm::DarcyFluxModule<TypeTag>; };
struct FluxModule<TypeTag, TTag::MultiPhaseBaseModel> { using type = DarcyFluxModule<TypeTag>; };
/*!
* \brief Set the material law to the null law by default.
@ -98,10 +98,10 @@ struct MaterialLaw<TypeTag, TTag::MultiPhaseBaseModel>
private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
using Traits = Opm::NullMaterialTraits<Scalar, FluidSystem::numPhases>;
using Traits = NullMaterialTraits<Scalar, FluidSystem::numPhases>;
public:
using type = Opm::NullMaterial<Traits>;
using type = NullMaterial<Traits>;
};
/*!
@ -116,7 +116,7 @@ struct MaterialLawParams<TypeTag, TTag::MultiPhaseBaseModel>
//! by default
template<class TypeTag>
struct SolidEnergyLaw<TypeTag, TTag::MultiPhaseBaseModel>
{ using type = Opm::NullSolidEnergyLaw<GetPropType<TypeTag, Properties::Scalar>>; };
{ using type = NullSolidEnergyLaw<GetPropType<TypeTag, Properties::Scalar>>; };
//! extract the type of the parameter objects for the solid energy storage law from the
//! law itself
@ -127,7 +127,7 @@ struct SolidEnergyLawParams<TypeTag, TTag::MultiPhaseBaseModel>
//! set the thermal conduction law to a dummy one by default
template<class TypeTag>
struct ThermalConductionLaw<TypeTag, TTag::MultiPhaseBaseModel>
{ using type = Opm::NullThermalConductionLaw<GetPropType<TypeTag, Properties::Scalar>>; };
{ using type = NullThermalConductionLaw<GetPropType<TypeTag, Properties::Scalar>>; };
//! extract the type of the parameter objects for the thermal conduction law from the law
//! itself
@ -182,8 +182,8 @@ public:
ParentType::registerParameters();
// register runtime parameters of the VTK output modules
Opm::VtkMultiPhaseModule<TypeTag>::registerParameters();
Opm::VtkTemperatureModule<TypeTag>::registerParameters();
VtkMultiPhaseModule<TypeTag>::registerParameters();
VtkTemperatureModule<TypeTag>::registerParameters();
}
/*!
@ -257,8 +257,8 @@ public:
ParentType::registerOutputModules_();
// add the VTK output modules which make sense for all multi-phase models
this->addOutputModule(new Opm::VtkMultiPhaseModule<TypeTag>(this->simulator_));
this->addOutputModule(new Opm::VtkTemperatureModule<TypeTag>(this->simulator_));
this->addOutputModule(new VtkMultiPhaseModule<TypeTag>(this->simulator_));
this->addOutputModule(new VtkTemperatureModule<TypeTag>(this->simulator_));
}
private:

View File

@ -54,7 +54,7 @@ class MultiPhaseBaseProblem
, public GetPropType<TypeTag, Properties::FluxModule>::FluxBaseProblem
{
//! \cond SKIP_THIS
using ParentType = Opm::FvBaseProblem<TypeTag>;
using ParentType = FvBaseProblem<TypeTag>;
using Implementation = GetPropType<TypeTag, Properties::Problem>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
@ -115,7 +115,7 @@ public:
// you have off-main diagonal entries in your permeabilities!
for (unsigned i = 0; i < dimWorld; ++i)
for (unsigned j = 0; j < dimWorld; ++j)
result[i][j] = Opm::harmonicMean(K1[i][j], K2[i][j]);
result[i][j] = harmonicMean(K1[i][j], K2[i][j]);
}
/*!
@ -305,7 +305,7 @@ public:
*/
unsigned markForGridAdaptation()
{
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
unsigned numMarked = 0;
ElementContext elemCtx( this->simulator() );

View File

@ -54,7 +54,7 @@ class TemperatureCallback
public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
TemperatureCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx)
@ -90,11 +90,11 @@ class PressureCallback
public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
PressureCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx)
{ Opm::Valgrind::SetUndefined(phaseIdx_); }
{ Valgrind::SetUndefined(phaseIdx_); }
PressureCallback(const ElementContext& elemCtx, unsigned phaseIdx)
: elemCtx_(elemCtx)
@ -114,7 +114,7 @@ public:
*/
ResultType operator()(unsigned dofIdx) const
{
Opm::Valgrind::CheckDefined(phaseIdx_);
Valgrind::CheckDefined(phaseIdx_);
return elemCtx_.intensiveQuantities(dofIdx, /*timeIdx=*/0).fluidState().pressure(phaseIdx_);
}
@ -138,7 +138,7 @@ class BoundaryPressureCallback
using IQRawFluidState = decltype(std::declval<IntensiveQuantities>().fluidState());
using IQFluidState = typename std::remove_const<typename std::remove_reference<IQRawFluidState>::type>::type;
using IQScalar = typename IQFluidState::Scalar;
using Toolbox = Opm::MathToolbox<IQScalar>;
using Toolbox = MathToolbox<IQScalar>;
public:
using ResultType = IQScalar;
@ -146,7 +146,7 @@ public:
BoundaryPressureCallback(const ElementContext& elemCtx, const FluidState& boundaryFs)
: elemCtx_(elemCtx)
, boundaryFs_(boundaryFs)
{ Opm::Valgrind::SetUndefined(phaseIdx_); }
{ Valgrind::SetUndefined(phaseIdx_); }
BoundaryPressureCallback(const ElementContext& elemCtx,
const FluidState& boundaryFs,
@ -169,13 +169,13 @@ public:
*/
ResultType operator()(unsigned dofIdx) const
{
Opm::Valgrind::CheckDefined(phaseIdx_);
Valgrind::CheckDefined(phaseIdx_);
return elemCtx_.intensiveQuantities(dofIdx, /*timeIdx=*/0).fluidState().pressure(phaseIdx_);
}
IQScalar boundaryValue() const
{
Opm::Valgrind::CheckDefined(phaseIdx_);
Valgrind::CheckDefined(phaseIdx_);
return boundaryFs_.pressure(phaseIdx_);
}
@ -201,11 +201,11 @@ class DensityCallback
public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
DensityCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx)
{ Opm::Valgrind::SetUndefined(phaseIdx_); }
{ Valgrind::SetUndefined(phaseIdx_); }
DensityCallback(const ElementContext& elemCtx, unsigned phaseIdx)
: elemCtx_(elemCtx)
@ -225,7 +225,7 @@ public:
*/
ResultType operator()(unsigned dofIdx) const
{
Opm::Valgrind::CheckDefined(phaseIdx_);
Valgrind::CheckDefined(phaseIdx_);
return elemCtx_.intensiveQuantities(dofIdx, /*timeIdx=*/0).fluidState().density(phaseIdx_);
}
@ -249,11 +249,11 @@ class MolarDensityCallback
public:
using ResultType = decltype(std::declval<IQFluidState>().molarDensity(0));
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
MolarDensityCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx)
{ Opm::Valgrind::SetUndefined(phaseIdx_); }
{ Valgrind::SetUndefined(phaseIdx_); }
MolarDensityCallback(const ElementContext& elemCtx, unsigned phaseIdx)
: elemCtx_(elemCtx)
@ -273,7 +273,7 @@ public:
*/
ResultType operator()(unsigned dofIdx) const
{
Opm::Valgrind::CheckDefined(phaseIdx_);
Valgrind::CheckDefined(phaseIdx_);
return elemCtx_.intensiveQuantities(dofIdx, /*timeIdx=*/0).fluidState().molarDensity(phaseIdx_);
}
@ -298,11 +298,11 @@ class ViscosityCallback
public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
ViscosityCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx)
{ Opm::Valgrind::SetUndefined(phaseIdx_); }
{ Valgrind::SetUndefined(phaseIdx_); }
ViscosityCallback(const ElementContext& elemCtx, unsigned phaseIdx)
: elemCtx_(elemCtx)
@ -322,7 +322,7 @@ public:
*/
ResultType operator()(unsigned dofIdx) const
{
Opm::Valgrind::CheckDefined(phaseIdx_);
Valgrind::CheckDefined(phaseIdx_);
return elemCtx_.intensiveQuantities(dofIdx, /*timeIdx=*/0).fluidState().viscosity(phaseIdx_);
}
@ -350,7 +350,7 @@ class VelocityCallback
public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultFieldType = typename ResultType::field_type;
using ResultFieldValueType = typename Opm::MathToolbox<ResultFieldType>::ValueType;
using ResultFieldValueType = typename MathToolbox<ResultFieldType>::ValueType;
VelocityCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx)
@ -382,11 +382,11 @@ class VelocityComponentCallback
public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
VelocityComponentCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx)
{ Opm::Valgrind::SetUndefined(dimIdx_); }
{ Valgrind::SetUndefined(dimIdx_); }
VelocityComponentCallback(const ElementContext& elemCtx, unsigned dimIdx)
: elemCtx_(elemCtx)
@ -406,7 +406,7 @@ public:
*/
ResultType operator()(unsigned dofIdx) const
{
Opm::Valgrind::CheckDefined(dimIdx_);
Valgrind::CheckDefined(dimIdx_);
return elemCtx_.intensiveQuantities(dofIdx, /*timeIdx=*/0).velocityCenter()[dimIdx_];
}
@ -431,13 +431,13 @@ class MoleFractionCallback
public:
using ResultType = typename std::remove_const<typename std::remove_reference<ResultRawType>::type>::type;
using ResultValueType = typename Opm::MathToolbox<ResultType>::ValueType;
using ResultValueType = typename MathToolbox<ResultType>::ValueType;
MoleFractionCallback(const ElementContext& elemCtx)
: elemCtx_(elemCtx)
{
Opm::Valgrind::SetUndefined(phaseIdx_);
Opm::Valgrind::SetUndefined(compIdx_);
Valgrind::SetUndefined(phaseIdx_);
Valgrind::SetUndefined(compIdx_);
}
MoleFractionCallback(const ElementContext& elemCtx, unsigned phaseIdx, unsigned compIdx)
@ -466,8 +466,8 @@ public:
*/
ResultType operator()(unsigned dofIdx) const
{
Opm::Valgrind::CheckDefined(phaseIdx_);
Opm::Valgrind::CheckDefined(compIdx_);
Valgrind::CheckDefined(phaseIdx_);
Valgrind::CheckDefined(compIdx_);
return elemCtx_.intensiveQuantities(dofIdx, /*timeIdx=*/0).fluidState().moleFraction(phaseIdx_, compIdx_);
}

View File

@ -57,7 +57,7 @@ struct AutoDiffLocalLinearizer {};
// set the properties to be spliced in
template<class TypeTag>
struct LocalLinearizer<TypeTag, TTag::AutoDiffLocalLinearizer>
{ using type = Opm::FvBaseAdLocalLinearizer<TypeTag>; };
{ using type = FvBaseAdLocalLinearizer<TypeTag>; };
//! Set the function evaluation w.r.t. the primary variables
template<class TypeTag>
@ -69,7 +69,7 @@ private:
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
public:
using type = Opm::DenseAd::Evaluation<Scalar, numEq>;
using type = DenseAd::Evaluation<Scalar, numEq>;
};
} // namespace Opm::Properties
@ -286,7 +286,7 @@ protected:
// with regard to the focus variable 'pvIdx' of the degree of freedom
// 'focusDofIdx'
jacobian_[dofIdx][focusDofIdx][eqIdx][pvIdx] = resid[dofIdx][eqIdx].derivative(pvIdx);
Opm::Valgrind::CheckDefined(jacobian_[dofIdx][focusDofIdx][eqIdx][pvIdx]);
Valgrind::CheckDefined(jacobian_[dofIdx][focusDofIdx][eqIdx][pvIdx]);
}
}
}

View File

@ -90,7 +90,7 @@ namespace Opm::Properties {
//! Set the default type for the time manager
template<class TypeTag>
struct Simulator<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::Simulator<TypeTag>; };
struct Simulator<TypeTag, TTag::FvBaseDiscretization> { using type = ::Opm::Simulator<TypeTag>; };
//! Mapper for the grid view's vertices.
template<class TypeTag>
@ -109,20 +109,20 @@ struct BorderListCreator<TypeTag, TTag::FvBaseDiscretization>
using DofMapper = GetPropType<TypeTag, Properties::DofMapper>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
public:
using type = Opm::Linear::NullBorderListCreator<GridView, DofMapper>;
using type = Linear::NullBorderListCreator<GridView, DofMapper>;
};
template<class TypeTag>
struct DiscLocalResidual<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseLocalResidual<TypeTag>; };
struct DiscLocalResidual<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseLocalResidual<TypeTag>; };
template<class TypeTag>
struct DiscIntensiveQuantities<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseIntensiveQuantities<TypeTag>; };
struct DiscIntensiveQuantities<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseIntensiveQuantities<TypeTag>; };
template<class TypeTag>
struct DiscExtensiveQuantities<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseExtensiveQuantities<TypeTag>; };
struct DiscExtensiveQuantities<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseExtensiveQuantities<TypeTag>; };
//! Calculates the gradient of any quantity given the index of a flux approximation point
template<class TypeTag>
struct GradientCalculator<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseGradientCalculator<TypeTag>; };
struct GradientCalculator<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseGradientCalculator<TypeTag>; };
//! The maximum allowed number of timestep divisions for the
//! Newton solver
@ -164,7 +164,7 @@ struct BoundaryRateVector<TypeTag, TTag::FvBaseDiscretization>
* \brief The class which represents constraints.
*/
template<class TypeTag>
struct Constraints<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseConstraints<TypeTag>; };
struct Constraints<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseConstraints<TypeTag>; };
/*!
* \brief The type for storing a residual for an element.
@ -184,7 +184,7 @@ struct GlobalEqVector<TypeTag, TTag::FvBaseDiscretization>
* \brief An object representing a local set of primary variables.
*/
template<class TypeTag>
struct PrimaryVariables<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBasePrimaryVariables<TypeTag>; };
struct PrimaryVariables<TypeTag, TTag::FvBaseDiscretization> { using type = FvBasePrimaryVariables<TypeTag>; };
/*!
* \brief The type of a solution for the whole grid at a fixed time.
@ -199,23 +199,23 @@ struct SolutionVector<TypeTag, TTag::FvBaseDiscretization>
* This should almost certainly be overloaded by the model...
*/
template<class TypeTag>
struct IntensiveQuantities<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseIntensiveQuantities<TypeTag>; };
struct IntensiveQuantities<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseIntensiveQuantities<TypeTag>; };
/*!
* \brief The element context
*/
template<class TypeTag>
struct ElementContext<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseElementContext<TypeTag>; };
struct ElementContext<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseElementContext<TypeTag>; };
template<class TypeTag>
struct BoundaryContext<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseBoundaryContext<TypeTag>; };
struct BoundaryContext<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseBoundaryContext<TypeTag>; };
template<class TypeTag>
struct ConstraintsContext<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseConstraintsContext<TypeTag>; };
struct ConstraintsContext<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseConstraintsContext<TypeTag>; };
/*!
* \brief The OpenMP threads manager
*/
template<class TypeTag>
struct ThreadManager<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::ThreadManager<TypeTag>; };
struct ThreadManager<TypeTag, TTag::FvBaseDiscretization> { using type = ::Opm::ThreadManager<TypeTag>; };
template<class TypeTag>
struct ThreadsPerProcess<TypeTag, TTag::FvBaseDiscretization> { static constexpr int value = 1; };
template<class TypeTag>
@ -225,7 +225,7 @@ struct UseLinearizationLock<TypeTag, TTag::FvBaseDiscretization> { static conste
* \brief Linearizer for the global system of equations.
*/
template<class TypeTag>
struct Linearizer<TypeTag, TTag::FvBaseDiscretization> { using type = Opm::FvBaseLinearizer<TypeTag>; };
struct Linearizer<TypeTag, TTag::FvBaseDiscretization> { using type = FvBaseLinearizer<TypeTag>; };
//! use an unlimited time step size by default
template<class TypeTag>
@ -370,12 +370,12 @@ class FvBaseDiscretization
historySize = getPropValue<TypeTag, Properties::TimeDiscHistorySize>(),
};
using IntensiveQuantitiesVector = std::vector<IntensiveQuantities, Opm::aligned_allocator<IntensiveQuantities, alignof(IntensiveQuantities)> >;
using IntensiveQuantitiesVector = std::vector<IntensiveQuantities, aligned_allocator<IntensiveQuantities, alignof(IntensiveQuantities)> >;
using Element = typename GridView::template Codim<0>::Entity;
using ElementIterator = typename GridView::template Codim<0>::Iterator;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using VectorBlock = Dune::FieldVector<Evaluation, numEq>;
using EvalEqVector = Dune::FieldVector<Evaluation, numEq>;
@ -500,7 +500,7 @@ public:
NewtonMethod::registerParameters();
// register runtime parameters of the output modules
Opm::VtkPrimaryVarsModule<TypeTag>::registerParameters();
VtkPrimaryVarsModule<TypeTag>::registerParameters();
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableGridAdaptation, "Enable adaptive grid refinement/coarsening");
EWOMS_REGISTER_PARAM(TypeTag, bool, EnableVtkOutput, "Global switch for turning on writing VTK files");
@ -1050,7 +1050,7 @@ public:
boundaryCtx,
faceIdx,
/*timeIdx=*/0);
Opm::Valgrind::CheckDefined(values);
Valgrind::CheckDefined(values);
unsigned dofIdx = boundaryCtx.interiorScvIndex(faceIdx, /*timeIdx=*/0);
const auto& insideIntQuants = elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0);
@ -1075,7 +1075,7 @@ public:
elemCtx,
dofIdx,
/*timeIdx=*/0);
Opm::Valgrind::CheckDefined(values);
Valgrind::CheckDefined(values);
const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0);
Scalar dofVolume =
@ -1257,7 +1257,7 @@ public:
*/
bool update()
{
Opm::TimerGuard prePostProcessGuard(prePostProcessTimer_);
TimerGuard prePostProcessGuard(prePostProcessTimer_);
#ifndef NDEBUG
for (unsigned timeIdx = 0; timeIdx < historySize; ++timeIdx) {
@ -1859,16 +1859,16 @@ public:
}
#endif
const Opm::Timer& prePostProcessTimer() const
const Timer& prePostProcessTimer() const
{ return prePostProcessTimer_; }
const Opm::Timer& linearizeTimer() const
const Timer& linearizeTimer() const
{ return linearizeTimer_; }
const Opm::Timer& solveTimer() const
const Timer& solveTimer() const
{ return solveTimer_; }
const Opm::Timer& updateTimer() const
const Timer& updateTimer() const
{ return updateTimer_; }
protected:
@ -1909,7 +1909,7 @@ protected:
void registerOutputModules_()
{
// add the output modules available on all model
auto *mod = new Opm::VtkPrimaryVarsModule<TypeTag>(simulator_);
auto *mod = new VtkPrimaryVarsModule<TypeTag>(simulator_);
this->outputModules_.push_back(mod);
}
@ -1946,10 +1946,10 @@ protected:
NewtonMethod newtonMethod_;
Opm::Timer prePostProcessTimer_;
Opm::Timer linearizeTimer_;
Opm::Timer solveTimer_;
Opm::Timer updateTimer_;
Timer prePostProcessTimer_;
Timer linearizeTimer_;
Timer solveTimer_;
Timer updateTimer_;
// calculates the local jacobian matrix for a given element
std::vector<LocalLinearizer> localLinearizer_;

View File

@ -103,10 +103,10 @@ public:
}
static void *operator new(size_t size)
{ return Opm::aligned_alloc(alignof(FvBaseElementContext), size); }
{ return aligned_alloc(alignof(FvBaseElementContext), size); }
static void operator delete(void *ptr)
{ Opm::aligned_free(ptr); }
{ aligned_free(ptr); }
/*!
* \brief Construct all volume and extensive quantities of an element
@ -597,8 +597,8 @@ protected:
GradientCalculator gradientCalculator_;
std::vector<DofStore_, Opm::aligned_allocator<DofStore_, alignof(DofStore_)> > dofVars_;
std::vector<ExtensiveQuantities, Opm::aligned_allocator<ExtensiveQuantities, alignof(ExtensiveQuantities)> > extensiveQuantities_;
std::vector<DofStore_, aligned_allocator<DofStore_, alignof(DofStore_)> > dofVars_;
std::vector<ExtensiveQuantities, aligned_allocator<ExtensiveQuantities, alignof(ExtensiveQuantities)> > extensiveQuantities_;
const Simulator *simulatorPtr_;
const Element *elemPtr_;

View File

@ -73,7 +73,7 @@ public:
extrusionFactor_ =
(elemCtx.intensiveQuantities(interiorScvIdx_, timeIdx).extrusionFactor()
+ elemCtx.intensiveQuantities(exteriorScvIdx_, timeIdx).extrusionFactor()) / 2;
Opm::Valgrind::CheckDefined(extrusionFactor_);
Valgrind::CheckDefined(extrusionFactor_);
assert(extrusionFactor_ > 0);
}
@ -99,7 +99,7 @@ public:
exteriorScvIdx_ = static_cast<unsigned short>(dofIdx);
extrusionFactor_ = context.intensiveQuantities(bfIdx, timeIdx).extrusionFactor();
Opm::Valgrind::CheckDefined(extrusionFactor_);
Valgrind::CheckDefined(extrusionFactor_);
assert(extrusionFactor_ > 0);
}

View File

@ -66,7 +66,7 @@ struct BaseEpsilon { using type = UndefinedProperty; };
// set the properties to be spliced in
template<class TypeTag>
struct LocalLinearizer<TypeTag, TTag::FiniteDifferenceLocalLinearizer>
{ using type = Opm::FvBaseFdLocalLinearizer<TypeTag>; };
{ using type = FvBaseFdLocalLinearizer<TypeTag>; };
template<class TypeTag>
struct Evaluation<TypeTag, TTag::FiniteDifferenceLocalLinearizer>
@ -282,7 +282,7 @@ public:
unsigned globalIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0);
Scalar pvWeight = elemCtx.model().primaryVarWeight(globalIdx, pvIdx);
assert(pvWeight > 0 && std::isfinite(pvWeight));
Opm::Valgrind::CheckDefined(pvWeight);
Valgrind::CheckDefined(pvWeight);
return baseEpsilon()/pvWeight;
}
@ -476,7 +476,7 @@ protected:
#ifndef NDEBUG
for (unsigned i = 0; i < derivResidual_.size(); ++i)
Opm::Valgrind::CheckDefined(derivResidual_[i]);
Valgrind::CheckDefined(derivResidual_[i]);
#endif
}
@ -497,7 +497,7 @@ protected:
// regard to the primary variable 'pvIdx' of the degree of freedom
// 'focusDofIdx'
jacobian_[dofIdx][focusDofIdx][eqIdx][pvIdx] = derivResidual_[dofIdx][eqIdx];
Opm::Valgrind::CheckDefined(jacobian_[dofIdx][focusDofIdx][eqIdx][pvIdx]);
Valgrind::CheckDefined(jacobian_[dofIdx][focusDofIdx][eqIdx][pvIdx]);
}
}
}

View File

@ -116,12 +116,12 @@ public:
if (i == focusDofIdx)
value = quantityCallback(i)*interiorDistance;
else
value = Opm::getValue(quantityCallback(i))*interiorDistance;
value = getValue(quantityCallback(i))*interiorDistance;
if (j == focusDofIdx)
value += quantityCallback(j)*exteriorDistance;
else
value += Opm::getValue(quantityCallback(j))*exteriorDistance;
value += getValue(quantityCallback(j))*exteriorDistance;
value /= interiorDistance + exteriorDistance;
@ -165,9 +165,9 @@ public:
value[k] *= interiorDistance;
}
else {
const auto& dofVal = Opm::getValue(quantityCallback(i));
const auto& dofVal = getValue(quantityCallback(i));
for (int k = 0; k < dofVal.size(); ++k)
value[k] = Opm::getValue(dofVal[k])*interiorDistance;
value[k] = getValue(dofVal[k])*interiorDistance;
}
if (j == focusDofIdx) {
@ -178,7 +178,7 @@ public:
else {
const auto& dofVal = quantityCallback(j);
for (int k = 0; k < dofVal.size(); ++k)
value[k] += Opm::getValue(dofVal[k])*exteriorDistance;
value[k] += getValue(dofVal[k])*exteriorDistance;
}
Scalar totDistance = interiorDistance + exteriorDistance;
@ -218,18 +218,18 @@ public:
Evaluation deltay;
if (i == focusIdx) {
deltay =
Opm::getValue(quantityCallback(j))
getValue(quantityCallback(j))
- quantityCallback(i);
}
else if (j == focusIdx) {
deltay =
quantityCallback(j)
- Opm::getValue(quantityCallback(i));
- getValue(quantityCallback(i));
}
else
deltay =
Opm::getValue(quantityCallback(j))
- Opm::getValue(quantityCallback(i));
getValue(quantityCallback(j))
- getValue(quantityCallback(i));
Scalar distSquared = 0.0;
for (unsigned dimIdx = 0; dimIdx < dimWorld; ++dimIdx) {
@ -296,8 +296,8 @@ public:
deltay = quantityCallback.boundaryValue() - quantityCallback(face.interiorIndex());
else
deltay =
Opm::getValue(quantityCallback.boundaryValue())
- Opm::getValue(quantityCallback(face.interiorIndex()));
getValue(quantityCallback.boundaryValue())
- getValue(quantityCallback(face.interiorIndex()));
const auto& boundaryFacePos = face.integrationPos();
const auto& interiorPos = stencil.subControlVolume(face.interiorIndex()).center();

View File

@ -89,7 +89,7 @@ class FvBaseLinearizer
using GridCommHandleFactory = GetPropType<TypeTag, Properties::GridCommHandleFactory>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using Element = typename GridView::template Codim<0>::Entity;
using ElementIterator = typename GridView::template Codim<0>::Iterator;
@ -219,7 +219,7 @@ public:
succeeded = gridView_().comm().min(succeeded);
if (!succeeded)
throw Opm::NumericalIssue("A process did not succeed in linearizing the system");
throw NumericalIssue("A process did not succeed in linearizing the system");
}
void finalize()
@ -252,7 +252,7 @@ public:
succeeded = comm.min(succeeded);
if (!succeeded)
throw Opm::NumericalIssue("linearization of an auxilary equation failed");
throw NumericalIssue("linearization of an auxilary equation failed");
}
}

View File

@ -78,7 +78,7 @@ private:
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
enum { extensiveStorageTerm = getPropValue<TypeTag, Properties::ExtensiveStorageTerm>() };
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using EvalVector = Dune::FieldVector<Evaluation, numEq>;
// copying the local residual class is not a good idea
@ -86,7 +86,7 @@ private:
{}
public:
using LocalEvalBlockVector = Dune::BlockVector<EvalVector, Opm::aligned_allocator<EvalVector, alignof(EvalVector)> >;
using LocalEvalBlockVector = Dune::BlockVector<EvalVector, aligned_allocator<EvalVector, alignof(EvalVector)> >;
FvBaseLocalResidual()
{ }
@ -182,7 +182,7 @@ public:
Scalar dofVolume = elemCtx.dofTotalVolume(dofIdx, /*timeIdx=*/0);
assert(std::isfinite(dofVolume));
Opm::Valgrind::CheckDefined(dofVolume);
Valgrind::CheckDefined(dofVolume);
for (unsigned eqIdx = 0; eqIdx < numEq; ++ eqIdx)
residual[dofIdx][eqIdx] /= dofVolume;
@ -283,8 +283,8 @@ public:
size_t numPrimaryDof = elemCtx.numPrimaryDof(/*timeIdx=*/0);
for (unsigned dofIdx=0; dofIdx < numPrimaryDof; dofIdx++) {
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx) {
Opm::Valgrind::CheckDefined(storage[dofIdx][eqIdx]);
assert(Opm::isfinite(storage[dofIdx][eqIdx]));
Valgrind::CheckDefined(storage[dofIdx][eqIdx]);
assert(isfinite(storage[dofIdx][eqIdx]));
}
}
#endif
@ -311,19 +311,19 @@ public:
unsigned i = face.interiorIndex();
unsigned j = face.exteriorIndex();
Opm::Valgrind::SetUndefined(flux);
Valgrind::SetUndefined(flux);
asImp_().computeFlux(flux, /*context=*/elemCtx, scvfIdx, timeIdx);
Opm::Valgrind::CheckDefined(flux);
Valgrind::CheckDefined(flux);
#ifndef NDEBUG
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx)
assert(Opm::isfinite(flux[eqIdx]));
assert(isfinite(flux[eqIdx]));
#endif
Scalar alpha = elemCtx.extensiveQuantities(scvfIdx, timeIdx).extrusionFactor();
alpha *= face.area();
Opm::Valgrind::CheckDefined(alpha);
Valgrind::CheckDefined(alpha);
assert(alpha > 0.0);
assert(Opm::isfinite(alpha));
assert(isfinite(alpha));
for (unsigned eqIdx = 0; eqIdx < numEq; ++ eqIdx)
flux[eqIdx] *= alpha;
@ -342,7 +342,7 @@ public:
// volume i and into sub-control volume j, we need to add the flux to finite
// volume i and subtract it from finite volume j
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx) {
assert(Opm::isfinite(flux[eqIdx]));
assert(isfinite(flux[eqIdx]));
residual[i][eqIdx] += flux[eqIdx];
residual[j][eqIdx] -= flux[eqIdx];
}
@ -353,8 +353,8 @@ public:
size_t numDof = elemCtx.numDof(timeIdx);
for (unsigned i=0; i < numDof; i++) {
for (unsigned j = 0; j < numEq; ++ j) {
assert(Opm::isfinite(residual[i][j]));
Opm::Valgrind::CheckDefined(residual[i][j]);
assert(isfinite(residual[i][j]));
Valgrind::CheckDefined(residual[i][j]);
}
}
#endif
@ -445,8 +445,8 @@ protected:
size_t numDof = elemCtx.numDof(/*timeIdx=*/0);
for (unsigned i=0; i < numDof; i++) {
for (unsigned j = 0; j < numEq; ++ j) {
assert(Opm::isfinite(residual[i][j]));
Opm::Valgrind::CheckDefined(residual[i][j]);
assert(isfinite(residual[i][j]));
Valgrind::CheckDefined(residual[i][j]);
}
}
#endif
@ -464,9 +464,9 @@ protected:
{
BoundaryRateVector values;
Opm::Valgrind::SetUndefined(values);
Valgrind::SetUndefined(values);
boundaryCtx.problem().boundary(values, boundaryCtx, boundaryFaceIdx, timeIdx);
Opm::Valgrind::CheckDefined(values);
Valgrind::CheckDefined(values);
const auto& stencil = boundaryCtx.stencil(timeIdx);
unsigned dofIdx = stencil.boundaryFace(boundaryFaceIdx).interiorIndex();
@ -476,8 +476,8 @@ protected:
stencil.boundaryFace(boundaryFaceIdx).area()
* insideIntQuants.extrusionFactor();
Opm::Valgrind::CheckDefined(values[eqIdx]);
assert(Opm::isfinite(values[eqIdx]));
Valgrind::CheckDefined(values[eqIdx]);
assert(isfinite(values[eqIdx]));
}
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx)
@ -504,13 +504,13 @@ protected:
for (unsigned dofIdx=0; dofIdx < numPrimaryDof; dofIdx++) {
Scalar extrusionFactor =
elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0).extrusionFactor();
Opm::Valgrind::CheckDefined(extrusionFactor);
assert(Opm::isfinite(extrusionFactor));
Valgrind::CheckDefined(extrusionFactor);
assert(isfinite(extrusionFactor));
assert(extrusionFactor > 0.0);
Scalar scvVolume =
elemCtx.stencil(/*timeIdx=*/0).subControlVolume(dofIdx).volume() * extrusionFactor;
Opm::Valgrind::CheckDefined(scvVolume);
assert(Opm::isfinite(scvVolume));
Valgrind::CheckDefined(scvVolume);
assert(isfinite(scvVolume));
assert(scvVolume > 0.0);
// if the model uses extensive quantities in its storage term, and we use
@ -528,9 +528,9 @@ protected:
asImp_().computeStorage(tmp, elemCtx, dofIdx, /*timeIdx=*/0);
#ifndef NDEBUG
Opm::Valgrind::CheckDefined(tmp);
Valgrind::CheckDefined(tmp);
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx)
assert(Opm::isfinite(tmp[eqIdx]));
assert(isfinite(tmp[eqIdx]));
#endif
if (elemCtx.enableStorageCache()) {
@ -559,7 +559,7 @@ protected:
tmp2[eqIdx] = Toolbox::value(tmp[eqIdx]);
}
Opm::Valgrind::CheckDefined(tmp2);
Valgrind::CheckDefined(tmp2);
model.updateCachedStorage(globalDofIdx, /*timeIdx=*/1, tmp2);
}
@ -568,7 +568,7 @@ protected:
// if the storage term is cached and we're not looking at the first
// iteration of the time step, we take the cached data.
tmp2 = model.cachedStorage(globalDofIdx, /*timeIdx=*/1);
Opm::Valgrind::CheckDefined(tmp2);
Valgrind::CheckDefined(tmp2);
}
}
else {
@ -576,7 +576,7 @@ protected:
// we re-calculate it from scratch.
tmp2 = 0.0;
asImp_().computeStorage(tmp2, elemCtx, dofIdx, /*timeIdx=*/1);
Opm::Valgrind::CheckDefined(tmp2);
Valgrind::CheckDefined(tmp2);
}
// Use the implicit Euler time discretization
@ -589,7 +589,7 @@ protected:
residual[dofIdx][eqIdx] += tmp[eqIdx];
}
Opm::Valgrind::CheckDefined(residual[dofIdx]);
Valgrind::CheckDefined(residual[dofIdx]);
// deal with the source term
asImp_().computeSource(sourceRate, elemCtx, dofIdx, /*timeIdx=*/0);
@ -602,7 +602,7 @@ protected:
dofIdx != elemCtx.focusDofIndex())
{
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx)
residual[dofIdx][eqIdx] -= Opm::scalarValue(sourceRate[eqIdx])*scvVolume;
residual[dofIdx][eqIdx] -= scalarValue(sourceRate[eqIdx])*scvVolume;
}
else {
for (unsigned eqIdx = 0; eqIdx < numEq; ++eqIdx) {
@ -611,7 +611,7 @@ protected:
}
}
Opm::Valgrind::CheckDefined(residual[dofIdx]);
Valgrind::CheckDefined(residual[dofIdx]);
}
#if !defined NDEBUG
@ -619,8 +619,8 @@ protected:
size_t numDof = elemCtx.numDof(/*timeIdx=*/0);
for (unsigned i=0; i < numDof; i++) {
for (unsigned j = 0; j < numEq; ++ j) {
assert(Opm::isfinite(residual[i][j]));
Opm::Valgrind::CheckDefined(residual[i][j]);
assert(isfinite(residual[i][j]));
Valgrind::CheckDefined(residual[i][j]);
}
}
#endif

View File

@ -66,7 +66,7 @@ class FvBaseNewtonConvergenceWriter
using NewtonMethod = GetPropType<TypeTag, Properties::NewtonMethod>;
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
public:
FvBaseNewtonConvergenceWriter(NewtonMethod& nm)

View File

@ -57,7 +57,7 @@ struct DiscNewtonMethod { using type = UndefinedProperty; };
// set default values
template<class TypeTag>
struct DiscNewtonMethod<TypeTag, TTag::FvBaseNewtonMethod>
{ using type = Opm::FvBaseNewtonMethod<TypeTag>; };
{ using type = FvBaseNewtonMethod<TypeTag>; };
template<class TypeTag>
struct NewtonMethod<TypeTag, TTag::FvBaseNewtonMethod>
@ -65,7 +65,7 @@ struct NewtonMethod<TypeTag, TTag::FvBaseNewtonMethod>
template<class TypeTag>
struct NewtonConvergenceWriter<TypeTag, TTag::FvBaseNewtonMethod>
{ using type = Opm::FvBaseNewtonConvergenceWriter<TypeTag>; };
{ using type = FvBaseNewtonConvergenceWriter<TypeTag>; };
} // namespace Opm::Properties
@ -82,14 +82,13 @@ namespace Opm {
template <class TypeTag>
class FvBaseNewtonMethod : public NewtonMethod<TypeTag>
{
using ParentType = Opm::NewtonMethod<TypeTag>;
using ParentType = NewtonMethod<TypeTag>;
using Implementation = GetPropType<TypeTag, Properties::NewtonMethod>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
using Model = GetPropType<TypeTag, Properties::Model>;
using Linearizer = GetPropType<TypeTag, Properties::Linearizer>;
using NewtonMethod = GetPropType<TypeTag, Properties::NewtonMethod>;
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
using SolutionVector = GetPropType<TypeTag, Properties::SolutionVector>;
using PrimaryVariables = GetPropType<TypeTag, Properties::PrimaryVariables>;
@ -102,7 +101,7 @@ public:
{ }
protected:
friend class Opm::NewtonMethod<TypeTag>;
friend class NewtonMethod<TypeTag>;
/*!
* \brief Update the current solution with a delta vector.

View File

@ -55,13 +55,13 @@ class FvBasePrimaryVariables
enum { numEq = getPropValue<TypeTag, Properties::NumEq>() };
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using ParentType = Dune::FieldVector<Scalar, numEq>;
public:
FvBasePrimaryVariables()
: ParentType()
{ Opm::Valgrind::SetUndefined(*this); }
{ Valgrind::SetUndefined(*this); }
/*!
* \brief Construction from a scalar value
@ -122,7 +122,7 @@ public:
*/
void checkDefined() const
{
Opm::Valgrind::CheckDefined(*static_cast<const ParentType*>(this));
Valgrind::CheckDefined(*static_cast<const ParentType*>(this));
}
};

View File

@ -69,7 +69,7 @@ private:
using GridView = GetPropType<TypeTag, Properties::GridView>;
static const int vtkOutputFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkOutputFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkOutputFormat>;
using Model = GetPropType<TypeTag, Properties::Model>;
using Scalar = GetPropType<TypeTag, Properties::Scalar>;

View File

@ -169,7 +169,7 @@ public:
#else
using QuantityConstType = typename std::remove_reference<typename QuantityCallback::ResultType>::type;
using QuantityType = typename std::remove_const<QuantityConstType>::type;
using Toolbox = Opm::MathToolbox<QuantityType>;
using Toolbox = MathToolbox<QuantityType>;
// If the user does not want to use two-point gradients, we
// use P1 finite element gradients..
@ -218,7 +218,7 @@ public:
using RawFieldType = decltype(std::declval<QuantityType>()[0]);
using FieldType = typename std::remove_const<typename std::remove_reference<RawFieldType>::type>::type;
using Toolbox = Opm::MathToolbox<FieldType>;
using Toolbox = MathToolbox<FieldType>;
// If the user does not want to use two-point gradients, we
// use P1 finite element gradients..
@ -287,7 +287,7 @@ public:
const auto& dofVal = quantityCallback(vertIdx);
const auto& tmp = p1Gradient_[fapIdx][vertIdx];
for (int dimIdx = 0; dimIdx < dim; ++ dimIdx)
quantityGrad[dimIdx] += Opm::scalarValue(dofVal)*tmp[dimIdx];
quantityGrad[dimIdx] += scalarValue(dofVal)*tmp[dimIdx];
}
}
#endif

View File

@ -61,7 +61,7 @@ private:
using CoordScalar = typename GridView::ctype;
public:
using type = Opm::VcfvStencil<CoordScalar, GridView>;
using type = VcfvStencil<CoordScalar, GridView>;
};
//! Mapper for the degrees of freedoms.
@ -70,23 +70,23 @@ struct DofMapper<TypeTag, TTag::VcfvDiscretization> { using type = GetPropType<T
//! The concrete class which manages the spatial discretization
template<class TypeTag>
struct Discretization<TypeTag, TTag::VcfvDiscretization> { using type = Opm::VcfvDiscretization<TypeTag>; };
struct Discretization<TypeTag, TTag::VcfvDiscretization> { using type = VcfvDiscretization<TypeTag>; };
//! The base class for the output modules (decides whether to write
//! element or vertex based fields)
template<class TypeTag>
struct DiscBaseOutputModule<TypeTag, TTag::VcfvDiscretization>
{ using type = Opm::VcfvBaseOutputModule<TypeTag>; };
{ using type = VcfvBaseOutputModule<TypeTag>; };
//! Calculates the gradient of any quantity given the index of a flux approximation point
template<class TypeTag>
struct GradientCalculator<TypeTag, TTag::VcfvDiscretization>
{ using type = Opm::P1FeGradientCalculator<TypeTag>; };
{ using type = P1FeGradientCalculator<TypeTag>; };
//! The class to create grid communication handles
template<class TypeTag>
struct GridCommHandleFactory<TypeTag, TTag::VcfvDiscretization>
{ using type = Opm::VcfvGridCommHandleFactory<TypeTag>; };
{ using type = VcfvGridCommHandleFactory<TypeTag>; };
//! Use two-point gradients by default for the vertex centered finite volume scheme.
template<class TypeTag>
@ -118,7 +118,7 @@ struct BorderListCreator<TypeTag, TTag::VcfvDiscretization>
using VertexMapper = GetPropType<TypeTag, Properties::VertexMapper>;
using GridView = GetPropType<TypeTag, Properties::GridView>;
public:
using type = Opm::Linear::VertexBorderListFromGrid<GridView, VertexMapper>;
using type = Linear::VertexBorderListFromGrid<GridView, VertexMapper>;
};
//! For the vertex centered finite volume method, ghost and overlap elements must _not_

View File

@ -73,7 +73,7 @@ class VcfvScvGeometries<Scalar, /*dim=*/1, ElementType::cube>
enum { numScv = 2 };
public:
using ScvLocalGeometry = Opm::QuadrialteralQuadratureGeometry<Scalar, dim>;
using ScvLocalGeometry = QuadrialteralQuadratureGeometry<Scalar, dim>;
static void init()
{
@ -112,7 +112,7 @@ class VcfvScvGeometries<Scalar, /*dim=*/1, ElementType::simplex>
enum { numScv = 2 };
public:
using ScvLocalGeometry = Opm::QuadrialteralQuadratureGeometry<Scalar, dim>;
using ScvLocalGeometry = QuadrialteralQuadratureGeometry<Scalar, dim>;
static const ScvLocalGeometry& get(unsigned scvIdx OPM_UNUSED)
{
@ -130,7 +130,7 @@ class VcfvScvGeometries<Scalar, /*dim=*/2, ElementType::simplex>
enum { numScv = 3 };
public:
using ScvLocalGeometry = Opm::QuadrialteralQuadratureGeometry<Scalar, dim>;
using ScvLocalGeometry = QuadrialteralQuadratureGeometry<Scalar, dim>;
static const ScvLocalGeometry& get(unsigned scvIdx)
{ return scvGeoms_[scvIdx]; }
@ -182,7 +182,7 @@ class VcfvScvGeometries<Scalar, /*dim=*/2, ElementType::cube>
enum { numScv = 4 };
public:
using ScvLocalGeometry = Opm::QuadrialteralQuadratureGeometry<Scalar, dim>;
using ScvLocalGeometry = QuadrialteralQuadratureGeometry<Scalar, dim>;
static const ScvLocalGeometry& get(unsigned scvIdx)
{ return scvGeoms_[scvIdx]; }
@ -243,7 +243,7 @@ class VcfvScvGeometries<Scalar, /*dim=*/3, ElementType::simplex>
enum { numScv = 4 };
public:
using ScvLocalGeometry = Opm::QuadrialteralQuadratureGeometry<Scalar, dim>;
using ScvLocalGeometry = QuadrialteralQuadratureGeometry<Scalar, dim>;
static const ScvLocalGeometry& get(unsigned scvIdx)
{ return scvGeoms_[scvIdx]; }
@ -322,7 +322,7 @@ class VcfvScvGeometries<Scalar, /*dim=*/3, ElementType::cube>
enum { numScv = 8 };
public:
using ScvLocalGeometry = Opm::QuadrialteralQuadratureGeometry<Scalar, dim>;
using ScvLocalGeometry = QuadrialteralQuadratureGeometry<Scalar, dim>;
static const ScvLocalGeometry& get(unsigned scvIdx)
{ return scvGeoms_[scvIdx]; }
@ -484,7 +484,7 @@ private:
using LocalPosition = Dune::FieldVector<CoordScalar,dim>;
using IntersectionIterator = typename GridView::IntersectionIterator;
using ScvLocalGeometry = Opm::QuadrialteralQuadratureGeometry<Scalar, dim>;
using ScvLocalGeometry = QuadrialteralQuadratureGeometry<Scalar, dim>;
#if HAVE_DUNE_LOCALFUNCTIONS
using LocalFiniteElementCache = Dune::PQkLocalFiniteElementCache<CoordScalar, Scalar, dim, 1>;

View File

@ -89,7 +89,7 @@ class VtkBlackOilEnergyModule : public BaseOutputModule<TypeTag>
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
enum { enableEnergy = getPropValue<TypeTag, Properties::EnableEnergy>() };
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
@ -165,20 +165,20 @@ public:
if (rockInternalEnergyOutput_())
rockInternalEnergy_[globalDofIdx] =
Opm::scalarValue(intQuants.rockInternalEnergy());
scalarValue(intQuants.rockInternalEnergy());
if (totalThermalConductivityOutput_())
totalThermalConductivity_[globalDofIdx] =
Opm::scalarValue(intQuants.totalThermalConductivity());
scalarValue(intQuants.totalThermalConductivity());
for (int phaseIdx = 0; phaseIdx < numPhases; ++ phaseIdx) {
if (fluidInternalEnergiesOutput_())
fluidInternalEnergies_[phaseIdx][globalDofIdx] =
Opm::scalarValue(intQuants.fluidState().internalEnergy(phaseIdx));
scalarValue(intQuants.fluidState().internalEnergy(phaseIdx));
if (fluidEnthalpiesOutput_())
fluidEnthalpies_[phaseIdx][globalDofIdx] =
Opm::scalarValue(intQuants.fluidState().enthalpy(phaseIdx));
scalarValue(intQuants.fluidState().enthalpy(phaseIdx));
}
}
}

View File

@ -118,7 +118,7 @@ class VtkBlackOilModule : public BaseOutputModule<TypeTag>
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
enum { oilPhaseIdx = FluidSystem::oilPhaseIdx };
enum { gasPhaseIdx = FluidSystem::gasPhaseIdx };
@ -225,14 +225,14 @@ public:
const auto& primaryVars = elemCtx.primaryVars(dofIdx, /*timeIdx=*/0);
unsigned pvtRegionIdx = elemCtx.primaryVars(dofIdx, /*timeIdx=*/0).pvtRegionIndex();
Scalar SoMax = std::max(Opm::getValue(fs.saturation(oilPhaseIdx)),
Scalar SoMax = std::max(getValue(fs.saturation(oilPhaseIdx)),
elemCtx.problem().maxOilSaturation(globalDofIdx));
if (FluidSystem::phaseIsActive(gasPhaseIdx) && FluidSystem::phaseIsActive(oilPhaseIdx)) {
Scalar x_oG = Opm::getValue(fs.moleFraction(oilPhaseIdx, gasCompIdx));
Scalar x_gO = Opm::getValue(fs.moleFraction(gasPhaseIdx, oilCompIdx));
Scalar X_oG = Opm::getValue(fs.massFraction(oilPhaseIdx, gasCompIdx));
Scalar X_gO = Opm::getValue(fs.massFraction(gasPhaseIdx, oilCompIdx));
Scalar x_oG = getValue(fs.moleFraction(oilPhaseIdx, gasCompIdx));
Scalar x_gO = getValue(fs.moleFraction(gasPhaseIdx, oilCompIdx));
Scalar X_oG = getValue(fs.massFraction(oilPhaseIdx, gasCompIdx));
Scalar X_gO = getValue(fs.massFraction(gasPhaseIdx, oilCompIdx));
Scalar Rs = FluidSystem::convertXoGToRs(X_oG, pvtRegionIdx);
Scalar Rv = FluidSystem::convertXgOToRv(X_gO, pvtRegionIdx);

View File

@ -97,7 +97,7 @@ class VtkBlackOilPolymerModule : public BaseOutputModule<TypeTag>
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
enum { enablePolymer = getPropValue<TypeTag, Properties::EnablePolymer>() };
@ -181,27 +181,27 @@ public:
if (polymerConcentrationOutput_())
polymerConcentration_[globalDofIdx] =
Opm::scalarValue(intQuants.polymerConcentration());
scalarValue(intQuants.polymerConcentration());
if (polymerDeadPoreVolumeOutput_())
polymerDeadPoreVolume_[globalDofIdx] =
Opm::scalarValue(intQuants.polymerDeadPoreVolume());
scalarValue(intQuants.polymerDeadPoreVolume());
if (polymerRockDensityOutput_())
polymerRockDensity_[globalDofIdx] =
Opm::scalarValue(intQuants.polymerRockDensity());
scalarValue(intQuants.polymerRockDensity());
if (polymerAdsorptionOutput_())
polymerAdsorption_[globalDofIdx] =
Opm::scalarValue(intQuants.polymerAdsorption());
scalarValue(intQuants.polymerAdsorption());
if (polymerViscosityCorrectionOutput_())
polymerViscosityCorrection_[globalDofIdx] =
Opm::scalarValue(intQuants.polymerViscosityCorrection());
scalarValue(intQuants.polymerViscosityCorrection());
if (waterViscosityCorrectionOutput_())
waterViscosityCorrection_[globalDofIdx] =
Opm::scalarValue(intQuants.waterViscosityCorrection());
scalarValue(intQuants.waterViscosityCorrection());
}
}

View File

@ -89,7 +89,7 @@ class VtkBlackOilSolventModule : public BaseOutputModule<TypeTag>
using ElementContext = GetPropType<TypeTag, Properties::ElementContext>;
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
enum { enableSolvent = getPropValue<TypeTag, Properties::EnableSolvent>() };
@ -157,7 +157,7 @@ public:
if (!enableSolvent)
return;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
for (unsigned dofIdx = 0; dofIdx < elemCtx.numPrimaryDof(/*timeIdx=*/0); ++dofIdx) {
const auto& intQuants = elemCtx.intensiveQuantities(dofIdx, /*timeIdx=*/0);
unsigned globalDofIdx = elemCtx.globalSpaceIndex(dofIdx, /*timeIdx=*/0);

View File

@ -108,7 +108,7 @@ class VtkCompositionModule : public BaseOutputModule<TypeTag>
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
using ComponentBuffer = typename ParentType::ComponentBuffer;
using PhaseComponentBuffer = typename ParentType::PhaseComponentBuffer;
@ -168,7 +168,7 @@ public:
*/
void processElement(const ElementContext& elemCtx)
{
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
return;

View File

@ -87,13 +87,13 @@ class VtkDiffusionModule : public BaseOutputModule<TypeTag>
using GridView = GetPropType<TypeTag, Properties::GridView>;
using Evaluation = GetPropType<TypeTag, Properties::Evaluation>;
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
using PhaseComponentBuffer = typename ParentType::PhaseComponentBuffer;
using PhaseBuffer = typename ParentType::PhaseBuffer;
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
enum { numComponents = getPropValue<TypeTag, Properties::NumComponents>() };

View File

@ -137,7 +137,7 @@ class VtkMultiPhaseModule : public BaseOutputModule<TypeTag>
using DiscBaseOutputModule = GetPropType<TypeTag, Properties::DiscBaseOutputModule>;
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
enum { dimWorld = GridView::dimensionworld };
enum { numPhases = getPropValue<TypeTag, Properties::NumPhases>() };
@ -247,7 +247,7 @@ public:
const auto& fs = intQuants.fluidState();
if (extrusionFactorOutput_()) extrusionFactor_[I] = intQuants.extrusionFactor();
if (porosityOutput_()) porosity_[I] = Opm::getValue(intQuants.porosity());
if (porosityOutput_()) porosity_[I] = getValue(intQuants.porosity());
if (intrinsicPermeabilityOutput_()) {
const auto& K = problem.intrinsicPermeability(elemCtx, i, /*timeIdx=*/0);
@ -261,19 +261,19 @@ public:
continue;
}
if (pressureOutput_())
pressure_[phaseIdx][I] = Opm::getValue(fs.pressure(phaseIdx));
pressure_[phaseIdx][I] = getValue(fs.pressure(phaseIdx));
if (densityOutput_())
density_[phaseIdx][I] = Opm::getValue(fs.density(phaseIdx));
density_[phaseIdx][I] = getValue(fs.density(phaseIdx));
if (saturationOutput_())
saturation_[phaseIdx][I] = Opm::getValue(fs.saturation(phaseIdx));
saturation_[phaseIdx][I] = getValue(fs.saturation(phaseIdx));
if (mobilityOutput_())
mobility_[phaseIdx][I] = Opm::getValue(intQuants.mobility(phaseIdx));
mobility_[phaseIdx][I] = getValue(intQuants.mobility(phaseIdx));
if (relativePermeabilityOutput_())
relativePermeability_[phaseIdx][I] = Opm::getValue(intQuants.relativePermeability(phaseIdx));
relativePermeability_[phaseIdx][I] = getValue(intQuants.relativePermeability(phaseIdx));
if (viscosityOutput_())
viscosity_[phaseIdx][I] = Opm::getValue(fs.viscosity(phaseIdx));
viscosity_[phaseIdx][I] = getValue(fs.viscosity(phaseIdx));
if (averageMolarMassOutput_())
averageMolarMass_[phaseIdx][I] = Opm::getValue(fs.averageMolarMass(phaseIdx));
averageMolarMass_[phaseIdx][I] = getValue(fs.averageMolarMass(phaseIdx));
}
}
@ -293,7 +293,7 @@ public:
const auto& inputPGrad = extQuants.potentialGrad(phaseIdx);
DimVector pGrad;
for (unsigned dimIdx = 0; dimIdx < dimWorld; ++dimIdx)
pGrad[dimIdx] = Opm::getValue(inputPGrad[dimIdx])*weight;
pGrad[dimIdx] = getValue(inputPGrad[dimIdx])*weight;
potentialGradient_[phaseIdx][I] += pGrad;
} // end for all phases
} // end for all faces
@ -312,15 +312,15 @@ public:
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
Scalar weight = std::max<Scalar>(1e-16,
std::abs(Opm::getValue(extQuants.volumeFlux(phaseIdx))));
Opm::Valgrind::CheckDefined(extQuants.extrusionFactor());
std::abs(getValue(extQuants.volumeFlux(phaseIdx))));
Valgrind::CheckDefined(extQuants.extrusionFactor());
assert(extQuants.extrusionFactor() > 0);
weight *= extQuants.extrusionFactor();
const auto& inputV = extQuants.filterVelocity(phaseIdx);
DimVector v;
for (unsigned k = 0; k < dimWorld; ++k)
v[k] = Opm::getValue(inputV[k]);
v[k] = getValue(inputV[k]);
if (v.two_norm() > 1e-20)
weight /= v.two_norm();
v *= weight;

View File

@ -76,7 +76,7 @@ class VtkPrimaryVarsModule : public BaseOutputModule<TypeTag>
using GridView = GetPropType<TypeTag, Properties::GridView>;
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
using ScalarBuffer = typename ParentType::ScalarBuffer;
using EqBuffer = typename ParentType::EqBuffer;

View File

@ -76,7 +76,7 @@ class VtkTemperatureModule : public BaseOutputModule<TypeTag>
using ScalarBuffer = typename ParentType::ScalarBuffer;
static const int vtkFormat = getPropValue<TypeTag, Properties::VtkOutputFormat>();
using VtkMultiWriter = Opm::VtkMultiWriter<GridView, vtkFormat>;
using VtkMultiWriter = ::Opm::VtkMultiWriter<GridView, vtkFormat>;
public:
VtkTemperatureModule(const Simulator& simulator)
@ -107,7 +107,7 @@ public:
*/
void processElement(const ElementContext& elemCtx)
{
using Toolbox = Opm::MathToolbox<Evaluation>;
using Toolbox = MathToolbox<Evaluation>;
if (!EWOMS_GET_PARAM(TypeTag, bool, EnableVtkOutput))
return;

View File

@ -127,9 +127,9 @@ struct NewtonMaxIterations { using type = UndefinedProperty; };
// set default values for the properties
template<class TypeTag>
struct NewtonMethod<TypeTag, TTag::NewtonMethod> { using type = Opm::NewtonMethod<TypeTag>; };
struct NewtonMethod<TypeTag, TTag::NewtonMethod> { using type = ::Opm::NewtonMethod<TypeTag>; };
template<class TypeTag>
struct NewtonConvergenceWriter<TypeTag, TTag::NewtonMethod> { using type = Opm::NullConvergenceWriter<TypeTag>; };
struct NewtonConvergenceWriter<TypeTag, TTag::NewtonMethod> { using type = NullConvergenceWriter<TypeTag>; };
template<class TypeTag>
struct NewtonWriteConvergence<TypeTag, TTag::NewtonMethod> { static constexpr bool value = false; };
template<class TypeTag>
@ -327,7 +327,7 @@ public:
Linearizer& linearizer = model().linearizer();
Opm::TimerGuard prePostProcessTimerGuard(prePostProcessTimer_);
TimerGuard prePostProcessTimerGuard(prePostProcessTimer_);
// tell the implementation that we begin solving
prePostProcessTimer_.start();
@ -335,10 +335,10 @@ public:
prePostProcessTimer_.stop();
try {
Opm::TimerGuard innerPrePostProcessTimerGuard(prePostProcessTimer_);
Opm::TimerGuard linearizeTimerGuard(linearizeTimer_);
Opm::TimerGuard updateTimerGuard(updateTimer_);
Opm::TimerGuard solveTimerGuard(solveTimer_);
TimerGuard innerPrePostProcessTimerGuard(prePostProcessTimer_);
TimerGuard linearizeTimerGuard(linearizeTimer_);
TimerGuard updateTimerGuard(updateTimer_);
TimerGuard solveTimerGuard(solveTimer_);
// execute the method as long as the implementation thinks
// that we should do another iteration
@ -460,7 +460,7 @@ public:
return false;
}
catch (const Opm::NumericalIssue& e)
catch (const NumericalIssue& e)
{
if (asImp_().verbose_())
std::cout << "Newton method caught exception: \""
@ -569,16 +569,16 @@ public:
const LinearSolverBackend& linearSolver() const
{ return linearSolver_; }
const Opm::Timer& prePostProcessTimer() const
const Timer& prePostProcessTimer() const
{ return prePostProcessTimer_; }
const Opm::Timer& linearizeTimer() const
const Timer& linearizeTimer() const
{ return linearizeTimer_; }
const Opm::Timer& solveTimer() const
const Timer& solveTimer() const
{ return solveTimer_; }
const Opm::Timer& updateTimer() const
const Timer& updateTimer() const
{ return updateTimer_; }
protected:
@ -627,7 +627,7 @@ protected:
succeeded = comm.min(succeeded);
if (!succeeded)
throw Opm::NumericalIssue("pre processing of the problem failed");
throw NumericalIssue("pre processing of the problem failed");
lastError_ = error_;
}
@ -670,7 +670,7 @@ protected:
const auto& r = currentResidual[dofIdx];
for (unsigned eqIdx = 0; eqIdx < r.size(); ++eqIdx)
error_ = Opm::max(std::abs(r[eqIdx] * model().eqWeight(dofIdx, eqIdx)), error_);
error_ = max(std::abs(r[eqIdx] * model().eqWeight(dofIdx, eqIdx)), error_);
}
// take the other processes into account
@ -679,9 +679,9 @@ protected:
// make sure that the error never grows beyond the maximum
// allowed one
if (error_ > newtonMaxError)
throw Opm::NumericalIssue("Newton: Error "+std::to_string(double(error_))
+" is larger than maximum allowed error of "
+std::to_string(double(newtonMaxError)));
throw NumericalIssue("Newton: Error "+std::to_string(double(error_))
+" is larger than maximum allowed error of "
+std::to_string(double(newtonMaxError)));
}
/*!
@ -722,7 +722,7 @@ protected:
succeeded = comm.min(succeeded);
if (!succeeded)
throw Opm::NumericalIssue("post processing of an auxilary equation failed");
throw NumericalIssue("post processing of an auxilary equation failed");
}
}
@ -753,7 +753,7 @@ protected:
// make sure not to swallow non-finite values at this point
if (!std::isfinite(solutionUpdate.one_norm()))
throw Opm::NumericalIssue("Non-finite update!");
throw NumericalIssue("Non-finite update!");
size_t numGridDof = model().numGridDof();
for (unsigned dofIdx = 0; dofIdx < numGridDof; ++dofIdx) {
@ -851,7 +851,7 @@ protected:
succeeded = comm.min(succeeded);
if (!succeeded)
throw Opm::NumericalIssue("post processing of the problem failed");
throw NumericalIssue("post processing of the problem failed");
if (asImp_().verbose_()) {
std::cout << "Newton iteration " << numIterations_ << ""
@ -921,10 +921,10 @@ protected:
Simulator& simulator_;
Opm::Timer prePostProcessTimer_;
Opm::Timer linearizeTimer_;
Opm::Timer solveTimer_;
Opm::Timer updateTimer_;
Timer prePostProcessTimer_;
Timer linearizeTimer_;
Timer solveTimer_;
Timer updateTimer_;
std::ostringstream endIterMsgStream_;

View File

@ -101,7 +101,7 @@ public:
Simulator(bool verbose = true)
{
Opm::TimerGuard setupTimerGuard(setupTimer_);
TimerGuard setupTimerGuard(setupTimer_);
setupTimer_.start();
@ -359,51 +359,51 @@ public:
* \brief Returns a reference to the timer object which measures the time needed to
* set up and initialize the simulation
*/
const Opm::Timer& setupTimer() const
const Timer& setupTimer() const
{ return setupTimer_; }
/*!
* \brief Returns a reference to the timer object which measures the time needed to
* run the simulation
*/
const Opm::Timer& executionTimer() const
const Timer& executionTimer() const
{ return executionTimer_; }
Opm::Timer& executionTimer()
Timer& executionTimer()
{ return executionTimer_; }
/*!
* \brief Returns a reference to the timer object which measures the time needed for
* pre- and postprocessing of the solutions.
*/
const Opm::Timer& prePostProcessTimer() const
const Timer& prePostProcessTimer() const
{ return prePostProcessTimer_; }
/*!
* \brief Returns a reference to the timer object which measures the time needed for
* linarizing the solutions.
*/
const Opm::Timer& linearizeTimer() const
const Timer& linearizeTimer() const
{ return linearizeTimer_; }
/*!
* \brief Returns a reference to the timer object which measures the time needed by
* the solver.
*/
const Opm::Timer& solveTimer() const
const Timer& solveTimer() const
{ return solveTimer_; }
/*!
* \brief Returns a reference to the timer object which measures the time needed to
* the solutions of the non-linear system of equations.
*/
const Opm::Timer& updateTimer() const
const Timer& updateTimer() const
{ return updateTimer_; }
/*!
* \brief Returns a reference to the timer object which measures the time needed to
* write the visualization output
*/
const Opm::Timer& writeTimer() const
const Timer& writeTimer() const
{ return writeTimer_; }
/*!
@ -636,7 +636,7 @@ public:
// try to restart a previous simulation
time_ = restartTime;
Opm::Restart res;
Restart res;
EWOMS_CATCH_PARALLEL_EXCEPTIONS_FATAL(res.deserializeBegin(*this, time_));
if (verbose_)
std::cout << "Deserialize from file '" << res.fileName() << "'\n" << std::flush;
@ -887,7 +887,7 @@ public:
*/
void serialize()
{
using Restarter = Opm::Restart;
using Restarter = Restart;
Restarter res;
res.serializeBegin(*this);
if (gridView().comm().rank() == 0)
@ -952,13 +952,13 @@ private:
Scalar episodeStartTime_;
Scalar episodeLength_;
Opm::Timer setupTimer_;
Opm::Timer executionTimer_;
Opm::Timer prePostProcessTimer_;
Opm::Timer linearizeTimer_;
Opm::Timer solveTimer_;
Opm::Timer updateTimer_;
Opm::Timer writeTimer_;
Timer setupTimer_;
Timer executionTimer_;
Timer prePostProcessTimer_;
Timer linearizeTimer_;
Timer solveTimer_;
Timer updateTimer_;
Timer writeTimer_;
std::vector<Scalar> forcedTimeSteps_;
Scalar startTime_;
@ -974,7 +974,7 @@ private:
namespace Properties {
template<class TypeTag>
struct Simulator<TypeTag, TTag::NumericModel> { using type = Opm::Simulator<TypeTag>; };
struct Simulator<TypeTag, TTag::NumericModel> { using type = ::Opm::Simulator<TypeTag>; };
}
} // namespace Opm