From 450ec8c4fbd01b365abeda6e40eab979b1d75120 Mon Sep 17 00:00:00 2001
From: Anna Wellmann <a.wellmann@tu-bs.de>
Date: Sat, 4 Dec 2021 09:07:27 +0100
Subject: [PATCH] Fix bug in weak scaling with levels

---
 apps/gpu/LBM/SphereScaling/SphereScaling.cpp   | 5 -----
 apps/gpu/LBM/SphereScaling1/SphereScaling1.cpp | 9 ++-------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/apps/gpu/LBM/SphereScaling/SphereScaling.cpp b/apps/gpu/LBM/SphereScaling/SphereScaling.cpp
index a7571e1a8..65c3f0ce2 100644
--- a/apps/gpu/LBM/SphereScaling/SphereScaling.cpp
+++ b/apps/gpu/LBM/SphereScaling/SphereScaling.cpp
@@ -449,11 +449,6 @@ void multipleLevel(const std::string& configPath)
                                                zGridMax, dxGrid);
                 }
 
-                if (useLevels) {
-                    gridBuilder->addGrid(new Sphere(0.5 * sideLengthCube, 0.5 * sideLengthCube, 0.5 * sideLengthCube, dSphereLev1), 1);                    
-                }
-
-
                 if (useLevels) {
                     if (scalingType == "strong"){
                         gridBuilder->addGrid(new Sphere(0.5 * sideLengthCube, 0.5 * sideLengthCube, 0.5 * sideLengthCube, dSphereLev1), 1);
diff --git a/apps/gpu/LBM/SphereScaling1/SphereScaling1.cpp b/apps/gpu/LBM/SphereScaling1/SphereScaling1.cpp
index 1edaceff8..14d151402 100644
--- a/apps/gpu/LBM/SphereScaling1/SphereScaling1.cpp
+++ b/apps/gpu/LBM/SphereScaling1/SphereScaling1.cpp
@@ -120,7 +120,7 @@ void multipleLevel(const std::string& configPath)
 
     bool useGridGenerator                  = true;
     bool useLevels                         = true;
-    std::string scalingType                = "strong"; // "strong" // "weak"
+    std::string scalingType                = "weak"; // "strong" // "weak"
     // bool useStreams                        = true;
     // para->useReducedCommunicationAfterFtoC = true;
     bool useStreams = para->getUseStreams();
@@ -448,12 +448,7 @@ void multipleLevel(const std::string& configPath)
                     gridBuilder->addCoarseGrid(xSplit - overlap, ySplit - overlap, zSplit - overlap, xGridMax, yGridMax,
                                                zGridMax, dxGrid);
                 }
-
-                if (useLevels) {
-                    gridBuilder->addGrid(new Sphere(0.5 * sideLengthCube, 0.5 * sideLengthCube, 0.5 * sideLengthCube, dSphereLev1), 1);                    
-                }
-
-
+                
                 if (useLevels) {
                     if (scalingType == "strong"){
                         gridBuilder->addGrid(new Sphere(0.5 * sideLengthCube, 0.5 * sideLengthCube, 0.5 * sideLengthCube, dSphereLev1), 1);
-- 
GitLab