:orphan:
# 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 logically two-dimensional array of values





## Notes
The values, `v`, are column-oriented (for the block version) and sorted

All the nonzeros in the row must be provided

The matrix must have previously had its column indices set, likely by having been assembled.

The row must belong to this process


## See Also
 [](ch_matrices), `Mat`, `MatSetOption()`, `MatAssemblyBegin()`, `MatAssemblyEnd()`, `MatSetValuesBlocked()`, `MatSetValuesLocal()`,
`InsertMode`, `INSERT_VALUES`, `ADD_VALUES`, `MatSetValues()`, `MatSetValuesRow()`, `MatSetLocalToGlobalMapping()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/interface/matrix.c.html#MatSetValuesRowLocal">src/mat/interface/matrix.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/interface/matrix.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
