removing some repeated contents in getWellConvergence in StandardWellsDense

which results from the rebasing process.
This commit is contained in:
Kai Bao
2017-06-27 17:16:42 +02:00
parent 48dee6bd7a
commit fb5fa836c0

View File

@@ -1045,40 +1045,6 @@ namespace Opm {
std::vector< Scalar > maxNormWell(numComp, Scalar() );
const auto& grid = ebosSimulator.gridManager().grid();
const auto& gridView = grid.leafGridView();
ElementContext elemCtx(ebosSimulator);
const auto& elemEndIt = gridView.template end</*codim=*/0, Dune::Interior_Partition>();
for (auto elemIt = gridView.template begin</*codim=*/0, Dune::Interior_Partition>();
elemIt != elemEndIt; ++elemIt)
{
elemCtx.updatePrimaryStencil(*elemIt);
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);
const auto& intQuants = elemCtx.intensiveQuantities(/*spaceIdx=*/0, /*timeIdx=*/0);
const auto& fs = intQuants.fluidState();
for ( int phaseIdx = 0; phaseIdx < np; ++phaseIdx )
{
auto& B = B_avg[ phaseIdx ];
const int ebosPhaseIdx = flowPhaseToEbosPhaseIdx(phaseIdx);
B += 1 / fs.invB(ebosPhaseIdx).value();
}
if (has_solvent_) {
auto& B = B_avg[ solventSaturationIdx ];
B += 1 / intQuants.solventInverseFormationVolumeFactor().value();
}
}
// compute global average
grid.comm().sum(B_avg.data(), B_avg.size());
for(auto& bval: B_avg)
{
bval/=global_nc_;
}
auto res = residual();
const int nw = res.size() / numComp;
@@ -1089,6 +1055,7 @@ namespace Opm {
}
}
const auto& grid = ebosSimulator.gridManager().grid();
grid.comm().max(maxNormWell.data(), maxNormWell.size());
Vector well_flux_residual(numComp);