[petsc-users] Fortran Interface NULL object / Casting

Nicholas Arnold-Medabalimi narnoldm at umich.edu
Thu Dec 8 12:05:57 CST 2022


Hi Petsc Users

I am trying to use DMAddField in a Fortran code. I had some questions on
casting/passing NULL. I follow how to pass NULL for standard types (INT,
CHAR, etc).

Is there a method/best practice for passing NULL for Petsc type arguments?
(In this case DMAddLabel I'd want to pass NULL to a DMLabel Parameter not
an intrinsic type)

For the 2nd question, In some cases in C we would cast a more specific
object to Petsc Object
DMAddField(dm, NULL, (PetscObject)fvm); (where fvm is a PetscFVM type)
Is there a method or practice to do the same in Fortran.

Thanks
Nicholas

-- 
Nicholas Arnold-Medabalimi

Ph.D. Candidate
Computational Aeroscience Lab
University of Michigan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221208/bd45d3b0/attachment.html>


More information about the petsc-users mailing list