<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Feb 22, 2017 at 9:53 PM, Jennifer Swenson <span dir="ltr"><<a href="mailto:jswenson@smu.edu" target="_blank">jswenson@smu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_8015826590469633030WordSection1"><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif">Note: This has been updated from the original thread to contain the equation. I apologize for the previous error.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif">Dear PETSc Users, <u></u><u></u></span></p><div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif">As a part of my problem, I need to be able to look up the value of a scalar field (let's call it xi) that is defined via a somewhat non-trivial integral over a second scalar field (let's call it rho).  Mathematically we have<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif">xi(x,t) = max( 0.1 – 1/L int{ rho_1[r(s),t] + rho_2[r(s),t] } ds )</span></p></div></div></div></blockquote><div><br></div><div>This sounds like the Radon Transform to me: <a href="https://en.wikipedia.org/wiki/Radon_transform">https://en.wikipedia.org/wiki/Radon_transform</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_8015826590469633030WordSection1"><div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif">What we're modeling here is the average energy loss of an energetic ion that is passing through a solid material.  Ions can arrive with a specified direction, so to calculate xi at each point, we have to perform line integrals back toward the ion source, and keep track of how much mass the ion has passed through.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif">In a serial algorithm, one can in principle generate xi by working from the top down, subtracting energy from each row of grid points given information on the density field.  However, it is not clear how one could develop a robust parallel algorithm, much less one that works within the PETSc framework.</span></p></div></div></div></blockquote><div><br></div><div>I cannot understand everything from the above, but how about a simplified model. Suppose you have a single</div><div>ion source somewhere that radiates isotropically. Now suppose you have a division of space into rectangles, such</div><div>as would be produced by DMDA. For each rectangle on a given process, I can independently calculate all the paths</div><div>through it from the known source point, which would provide increments to the line integral.</div><div><br></div><div>Now it gets complicated, or at least I do not have a simple way to do this. You have to scan the processes in the order</div><div>in which they are illuminated by the source.This can be calculated for rectangular (probably for convex) regions in a<br></div><div>straightforward way. Then you communicate along the chain, updating the increments. I think you could renumber the</div><div>processes to match some total order from the partial order of illumination and just use MPI_Scan(), but I can not sure.</div><div><br></div><div>However, this is an old problem, and my first thought is that someone would have already solved it. To the library!</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div class="gmail-m_8015826590469633030WordSection1"><div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif">I would very grateful for any help you can offer.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif"><u></u> <u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif">Sincerely,<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif">Jennifer Swenson<u></u><u></u></span></p></div><p class="MsoNormal"><span style="font-size:10pt;font-family:calibri,sans-serif"><u></u> <u></u></span></p></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div></div>