next up previous contents
Next: schedule.ccl Up: param.ccl Previous: Parameter Data Scoping Items   Contents


Parameter Object Specification Items

[EXTENDS|USES] <parameter type> <parameter name>[[<len>]] "<parameter description>"
[AS <alias>] [STEERABLE=<NEVER|ALWAYS|RECOVER>]
[ACCUMULATOR=<expression>] [ACCUMULATOR-BASE=<parameter name>]
{
  <parameter values>
} <default value>
where the options AS, STEERABLE, etc. following <parameter description> must all appear on one line. Note that the beginning brace ({) must sit on a line by itself; the ending brace (}) must be at the beginning of a line followed by <default value> on that same line.

  • The parameter values depend on the parameter type, which may be one of the following:
    INT
    The specification of parameter values takes the form of one or more lines, each of the form

          <range description> [::"<comment describing this range>"]
        
    Here a <range description> specifies a set of integers, and has one of the following forms:

          *                           # means any integer
          <integer>                   # means only <integer>
          <lower bound>:<upper bound> # means all integers in the range
                                      # from <lower bound> to <upper bound>
          <lower bound>:<upper bound>:<positive step>
                                      # means all integers in the range
                                      # from <lower bound> to <upper bound>
                                      # in steps of <positive step>
        
    where <lower bound> has one of the forms

          <empty field>   # means no lower limit
          *               # means no lower limit
          <integer>       # means a closed interval starting at <integer>
          [<integer>      # also means a closed interval starting at <integer>
          (<integer>      # means an open interval starting at <integer>
        
    and <upper bound> has one of the forms

          <empty field>   # means no upper limit
          *               # means no upper limit
          <integer>       # means a closed interval ending at <integer>
          <integer>]      # also means a closed interval ending at <integer>
          <integer>)      # means an open interval ending at <integer>
        

    REAL
    The range specification is the same as integers, except that here, no step implies a continuum of values. Note that numeric constants should be expressed as in C (e.g. 1e-10). Note also that one cannot use the Cactus types such as CCTK_REAL4 to specify the precision of the parameter; parameters always have the default precision.

    KEYWORD
    Each entry in the list of acceptable values for a keyword has the form

          <keyword value>, <keyword value> :: "<description>"
        
    Keyword values should be enclosed in double quotes. The double quotes are mandatory if the keyword contains spaces.

    STRING
    Allowed values for strings should be specified using regular expressions. To allow any string, the regular expression "" should be used. (An empty regular expression matches anything.) Regular expressions and string values should be enclosed in double quotes. The double quotes are mandatory if the regular expression or the string value is empty or contains spaces.

    BOOLEAN
    No parameter values should be specified for a boolean parameter. The default value for a boolean can be
    • True: 1, yes, y, t, true
    • False: 00, no, n, f, false
    Boolean values may optionally be enclosed in double quotes.

  • The parameter name must be unique within the scope of the thorn.

  • The default value must match one of the ranges given in the parameter type

  • A thorn can declare that it EXTENDS a parameter of another thorn. This allows it to declare additional acceptable values. By default it is acceptable for two thorns to declare the same value as acceptable.

  • If the thorn wants to simply use a parameter from another thorn, without declaring additional values, use USES instead.

  • [len] (where len is an integer), if present, indicates that this is an array parameter of len values of the specified type. (Note that the notation used above for the parameter specification breaks down here, as there must be square brackets around the length).

  • alias allows a parameter to appear as a different name in this thorn than its original name in another thorn. The name as seen in the parameter file is unchanged.

  • STEERABLE specifies when a parameter value may be changed. By default parameters may not be changed after the parameter file has been read, or on restarting from checkpoint. This option relaxes this restriction, specifying that the parameter may be changed at recovery time from a parameter file or at any time using the flesh routine CCTK_ParameterSet -- see the Reference Guide.

    The value RECOVERY is used in checkpoint/recovery situations, and indicates that the parameter may be altered until the value is read in from a recovery par file, but not after.

  • ACCUMULATOR specifies that this is an accumulator parameter. Such parameters cannot be set directly, but are set by other parameters who specify this one as an ACCUMULATOR-BASE. The expression is a two parameter arithmetical expression of 17#17 and 20#20. Setting the parameter consists of evaluating this expression successively, with 17#17 being the current value of the parameter (at the first iteration this is the default value) and 20#20 the value of the setting parameter. This procedure is repeated, starting from the default value of the parameter, each time one of the setting parameters changes.

  • ACCUMULATOR-BASE specifies the name of an ACCUMULATOR parameter which this parameter sets.


next up previous contents
Next: schedule.ccl Up: param.ccl Previous: Parameter Data Scoping Items   Contents