KSPGetApplicationContext#
Gets the user-defined context for the linear solver set with KSPSetApplicationContext()
Synopsis#
#include "petscksp.h"
PetscErrorCode KSPGetApplicationContext(KSP ksp, PeCtx ctx)
Not Collective
Input Parameter#
ksp -
KSP
context
Output Parameter#
ctx - a pointer to the user context
Fortran Notes#
This only works when the context is a Fortran derived type (it cannot be a PetscObject
) and you must write a Fortran interface definition for this
function that tells the Fortran compiler the derived data type that is returned as the ctx
argument. For example,
Interface KSPGetApplicationContext
Subroutine KSPGetApplicationContext(ksp,ctx,ierr)
#include <petsc/finclude/petscksp.h>
use petscksp
KSP ksp
type(tUsertype), pointer :: ctx
PetscErrorCode ierr
End Subroutine
End Interface KSPGetApplicationContext
The prototype for ctx
must be
type(tUsertype), pointer :: ctx
See Also#
Level#
intermediate
Location#
src/ksp/ksp/interface/iterativ.c
Index of all KSP routines
Table of Contents for all manual pages
Index of all manual pages