summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorAdrian Kummerlaender2019-02-01 14:49:18 +0100
committerAdrian Kummerlaender2019-06-24 15:17:28 +0200
commit94ccaad9ef058f10f14ddf2bee44df769bf69bcd (patch)
treea674fd5fd5e4c4c816c6e34ee1daed46d8f8edb3 /apps
parent9248f0c5bff6ba04a838ebe94a4a4e925d38530e (diff)
downloadgrid_refinement_openlb-94ccaad9ef058f10f14ddf2bee44df769bf69bcd.tar
grid_refinement_openlb-94ccaad9ef058f10f14ddf2bee44df769bf69bcd.tar.gz
grid_refinement_openlb-94ccaad9ef058f10f14ddf2bee44df769bf69bcd.tar.bz2
grid_refinement_openlb-94ccaad9ef058f10f14ddf2bee44df769bf69bcd.tar.lz
grid_refinement_openlb-94ccaad9ef058f10f14ddf2bee44df769bf69bcd.tar.xz
grid_refinement_openlb-94ccaad9ef058f10f14ddf2bee44df769bf69bcd.tar.zst
grid_refinement_openlb-94ccaad9ef058f10f14ddf2bee44df769bf69bcd.zip
Add domain-restricted material number reset to SuperGeometry2D
Makes it easier to exclude refined areas
Diffstat (limited to 'apps')
-rw-r--r--apps/adrian/cylinder2d/cylinder2d.cpp12
1 files changed, 2 insertions, 10 deletions
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<T,DESCRIPTOR>& 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<T,DESCRIPTOR>& grid)
@@ -261,7 +259,6 @@ int main(int argc, char* argv[])
auto& fineGrid = coarseGrid.refine(fineOrigin, fineExtend);
prepareGeometry(fineGrid);
-
disableRefinedArea(coarseGrid, fineGrid);
const Vector<T,2> fineOutflowExtend {5*coarseDeltaX, ly};
@@ -280,10 +277,7 @@ int main(int argc, char* argv[])
coarseGrid.addCoarseCoupling(fineOutflowGrid, origin + Vector<T,2> {coarseDeltaX,0}, extendY);
IndicatorCuboid2D<T> refined(extend, origin + Vector<T,2> {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<T,2> 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<T,2> 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);