Skip to main content
`Ctrl`+`K`

# PetscObjectIsNull

returns true if the given PETSc object is a null object Fortran only

## Synopsis

    #include <petsc/finclude/petscsys.h>
    PetscBool PetscObjectIsNull(PetscObject obj)

Logically Collective

## Input Parameters

- obj - the PETSc object

## Example Usage

      if (PetscObjectIsNull(dm)) then
      if (.not. PetscObjectIsNull(dm)) then

## Note

Code such as

      if (dm == PETSC_NULL_DM) then

is not allowed.

## See Also

`PetscObject`, `PETSC_NULL_OBJECT`, `PETSC_NULL_VEC`, `PETSC_NULL_VEC_ARRAY`

## Level

beginner

## Location

src/sys/objects/inherit.c

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