[petsc-users] example to use GetVecType

Matthew Knepley knepley at gmail.com
Mon Dec 12 07:36:03 CST 2011


On Mon, Dec 12, 2011 at 7:27 AM, Dominik Szczerba <dominik at itis.ethz.ch>wrote:

> Is there a C example how to use GetVecType?
> I am trying to do something like
>
>        // VecType* type;
>        char type[1024];
>        ierr = VecGetType(b, type);
>

VecType t;

VecGetType(b, &t);
Printf("%s\n", t);

  Matt


>        ierr = PetscSynchronizedFPrintf(PETSC_COMM_WORLD, stderr, "%s\n",
> type); CHKERRQ(ierr);
>
> but always get this or another error like cannot convert 'char*' to
> 'const char**' or similar.
>
> Many thanks
> Dominik
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111212/0372a35b/attachment.htm>


More information about the petsc-users mailing list