:orphan:
# MatSetValueLocal
Inserts or adds a single value into a matrix, using a local numbering of the nodes. Not Collective


## Input Parameters

- ***m -*** the matrix
- ***i -*** the row location of the entry
- ***j -*** the column location of the entry
- ***va -*** the value to insert
- ***mode -*** either `INSERT_VALUES` or `ADD_VALUES`





## Notes
For efficiency one should use `MatSetValuesLocal()` and set several values simultaneously.

See notes for `MatSetValuesLocal()` for additional information on when and how this function can be used.


## See Also
 [](ch_matrices), `MatSetValue()`, `MatSetValuesLocal()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscmat.h.html#MatSetValueLocal">include/petscmat.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscmat.h)


[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)  
