DMPlexPreallocateOperator#
Calculate the matrix nonzero pattern based upon the information in the DM
, the PetscDS
it contains, and the default PetscSection
.
Synopsis#
#include "petscdmplex.h"
PetscErrorCode DMPlexPreallocateOperator(DM dm, PetscInt bs, PetscInt dnz[], PetscInt onz[], PetscInt dnzu[], PetscInt onzu[], Mat A, PetscBool fillMatrix)
Collective
Input Parameters#
dm - The
DMPLEX
bs - The matrix blocksize
dnz - An array to hold the number of nonzeros in the diagonal block
onz - An array to hold the number of nonzeros in the off-diagonal block
dnzu - An array to hold the number of nonzeros in the upper triangle of the diagonal block
onzu - An array to hold the number of nonzeros in the upper triangle of the off-diagonal block
fillMatrix - If
PETSC_TRUE
, fill the matrix with zeros
Output Parameter#
A - The preallocated matrix
See Also#
Level#
advanced
Location#
Implementations#
DMPlexPreallocateOperator_2 in src/dm/impls/plex/plexpreallocate.c
Index of all DMPlex routines
Table of Contents for all manual pages
Index of all manual pages