[petsc-users] implementing non-local scalar field -- updated

Matthew Knepley knepley at gmail.com
Thu Feb 23 09:57:40 CST 2017


On Wed, Feb 22, 2017 at 9:53 PM, Jennifer Swenson <jswenson at smu.edu> wrote:

> Note: This has been updated from the original thread to contain the
> equation. I apologize for the previous error.
>
>
>
> Dear PETSc Users,
>
>
>
> 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
>
>
>
> xi(x,t) = max( 0.1 – 1/L int{ rho_1[r(s),t] + rho_2[r(s),t] } ds )
>

This sounds like the Radon Transform to me:
https://en.wikipedia.org/wiki/Radon_transform


> 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.
>
>
>
> 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.
>

I cannot understand everything from the above, but how about a simplified
model. Suppose you have a single
ion source somewhere that radiates isotropically. Now suppose you have a
division of space into rectangles, such
as would be produced by DMDA. For each rectangle on a given process, I can
independently calculate all the paths
through it from the known source point, which would provide increments to
the line integral.

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
in which they are illuminated by the source.This can be calculated for
rectangular (probably for convex) regions in a
straightforward way. Then you communicate along the chain, updating the
increments. I think you could renumber the
processes to match some total order from the partial order of illumination
and just use MPI_Scan(), but I can not sure.

However, this is an old problem, and my first thought is that someone would
have already solved it. To the library!

  Thanks,

     Matt

I would very grateful for any help you can offer.
>
>
>
> Sincerely,
>
> Jennifer Swenson
>
>
>



-- 
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/20170223/fa69266f/attachment.html>


More information about the petsc-users mailing list