petsc-3.4.5 2014-06-29

DMMeshCreateMatrix

Creates a matrix with the correct parallel layout required for computing the Jacobian on a function defined using the information in the Section.

Synopsis

#include "petscdmmesh.h"   
PetscErrorCode DMMeshCreateMatrix(DM dm, SectionReal section, MatType mtype, Mat *J)
Collective on DMMesh

Input Parameters

mesh - the mesh object
section - the section which determines data layout
mtype - Supported types are MATSEQAIJ, MATMPIAIJ, MATSEQBAIJ, MATMPIBAIJ, MATSEQSBAIJ, MATMPISBAIJ, or any type which inherits from one of these (such as MATAIJ, MATLUSOL, etc.).

Output Parameter

J -matrix with the correct nonzero preallocation (obviously without the correct Jacobian values)

Notes: This properly preallocates the number of nonzeros in the sparse matrix so you do not need to do it yourself.

See Also

ISColoringView(), ISColoringGetIS(), MatFDColoringCreate(), DMDASetBlockFills()

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