[yt-users] ghost zones and non-periodic boundary conditions

j s oishi jsoishi at gmail.com
Sat Oct 23 11:07:09 PDT 2010


Hi everyone,

Thanks! I'm not sure it's really worth it to modify yt in this way
until I can figure out how to get enzo to dump ghost zones, and I'm
not sure that's necessary either if I can figure out my bug.

I appreciate all your help.

j

On Sat, Oct 23, 2010 at 10:33 AM, Matthew Turk <matthewturk at gmail.com> wrote:
> Hi Jeff,
>
> yt assumed periodicity, simply because that covered the vast majority
> of the situations that the ghost zones were used in -- it only becomes
> an issue in the grids that touch the domain edges.  You can see this
> in yt/utilities/data_point_utilities.c around line 1014 where it takes
> the modulo of the integer location with dw[].  This is something of
> obtuse code, but I'd be happy to help modify it to meet your needs.
>
> Rick -- I think it would be very valuable if you could assist Dave in
> making this option available in the main Enzo branch.  At that point,
> a simple subclass of the IOHandler would handle obtaining the ghost
> zones; this would also speed up volume rendering substantially.
>
> -Matt
>
> On Sat, Oct 23, 2010 at 9:26 AM, Rick Wagner <rwagner at physics.ucsd.edu> wrote:
>> Hi John,
>>
>> Actually, some users have modified Enzo to output ghost zones (e.g., Dave), but it's certainly not the norm.
>>
>> --Rick
>>
>> On Oct 23, 2010, at 9:12 AM, John Wise <jwise at astro.princeton.edu> wrote:
>>
>>> Hi Jeff,
>>>
>>> I'm not exactly sure what kind of assumptions the retrieve_ghost_zones() routine makes about the boundary conditions, but I can answer your Enzo question.  Enzo never outputs the ghost zones, and they are always recreated when restarting a simulation.  By your description, it looks like yt is assuming periodic boundary conditions and filling the ghost zones.  I tried to look in the source, but I couldn't find where periodicity is used in the covering_grid, and whether that can be changed to something else.
>>>
>>> John
>>>
>>> On 10/23/2010 02:50 AM, j s oishi wrote:
>>>> Hi all,
>>>>
>>>> I have a question which is kind of a yt question and kind of an enzo
>>>> question, so first off, my apologies to the non-enzo users. I have
>>>> something that quite clearly appears to be a boundary value problem on
>>>> a non-periodic boundary condition. My first method of attack is to
>>>> load the (single) root grid data object with its ghost zones:
>>>>
>>>> pf = load(data)
>>>> gz = pf.h.grids[0].retrieve_ghost_zones(2,'y-velocity')
>>>>
>>>> However, when I do this on a sample I believe not to have the bug, it
>>>> appears that yt is loading periodic boundary conditions in the
>>>> non-periodic direction: the first ghost zone on the lower y boundary
>>>> is exactly equal to the second-to-top active zone, and the second
>>>> lower y ghost zone exactly equals the top active zone. More
>>>> concretely,
>>>>
>>>> gz['y-velocity'][:,0,2] always equals gz['y-velocity'][:,-4,2]
>>>>
>>>> and
>>>>
>>>> gz['y-velocity'][:,1,2] always equals gz['y-velocity'][:,-3,2]
>>>>
>>>> This is very clear in the (2D) case at hand, since the velocity field
>>>> is a large gradient in the y-direction.
>>>>
>>>> Is it possible that enzo is not outputting its ghost zones, and yt is
>>>> simply filling using a periodic method? Or does enzo always output
>>>> ghost zones, and this is simply a manifestation of my bug?
>>>>
>>>> I realize this is not a very clear question, but I'm a bit confused myself.
>>>>
>>>> thanks,
>>>>
>>>> j
>>>> _______________________________________________
>>>> 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
>>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list