petsc-3.7.1 2016-05-15
Report Typos and Errors

VecSetValuesBlockedLocal

Inserts or adds values into certain locations of a vector, using a local ordering of the nodes.

Synopsis

#include "petscvec.h"   
PetscErrorCode  VecSetValuesBlockedLocal(Vec x,PetscInt ni,const PetscInt ix[],const PetscScalar y[],InsertMode iora)
Not Collective Many br

Input Parameters

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

Many br

Notes

VecSetValuesBlockedLocal() sets x[bs*ix[i]+j] = y[bs*i+j], Many brfor j=0,..bs-1, for i=0,...,ni-1, where bs has been set with VecSetBlockSize(). Many br

Calls to VecSetValuesBlockedLocal() with the INSERT_VALUES and ADD_VALUES Many broptions cannot be mixed without intervening calls to the assembly Many brroutines. Many br

These values may be cached, so VecAssemblyBegin() and VecAssemblyEnd() Many brMUST be called after all calls to VecSetValuesBlockedLocal() have been completed. Many br

VecSetValuesBlockedLocal() uses 0-based indices in Fortran as well as in C. Many br

See Also

VecAssemblyBegin(), VecAssemblyEnd(), VecSetValues(), VecSetValuesBlocked(),
VecSetLocalToGlobalMapping() Many br

Level:intermediate
Location:
src/vec/vec/interface/rvector.c
Index of all Vec routines
Table of Contents for all manual pages
Index of all manual pages