DMStagMatSetValuesStencil#
insert or add matrix entries using grid indexing
Synopsis#
#include "petscdmstag.h"
PetscErrorCode DMStagMatSetValuesStencil(DM dm, Mat mat, PetscInt nRow, const DMStagStencil *posRow, PetscInt nCol, const DMStagStencil *posCol, const PetscScalar *val, InsertMode insertMode)
Not Collective
Input Parameters#
dm - the
DMSTAG
objectmat - the matrix
nRow - number of rows
posRow - grid locations (including components) of rows
nCol - number of columns
posCol - grid locations (including components) of columns
val - logically two-dimensional array of values
insertMode -
INSERT_VALUES
orADD_VALUES
Notes#
See notes for MatSetValuesStencil()
See Also#
DMSTAG: Staggered, Structured Grid, DMSTAG
, DMStagStencil
, DMStagStencilLocation
, DMStagVecGetValuesStencil()
, DMStagVecSetValuesStencil()
, DMStagMatGetValuesStencil()
, MatSetValuesStencil()
, MatAssemblyBegin()
, MatAssemblyEnd()
, DMCreateMatrix()
Level#
intermediate
Location#
Examples#
src/dm/impls/stag/tutorials/ex8.c
src/dm/impls/stag/tutorials/ex3.c
src/dm/impls/stag/tutorials/ex1.c
src/dm/impls/stag/tutorials/ex2.c
src/dm/impls/stag/tutorials/ex4.c
Index of all DMStag routines
Table of Contents for all manual pages
Index of all manual pages