:orphan: # MatUpdateMPIAIJWithArray updates an `MATMPIAIJ` matrix using an array that contains the nonzero values ## Synopsis ``` #include "petscmat.h" PetscErrorCode MatUpdateMPIAIJWithArray(Mat mat, const PetscScalar v[]) ``` Collective ## Input Parameters - ***mat -*** the matrix - ***v -*** matrix values, stored by row ## Note The matrix must have been obtained with `MatCreateMPIAIJWithArrays()` or `MatMPIAIJSetPreallocationCSR()` ## See Also [](ch_matrices), `Mat`, `MatCreate()`, `MatCreateSeqAIJ()`, `MatSetValues()`, `MatMPIAIJSetPreallocation()`, `MatMPIAIJSetPreallocationCSR()`, `MATMPIAIJ`, `MatCreateAIJ()`, `MatCreateMPIAIJWithSplitArrays()`, `MatUpdateMPIAIJWithArrays()`, `MatUpdateMPIAIJWithArrays()` ## Level intermediate ## Location src/mat/impls/aij/mpi/mpiaij.c --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/aij/mpi/mpiaij.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)