You can look at VecSqrt() to see us do it. Matt
On Thu, Nov 5, 2009 at 3:10 AM, Aron Ahmadia <aja2111 at columbia.edu> wrote: > Hi Braxton, > > I don't think there's an explicit manual page in PETSc for doing it. > You would need to do: > > VecGetArray > VecGetOwnershipRange > > (iterate over range on data from array) > > VecRestoreArray > > I cc the PETSc user's list in case anyone else has a brighter idea. > > Cheers, > A > > On Thu, Nov 5, 2009 at 3:40 AM, Braxton Osting <braxtono at gmail.com> wrote: > > aron, > > > > last year you showed abby and I a slick way to apply a function to a > > petsc vec pointwise. i can't seem to find that manual page now. do you > > remember it? > > > > thanks, > > b > > > -- 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/20091105/29467e8c/attachment.htm>
