[Carpet] question on grid structures and interpolation
Yosef Zlochower
yosef at astro.rit.edu
Thu Aug 30 16:31:08 CEST 2007
Hi,
I am trying to evolve curves using MoL. I have cactus arrays
loc_x, loc_y, loc_z, and dot_loc_x, dot_loc_y, dot_loc_z. I then
have dot_loc_[xyz] = INTERPOLATION(ADMBASE_VARS).
MoL will then handle the time evolution. Do I need to schedule this
routine in local mode for MoL to work correctly? Is there a way of finding
if the current level actually contains some point p?
Yosef
Erik Schnetter wrote:
> On Aug 30, 2007, at 08:40:19, Yosef Zlochower wrote:
>
>> Hi,
>>
>> I have a routine, which is scheduled in local mode, that
>> interpolated GFs
>> at specific points. I wanted to set up the routine so that it would only
>> do the interpolation if the current component of the current level
>> contains
>> the interpolation point. I tried to get the bounds of the current
>> component
>> using the code
>>
>> lx = CCTK_ORIGIN_SPACE(0);
>> ux = lx + (cctk_gsh[0] -1)*CCTK_DELTA_SPACE(0);
>> etc.
>>
>> My grid is set up so that I have n refinement levels about two separate
>> locations
>> (using the CarpetRegrid2 thorn). I found, however, that the range
>> (lx,ux) seems to
>> contain both centers for all refinement levels. Does this mean that I am
>> actually
>> using much bigger grids than I thought, or does the above calculation
>> only give
>> me results for a `virtual' grid which contains all components of the
>> real grids at
>> a particular refinement level?
>
> Hi Yosef,
>
> the information stored in the cGH can only represent a cuboid
> (rectangular) box. It therefore represents a box which is guaranteed
> to enclose all components of the current level, but not all grid
> points will actually exist as components. Yes, this is a "virtual" box.
>
>> In addition, would be the result if I attempt to interpolate a data
>> point from another
>> component of the same refinement level?
>
> Performing interpolations in local mode can lead to strange results.
> If there are several components per processor, then the interpolations
> will occur multiple times. They are mostly allowed for backward
> compatibility with code which doesn't know about modes -- you should
> try to use either global or level mode instead. Level mode
> interpolates from the current level, which seems to fit your problem.
>
> Interpolations are always global, so you can always get data from
> other processors (other components). All processors need to call the
> interpolation routines at the same time.
>
> If you really only want to interpolate if the current (this
> processor's) component of the current level contains the interpolation
> point, then I suggest to use a local interpolation instead. A local
> interpolation does not know about symmetry boundaries, but it is
> faster since it does not involve any communication, and it does not
> have to be called in unison on all processors. This is done by
> calling CCTK_InterpLocalUniform, which expects instead of grid
> function indices a description of the coordinate system and pointers
> to the arrays which you want to interpolate.
>
> In my language, a component is a cuboid 3D piece of data residing on a
> single processor. If you have two "refined regions", then these will
> still be broken up into multiple components. Note that these won't
> necessarily be two separate sets of components; if you have e.g. 2
> regions and 2 processors, then each region will become one component.
>
> -erik
>
> --Erik Schnetter <schnetter at cct.lsu.edu>
>
> My email is as private as my paper mail. I therefore support encrypting
> and signing email messages. Get my PGP key from www.keyserver.net.
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> developers mailing list
> developers at lists.carpetcode.org
> http://lists.carpetcode.org/listinfo/developers
>
More information about the developers
mailing list