DMDASetGetMatrix#
Sets the routine used by the DMDA
to allocate a matrix.
Synopsis#
#include "petscdmda.h"
PetscErrorCode DMDASetGetMatrix(DM da, PetscErrorCode (*f)(DM da, Mat *A))
Logically Collective; No Fortran Support
Input Parameters#
Calling sequence of f
#
da - the
DMDA
objectA - the created matrix
Notes#
If the function is not provided a default function is used that uses the DMDAStencilType
, DMBoundaryType
, and value of DMDASetStencilWidth()
to construct the matrix.
See DMDASetBlockFills()
that provides a simple way to provide the nonzero structure for
the diagonal and off-diagonal blocks of the matrix without providing a custom function
Developer Note#
This should be called DMDASetCreateMatrix()
See Also#
DMDA - Creating vectors for structured grids, DM
, DMDA
, DMCreateMatrix()
, DMDASetBlockFills()
Level#
developer
Location#
Index of all DMDA routines
Table of Contents for all manual pages
Index of all manual pages