petsc-3.4.5 2014-06-29

MatSetValuesTopology

Sets values in a matrix using DM Mesh points rather than indices

Synopsis

#include "petscdmmesh.h"   
PetscErrorCode MatSetValuesTopology(Mat mat, DM dmr, PetscInt nrow, const PetscInt rowPoints[], DM dmc, PetscInt ncol, const PetscInt colPoints[], const PetscScalar v[], InsertMode mode)
Not Collective

Input Parameters

mat - the matrix
dmr - The row DM
nrow, rowPoints - number of rows and their local Sieve points
dmc - The column DM
ncol, colPoints - number of columns and their local Sieve points
v - a logically two-dimensional array of 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

DMMeshCreate(), MatSetValuesStencil()

Level:intermediate
Location:
src/dm/impls/mesh/mesh.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/snes/examples/tutorials/ex10.c.html