[petsc-dev] XDestroy should set Fortran to PETSC_NULL_X

Jed Brown jed at jedbrown.org
Wed Sep 5 17:55:10 CDT 2018


It is safe in Fortran to write

  call DMDestroy(da, ierr)
  call DMDestroy(da, ierr)

but not

  da = PETSC_NULL_DM
  call DMDestroy(da, ierr)

That's pretty lame and inconsistent with the analogous C concept.
Should we either change the value of PETSC_NULL_DM or change the
generated Destroy code?


More information about the petsc-dev mailing list