<html>#2956: CarpetX: Allow conditional expressions after SCHEDULE declarations
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Maxwell Rizzo</td></tr>
<tr><td style='text-align:right'> Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'> Version:</td><td></td></tr>
<tr><td style='text-align:right'> Type:</td><td>enhancement</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>minor</td></tr>
<tr><td style='text-align:right'>Component:</td><td>CarpetX</td></tr>
</table>
<p>Current Cactus/CarpetX behavior allows conditional expressions in <code>schedule.ccl</code>, but only before a <code>SCHEDULE foo</code> block. This means that routines whose <code>READS</code>/<code>WRITES</code> or other actions/metadata that depend on runtime parameters currently require multiple near-duplicate schedule blocks, one for each branch.</p>
<p>For example, a routine such as <code>function_set_xyz</code> may optionally read or write gridfunctions <code>x</code>, <code>y</code>, and <code>z</code> depending on parameters such as <code>param_set_x</code>, <code>param_set_y</code>, and <code>param_set_z</code>. Scheduling each branch properly would take 2^3 = 8 schedule blocks.</p>
<p>Allowing (single or multiple) conditional expressions after the scheduled routine declaration would let one schedule block cover all branches of behavior. The parser/build system could expand the conditional schedule metadata at compile time, while the actual selected branch would still be determined at runtime from result of the conditionals.</p>
<p>Should be a relatively safe,"opt-in" style feature that requires a thorn to move their conditionals somewhere that previously was invalid. In principle it does admit some risk if used improperly. A thorn could cover all possible branches determined by runtime parameters without explicitly scheduling them, supporting some branches of behavior accidentally.</p>
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2956/carpetx-allow-conditional-expressions'>https://bitbucket.org/einsteintoolkit/tickets/issues/2956/carpetx-allow-conditional-expressions</a></p>
</html>