[yt-users] load spherical polar coordinate data with mesh refinement in HDF5

Michael Zingale michael.zingale at stonybrook.edu
Mon Apr 4 14:38:10 PDT 2016


I think that the main mapping functions that stellar people are thinking
about are these:

http://math.boisestate.edu/~calhoun/www_personal/papers/ca-he-le-2008.pdf

On Mon, Apr 4, 2016 at 5:35 PM, Matthew Turk <matthewturk at gmail.com> wrote:

> Hi Mike and Sam,
>
> That makes sense; one thing we need to be slightly careful about is if
> the shape function needs to be modified considerably, or if it's
> multi-variate.  Sam, I'm sorry I missed your message or didn't put
> things together, but I think this is worth looking into further.  If
> you'd like to correspond about this, yt-dev might be a better choice,
> or we can chat offline and I'll send a summary.
>
> On Mon, Apr 4, 2016 at 4:31 PM, Michael Zingale
> <michael.zingale at stonybrook.edu> wrote:
> > This mapped grid capability is similar to what Sam Jones e-mailed the
> list
> > about a week or two ago.  Their grid is logically Cartesian, but a
> mapping
> > function transforms it to a different shape.
> >
> > On Mon, Apr 4, 2016 at 5:13 PM, Matthew Turk <matthewturk at gmail.com>
> wrote:
> >>
> >> Hi Yan-Fei,
> >>
> >> I've thought about this a bunch.  I *think* that it's feasible, with
> >> only very minor modifications to the existing system, as long as
> >> there's a mapping we can construct for the spacing, and that mapping
> >> is unique across the grids at fixed levels.
> >>
> >> What I mean by that is, if we can have a function that operates such
> >> that it's given a set of integer values (integer coordinate [xyz],
> >> resolution level) and it can return a position and a width (in linear
> >> space), we can implement this without too much trouble.  I can see
> >> some tricky things relating to how to switch between log/lin
> >> visualization, but they should be surmountable. (And presumably, if
> >> you have a log spaced dataset, you won't want linear viz terribly
> >> frequently anyway.)  Generating the integer coordinate might be the
> >> funniest part; in linear space it's just
> >> (pos-domain_left_edge)/local_dx, but I don't know the specifics of
> >> your data format.
> >>
> >> -Matt
> >>
> >> On Thu, Mar 31, 2016 at 9:55 AM, Jonah Miller
> >> <jonah.maxwell.miller at gmail.com> wrote:
> >> > Hi Yan-Fei,
> >> >
> >> > I don't think this will work out of the box. Matt may have more
> insight
> >> > here.
> >> >
> >> > Best,
> >> > Jonah
> >> >
> >> >
> >> > On 16-03-31 01:03 AM, Jiang, Yanfei wrote:
> >> >
> >> > Hi Matt and Jonah,
> >> >
> >> >     I think I can use load_hexahedral_mesh to load data from each mesh
> >> > block. But it cannot use three arrays (xgrid, ygrid, zgrid) to define
> >> > the
> >> > whole mesh due to mesh refinement. I guess I can create a dict to
> >> > collect
> >> > the data from each mesh block, as in load_amr_grids (but not the
> same).
> >> > The
> >> > question is will such a data structure (a dict of hexahedral_mesh) be
> >> > recognized by yt?
> >> >
> >> > On Wed, Mar 30, 2016 at 6:01 PM, Jonah Miller
> >> > <jonah.maxwell.miller at gmail.com> wrote:
> >> >>
> >> >> Hi Yanfei,
> >> >>
> >> >> To add to Matt's comment. Here is the documentation for using
> >> >> load_hexahedral_mesh.
> >> >>
> >> >>
> >> >>
> http://yt-project.org/doc/examining/loading_data.html#semi-structured-grid-data
> >> >>
> >> >>
> >> >>
> http://yt-project.org/doc/reference/api/generated/yt.frontends.stream.data_structures.load_hexahedral_mesh.html
> >> >>
> >> >> Best,
> >> >> Jonah
> >> >>
> >> >>
> >> >> On 16-03-30 05:15 PM, Matthew Turk wrote:
> >> >>>
> >> >>> Hi Yanfei,
> >> >>>
> >> >>> This is possible -- but it will also slow some things down.  You can
> >> >>> use the load_hexahedral_mesh function, and there're examples of
> this.
> >> >>> This takes away some of the optimizations that regular grids can do,
> >> >>> but we're hoping to add them back in shortly.  Like the other
> >> >>> functions it too takes a geometry argument.
> >> >>>
> >> >>> -Matt
> >> >>>
> >> >>> On Wed, Mar 30, 2016 at 2:49 PM, Jiang, Yanfei
> >> >>> <yanfei.jiang at cfa.harvard.edu> wrote:
> >> >>>>
> >> >>>> Hi Jonah,
> >> >>>>
> >> >>>>     I am able to load the data to yt now using load_amr_grids(). I
> >> >>>> notice
> >> >>>> that it can also set geometry to spherical. This is great. But to
> >> >>>> make
> >> >>>> life
> >> >>>> more complicate. Is it possible to let yt know that the grid is
> >> >>>> logarithmic?
> >> >>>> Currently, load_amr_grids() just take left and right edges of each
> >> >>>> block. I
> >> >>>> guess yt assumes the grid is uniform between left and right edges.
> Is
> >> >>>> it
> >> >>>> possible to provide arrays of coordinate values for each cell in
> each
> >> >>>> block?
> >> >>>>
> >> >>>> Thanks.
> >> >>>>
> >> >>>> On Tue, Mar 29, 2016 at 6:58 PM, Jonah Miller
> >> >>>> <jonah.maxwell.miller at gmail.com> wrote:
> >> >>>>>
> >> >>>>> Hi Yan-Feng,
> >> >>>>>
> >> >>>>> I haven't tried it, but I think there is functionality for this.
> You
> >> >>>>> can
> >> >>>>> use the load_amr_grids() function which can load amr data in
> >> >>>>> Cartesian,
> >> >>>>> spherical, or polar coordinates. Here's the documentation:
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> http://yt-project.org/doc/examining/generic_array_data.html#loading-numpy-array
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> >> >>>>>
> http://yt-project.org/doc/reference/api/generated/yt.frontends.stream.data_structures.load_amr_grids.html#yt.frontends.stream.data_structures.load_amr_grids
> >> >>>>>
> >> >>>>> Best,
> >> >>>>> Jonah
> >> >>>>>
> >> >>>>> On Tue, Mar 29, 2016, 6:35 PM Jiang, Yanfei
> >> >>>>> <yanfei.jiang at cfa.harvard.edu>
> >> >>>>> wrote:
> >> >>>>>>
> >> >>>>>> Hi,
> >> >>>>>>           I have some data from a new version of Athena
> >> >>>>>> simulations.
> >> >>>>>> It is
> >> >>>>>> in spherical polar coordinate with mesh refinement written in
> HDF5.
> >> >>>>>> The data
> >> >>>>>> structure is similar to flash data but not the same. Does anyone
> >> >>>>>> have
> >> >>>>>> suggestions to load such data to yt directly?
> >> >>>>>>
> >> >>>>>> Thank you.
> >> >>>>>> --
> >> >>>>>> Yan-Fei Jiang
> >> >>>>>>
> >> >>>>>> Einstein Fellow
> >> >>>>>> Harvard-Smithsonian Center for Astrophysics
> >> >>>>>> 60 Garden Street, Cambridge MA USA 02138
> >> >>>>>> _______________________________________________
> >> >>>>>> yt-users mailing list
> >> >>>>>> yt-users at lists.spacepope.org
> >> >>>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >> >>>>>
> >> >>>>>
> >> >>>>> _______________________________________________
> >> >>>>> yt-users mailing list
> >> >>>>> yt-users at lists.spacepope.org
> >> >>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >> >>>>>
> >> >>>>
> >> >>>>
> >> >>>> --
> >> >>>> Yan-Fei Jiang
> >> >>>>
> >> >>>> Einstein Fellow
> >> >>>> Harvard-Smithsonian Center for Astrophysics
> >> >>>> 60 Garden Street, Cambridge MA USA 02138
> >> >>>>
> >> >>>> _______________________________________________
> >> >>>> yt-users mailing list
> >> >>>> yt-users at lists.spacepope.org
> >> >>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >> >>>>
> >> >>> _______________________________________________
> >> >>> yt-users mailing list
> >> >>> yt-users at lists.spacepope.org
> >> >>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >> >>
> >> >>
> >> >> _______________________________________________
> >> >> yt-users mailing list
> >> >> yt-users at lists.spacepope.org
> >> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Yan-Fei Jiang
> >> >
> >> > Einstein Fellow
> >> > Harvard-Smithsonian Center for Astrophysics
> >> > 60 Garden Street, Cambridge MA USA 02138
> >> >
> >> >
> >> > _______________________________________________
> >> > yt-users mailing list
> >> > yt-users at lists.spacepope.org
> >> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >> >
> >> >
> >> >
> >> > _______________________________________________
> >> > yt-users mailing list
> >> > yt-users at lists.spacepope.org
> >> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >> >
> >> _______________________________________________
> >> yt-users mailing list
> >> yt-users at lists.spacepope.org
> >> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> >
> >
> >
> > --
> > Michael Zingale
> > Associate Professor
> >
> > Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY
> > 11794-3800
> > phone:  631-632-8225
> > e-mail: Michael.Zingale at stonybrook.edu
> > web: http://www.astro.sunysb.edu/mzingale
> > github: http://github.com/zingale
> >
> >
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



-- 
Michael Zingale
Associate Professor

Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY
11794-3800
*phone*:  631-632-8225
*e-mail*: Michael.Zingale at stonybrook.edu
*web*: http://www.astro.sunysb.edu/mzingale
github: http://github.com/zingale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160404/9f1e1ed2/attachment-0001.htm>


More information about the yt-users mailing list