[ET Trac] [Einstein Toolkit] #675: allow zero timelevels in STORAGE when timelevels are specified via parameter
Einstein Toolkit
trac-noreply at einsteintoolkit.org
Mon Nov 21 20:52:10 CST 2011
#675: allow zero timelevels in STORAGE when timelevels are specified via
parameter
-------------------------+--------------------------------------------------
Reporter: rhaas | Owner:
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: Cactus | Version:
Keywords: |
-------------------------+--------------------------------------------------
this allows to simply set timelevels=0 to turn off storage without having
to put an "if(do_something || timelevels > 0)" into schedule.ccl files. It
is also the only way to turn off storage inside of a GROUP of SCHEDULE
statement based on a condition (other than scheduling the item twice, once
with STORAGE, once without).
More complicated conditions require either (I believe):
a. the (ab)use of accumulors the way that GRHydro::GRHydro_hydro_excision
works (only all "and" or all "or" supported I think)
a. using undocumented behaviour and putting C code into schedule.ccl
{{{
const int compound_condition = condition_a || condition_b ? 3 : 2
SCHEDULE
{
STORAGE foo[compound_condition]
...
}}}
c. allow more than just identifiers within the '[]" brackets of STORAGE
(most likely one has to allow almost everything "{{{[^]]+}}}") then use
C's "?" operator to build up the complicated expression
Having 0 timelevels works trivially since eventually these STORAGE
statements end up in CCTK_GroupStorageIncrease which allows 0 timelevels.
--
Ticket URL: <https://trac.einsteintoolkit.org/ticket/675>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit
More information about the Trac
mailing list