Matrix reordering by changing LocalToGlobalMapping

Jed Brown jed at 59A2.org
Fri Nov 28 10:42:23 CST 2008


The usefulness of -pc_factor_mat_ordering_type is obviously limited to
PETSc factorization.  I was thinking about how to use a reordering for
third-party preconditioners and it seems like a good option would be to
assemble a dummy matrix, compute an ordering, and update the
LocalToGlobalMapping.  After this step, the real matrix would always be
assembled using the computed ordering and all preconditioners would
benefit.  While this is pretty easy for user code to do manually, I was
thinking about the possibility of putting a nice interface on it.

In some sense, the ideal interface would be an option in
SNESComputeJacobian to do the dummy assemble, reorder, update L2G,
reassemble the first time a matrix is assembled.  This won't work
though, because there are probably vectors lying around with a different
L2G mapping and values that only make sense in the old ordering.  So I
think there is no way to get around user code explicitly asking for a
reordering before MatGetVecs.  Any thoughts on this?  Is a generic
implementation a waste of effort?



The attached bundle has two minor patches

* Use prefix for -mat_* options in sorder.c
* Free sliced->ghosts

Jed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jed-20081128.hg
Type: application/octet-stream
Size: 1212 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20081128/9434bc07/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20081128/9434bc07/attachment.sig>


More information about the petsc-dev mailing list