You can look at VecSqrt() to see us do it.<br><br> Matt<br><br><div class="gmail_quote">On Thu, Nov 5, 2009 at 3:10 AM, Aron Ahmadia <span dir="ltr"><<a href="mailto:aja2111@columbia.edu">aja2111@columbia.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Braxton,<br>
<br>
I don't think there's an explicit manual page in PETSc for doing it.<br>
You would need to do:<br>
<br>
VecGetArray<br>
VecGetOwnershipRange<br>
<br>
(iterate over range on data from array)<br>
<br>
VecRestoreArray<br>
<br>
I cc the PETSc user's list in case anyone else has a brighter idea.<br>
<br>
Cheers,<br>
A<br>
<br>
On Thu, Nov 5, 2009 at 3:40 AM, Braxton Osting <<a href="mailto:braxtono@gmail.com">braxtono@gmail.com</a>> wrote:<br>
> aron,<br>
><br>
> last year you showed abby and I a slick way to apply a function to a<br>
> petsc vec pointwise. i can't seem to find that manual page now. do you<br>
> remember it?<br>
><br>
> thanks,<br>
> b<br>
><br>
</blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>