VecSetValuesBlocked

Inserts or adds blocks of values into certain locations of a vector.

Synopsis

int VecSetValuesBlocked(Vec x,int ni,int *ix,Scalar *y,InsertMode iora) 
Not Collective

Input Parameters

x - vector to insert in
ni - number of blocks to add
ix - indices where to add in block count, rather than element count
y - array of values
iora - either INSERT_VALUES or ADD_VALUES, where ADD_VALUES adds values to any existing entries, and INSERT_VALUES replaces existing entries with new values

Notes

VecSetValuesBlocked() sets x[ix[bs*i]+j] = y[bs*i+j], for j=0,...,bs, for i=0,...,ni-1. where bs was set with VecSetBlockSize().

Calls to VecSetValuesBlocked() with the INSERT_VALUES and ADD_VALUESoptions cannot be mixed without intervening calls to the assemblyroutines.

These values may be cached, so VecAssemblyBegin() and VecAssemblyEnd() MUST be called after all calls to VecSetValuesBlocked() have been completed.

VecSetValuesBlocked() uses 0-based indices in Fortran as well as in C.

Keywords

vector, set, values

See Also

VecAssemblyBegin(), VecAssemblyEnd(), VecSetValuesBlockedLocal(),
VecSetValues()

Location: src/vec/interface/vector.c
Vector Index
Table of Contents