[petsc-users] ASM Interface (Additive Schwarz Method)
Nils Schween
nils.schween at uni-heidelberg.de
Fri Jan 18 07:23:46 CST 2019
Hello everyone,
after working a while with Petsc’s ASM preconditioner, I ended up a little bit
confused.
I drew a picture to demonstrate to you how I am setting up the ASM
blocks via the routine PCASMSetLocalSubdomains().
Indexset is_local idxArrayASMBlockLocal: [1,...,60,...,90,...]
1 +--------------------------------------------------+... | ^ ^ ^
| | .. rank 0 --------+--------------------| | |
| |... | | |
| |... | | |
| | .. rank 1 | | |
| |... | | |
| | | | |
| | | | |
| | . | | |
| | . | | |
| | . | | |
| | | | |
| | | | |
| |... | | |
| | .. rank size-1 | | |
| |... | | |
60 +--------------------------------------------------+... | | |
| | .. rank 0 --------+---------------------------+ |
| |... | |
| | . | |
| | . | |
| | . | |
| | | |
90 +--------------------------------------------------+ ... | |
| | .. rank 0--------+---------------------------------+
| | ... v
| | . ISCreateGeneral(PETSC_COMM_WORLD, numberOfElements,idxArrayAsMBlockLocal, PETSC_USE_POINTER, &IndicesASMBlockLocal);
100 +--------------------------------------------------+ .
Indexset is idxArrayASMBlock: [1,...,olap,60,...,olap,90,...]
| ^ ^ ^
1 +--------------------------------------------------+... | | | |
| | . | | | |
| +--+- rank 0 -----------+--------------| | |
| | | | | |
| |..| | | |
| | +- rank 1 | | |
| | | | | |
| | | | | |
| +--+ | | |
| | . | | |
| | . | | |
| |... | | |
| | . | | |
| | .. rank size-1 | | |
| | . | | |
| |... | | |
60 +--------------------------------------------------+... | | |
| |. . | | |
| +.-+. rank 0 -----------+--------------------------+ |
| |. | | |
| |..| | |
| | | | |
| | +- rank 1 | |
90 +--------------------------------------------------+... | |
| | . | |
| +--+. rank 0 -----------+--------------------------------------+
| | | |
100 +--------------------------------------------------+ .| v
+- rank 1 ISCreateGeneral(PETSC_COMM_WORD, numberOfElements+elementsOlap, idxArrayASMBlock, PETSC_USE_POINTER, &IndicesASMBlockLocal);
The PCASMSetLocalSubdomains() routine requires, next to other arguments, two
index sets. The above drawing shows how these index sets are obtained: Think
of the matrix to be preconditioned as split into three parts. To create an ASM
block on one processor, say rank 0, rows from each part are needed. (As can be
seen in the first part of the above picture). The row indices of the needed rows
are stored in an integer array (i.e. in my case idxArrayASMBlockLocal or
idxArrayASMBlock) which is used to create an index set with the help of
ISCreateGeneral(). The second part of the above picture demonstrates what row
indices are used to create the overlap.
This works perfectly as long as I use PC_ASM_BASIC for the PCASMType. If I
switch to PC_ASM_RESTRICT, my GMRES algorithm, does not converge anymore.
Why is this?
Am I misunderstanding the ASM interface? (i.e. is the way I define the overlap
wrong?)
Do I have to somehow permute the right-hand side of system of equations?
It’s probably important to know, that PCSide is set to PC_RIGHT.
Thank you for your help!
With best regards,
Nils
P.S.: I very much hope, that my small picture is not destroyed by our email clients.
--
M.Sc. Nils Schween
Research Associate
Phone: +49 6221 54 14512
Mail: nils.schween at uni-heidelberg.de
Heidelberg University
Engineering Mathematics and Computing Lab (EMCL)
Interdisciplinary Center for Scientific Computing (IWR)
Im Neuenheimer Feld 205, D-69120 Heidelberg
http://emcl.iwr.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190118/8b39ea0b/attachment.sig>
More information about the petsc-users
mailing list