[yt-users] yt-3.0 density gradient

Lile Wang wll9004 at gmail.com
Fri Aug 8 15:49:38 PDT 2014


Hi Nathan,

Yep, this really helps. It is relatively easy to guess that the problem is related to the ghost regions, yet I could not find the exact point about it.

Thanks a lot!

Cheers,
Lile

----------------------------------------------------------- 
Lile 'Patrick' Wang 
Dept. of Astroph. Sci., Princeton University, NJ 08544 USA
Website     : http://www.astro.princeton.edu/~lilew/
Tel (Mobile): +1-(734)-834-3936 
Tel (GVoice): +1-(510)-926-6831 
-----------------------------------------------------------

> 在 Aug 8, 2014,18:04,Nathan Goldbaum <nathan12343 at gmail.com> 写道:
> 
> Hi Lile,
> 
> This is due to a known issue in yt-3.0.  Right now ghost zone generation has only been implemented for periodic boundary conditions. In yt-2, all simulations were assumed to have periodic boundary conditions, so it would incorrectly assume that for your dataset and generate ghost zones as if it were periodic.
> 
> Instead of silently generating incorrect results, yt-3 now issues the error you're seeing when trying to select data outside of the simulation domain for non-periodic datasets.
> 
> Improving support for ghost zones at the simulation boundary for non-periodic datasets is on the roadmap for yt 3.1: https://trello.com/c/lLlqF0zp
> 
> You should be able to "cheat" and tell yt that your dataset is periodic when it really isn't by doing the following:
> 
> ds = yt.load(filename)
> ds.periodicity = (True, True, True)
> 
> Hope that's helpful,
> 
> Nathan
> 
> 
>> On Fri, Aug 8, 2014 at 2:58 PM, Lile Wang <wll9004 at gmail.com> wrote:
>> Hi all,
>> 
>> I am just worried about the problem associated to the density gradient field in yt-3.0.
>> 
>> When I was trying to get the gradient of density field along z (actually any) direction, I got this error message (last few lines) when calling data[ 'density_gradient_z' ]:
>> ~/lilew/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.pyc in selector(self)
>>     529         if sclass is None:
>>     530             raise YTDataSelectorNotImplemented(self._type_name)
>> --> 531         self._selector = sclass(self)
>>     532         return self._selector
>>     533 
>> 
>> ~/lilew/yt-x86_64/src/yt-hg/yt/geometry/selection_routines.so in yt.geometry.selection_routines.RegionSelector.__init__ (yt/geometry/selection_routines.c:20276)()
>> 
>> RuntimeError: Error: bad Region in non-periodic domain along dimension 0. Region left edge = -0.01171875 code_length, Region right edge = 0.13671875 code_lengthDataset left edge = 0.
>> 0 code_length, Dataset right edge = 1.0 code_length
>> Similar things happen for the pressure gradient.
>> 
>> The data input was generated by Enzo with AMR. In comparison, it works well with yt-2.6, where I refer to the gradient by data[ 'gradDensityZ' ].
>> 
>> Any ideas are appreciated. Thanks!
>> 
>> Cheers,
>> Lile
>> 
>> 
>> ----------------------------------------------------------- 
>> Lile 'Patrick' Wang 
>> Dept. of Astroph. Sci., Princeton University, NJ 08544 USA
>> Website     : http://www.astro.princeton.edu/~lilew/
>> Tel (Mobile): +1-(734)-834-3936 
>> Tel (GVoice): +1-(510)-926-6831 
>> ----------------------------------------------------------- 
>> 
>> 
>> _______________________________________________
>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20140808/5d33de5d/attachment.html>


More information about the yt-users mailing list