From 94ccaad9ef058f10f14ddf2bee44df769bf69bcd Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Fri, 1 Feb 2019 14:49:18 +0100 Subject: Add domain-restricted material number reset to SuperGeometry2D Makes it easier to exclude refined areas --- apps/adrian/cylinder2d/cylinder2d.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'apps/adrian/cylinder2d') diff --git a/apps/adrian/cylinder2d/cylinder2d.cpp b/apps/adrian/cylinder2d/cylinder2d.cpp index 094e548..c853939 100644 --- a/apps/adrian/cylinder2d/cylinder2d.cpp +++ b/apps/adrian/cylinder2d/cylinder2d.cpp @@ -102,9 +102,7 @@ void disableRefinedArea(Grid2D& coarseGrid, { auto& sGeometry = coarseGrid.getSuperGeometry(); auto refinedOverlap = fineGrid.getRefinedOverlap(); - sGeometry.rename(1,0,*refinedOverlap); - sGeometry.rename(2,0,*refinedOverlap); - sGeometry.rename(5,0,*refinedOverlap); + sGeometry.reset(*refinedOverlap); } void prepareLattice(Grid2D& grid) @@ -261,7 +259,6 @@ int main(int argc, char* argv[]) auto& fineGrid = coarseGrid.refine(fineOrigin, fineExtend); prepareGeometry(fineGrid); - disableRefinedArea(coarseGrid, fineGrid); const Vector fineOutflowExtend {5*coarseDeltaX, ly}; @@ -280,10 +277,7 @@ int main(int argc, char* argv[]) coarseGrid.addCoarseCoupling(fineOutflowGrid, origin + Vector {coarseDeltaX,0}, extendY); IndicatorCuboid2D refined(extend, origin + Vector {2*coarseDeltaX,0}); - - coarseGrid.getSuperGeometry().rename(1,0,refined); - coarseGrid.getSuperGeometry().rename(2,0,refined); - coarseGrid.getSuperGeometry().rename(4,0,refined); + coarseGrid.getSuperGeometry().reset(refined); } const Vector fineExtend2 {2.3*cylinderD, 1.7*cylinderD}; @@ -291,7 +285,6 @@ int main(int argc, char* argv[]) auto& fineGrid2 = fineGrid.refine(fineOrigin2, fineExtend2); prepareGeometry(fineGrid2); - disableRefinedArea(fineGrid, fineGrid2); const Vector fineExtend3 {1.4*cylinderD, 1.4*cylinderD}; @@ -299,7 +292,6 @@ int main(int argc, char* argv[]) auto& fineGrid3 = fineGrid2.refine(fineOrigin3, fineExtend3); prepareGeometry(fineGrid3); - disableRefinedArea(fineGrid2, fineGrid3); prepareLattice(coarseGrid); -- cgit v1.2.3