Fixes comments from PR

Don't sum ghost cells in the RateConverter
Some cleaning and comments.
This commit is contained in:
Tor Harald Sandve 2017-08-18 08:37:25 +02:00
parent 6bca2ea69c
commit 6146190844
3 changed files with 22 additions and 15 deletions

View File

@ -621,6 +621,7 @@ namespace Opm {
const auto& elemEndIt = gridView.template end</*codim=*/0>(); const auto& elemEndIt = gridView.template end</*codim=*/0>();
SolutionVector& solution = ebosSimulator_.model().solution( 0 /* timeIdx */ ); SolutionVector& solution = ebosSimulator_.model().solution( 0 /* timeIdx */ );
// Store the initial solution.
if( iterationIdx == 0 ) if( iterationIdx == 0 )
{ {
ebosSimulator_.model().solution( 1 /* timeIdx */ ) = solution; ebosSimulator_.model().solution( 1 /* timeIdx */ ) = solution;
@ -674,6 +675,7 @@ namespace Opm {
// polymer // polymer
const double dc = has_polymer_ ? dx[cell_idx][Indices::polymerConcentrationIdx] : 0.0; const double dc = has_polymer_ ? dx[cell_idx][Indices::polymerConcentrationIdx] : 0.0;
// oil
dso = - (dsw + dsg + dss); dso = - (dsw + dsg + dss);
// compute a scaling factor for the saturation update so that the maximum // compute a scaling factor for the saturation update so that the maximum

View File

@ -485,7 +485,11 @@ namespace Opm {
elemIt != elemEndIt; elemIt != elemEndIt;
++elemIt) ++elemIt)
{ {
const auto& elem = *elemIt; const auto& elem = *elemIt;
if (elem.partitionType() != Dune::InteriorEntity)
continue;
elemCtx.updatePrimaryStencil(elem); elemCtx.updatePrimaryStencil(elem);
elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0); elemCtx.updatePrimaryIntensiveQuantities(/*timeIdx=*/0);
const auto& intQuants = elemCtx.intensiveQuantities(/*spaceIdx=*/0, /*timeIdx=*/0); const auto& intQuants = elemCtx.intensiveQuantities(/*spaceIdx=*/0, /*timeIdx=*/0);

View File

@ -988,6 +988,7 @@ protected:
} }
} }
// store the solution at the beginning of the time step
if( iterationIdx == 0 ) if( iterationIdx == 0 )
{ {
simulator.model().solution( 1 /* timeIdx */ ) = solution; simulator.model().solution( 1 /* timeIdx */ ) = solution;