[Developers] If clauses in schedule

Ian Hinder hinder at gravity.psu.edu
Mon Apr 7 12:43:45 CDT 2008


Erik Schnetter wrote:
> On Apr 7, 2008, at 09:48:04, Ian Hinder wrote:
>> Erik Schnetter wrote:
>>> Schedule items in Cactus can have WHILE clauses, which means that they
>>> are executed while a certain condition are true.  I suggest to add IF
>>> clauses, which would mean that they are executed only if a certain
>>> condition is true.  The syntax is equivalent to WHILE clauses.
>>>
>>> This is different from the existing if statements, which are only
>>> evaluated once at startup.  The new if clauses are evaluated every
>>> time the schedule is traversed.
>>
>> Does this mean that the current implementation does not respect changes
>> to steerable parameters during a simulation, when those parameters are
>> used in if statements in schedule files?
>>
>> Your suggestion sounds like a good idea - it brings up the question of
>> why it was not done like that before.  Was there a design decision that
>> the schedule tree should be static?
> 
> 
> The schedule is calculated in the beginning.  It actually has to be
> calculated, since the dependencies have to be resolved and a correct
> order be determined.  The current if statements are evaluated once when
> the schedule is calculated.  This is used e.g. for choosing gauge
> conditions or evolution systems.

OK - in that case I think your suggestion is a very good idea. For
example, I might want to change a gauge condition at some point in the
inspiral, and the easiest way to do this would be to steer a parameter.

Would the current syntax be extended to allow the statements to be
recalculated, which might have backward compatibility issues, or will
there be a new syntax?  Perhaps we could find out if there are any cases
that broke by extending the old syntax, and fix those, as it would be
very confusing to have two types of "if" in the schedule file.

-- 
Ian Hinder
hinder at gravity.psu.edu
http://www.gravity.psu.edu/~hinder


More information about the Developers mailing list