adapt to the move of the valgrind client requests into the Opm namespace

This commit is contained in:
Andreas Lauser 2017-02-09 18:25:44 +01:00
parent 5579caaa66
commit a284089d73
5 changed files with 27 additions and 27 deletions

View File

@ -212,7 +212,7 @@ protected:
*/
void calculateGradients_(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx)
{
Valgrind::SetUndefined(*this);
Opm::Valgrind::SetUndefined(*this);
const auto& problem = elemCtx.problem();
const auto& stencil = elemCtx.stencil(timeIdx);

View File

@ -188,7 +188,7 @@ public:
continue;
saturation_[phaseIdx][globalDofIdx] = Toolbox::value(fs.saturation(phaseIdx));
Valgrind::CheckDefined(saturation_[phaseIdx][globalDofIdx]);
Opm::Valgrind::CheckDefined(saturation_[phaseIdx][globalDofIdx]);
}
}
if (pressuresOutput_()) {
@ -197,35 +197,35 @@ public:
continue;
pressure_[phaseIdx][globalDofIdx] = Toolbox::value(fs.pressure(phaseIdx));
Valgrind::CheckDefined(pressure_[phaseIdx][globalDofIdx]);
Opm::Valgrind::CheckDefined(pressure_[phaseIdx][globalDofIdx]);
}
}
if (gasDissolutionFactorOutput_()) {
Scalar SoMax = elemCtx.model().maxOilSaturation(globalDofIdx);
gasDissolutionFactor_[globalDofIdx] =
FluidSystem::template saturatedDissolutionFactor<FluidState, Scalar>(fs, gasPhaseIdx, pvtRegionIdx, SoMax);
Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]);
Opm::Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]);
}
if (oilVaporizationFactorOutput_()) {
Scalar SoMax = elemCtx.model().maxOilSaturation(globalDofIdx);
gasDissolutionFactor_[globalDofIdx] =
FluidSystem::template saturatedDissolutionFactor<FluidState, Scalar>(fs, oilPhaseIdx, pvtRegionIdx, SoMax);
Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]);
Opm::Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]);
}
if (gasFormationVolumeFactorOutput_()) {
gasFormationVolumeFactor_[globalDofIdx] =
1.0/FluidSystem::template inverseFormationVolumeFactor<FluidState, Scalar>(fs, gasPhaseIdx, pvtRegionIdx);
Valgrind::CheckDefined(gasFormationVolumeFactor_[globalDofIdx]);
Opm::Valgrind::CheckDefined(gasFormationVolumeFactor_[globalDofIdx]);
}
if (saturatedOilFormationVolumeFactorOutput_()) {
saturatedOilFormationVolumeFactor_[globalDofIdx] =
1.0/FluidSystem::template saturatedInverseFormationVolumeFactor<FluidState, Scalar>(fs, oilPhaseIdx, pvtRegionIdx);
Valgrind::CheckDefined(saturatedOilFormationVolumeFactor_[globalDofIdx]);
Opm::Valgrind::CheckDefined(saturatedOilFormationVolumeFactor_[globalDofIdx]);
}
if (oilSaturationPressureOutput_()) {
oilSaturationPressure_[globalDofIdx] =
FluidSystem::template saturationPressure<FluidState, Scalar>(fs, oilPhaseIdx, pvtRegionIdx);
Valgrind::CheckDefined(oilSaturationPressure_[globalDofIdx]);
Opm::Valgrind::CheckDefined(oilSaturationPressure_[globalDofIdx]);
}
}
}

View File

@ -450,7 +450,7 @@ public:
// require the black-oil model for now anyway, so this should not be too much
// of a problem...
assert(numModelEq == numComponents);
Valgrind::CheckDefined(q);
Opm::Valgrind::CheckDefined(q);
auto& matrixEntry = matrix[gridDofIdx][wellGlobalDofIdx];
matrixEntry = 0.0;
for (unsigned eqIdx = 0; eqIdx < numModelEq; ++ eqIdx)
@ -1131,7 +1131,7 @@ public:
q[eqIdx] += modelRate[eqIdx];
}
Valgrind::CheckDefined(q);
Opm::Valgrind::CheckDefined(q);
}
protected:
@ -1224,13 +1224,13 @@ protected:
OPM_THROW(std::logic_error,
"Type of well \"" << name() << "\" is undefined");
Valgrind::CheckDefined(pbh);
Valgrind::CheckDefined(p);
Valgrind::CheckDefined(g);
Valgrind::CheckDefined(rho);
Valgrind::CheckDefined(lambda);
Valgrind::CheckDefined(depth);
Valgrind::CheckDefined(refDepth_);
Opm::Valgrind::CheckDefined(pbh);
Opm::Valgrind::CheckDefined(p);
Opm::Valgrind::CheckDefined(g);
Opm::Valgrind::CheckDefined(rho);
Opm::Valgrind::CheckDefined(lambda);
Opm::Valgrind::CheckDefined(depth);
Opm::Valgrind::CheckDefined(refDepth_);
// pressure in the borehole ("hole pressure") at the given location
ResultEval ph = pbh + rho*g*(depth - refDepth_);
@ -1238,9 +1238,9 @@ protected:
// volumetric reservoir rate for the phase
volRates[phaseIdx] = Twj*lambda*(ph - p);
Valgrind::CheckDefined(g);
Valgrind::CheckDefined(ph);
Valgrind::CheckDefined(volRates[phaseIdx]);
Opm::Valgrind::CheckDefined(g);
Opm::Valgrind::CheckDefined(ph);
Opm::Valgrind::CheckDefined(volRates[phaseIdx]);
}
}
@ -1505,10 +1505,10 @@ protected:
// injectors. (i.e., the target bottom hole pressure is an upper limit for
// injectors and a lower limit for producers.) Note that with this approach, one
// of the limits must always be reached to get the well equation to zero...
Valgrind::CheckDefined(maximumSurfaceRate_);
Valgrind::CheckDefined(maximumReservoirRate_);
Valgrind::CheckDefined(surfaceRate);
Valgrind::CheckDefined(resvRate);
Opm::Valgrind::CheckDefined(maximumSurfaceRate_);
Opm::Valgrind::CheckDefined(maximumReservoirRate_);
Opm::Valgrind::CheckDefined(surfaceRate);
Opm::Valgrind::CheckDefined(resvRate);
BhpEval result = 1e30;

View File

@ -1243,8 +1243,8 @@ private:
Dune::FieldVector< Scalar, numPhases > pc( 0 );
const auto& matParams = materialLawParams(dofIdx);
MaterialLaw::capillaryPressures(pc, matParams, dofFluidState);
Valgrind::CheckDefined(oilPressure);
Valgrind::CheckDefined(pc);
Opm::Valgrind::CheckDefined(oilPressure);
Opm::Valgrind::CheckDefined(pc);
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
dofFluidState.setPressure(phaseIdx, oilPressure + (pc[phaseIdx] - pc[oilPhaseIdx]));

View File

@ -323,7 +323,7 @@ private:
{
static bool warningPrinted = false;
for (size_t i = 0; i < b.size(); ++i) {
Valgrind::CheckDefined(b[i]);
Opm::Valgrind::CheckDefined(b[i]);
if (!warningPrinted && !std::isfinite(b[i])) {
std::cerr << "WARNING: data field written to disk contains non-finite entries!\n";