TaoGetApplicationContext#
Gets the user-defined context for a Tao
solver provided with TaoSetApplicationContext()
Synopsis#
#include "petsctao.h"
PetscErrorCode TaoGetApplicationContext(Tao tao, PeCtx ctx)
Not Collective
Input Parameter#
tao - the
Tao
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 TaoGetApplicationContext
Subroutine TaoGetApplicationContext(tao,ctx,ierr)
#include <petsc/finclude/petsctao.h>
use petsctao
Tao tao
type(tUsertype), pointer :: ctx
PetscErrorCode ierr
End Subroutine
End Interface TaoGetApplicationContext
The prototype for ctx
must be
type(tUsertype), pointer :: ctx
See Also#
Level#
intermediate
Location#
Index of all Tao routines
Table of Contents for all manual pages
Index of all manual pages