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

Chris Eldred chris.eldred at gmail.com
Wed Feb 22 11:04:05 CST 2017


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).

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

The star forest write up is exactly what I was looking for, thanks!

Regards,
Chris

On Wed, Feb 22, 2017 at 5:37 PM, Jed Brown <jed at jedbrown.org> wrote:
> "Kong, Fande" <fande.kong at inl.gov> writes:
>> How about the inverse of SF? The original leaf becomes  a new root, and the
>> original leaf will map to multiple new leafs?
>
> Chris has multiple local indices mapping to the same global index (this
> is the usual local-to-global map).  He's eager to build a singular
> matrix and irritated that the tooling intentionally makes that harder to
> do by accident.  ;-)



-- 
Chris Eldred
https://www.math.univ-paris13.fr/~eldred/
Postdoctoral Fellow, LAGA, University of Paris 13
PhD, Atmospheric Science, Colorado State University, 2015
DOE Computational Science Graduate Fellow (Alumni)
B.S. Applied Computational Physics, Carnegie Mellon University, 2009
chris.eldred at gmail.com



More information about the petsc-dev mailing list