MultiPhaseBaseProblem: use elements range generator

This commit is contained in:
Arne Morten Kvarving 2022-10-17 10:47:48 +02:00
parent 96913df6c9
commit 85ac4160ee

View File

@ -321,12 +321,8 @@ public:
ElementContext elemCtx( this->simulator() ); ElementContext elemCtx( this->simulator() );
auto gridView = this->simulator().vanguard().gridView(); auto gridView = this->simulator().vanguard().gridView();
auto& grid = this->simulator().vanguard().grid(); auto& grid = this->simulator().vanguard().grid();
auto elemIt = gridView.template begin</*codim=*/0, Dune::Interior_Partition>(); for (const auto& element : elements(gridView, Dune::Partitions::interior)) {
auto elemEndIt = gridView.template end</*codim=*/0, Dune::Interior_Partition>(); elemCtx.updateAll(element);
for (; elemIt != elemEndIt; ++elemIt)
{
const auto& element = *elemIt ;
elemCtx.updateAll( element );
// HACK: this should better be part of an AdaptionCriterion class // HACK: this should better be part of an AdaptionCriterion class
for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) { for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {