mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
adapt to the move of the valgrind client requests into the Opm namespace
This commit is contained in:
@@ -212,7 +212,7 @@ protected:
|
|||||||
*/
|
*/
|
||||||
void calculateGradients_(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx)
|
void calculateGradients_(const ElementContext& elemCtx, unsigned scvfIdx, unsigned timeIdx)
|
||||||
{
|
{
|
||||||
Valgrind::SetUndefined(*this);
|
Opm::Valgrind::SetUndefined(*this);
|
||||||
|
|
||||||
const auto& problem = elemCtx.problem();
|
const auto& problem = elemCtx.problem();
|
||||||
const auto& stencil = elemCtx.stencil(timeIdx);
|
const auto& stencil = elemCtx.stencil(timeIdx);
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ public:
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
saturation_[phaseIdx][globalDofIdx] = Toolbox::value(fs.saturation(phaseIdx));
|
saturation_[phaseIdx][globalDofIdx] = Toolbox::value(fs.saturation(phaseIdx));
|
||||||
Valgrind::CheckDefined(saturation_[phaseIdx][globalDofIdx]);
|
Opm::Valgrind::CheckDefined(saturation_[phaseIdx][globalDofIdx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pressuresOutput_()) {
|
if (pressuresOutput_()) {
|
||||||
@@ -197,35 +197,35 @@ public:
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
pressure_[phaseIdx][globalDofIdx] = Toolbox::value(fs.pressure(phaseIdx));
|
pressure_[phaseIdx][globalDofIdx] = Toolbox::value(fs.pressure(phaseIdx));
|
||||||
Valgrind::CheckDefined(pressure_[phaseIdx][globalDofIdx]);
|
Opm::Valgrind::CheckDefined(pressure_[phaseIdx][globalDofIdx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (gasDissolutionFactorOutput_()) {
|
if (gasDissolutionFactorOutput_()) {
|
||||||
Scalar SoMax = elemCtx.model().maxOilSaturation(globalDofIdx);
|
Scalar SoMax = elemCtx.model().maxOilSaturation(globalDofIdx);
|
||||||
gasDissolutionFactor_[globalDofIdx] =
|
gasDissolutionFactor_[globalDofIdx] =
|
||||||
FluidSystem::template saturatedDissolutionFactor<FluidState, Scalar>(fs, gasPhaseIdx, pvtRegionIdx, SoMax);
|
FluidSystem::template saturatedDissolutionFactor<FluidState, Scalar>(fs, gasPhaseIdx, pvtRegionIdx, SoMax);
|
||||||
Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]);
|
Opm::Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]);
|
||||||
}
|
}
|
||||||
if (oilVaporizationFactorOutput_()) {
|
if (oilVaporizationFactorOutput_()) {
|
||||||
Scalar SoMax = elemCtx.model().maxOilSaturation(globalDofIdx);
|
Scalar SoMax = elemCtx.model().maxOilSaturation(globalDofIdx);
|
||||||
gasDissolutionFactor_[globalDofIdx] =
|
gasDissolutionFactor_[globalDofIdx] =
|
||||||
FluidSystem::template saturatedDissolutionFactor<FluidState, Scalar>(fs, oilPhaseIdx, pvtRegionIdx, SoMax);
|
FluidSystem::template saturatedDissolutionFactor<FluidState, Scalar>(fs, oilPhaseIdx, pvtRegionIdx, SoMax);
|
||||||
Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]);
|
Opm::Valgrind::CheckDefined(gasDissolutionFactor_[globalDofIdx]);
|
||||||
}
|
}
|
||||||
if (gasFormationVolumeFactorOutput_()) {
|
if (gasFormationVolumeFactorOutput_()) {
|
||||||
gasFormationVolumeFactor_[globalDofIdx] =
|
gasFormationVolumeFactor_[globalDofIdx] =
|
||||||
1.0/FluidSystem::template inverseFormationVolumeFactor<FluidState, Scalar>(fs, gasPhaseIdx, pvtRegionIdx);
|
1.0/FluidSystem::template inverseFormationVolumeFactor<FluidState, Scalar>(fs, gasPhaseIdx, pvtRegionIdx);
|
||||||
Valgrind::CheckDefined(gasFormationVolumeFactor_[globalDofIdx]);
|
Opm::Valgrind::CheckDefined(gasFormationVolumeFactor_[globalDofIdx]);
|
||||||
}
|
}
|
||||||
if (saturatedOilFormationVolumeFactorOutput_()) {
|
if (saturatedOilFormationVolumeFactorOutput_()) {
|
||||||
saturatedOilFormationVolumeFactor_[globalDofIdx] =
|
saturatedOilFormationVolumeFactor_[globalDofIdx] =
|
||||||
1.0/FluidSystem::template saturatedInverseFormationVolumeFactor<FluidState, Scalar>(fs, oilPhaseIdx, pvtRegionIdx);
|
1.0/FluidSystem::template saturatedInverseFormationVolumeFactor<FluidState, Scalar>(fs, oilPhaseIdx, pvtRegionIdx);
|
||||||
Valgrind::CheckDefined(saturatedOilFormationVolumeFactor_[globalDofIdx]);
|
Opm::Valgrind::CheckDefined(saturatedOilFormationVolumeFactor_[globalDofIdx]);
|
||||||
}
|
}
|
||||||
if (oilSaturationPressureOutput_()) {
|
if (oilSaturationPressureOutput_()) {
|
||||||
oilSaturationPressure_[globalDofIdx] =
|
oilSaturationPressure_[globalDofIdx] =
|
||||||
FluidSystem::template saturationPressure<FluidState, Scalar>(fs, oilPhaseIdx, pvtRegionIdx);
|
FluidSystem::template saturationPressure<FluidState, Scalar>(fs, oilPhaseIdx, pvtRegionIdx);
|
||||||
Valgrind::CheckDefined(oilSaturationPressure_[globalDofIdx]);
|
Opm::Valgrind::CheckDefined(oilSaturationPressure_[globalDofIdx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -450,7 +450,7 @@ public:
|
|||||||
// require the black-oil model for now anyway, so this should not be too much
|
// require the black-oil model for now anyway, so this should not be too much
|
||||||
// of a problem...
|
// of a problem...
|
||||||
assert(numModelEq == numComponents);
|
assert(numModelEq == numComponents);
|
||||||
Valgrind::CheckDefined(q);
|
Opm::Valgrind::CheckDefined(q);
|
||||||
auto& matrixEntry = matrix[gridDofIdx][wellGlobalDofIdx];
|
auto& matrixEntry = matrix[gridDofIdx][wellGlobalDofIdx];
|
||||||
matrixEntry = 0.0;
|
matrixEntry = 0.0;
|
||||||
for (unsigned eqIdx = 0; eqIdx < numModelEq; ++ eqIdx)
|
for (unsigned eqIdx = 0; eqIdx < numModelEq; ++ eqIdx)
|
||||||
@@ -1131,7 +1131,7 @@ public:
|
|||||||
q[eqIdx] += modelRate[eqIdx];
|
q[eqIdx] += modelRate[eqIdx];
|
||||||
}
|
}
|
||||||
|
|
||||||
Valgrind::CheckDefined(q);
|
Opm::Valgrind::CheckDefined(q);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@@ -1224,13 +1224,13 @@ protected:
|
|||||||
OPM_THROW(std::logic_error,
|
OPM_THROW(std::logic_error,
|
||||||
"Type of well \"" << name() << "\" is undefined");
|
"Type of well \"" << name() << "\" is undefined");
|
||||||
|
|
||||||
Valgrind::CheckDefined(pbh);
|
Opm::Valgrind::CheckDefined(pbh);
|
||||||
Valgrind::CheckDefined(p);
|
Opm::Valgrind::CheckDefined(p);
|
||||||
Valgrind::CheckDefined(g);
|
Opm::Valgrind::CheckDefined(g);
|
||||||
Valgrind::CheckDefined(rho);
|
Opm::Valgrind::CheckDefined(rho);
|
||||||
Valgrind::CheckDefined(lambda);
|
Opm::Valgrind::CheckDefined(lambda);
|
||||||
Valgrind::CheckDefined(depth);
|
Opm::Valgrind::CheckDefined(depth);
|
||||||
Valgrind::CheckDefined(refDepth_);
|
Opm::Valgrind::CheckDefined(refDepth_);
|
||||||
|
|
||||||
// pressure in the borehole ("hole pressure") at the given location
|
// pressure in the borehole ("hole pressure") at the given location
|
||||||
ResultEval ph = pbh + rho*g*(depth - refDepth_);
|
ResultEval ph = pbh + rho*g*(depth - refDepth_);
|
||||||
@@ -1238,9 +1238,9 @@ protected:
|
|||||||
// volumetric reservoir rate for the phase
|
// volumetric reservoir rate for the phase
|
||||||
volRates[phaseIdx] = Twj*lambda*(ph - p);
|
volRates[phaseIdx] = Twj*lambda*(ph - p);
|
||||||
|
|
||||||
Valgrind::CheckDefined(g);
|
Opm::Valgrind::CheckDefined(g);
|
||||||
Valgrind::CheckDefined(ph);
|
Opm::Valgrind::CheckDefined(ph);
|
||||||
Valgrind::CheckDefined(volRates[phaseIdx]);
|
Opm::Valgrind::CheckDefined(volRates[phaseIdx]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1505,10 +1505,10 @@ protected:
|
|||||||
// injectors. (i.e., the target bottom hole pressure is an upper limit for
|
// 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
|
// 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...
|
// of the limits must always be reached to get the well equation to zero...
|
||||||
Valgrind::CheckDefined(maximumSurfaceRate_);
|
Opm::Valgrind::CheckDefined(maximumSurfaceRate_);
|
||||||
Valgrind::CheckDefined(maximumReservoirRate_);
|
Opm::Valgrind::CheckDefined(maximumReservoirRate_);
|
||||||
Valgrind::CheckDefined(surfaceRate);
|
Opm::Valgrind::CheckDefined(surfaceRate);
|
||||||
Valgrind::CheckDefined(resvRate);
|
Opm::Valgrind::CheckDefined(resvRate);
|
||||||
|
|
||||||
BhpEval result = 1e30;
|
BhpEval result = 1e30;
|
||||||
|
|
||||||
|
|||||||
@@ -1243,8 +1243,8 @@ private:
|
|||||||
Dune::FieldVector< Scalar, numPhases > pc( 0 );
|
Dune::FieldVector< Scalar, numPhases > pc( 0 );
|
||||||
const auto& matParams = materialLawParams(dofIdx);
|
const auto& matParams = materialLawParams(dofIdx);
|
||||||
MaterialLaw::capillaryPressures(pc, matParams, dofFluidState);
|
MaterialLaw::capillaryPressures(pc, matParams, dofFluidState);
|
||||||
Valgrind::CheckDefined(oilPressure);
|
Opm::Valgrind::CheckDefined(oilPressure);
|
||||||
Valgrind::CheckDefined(pc);
|
Opm::Valgrind::CheckDefined(pc);
|
||||||
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
|
||||||
dofFluidState.setPressure(phaseIdx, oilPressure + (pc[phaseIdx] - pc[oilPhaseIdx]));
|
dofFluidState.setPressure(phaseIdx, oilPressure + (pc[phaseIdx] - pc[oilPhaseIdx]));
|
||||||
|
|
||||||
|
|||||||
@@ -323,7 +323,7 @@ private:
|
|||||||
{
|
{
|
||||||
static bool warningPrinted = false;
|
static bool warningPrinted = false;
|
||||||
for (size_t i = 0; i < b.size(); ++i) {
|
for (size_t i = 0; i < b.size(); ++i) {
|
||||||
Valgrind::CheckDefined(b[i]);
|
Opm::Valgrind::CheckDefined(b[i]);
|
||||||
|
|
||||||
if (!warningPrinted && !std::isfinite(b[i])) {
|
if (!warningPrinted && !std::isfinite(b[i])) {
|
||||||
std::cerr << "WARNING: data field written to disk contains non-finite entries!\n";
|
std::cerr << "WARNING: data field written to disk contains non-finite entries!\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user