Only compute convergence markers for interior elements.

This commit is contained in:
Markus Blatt 2017-04-12 13:27:24 +02:00
parent b72a167c76
commit 0db663fe51

View File

@ -901,18 +901,22 @@ namespace Opm {
Vector maxCoeff(np); Vector maxCoeff(np);
Vector maxNormWell(np); Vector maxNormWell(np);
std::vector< Vector > B( np, Vector( nc ) ); // As we will not initialize values in the following arrays
std::vector< Vector > R( np, Vector( nc ) ); // for the non-interior elements, we have to make sure
std::vector< Vector > R2( np, Vector( nc ) ); // (at least for tempV) that the values there do not influence
std::vector< Vector > tempV( np, Vector( nc ) ); // our reduction.
std::vector< Vector > B( np, Vector( nc, 0.0) );
//std::vector< Vector > R( np, Vector( nc, 0.0) ) );
std::vector< Vector > R2( np, Vector( nc, 0.0 ) );
std::vector< Vector > tempV( np, Vector( nc, std::numeric_limits<double>::lowest() ) );
const auto& ebosResid = ebosSimulator_.model().linearizer().residual(); const auto& ebosResid = ebosSimulator_.model().linearizer().residual();
ElementContext elemCtx(ebosSimulator_); ElementContext elemCtx(ebosSimulator_);
const auto& gridView = ebosSimulator().gridView(); const auto& gridView = ebosSimulator().gridView();
const auto& elemEndIt = gridView.template end</*codim=*/0>(); const auto& elemEndIt = gridView.template end</*codim=*/0, Dune::Interior_Partition>();
for (auto elemIt = gridView.template begin</*codim=*/0>(); for (auto elemIt = gridView.template begin</*codim=*/0, Dune::Interior_Partition>();
elemIt != elemEndIt; elemIt != elemEndIt;
++elemIt) ++elemIt)
{ {