[petsc-users] Reordering of entries in a DMDA

Matthew Knepley knepley at gmail.com
Wed Apr 21 14:11:25 CDT 2021

On Wed, Apr 21, 2021 at 3:07 PM Fabian Jakub <
Fabian.Jakub at physik.uni-muenchen.de> wrote:

> Dear Petsc team,
> I would like to play with the ordering of a DMDA application.
> To be exact, I would like to change the order in which a forward
> SOR/Gauss Seidel preconditioner iterates over the domain.
> e.g. change from [x,y,z,dof] to [z, yend->ystart, xend->xstart, dof]
> As I see it, I could
>  a) reorder the application, i.e. how data is stored in the DMDA
>  b) apply a mat reordering (happy to have the reordering only happening
> locally)
>  c) or implement a custom PC (or using a PCShell?)
> I don't like a) because it would be very laborious and intrusive and I
> don't even know if it is worth it.
> Implementing a custom PC might give the most freedom but reduces solver
> configurability that I like.
> And how bad would a SOR be if it were to jump around in memory compared
> to the performance and memory needs of a mat reordering?
> I wanted to ask if you have any other suggestions and which approach you
> would recommend.

1) I would do the reordering in serial to check that it is effective

2) If the reodering is process local, then everything is simple. You just
alter the global-to-local mapping
    for the matrix. If not, things would get more complicated.



> Many thanks,
> Fabian

What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210421/5c63aaac/attachment.html>

More information about the petsc-users mailing list