From 0bbbb9f0685006429c8e2bd9fc7af3385444cf54 Mon Sep 17 00:00:00 2001 From: Mathis Kelm Date: Tue, 26 Aug 2025 11:24:22 +0200 Subject: [PATCH 1/2] [two-scale-heat-conduction] Write data only for interior elements --- two-scale-heat-conduction/macro-dumux/appl/main.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/two-scale-heat-conduction/macro-dumux/appl/main.cc b/two-scale-heat-conduction/macro-dumux/appl/main.cc index 3491731a5..15a15b5f8 100644 --- a/two-scale-heat-conduction/macro-dumux/appl/main.cc +++ b/two-scale-heat-conduction/macro-dumux/appl/main.cc @@ -289,8 +289,15 @@ int main(int argc, char **argv) // linearize & solve nonLinearSolver.solve(x, *timeLoop); - for (int solIdx = 0; solIdx < numberOfElements; ++solIdx) - temperatures[solIdx] = x[solIdx][problem->returnTemperatureIdx()]; + int solIdx = 0; + for (const auto &element : elements(leafGridView, Dune::Partitions::interior)) { + auto fvGeometry = localView(*gridGeometry); + fvGeometry.bindElement(element); + for (const auto &scv : scvs(fvGeometry)) { + temperatures[solIdx++] = + x[scv.elementIndex()][problem->returnTemperatureIdx()]; + } + } if (getParam("Precice.RunWithCoupling") == true) { couplingParticipant.writeQuantityVector(meshName, From 8b7f057e1b0dc14a596e5eb59fa85bb192d51bb0 Mon Sep 17 00:00:00 2001 From: Ishaan Desai Date: Wed, 27 Aug 2025 14:10:41 +0200 Subject: [PATCH 2/2] Formatting --- two-scale-heat-conduction/macro-dumux/appl/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/two-scale-heat-conduction/macro-dumux/appl/main.cc b/two-scale-heat-conduction/macro-dumux/appl/main.cc index 15a15b5f8..bbcf54310 100644 --- a/two-scale-heat-conduction/macro-dumux/appl/main.cc +++ b/two-scale-heat-conduction/macro-dumux/appl/main.cc @@ -295,7 +295,7 @@ int main(int argc, char **argv) fvGeometry.bindElement(element); for (const auto &scv : scvs(fvGeometry)) { temperatures[solIdx++] = - x[scv.elementIndex()][problem->returnTemperatureIdx()]; + x[scv.elementIndex()][problem->returnTemperatureIdx()]; } }