PCASMWeightedSetComputeScaling#
Sets a callback to compute PC_ASM_WEIGHTED scaling during PCSetUp().
Synopsis#
#include "petscpc.h"
PetscErrorCode PCASMWeightedSetComputeScaling(PC pc, PCASMWeightedComputeScalingFn *fn, PetscCtx ctx)
Logically Collective
Input Parameters#
pc - the
PCASMpreconditionerfn - function to fill each local scaling vector, or
NULLto disable the callbackctx - function context passed to
fn
Notes#
Register before setup and select PC_ASM_WEIGHTED.
Whenever PCSetUp() rebuilds weighted ASM,
fn is called once per local subdomain, after overlap expansion and index sorting, with a vector
of the correct size and type.
No explicit setup or vector allocation is needed by the caller.
The callback overwrites any existing weights, including those supplied directly by PCASMWeightedSetScaling().
Registration does not trigger setup. Passing NULL leaves the current weights in place.
The callback and context survive PCReset(). The caller owns ctx and must keep it valid
until the callback is replaced or disabled, or the preconditioner is destroyed.
Fortran Note#
fn is a subroutine with arguments (pc, local, scaling, ctx, ierr). Pass PETSC_NULL_FUNCTION to disable the callback.
See Also#
KSP: Linear System Solvers, PCASM, PCASMWeightedComputeScalingFn, PCASMWeightedSetScaling(), PCASMWeightedGetScaling(), PCASMSetType()
Level#
intermediate
Location#
Examples#
Implementations#
PCASMWeightedSetComputeScaling_ASM() in src/ksp/pc/impls/asm/asm.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages