[petsc-users] VecSetValues
Robert Ellis
Robert.Ellis at geosoft.com
Mon Oct 10 15:33:12 CDT 2011
Hello All,
I sometimes use VecSetValues ...
PetscErrorCode VecSetValues(Vec x,PetscInt ni,const PetscInt ix[],const PetscScalar y[],InsertMode iora)
with PetscInt ix[] increasing uniformly, in steps of 1, from 0 to ni-1, which is also the full index range of Vec x. I do this on every rank, then use ADD_VALUES to generate the full Vec x.
Is there a PetSc method to set values without specifying PetscInt ix[] explicitly in this simple case. I'm trying to save the memory overhead of specifying ix[]on every rank.
Any guidance will be appreciated.
Regards,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111010/462b2cb9/attachment.htm>
More information about the petsc-users
mailing list