On Fri, Apr 20, 2018 at 4:10 PM, Junchao Zhang <jczhang@mcs.anl.gov> wrote:
To pad a vector, i.e., copy a vector to a new one, I have to call VecSetValue(newb,1,&idx,...) for each element. But to be efficient, what I really needs is to set a block of values in one call. It looks PETSc does not have a routine for that(?). I looked at VecSetValuesBlocked, but it looks it is not for that purpose.
Should we have something like VecSetValuesBlock(Vec v,PetscInt i,PetscInt cnt,PetscScalar *value, InsertMode mode) to set cnt values starting at index i?

Use VecGetArray().

  Matt
 
--Junchao Zhang



--
What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener