<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,</div><div dir="ltr"><br><div>I have created a DMPlex using DMPlexCreateFromFile,</div><div>and I use PetscObjectSetName to create the name of DM.</div><div>I have occurred some problem when I try to use PetscViewerVTKGetDM.</div><div>This is what I write:</div><div><br></div><div> DM dm;</div><div> ...</div><div> PetscObjectSetName((PetscObject) dm, "Mesh");</div><div> ...</div><div> PetscViewerVTKGetDM(viewer, (PetscObject) dm);</div><div><br></div><div>And here is the output of waring:</div><div> warning: passing argument 2 of ‘PetscViewerVTKGetDM’ from incompatible pointer type [-Wincompatible-pointer-types]</div><div> ierr = PetscViewerVTKGetDM(viewer, (PetscObject) dm);CHKERRQ(ierr);</div><div> ^</div><div> note: expected ‘struct _p_PetscObject **’ but argument is of type ‘struct _p_PetscObject *'</div><div> PETSC_EXTERN PetscErrorCode PetscViewerVTKGetDM(PetscViewer,PetscObject*);</div><div> ^~~~~~~~~~~~~~~~~~~</div><div><br></div><div>How can I fix it?</div><div><br></div><div>Thank you,</div><div><br></div><div>Barry</div><div><br></div><div><br></div></div></div></div></div></div></div></div></div>