On Thu, Dec 8, 2022 at 2:56 PM Barry Smith <bsm...@petsc.dev> wrote:

>
>    You would use *PETSC_NULL_DM*LABEL but Matt needs to customize the
> PETSc Fortran stub for DMAddField() for you to handle accepting the NULL
> from PETSc.
>

Sorry, I missed this message. The customization is done.

  Thanks,

     Matt


>    Barry
>
>
>
>
>
> On Dec 8, 2022, at 1:05 PM, Nicholas Arnold-Medabalimi <narno...@umich.edu>
> wrote:
>
> 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
>
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://urldefense.us/v3/__https://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Y7V3ljA2ftwwmUl996o8LBEkPFj2p3sNz4c1MmdMRf8S5xQVjNjWnUACSD3Ys6A2ER8jLncCxWS5fZjxqnnF$
  
<https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!Y7V3ljA2ftwwmUl996o8LBEkPFj2p3sNz4c1MmdMRf8S5xQVjNjWnUACSD3Ys6A2ER8jLncCxWS5ffB4GK3h$
 >

Reply via email to