-
Notifications
You must be signed in to change notification settings - Fork 67
What do expressions look like?
This is a scratch pad for the types of expressions we want to support.
An expression that reduces to a single variable. Example types:
- bool (stored as an integer)
- integer
- double
- vec3
Ex
Queries compute the result of an expression and stores the result into an identifier that can be accessed by other queries or triggers. This result can be any supported types (e.g., scalars or something more complex like a histogram). These named identifiers can serve as the building blocks for more complicated expressions.
Triggers evaluate an expression that results in a boolean value.
If true
, a set of Ascent actions are executed.
Since queries and triggers are actions within ascent, they execute many times during a simulation run, and with that comes a time history of each query that can be accessed.
Example syntax:
- bool:
max("pressure") > 10.0
- integer:
1 + 1
- double:
pow(1.0,0.5)
,magnitude(vec3(1.0, 2.0, 3.0) - coordinate(max("pressure")))
- vec3:
coordinate(max("pressure"))