Hi David,
I'm not sure if I know the best answer to your question. A priori
you have an "unstructured" mesh in flash - blocks with different
resolution positioned accordingly with the physical criteria for
refinement. The structure can become rather complicated. If you
need to read values of a scalar (dens) along a line (e.g. parallel to
x axis), you will need to come up with a fairly generic routine to do
that. Ideally you would want to interpolate values of the dens array
onto your line, since it can be crossing cells not at their centers.
One way to do this (the only one I can think of now) is to start from
a parametric equation for your line (x = x(s), y = y(s), z = z(s)).
Then do a loop over all blocks (note, each CPU will be going through
its own set of local blocks - good point to keep in mind), determine
whether each block is crossed by the line (find values of s that
satisfy [xyz]min <= [xyz](s) <= [xyz]max, where [xyz][minmax] are
block bounds), if the line crosses the block, loop over this block
cells (applying the same criteria, only now [xyz][minmax] are cell
bounds) and record values of dens array as a function of the
parameter s.
How's that? This routine doesn't do any interpolation of the
neighboring cells values, but it's a start. I hope it helps.
Best,
Georgi
On 31 May 2006, at 17:24, Farley, David wrote:
> Thanks Georgi,
>
> I am not sure we're talking about the same thing (or maybe I'm not
> understanding properly!). I do not want to assign values of dens
> to Flash, but rather want to read density as a fcn of x, eg. rho
> (x). I will use this rho(x) to determine where (x) laser light
> would be absorbed (depends on density). So, I want to read rho(x),
> locate the x with the density I'm looking for, and that's all I
> need. If you can write the code in your reply if you have a simple
> answer, this would be appreciated. Looping over all blocks and
> reading the dens profile for each block and then trying to string
> them together is a mess. thanks. Dave
>
>
> -----Original Message-----
> From: owner-flash-users@flash.uchicago.edu on behalf of Georgi
> Pavlovski
> Sent: Wed 5/31/2006 11:23 PM
> To: Farley, David
> Cc: Timur Linde; flash-users@flash.uchicago.edu
> Subject: Re: [FLASH-USERS] accessing the density profile
>
> Hi,
>
> leave the block numbers to flash. The simplest way is to code dens
> as a
> function of the physical coordinates (x,y,z). Loop over all blocks
> and
> assign values to the solnData array for "dens".
>
> - Georgi
>
>
> Farley, David wrote:
> > Is there an easy way to code density (rho) versus x for the whole
> > x-domain (i.e. across blocks)?? I can get the density profile
> for each
> > block, but to string them all together for the entire x-doamin is
> not
> > simple since block numbers vary through the x & y domains. I am
> trying
> > to re-write the heat source routine, and need to have rho vs x in
> a 1-D
> > array. Thanks. Dave
> >
>
> --
> ===================================================================
> Dr Georgi B. Pavlovski School of Physics and Astronomy
> Tel: +44-(0)-23-8059-2446 University of Southampton
> Fax: +44-(0)-23-8059-3910 Southampton SO17 1BJ, U.K.
> Email: gbp@phys.soton.ac.uk Web: www.astro.soton.ac.uk/~gbp
> ===================================================================
>
>
>
>
Received on Fri Jun 2 03:53:22 2006
This archive was generated by hypermail 2.1.8 : Thu Aug 31 2006 - 21:20:49 CDT