Skip to content

Commit c4fcda1

Browse files
Notes on how agglomeration works in MLMG (#4602)
Notes on how agglomeration works in MLMG --------- Co-authored-by: Weiqun Zhang <[email protected]>
1 parent ce6502b commit c4fcda1

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

Docs/sphinx_documentation/source/LinearSolvers.rst

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ biconjugate gradient stabilized method, but can easily be changed with the :cpp:
359359

360360
void setBottomSolver (BottomSolver s);
361361

362-
Available choices are
362+
Available choices the bottom solver are
363363

364364
- :cpp:`MLMG::BottomSolver::bicgstab`: The default.
365365

@@ -379,18 +379,30 @@ Available choices are
379379

380380
- :cpp:`MLMG::BottomSolver::petsc`: Currently for cell-centered only.
381381

382+
The :cpp:`LPInfo` class can be used control the agglomeration and
383+
consolidation strategy for multigrid coarsening.
384+
382385
- :cpp:`LPInfo::setAgglomeration(bool)` (by default true) can be used
383-
continue to coarsen the multigrid by copying what would have been the
384-
bottom solver to a new :cpp:`MultiFab` with a new :cpp:`BoxArray` with
385-
fewer, larger grids, to allow for additional coarsening.
386+
to copy the current level of multigrid data to fewer, larger
387+
boxes. Two advantages of using this option is that the bottom solver will become
388+
smaller, and communication overhead is reduced.
389+
390+
- :cpp:`LPInfo::setAgglomerationGridSize(int)` controls the grid-length
391+
threshold used for agglomeration. By default, the threshold length is set
392+
to 32 for GPU builds, and 8, 16 and 32 for CPU builds in 1D, 2D and 3D,
393+
respectively. The corresponding volume threshold is :math:`L^D`, where
394+
:math:`L` is the length threshold and :math:`D` is
395+
:cpp:`AMREX_SPACEDIM`. When the average box volume falls below this volume
396+
threshold, boxes are agglomerated until this is no longer the case. Note
397+
that this action is recursive and can happen at several different levels
398+
in the multigrid hierarchy.
386399

387400
- :cpp:`LPInfo::setConsolidation(bool)` (by default true) can be used
388401
continue to transfer a multigrid problem to fewer MPI ranks.
389402
There are more setting such as :cpp:`LPInfo::setConsolidationGridSize(int)`,
390403
:cpp:`LPInfo::setConsolidationRatio(int)`, and
391404
:cpp:`LPInfo::setConsolidationStrategy(int)`, to give control over how this
392-
process works.
393-
405+
process works. If agglomeration is used, consolidation is ignored.
394406

395407
:cpp:`MLMG::setThrowException(bool)` controls whether multigrid failure results
396408
in aborting (default) or throwing an exception, whereby control will return to the calling

0 commit comments

Comments
 (0)