[petsc-users] How to use PetscViewerVTKGetDM

陳宗興 barrydog505 at gmail.com
Fri Nov 2 09:58:17 CDT 2018


Hi,

I have created a DMPlex using DMPlexCreateFromFile,
and I use PetscObjectSetName to create the name of DM.
I have occurred some problem when I try to use PetscViewerVTKGetDM.
This is what I write:

     DM   dm;
     ...
     PetscObjectSetName((PetscObject) dm, "Mesh");
     ...
     PetscViewerVTKGetDM(viewer, (PetscObject) dm);

And here is the output of waring:
     warning: passing argument 2 of ‘PetscViewerVTKGetDM’ from incompatible
pointer type [-Wincompatible-pointer-types]
     ierr = PetscViewerVTKGetDM(viewer, (PetscObject) dm);CHKERRQ(ierr);
                                                                  ^
     note: expected ‘struct _p_PetscObject **’ but argument is of type
‘struct _p_PetscObject *'
     PETSC_EXTERN PetscErrorCode
PetscViewerVTKGetDM(PetscViewer,PetscObject*);

 ^~~~~~~~~~~~~~~~~~~

How can I fix it?

Thank you,

Barry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181102/fb84cb6c/attachment.html>


More information about the petsc-users mailing list