From 68f2384f79bff6553d1db21ac0b3173d57e4e2bf Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 10 Jan 2019 15:13:23 +0100 Subject: Add hacky MPI support for grid refinement Works but is nowhere near anything one could consider good. Obvious issues: * More than one cuboid per grid makes it harder to determine the next lattice cell to be coupled * i.e. currently lattice positions are determined ad hoc by resolving their physical position * Coupling is not actually parallelized * All coupling lines are traversed by all processes, way to much communication * Load balancing and cuboid decomposition doesn't care about refinement * ideally refined cuboids should be computationally near their coarse _parent_ cuboids The first two isses should be fixable with a reasonable amount of work. This sadly doesn't apply in any form to the last issue. --- apps/adrian/poiseuille2d/poiseuille2d.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'apps/adrian/poiseuille2d') diff --git a/apps/adrian/poiseuille2d/poiseuille2d.cpp b/apps/adrian/poiseuille2d/poiseuille2d.cpp index a6d7bd1..df166e1 100644 --- a/apps/adrian/poiseuille2d/poiseuille2d.cpp +++ b/apps/adrian/poiseuille2d/poiseuille2d.cpp @@ -35,10 +35,11 @@ typedef double T; #define DESCRIPTOR D2Q9Descriptor -const T lx = 4.0; // length of the channel -const T ly = 1.0; // height of the channel -const int N = 60; // resolution of the model +const T lx = 8.0; // length of the channel +const T ly = 2.0; // height of the channel +const int N = 64; // resolution of the model const T Re = 500.; // Reynolds number +const T baseTau = 0.57; // Relaxation time of coarsest grid const T maxPhysT = 60.; // max. simulation time in s, SI unit const T physInterval = 0.25; // interval for the convergence check in s const T residuum = 1e-5; // residuum for the convergence check @@ -183,10 +184,10 @@ int main(int argc, char* argv[]) const Vector coarseExtend {lx, ly}; IndicatorCuboid2D coarseCuboid(coarseExtend, coarseOrigin); - auto coarseGrid = Grid2D::make(coarseCuboid, N, 0.57, Re); + auto coarseGrid = Grid2D::make(coarseCuboid, N, baseTau, Re); prepareGeometry(coarseGrid->getConverter(), coarseGrid->getSuperGeometry()); - const Vector wantedFineExtend {2.0, 0.75}; + const Vector wantedFineExtend {3.0, 1.5}; const Vector fineOrigin = coarseGrid->alignToGrid({0.8, (ly-wantedFineExtend[1])/2}); const Vector fineExtend = coarseGrid->alignToGrid(fineOrigin + wantedFineExtend) - fineOrigin; @@ -220,7 +221,7 @@ int main(int argc, char* argv[]) sOnLatticeBoundaryCondition2D fineSBoundaryCondition(fineGrid->getSuperLattice()); createLocalBoundaryCondition2D(fineSBoundaryCondition); - const Vector wantedFineExtend2 {0.4, 0.4}; + const Vector wantedFineExtend2 {0.6, 0.4}; const Vector fineOrigin2 = fineGrid->alignToGrid({1.05, (ly-wantedFineExtend2[1])/2}); const Vector fineExtend2 = fineGrid->alignToGrid(fineOrigin2 + wantedFineExtend2) - fineOrigin2; -- cgit v1.2.3