PCBDDCSetLocalAdjacencyGraph#
Sets the adjacency graph of the local degrees of freedom in CSR format
Synopsis#
#include "petscpc.h"
PetscErrorCode PCBDDCSetLocalAdjacencyGraph(PC pc, PetscInt nvtxs, const PetscInt xadj[], const PetscInt adjncy[], PetscCopyMode copymode)
Not Collective
Input Parameters#
pc - the preconditioning context
nvtxs - number of local graph vertices, equal to the number of local degrees of freedom
xadj - CSR row offsets, of length
nvtxs+ 1adjncy - CSR column indices, of length
xadj[nvtxs]copymode -
PETSC_COPY_VALUES,PETSC_USE_POINTER, orPETSC_OWN_POINTER
Notes#
Graph vertices use the numbering of the local MATIS matrix. The CSR arrays use zero-based indexing.
A degree of freedom i is considered connected to all local degrees of freedom if xadj[i+1] - xadj[i] == 1
and adjncy[xadj[i]] is negative.
With PETSC_COPY_VALUES, the arrays are copied. With PETSC_OWN_POINTER, ownership of the arrays is transferred to pc;
the arrays must have been allocated with PetscMalloc(). With PETSC_USE_POINTER, the caller must keep the arrays valid
and unchanged until the graph is replaced or the preconditioner is reset or destroyed.
Passing nvtxs equal to 0 clears the user-defined graph.
See Also#
Level#
intermediate
Location#
Examples#
Implementations#
PCBDDCSetLocalAdjacencyGraph_BDDC() in src/ksp/pc/impls/bddc/bddc.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages