mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
removing some repeated contents in getWellConvergence in StandardWellsDense
which results from the rebasing process.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user