petsc-3.13.6 2020-09-29
Report Typos and Errors

MatGetValuesLocal

retrieves values into certain locations of a matrix, using a local numbering of the nodes.

Synopsis

#include "petscmat.h" 
PetscErrorCode MatGetValuesLocal(Mat mat,PetscInt nrow,const PetscInt irow[],PetscInt ncol,const PetscInt icol[],PetscScalar y[])
Not Collective

Input Parameters

mat - the matrix
nrow, irow - number of rows and their local indices
ncol, icol - number of columns and their local indices

Output Parameter

y -a logically two-dimensional array of values

Notes

If you create the matrix yourself (that is not with a call to DMCreateMatrix()) then you MUST call MatSetLocalToGlobalMapping() before using this routine

Developer Notes

This is labelled with C so does not automatically generate Fortran stubs and interfaces because it requires multiple Fortran interfaces depending on which arguments are scalar or arrays.

See Also

MatAssemblyBegin(), MatAssemblyEnd(), MatSetValues(), MatSetLocalToGlobalMapping(),
MatSetValuesLocal()

Level

advanced

Location

src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages