MatSeqAIJSetValuesLocalFast — PETSc 3.25.4 documentation

Skip to main content
`Ctrl`+`K`

# MatSeqAIJSetValuesLocalFast

An optimized version of `MatSetValuesLocal()` for `MATSEQAIJ` matrices, valid under several restrictive assumptions.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatSeqAIJSetValuesLocalFast(Mat A, PetscInt m, const PetscInt im[], PetscInt n, const PetscInt in[], const PetscScalar v[], InsertMode is)

Not Collective

## Input Parameters

- A - the `MATSEQAIJ` matrix

- m - the number of rows being set (must be 1)

- im - array of length `m` giving the local row index

- n - the number of columns being set

- in - array of length `n` giving the local column indices

- v - array of length `n` of values to add

- is - the insert mode (must be `ADD_VALUES`)

## Notes

This routine requires that a single row of values is set with each call, that no row or column index is negative or larger than the number of rows or columns, that values are always added (not inserted), and that no new nonzero locations are introduced.

The global column indices are not assumed to be sorted.

## See Also

`Mat`, `MATSEQAIJ`, `MatSetValuesLocal()`, `MatSetValues()`

## Level

developer

## Location

src/mat/impls/aij/seq/aij.c

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages