Re: [petsc-dev] Scatter a single local value to multiple global values
Ok, it is apparent I will have to think about this some more. Thanks for the help! -Chris On Wed, Feb 22, 2017 at 6:36 PM, Jed Brown <[email protected]> wrote:
Chris Eldred <[email protected]> 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.
-- 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 [email protected]
participants (1)
-
Chris Eldred