PetscTryTypeMethod#

Call a method on a PETSc object, that is a function in the objects function table obj->ops, skip if the method does not exist

Synopsis#

#include "petsc/private/petscimpl.h"
PetscTryTtype(obj,method,other_args)

Input Parameters#

  • obj - the object the method is called on

  • method - the name of the method, for example, mult for the PETSc routine MatMult()

  • other_args - the other arguments for the method, obj is the first argument

Note#

This does not return an error code, it is a macro that returns with an error code on error.

Use PetscUseMethod() or PetscTryMethod() to call functions that have been composed to an object with PetscObjectComposeFunction()

See Also#

PetscTryMethod(), PetscUseMethod(), PetscCall(), PetscCheck(), PetscUseTypeMethod()

Level#

developer

Location#

include/petsc/private/petscimpl.h


Edit on GitLab

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages