-
Notifications
You must be signed in to change notification settings - Fork 72
Expression Langauge
Matt Larsen edited this page Aug 25, 2019
·
14 revisions
- integer
- double
- mesh variables: strings, e.g.
"pressure"indicate a variable defined on the mesh. - bool: Note: only produced as the result of a comparison. Not sure we need keywords
trueandfalsesince I don't see how we would use it in practice.
Functions can return objects that contain values and attributes.
Idea: currently, vector math, e.g. v1+v2 is implemented in the binary op code. Perhaps there is a way that we can define objects in such a way that it contains the code that defines supported ops like an overloaded operator in c++. In the near term, it is simpler to just add a add(vector,vector) function. Additionally, its unclear how we will generate code for JIT derived expressions.
- Vector: a 3D vector created with the
vectorfunction, e.g.,vector(0,1,0).
- Math:
-,+,*,/,% - Comparison:
==,>=,<=,!=,>,< - Boolean: not implemented. We had the goal of being python like so maybe these should be
and,or, andnot, as opposed to&&,||, and!. For JIT, we can just substitute whatever we need back in. Note:notis a unary operator.
-