[petsc-users] How to pass data to PETSc

Jed Brown jedbrown at mcs.anl.gov
Fri Nov 1 09:17:02 CDT 2013


Ted Sariyski <tsariysk at craft-tech.com> writes:

> On 10/31/2013 04:53 PM, Jed Brown wrote:
>> Ted Sariyski <tsariysk at craft-tech.com> writes:
>>> Q1: I have the stiffness matrix and the rhs vector assembled (outside)
>>> and in PETSc order. Do I still need to create a scatter:"ierr =
>>> VecScatterCreate(bb,isglobal,localX,islocal,&scatter)"?
>> What do you want to do with the Vec?
> Use KSP for solving a linear system.

It looks like your vectors are already distributed, so you don't need a
VecScatter.  If you were computing nonlinear residuals, you would
probably need to communicate with neighbors; VecScatter is a flexible
way to do that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131101/3aa2d49b/attachment.pgp>


More information about the petsc-users mailing list