[Carpet] CCTK_{ORIGIN, DELTA}_SPACE() not set when entering local mode
Jonathan Thornburg
jthorn at aei.mpg.de
Fri May 26 20:05:44 CEST 2006
Hi, Erik,
> Looking at your example thorn source code again, I see the error.
> The macro DECLARE_CCTK_ARGUMENTS declares certain local variables and
> initialises them. In your routine, these are initialised in
> singlemap mode, not in local mode. The macro CCTK_ORIGIN_SPACE
> accesses these local variables. These are set to sentinel values
> that should catch your attention. (They are not undefined).
>
[[...]]
> You can place the definition DECLARE_CCTK_ARGUMENTS into the loop
> over all components. This will define the local variables correctly.
Voila! This fixes the problem in my test thorn... and in my real
code inside GZPatchSystem, too!
> Of course, you could also schedule your test code in local mode. Can
> you try this just for debugging purposes?
Alas, in my real code (inside GZPatchSystem) I'm doing this as part
of of building a bunch of data structures which need to mirror the Carpet
component structure. That is, I have a patch object, which owns a sequence
of component objects, etc. So unless I do some serious trickery I
need to start in singlemap mode (setting up the patch object) and then
climb a higher mode and then climb down to local mode (setting up each
component object in turn). So moving the DECLARE_CCTK_ARGUMENTS into
the loop-over-components is the nice solution here...
thanks for solving this problem for me!
ciao,
--
-- Jonathan Thornburg <jthorn at aei.mpg.de>
Max-Planck-Institut fuer Gravitationsphysik (Albert-Einstein-Institut),
Golm, Germany, "Old Europe" http://www.aei.mpg.de/~jthorn/home.html
"Washing one's hands of the conflict between the powerful and the
powerless means to side with the powerful, not to be neutral."
-- quote by Freire / poster by Oxfam
More information about the developers
mailing list