Hi Nicola,
Today, Jill and I sat down and worked out how to get a voronoi
tesselation plotted in yt, using only existing machinery. (We're
going to try out getting a new set of machinery very soon...)
Quantitative analysis should work just fine without any chances, but
for visualizing things like slices and projections, we came up with
this:
def nearest_neighbor(field, data):
pos = data["PartType0", "particle_position"].in_units("code_length")
dens = data["PartType0", "Density"].in_units("g/cm**3")
rv = data.smooth(pos, [dens], method="nearest", nneighbors=1)
# Now some quick unit conversions.
rv = data.apply_units(rv, "g/cm**3")
return rv
yt.add_field(("deposit", "PartType0_nn"), function = nearest_neighbor,
validators = [yt.ValidateSpatial(0)],
units = "g/cm**3")
This sets up a derived field that deposits the density of the nearest
particle into each mesh point for the image. It own't look good
unless you also increase the resolution; we did this, although keep in
mind that our simulation is pretty small:
ds = yt.load("snap_029.hdf5", over_refine_factor=4, n_ref=64)
the over_refine_factor=4 means to use 2**4 == 16 zones on a side for
the octree mesh, where a new level is added every time n_ref (64)
particles are in an Oct.
-Matt
On Mon, Apr 27, 2015 at 10:08 AM, Jill Naiman
Hi Nicola,
I am also interested in supporting Voroni-Delaunay tessellations so feel free to keep me in the loop! I was going to try to start writing a front end for Arepo at some point (which uses them), but I didn't have a specific time schedule in mind.
Cheers, -Jill
On Mon, Apr 27, 2015 at 6:16 AM, Matthew Turk
wrote: Hi Nicola,
Thanks for writing! There's work being done on unstructured meshes right now, and the timeline is that we're aiming to have support for tetrahedra, hexahedra, and wedges by the end of May. Jill Naiman and I are sprinting on this the next couple weeks. That doesn't *quite* get you to what you're looking for, but it's a slightly different situation for voronoi tesselations anyway, since they are both more complex and simpler to define.
What would be possible, right now, would be to load in the data as particles, visualize it (by over-refining the mesh by a good amount and using nearest-neighbor mesh deposition), and if you have the volumes stored in advance, do quantitative analysis. Computing the volumes on the fly isn't yet possible (but could be implemented) and hopefully in the next couple weeks it'll be a lot easier to make visualizations without over-refining the mesh.
Please feel free to stop by IRC sometime to chat more about this, and if you are able to give a try to loading in as particles, let us know how that goes.
-Matt
On Sun, Apr 26, 2015 at 11:57 AM, Nicola Clementel
wrote: Dear yt developer,
I would like to use yt to visualise the output from the SimpleX radiative transfer code. Due to the "Voroni-Delaunay" unstructured grid use in the code the output ‘cells’ are tetrahedra.
From a firs look into the code and in the documentation, I was not able to find if this kind of unstructured grid are already supported in yt or if something similar is under development. If one of the other code have something similar already implemented that I can use as guideline it would be incredibly helpful!
Thanks,
Nicola Clementel _______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
-- Jill P. Naiman, Ph.D. Harvard-Smithsonian Center for Astrophysics jill.naiman@cfa.harvard.edu www.astroblend.com www.avriot.com
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org