[yt-users] Using AMR with inline python
Azton Wells
azton.wells at gmail.com
Thu Jul 14 10:04:42 PDT 2016
Thanks Matt for your reply.
I am using
rho = na.asarray(enzo.grid_data[enzo.grid_data.keys()[0]]["Density"])
to access the density, and then insert values into another field, so I'm
not using them for plotting or anything. So after checking the density of
a cell and setting the value 'emis' accordingly, I use
enzo.grid_data[enzo.grid_data.keys()[0]][field][cellx][celly][cellz]=enzo.grid_data[enzo.grid_data.keys()[0]][field][cellx][celly][cellz]+emis
to modify a field within the simulation. Unfortunately, the value 'emis'
that I am generating is volume dependent, so I need a method to find the
volume of the cell (in a way consistent with the two methods above, if
possible). Failing finding the volume, if I could find the AMR level, I
would automatically know the volume. Is this possible using the enzo
object?
Sorry if this is an obvious one, I am relatively new to enzo & yt.
Best,
Azton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20160714/8f358ba8/attachment.html>
More information about the yt-users
mailing list