[petsc-dev] Scatter a single local value to multiple global values

Jed Brown jed at jedbrown.org
Wed Feb 22 11:36:07 CST 2017


Chris Eldred <chris.eldred at gmail.com> writes:

> Hey Jed,
>
> That makes sense now, thanks! It sounds like the correct way to do things is:
>
> For matrices:
> 1) for each set of coupled dofs, select 1 to be the master and modify
> the local to global maps such that all the local indices that
> previously pointed to the slave dofs now point to the master dof
> -> assembly doesn't produce anything for the slave rows
> 2) fill the rows for the slave dofs with a -1 in the master column and
> 1 in the slave column (since we are just enforcing slave = master).

It's better to not store slave dofs in the global matrix.  Just use the
local-to-global mapping so that you get it in your local spaces.  What
you describe makes the matrix nonsymmetric and possibly ill-conditioned
(depends on scaling of the other dofs).

> For residuals, just do 1) and then set slave dofs equal to the master dof.

What you describe above with +1 and -1 requires a right-hand side of 0.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20170222/d9e7ff54/attachment.sig>


More information about the petsc-dev mailing list