File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
two-scale-heat-conduction/macro-dumux/appl Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -289,8 +289,15 @@ int main(int argc, char **argv)
289289 // linearize & solve
290290 nonLinearSolver.solve (x, *timeLoop);
291291
292- for (int solIdx = 0 ; solIdx < numberOfElements; ++solIdx)
293- temperatures[solIdx] = x[solIdx][problem->returnTemperatureIdx ()];
292+ int solIdx = 0 ;
293+ for (const auto &element : elements (leafGridView, Dune::Partitions::interior)) {
294+ auto fvGeometry = localView (*gridGeometry);
295+ fvGeometry.bindElement (element);
296+ for (const auto &scv : scvs (fvGeometry)) {
297+ temperatures[solIdx++] =
298+ x[scv.elementIndex ()][problem->returnTemperatureIdx ()];
299+ }
300+ }
294301
295302 if (getParam<bool >(" Precice.RunWithCoupling" ) == true ) {
296303 couplingParticipant.writeQuantityVector (meshName,
You can’t perform that action at this time.
0 commit comments