MatSetValuesRowLocal#
Inserts a row (block row for MATBAIJ matrices) of nonzero values into a matrix
Synopsis#
#include "petscmat.h"
PetscErrorCode MatSetValuesRowLocal(Mat mat, PetscInt row, const PetscScalar v[])
Not Collective
Input Parameters#
mat - the matrix
row - the (block) row to set
v - a one-dimensional array that contains the values. For
MATBAIJthey are implicitly stored as a two-dimensional array, by default in row-major order. SeeMAT_ROW_ORIENTEDinMatSetOption()for how to use column-major order.
Notes#
The values, v, are column-oriented (for the block version) and sorted
All the nonzero values in row must be provided
The matrix must have previously had its column indices set, likely by having been assembled.
row must belong to this MPI process
Fortran Note#
If v is a two-dimensional array use reshape() to pass it as a one dimensional array
See Also#
Matrices, Mat, MatSetOption(), MatAssemblyBegin(), MatAssemblyEnd(), MatSetValuesBlocked(), MatSetValuesLocal(),
InsertMode, INSERT_VALUES, ADD_VALUES, MatSetValues(), MatSetValuesRow(), MatSetLocalToGlobalMapping()
Level#
intermediate
Location#
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages