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


## Input Parameters

- ***m -*** the matrix
- ***row -*** the row location of the entry
- ***col -*** the column location of the entry
- ***value -*** 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
 `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](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
