DAGetMatrix
Gets the nonzero structure required for computing the Jacobian via finite differences on a function defined using a stencil on the DA.
Synopsis
#include "petscda.h"
#include "petscmat.h"
int DAGetMatrix(DA da,MatType mtype,Mat *J)
Collective on DA
Input Parameter
| da | - the distributed array
|
| mtype | - either MATMPIAIJ or MATMPIBAIJ
|
Output Parameters
J -matrix with the correct nonzero structure
(obviously without the correct Jacobian values)
This does not yet handle BAIJ matrices, because
1) we need a way for the user to indicate what matrix type they want
2) after the matrix is created, for BAIJ matrices we need to set nc to 1 and
use MatSetValuesBlockedLocal() instead of MatSetValuesLocal()
See Also
ISColoringView(), ISColoringGetIS(), MatFDColoringCreate(), DAGetMatrixMPIBAIJ()
Level:advanced
Location:src/dm/da/utils/fdda.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages
Examples
src/snes/examples/tutorials/ex5.c.html
src/snes/examples/tutorials/ex14.c.html
src/snes/examples/tutorials/ex24.c.html
src/snes/examples/tutorials/ex5f.F.html
src/snes/examples/tutorials/ex5f90.F.html
src/ts/examples/tutorials/ex7.c.html