# assembleMatrix

Insert values into a matrix

### Synopsis

    #include "petscmesh.h"
    PetscErrorCode assembleMatrix(Mat A, PetscInt e, PetscScalar v[], InsertMode mode)

Collective on A

### Input Parameters

| A | - the matrix
| e | - The element number
| v | - The values
| mode | - either ADD_VALUES or INSERT_VALUES, where ADD_VALUES adds values to any existing entries, and INSERT_VALUES replaces existing entries with new values

### See Also

MatSetOption()

Level:beginner
Location:src/dm/mesh/mesh.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages