xx Trigger

Trigger

Frank Lxffler <knarf@cct.lsu.edu>

October 23, 2012

Abstract

Trigger can be used to steer (change) parameters depending on data from the simulation. Examples would be enabling refinement levels when the density reaches a certain threshold or enabling output within a certain time window.

1 Parameters

TriggerxNumber specifies the total number of triggers you want to specify.

TriggerxCheckedxVariable[index] holds the fully specified variable name that the trigger with that index should depend on. Leave it empty if it shouldn’t.

TriggerxCheckedxParameterxThorn and TriggerxCheckedxParameterxName hold the information about which parameter this trigger should depend on.

TriggerxRelation defines a mathematical relation between whatever is checked and a some value. Allowed values are , , and .

TriggerxCheckedxValue specifies the actual value that is used for the comparison. This has to be a real number.

TriggerxReduction specifies which reduction should be used in case you specified a grid function as variable to be checked. Leave empty for grid scalars and parameters.

TriggerxReaction specifies what should happen in case the check above is true.

”output”: some output should be enabled. File names will be prefixed with ”triggerx”.

TriggerxOutputxMethod specifies which type of output should be enabled.

TriggerxOutputxVariables specifies a space-separated list of fully qualified variable names to be output.

”steerparam”: Steer a parameter

TriggerxSteeredxParameterxThorn Name of the thorn of the parameter to be steered.

TriggerxSteeredxParameterxName Name of the parameter to be steered.

TriggerxSteeredxParameterxValue Value the parameter should be steered to. Given as string, as it could be of any Cactus type.

”steerscalar”: Change the value of a scalar

TriggerxSteeredxScalar: Name of the scalar to be changed

TriggerxSteeredxScalarxIndex: Index of the scalar (in case it happens to be an array of scalars, otherwise leave it at 0)

TriggerxSteeredxScalarxValue: Value the scalar should be changed to - given as string

TriggerxDebug: Turn on Debug output (not generally recommended, but useful if something doesn’t trigger as expected). This is an integer, allowed is 0 or 1.

2 Parameters

11 triggerxcheckedxparameterxname 10 Scope: private01  STRING

11 Description: parameter name to be checked for

11 Range 10 01 Default: (none)
11 .+  10 parameter name
11 ˆ$  10 An empty string to trigger nothing

11

11 triggerxcheckedxparameterxthorn 10 Scope: private01  STRING

11 Description: thorn of parameter to be checked for

11 Range 10 01 Default: (none)
11 .+  10 thorn name
11 ˆ$  10 An empty string to trigger nothing

11

11 triggerxcheckedxvalue  10 Scope: private01  REAL

11 Description: triggered value for checked variable

11 Range 10 01 Default: 1.0
11 *:*  10 value to be triggered for

11 triggerxcheckedxvariable  10 Scope: private01  STRING

11 Description: variable to be checked for

11 Range 10 01 Default: (none)
11 .+  10 fully qualified variable name, ’param’ for a parameter
11 ˆ$  10 An empty string to trigger nothing

11

11 triggerxdebug  10 Scope: private01  INT

11 Description: turnes on debug messages

11 Range 10 01 Default: (none)
11 0:1  10 Only 0 (off, default) or 1 (on)

11

11 triggerxnumber  10 Scope: private01  INT

11 Description: Number of triggers

11 Range 10 01 Default: (none)
11 0:10  10 The number of triggers that are defined

11

11 triggerxonce  10 Scope: private01  INT

11 Description: Should this trigger only be triggered (and checked) once?

11 Range 10 01 Default: (none)
11 0:1  10 0 (no), 1 (yes)

11

11 triggerxoutputxmethod  10 Scope: private01  STRING

11 Description: IO-output method for this trigger

11 Range 10 01 Default: 1D
11 .+  10 an enabled IO-method
11 ˆ$  10 An empty string for no output

11

11 triggerxoutputxvariables  10 Scope: private01  STRING

11 Description: variable to be put out ’param’ for parameter

11 Range 10 01 Default: (none)
11 .+  10 Space-separated list of fully qualified variable name
11 ˆ$  10 An empty string to trigger nothing

11

11 triggerxreaction  10 Scope: private01  KEYWORD

11 Description: how to react on a positive trigger

11 Range 10 01 Default: output
11 output  10 enable output
11 steerparam  10 steer parameter
11 steerscalar  10 steer grid scalar

11

11 triggerxreduction  10 Scope: private01  STRING

11 Description: valid reduction method

11 Range 10 01 Default: (none)
11 .+  10 some relations e.g. ’norm2’
11 ˆ$  10 An empty string for no reduction (for scalars)

11 triggerxrelation  10 Scope: private01  STRING

11 Description: relation operator for checked variable

11 Range 10 01 Default: >
11 see [1] below  10 some relations

11

\^{\textless}|{\textgreater}|==|!=\$

11 triggerxsteeredxparameterxname 10 Scope: private01  STRING

11 Description: parameter name to be changed

11 Range 10 01 Default: (none)
11 .+  10 parameter name
11 ˆ$  10 An empty string to change nothing

11

11 triggerxsteeredxparameterxthorn 10 Scope: private01  STRING

11 Description: thorn of parameter to be changed

11 Range 10 01 Default: (none)
11 .+  10 thorn name
11 ˆ$  10 An empty string to change nothing

11

11 triggerxsteeredxparameterxvalue 10 Scope: private01  STRING

11 Description: parameter value to be changed to

11 Range 10 01 Default: (none)
11 .+  10 parameter value
11 ˆ$  10 can be empty

11

11 triggerxsteeredxscalar  10 Scope: private01  STRING

11 Description: Scalar to be changed

11 Range 10 01 Default: (none)
11 .+  10 scalar name
11 ˆ$  10 can be empty

11

11 triggerxsteeredxscalarxindex 10 Scope: private01  INT

11 Description: Scalar index to be changed

11 Range 10 01 Default: (none)
11 0:*  10 >=0 11

11 triggerxsteeredxscalarxvalue 10 Scope: private01  STRING

11 Description: Scalar value to be changed to

11 Range 10 01 Default: (none)
11 .+  10 scalar value
11 ˆ$  10 can be empty

3 Interfaces

General Implements: trigger

Inherits: io

Grid Variables

3.0.1 PRIVATE GROUPS

11 x Group Names x 10 x Variable Names x01 Details x 11 x
11 triggerxvars 10 01 compact 11 0
11                    10 triggerxcctkxiteration01 description 11 Scalars for the triggers
11                    10 triggerxcctkxtime 01 dimensions 11 0
11                    10                    01 distribution 11 CONSTANT
11                    10                    01 group type 11 SCALAR
11                    10                    01  tags 11 checkpoint=”no”
11                    10                    01 timelevels 11 1
11                    10                    01 variable type 11 REAL

11

4 Schedule This section lists all the variables which are assigned storage by thorn CactusUtils/Trigger. Storage can either last for the duration of the run (Always means that if this thorn is activated storage will be assigned, Conditional means that if this thorn is activated storage will be assigned for the duration of the run if some condition is met), or can be turned on for the duration of a schedule function.

Storage NONE

Scheduled Functions

CCTKxSTARTUP x triggerxstartup x startup routine x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxPARAMCHECK x triggerxparamcheck x parameter checking x

11 x 11 Language: 11 c
11 x 11 Type:  11 function

11

CCTKxANALYSIS x triggerxcheck x test x

11 x 11 Before: 11 ahfinderdirectxsetupupdate
11 x 11 Language: 11 c
11 x 11 Options: 11 global-early
11 x 11 Storage: 11 triggerxvars
11 x 11 Type:  11 function