DMCompositeGetColoring

Gets the coloring required for computing the Jacobian via finite differences on a function defined using a DMComposite "grid"

Synopsis

#include "petscda.h"     
PetscErrorCode PETSCDM_DLLEXPORT DMCompositeGetColoring(DMComposite dmcomposite,ISColoringType ctype,ISColoring *coloring)
Collective on DA

Input Parameter

dmcomposite - the DMComposite object
ctype - IS_COLORING_GLOBAL or IS_COLORING_GHOSTED

Output Parameters

coloring -matrix coloring for use in computing Jacobians (or PETSC_NULL if not needed)

Notes: This colors each diagonal block (associated with a single DM) with a different set of colors; this it will compute the diagonal blocks of the Jacobian correctly. The off diagonal blocks are not computed, hence the Jacobian computed is not the entire Jacobian. If -dmcomposite_dense_jacobian is used then each column of the Jacobian is given a different color so the full Jacobian is computed correctly.

Notes: These compute the graph coloring of the graph of A^{T}A. The coloring used for efficient (parallel or thread based) triangular solves etc is NOT yet available.

See Also

ISColoringView(), ISColoringGetIS(), MatFDColoringCreate(), ISColoringType, ISColoring, DAGetColoring()

Level:advanced
Location:
src/dm/da/utils/pack.c
Index of all DA routines
Table of Contents for all manual pages
Index of all manual pages