inlcude XXX_EARLY and XXX_LATE modes in schedule documentation, update "if" in schedule.ccl

Create issue
Issue #463 closed
Roland Haas created an issue

Two patches to the documentation. The first adds short one sentence descriptions of GLOBAL-EARLY, GLOBAL-LATE, META-EARLY and META-LATE. The second changes the documented allowed "if" statements in schedule files from

if(CCTK_EQUALS(<parameter>, <value>)) { ... }

to

if(<expression>) { ... }

which is what is actually allowed (and commonly used). Looking at the schedule parser it seems that in fact everything that is not a STORAGE/COMM or SCHEDULE block (or comment) is copied verbatim into the C function (tested this only very sporadically). Should this be documented? This affects the flesh so I cannot commit them myself.

Keyword: documentation

Comments (3)

  1. Erik Schnetter
    • changed status to resolved
    • removed comment

    I applied these patches.

    Yes, it is the case that all lines that are not recognised are assumed to be C and are copied into the auto-generated code. I view this as an implementation shortcut that should be improved, not as something that should be documented. As the scheduled is constructed at startup and is immutable during execution, there is only a limited number of operations that make sense, and allowing arbitrary code here can lead to many problems that are difficult to diagnose and which would break encapsulation.

  2. Log in to comment