From a284089d739e847127ea2737e92ee1d91f6ad886 Mon Sep 17 00:00:00 2001 From: Andreas Lauser Date: Thu, 9 Feb 2017 18:25:44 +0100 Subject: [PATCH] adapt to the move of the valgrind client requests into the Opm namespace --- ebos/eclfluxmodule.hh | 2 +- ebos/ecloutputblackoilmodule.hh | 14 +++++++------- ebos/eclpeacemanwell.hh | 32 ++++++++++++++++---------------- ebos/eclproblem.hh | 4 ++-- ebos/eclwriter.hh | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/ebos/eclfluxmodule.hh b/ebos/eclfluxmodule.hh index b1ad3bedc..107bad600 100644 --- a/ebos/eclfluxmodule.hh +++ b/ebos/eclfluxmodule.hh @@ -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); diff --git a/ebos/ecloutputblackoilmodule.hh b/ebos/ecloutputblackoilmodule.hh index aa934a1da..94ae1b99d 100644 --- a/ebos/ecloutputblackoilmodule.hh +++ b/ebos/ecloutputblackoilmodule.hh @@ -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(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(fs, oilPhaseIdx, pvtRegionIdx, SoMax); - Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]); + Opm::Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]); } if (gasFormationVolumeFactorOutput_()) { gasFormationVolumeFactor_[globalDofIdx] = 1.0/FluidSystem::template inverseFormationVolumeFactor(fs, gasPhaseIdx, pvtRegionIdx); - Valgrind::CheckDefined(gasFormationVolumeFactor_[globalDofIdx]); + Opm::Valgrind::CheckDefined(gasFormationVolumeFactor_[globalDofIdx]); } if (saturatedOilFormationVolumeFactorOutput_()) { saturatedOilFormationVolumeFactor_[globalDofIdx] = 1.0/FluidSystem::template saturatedInverseFormationVolumeFactor(fs, oilPhaseIdx, pvtRegionIdx); - Valgrind::CheckDefined(saturatedOilFormationVolumeFactor_[globalDofIdx]); + Opm::Valgrind::CheckDefined(saturatedOilFormationVolumeFactor_[globalDofIdx]); } if (oilSaturationPressureOutput_()) { oilSaturationPressure_[globalDofIdx] = FluidSystem::template saturationPressure(fs, oilPhaseIdx, pvtRegionIdx); - Valgrind::CheckDefined(oilSaturationPressure_[globalDofIdx]); + Opm::Valgrind::CheckDefined(oilSaturationPressure_[globalDofIdx]); } } } diff --git a/ebos/eclpeacemanwell.hh b/ebos/eclpeacemanwell.hh index 34a95fbc2..a2e605507 100644 --- a/ebos/eclpeacemanwell.hh +++ b/ebos/eclpeacemanwell.hh @@ -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; diff --git a/ebos/eclproblem.hh b/ebos/eclproblem.hh index b1c8f25b0..25105ddb2 100644 --- a/ebos/eclproblem.hh +++ b/ebos/eclproblem.hh @@ -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])); diff --git a/ebos/eclwriter.hh b/ebos/eclwriter.hh index ad51b8fc5..b19e69ac3 100644 --- a/ebos/eclwriter.hh +++ b/ebos/eclwriter.hh @@ -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";