PCASMWeightedSetComputeScaling#

Sets a callback to compute PC_ASM_WEIGHTED scaling during PCSetUp().

Synopsis#

Logically Collective

Input Parameters#

  • pc - the PCASM preconditioner

  • fn - function to fill each local scaling vector, or NULL to disable the callback

  • ctx - 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#

src/ksp/pc/impls/asm/asm.c

Examples#

src/ksp/pc/tests/ex13.c
src/ksp/pc/tests/ex13f.F90

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