<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Suppose I have a function f at sample points x, with x and f both stored as Vec distributed structures. What I would like to do is compute an estimate of the anti derivative of f,<div class=""><br class=""></div><div class="">\int_a^x f(s)ds</div><div class=""><br class=""></div><div class="">for a<= x <=b.<br class=""><div class=""><br class=""></div><div class="">One way I can see how to compute this efficiently is to do the numerical quadrature on each node, and then use standard MPI to send the successive cumulative quantity from processor 0 to 1 to 2, and so on. I am wondering if there is a “PETSc” way to do this kind of calculation, as opposed to relying on MPI code.</div><div class=""><br class=""><div class="">
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">-gideon</span>
</div>
<br class=""></div></div></body></html>