MatSetValuesLocal

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

Synopsis

int MatSetValuesLocal(Mat mat,int nrow,int *irow,int ncol, int *icol,Scalar *y,InsertMode addv) 
Not Collective

Input Parameters

x - the matrix
nrow, irow - number of rows and their local indices
ncol, icol - number of columns and their local indices
y - a logically two-dimensional array of values
addv - 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

Before calling MatSetValuesLocal(), the user must first set thelocal-to-global mapping by calling MatSetLocalToGlobalMapping().

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

These values may be cached, so MatAssemblyBegin() and MatAssemblyEnd() MUST be called after all calls to MatSetValuesLocal() have been completed.

Keywords

matrix, set, values, local ordering

See Also

MatAssemblyBegin(), MatAssemblyEnd(), MatSetValues(), MatSetLocalToGlobalMapping()

Location: src/mat/interface/matrix.c
Matrix Index
Table of Contents