Scott
Your "inelegant" solution is correct.
The most elegant way is
BEGIN_GLOBAL_MODE(cctkGH) { ENTER_LEVEL_MODE(cctkGH, 0) { // code } LEAVE_LEVEL_MODE; } END_GLOBAL_MODE;
-erik
On Mon, May 20, 2013 at 5:35 PM, Scott Hawley scott.hawley@belmont.eduwrote:
Hi, I can't seem to get the right combinations of modes correct...
I want to do a set of operations on the base grid, i.e. reflevel==0.
I've used BEGIN_REFLEVEL_LOOP before, but I no longer want a loop, just level zero. I'm trying this....
BEGIN_GLOBAL_MODE (cctkGH) { BEGIN_LEVEL_MODE (cctkGH) { SWITCH_TO_LEVEL( cctkGH, 0) {
//my other code here... } END_SWITCH_TO_LEVEL; } END_LEVEL_MODE;} END_GLOBAL_MODE;
...but I get a failed assertion: Assertion failed: (not is_global_mode()), function level_escape, file /Users/shawley/Cactus/configs/bruiser/build/Carpet/modes.cc, line 1123.
If I take out the two lines with "GLOBAL_MODE", I get the same failed assertion.
What's the proper way to implement this? Thanks, Scott
P.S.- For now, I'll just use...
BEGIN_GLOBAL_MODE (cctkGH) { BEGIN_REFLEVEL_LOOP (cctkGH) {
if (reflevel != 0) break; //my other code here....} END_REFLEVEL_LOOP; } END_GLOBAL_MODE;
...but this seems pretty inelegant.
Users mailing list Users@einsteintoolkit.org http://lists.einsteintoolkit.org/mailman/listinfo/users