[petsc-users] How to get a duoble array into petsc Vec?

Matthew Knepley knepley at gmail.com
Thu May 19 10:46:52 CDT 2011


2011/5/19 Dürrwang, Jürgen <Juergen.Duerrwang at iosb.fraunhofer.de>

> Hi,
>
>
>
> I am trying to put data form a double c array to an petsc vector. I tried
> to loop over each element like this petsc Vec[i] = double array[i], but I
> need a cast for that….has anybody an idea?
>

http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/src/vec/vec/examples/tutorials/ex3.c.html

   Matt


>
>
> Thanks Jürgen
>
>
>



-- 
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/20110519/8c926487/attachment.htm>


More information about the petsc-users mailing list