Is there somewhere the full documentation of the mathematical expression library used? I tried to take a look around, but didn't find anything.
In particular, I am curious if there are any demos of:
* the while statement (in an attempt to create a loop)
* the square_norm function (apparently defined as "square norm of a vector" - but it is not clear how to define a vector)
GUI math expression documentation
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4138
- Joined: Mon Feb 20, 2012 3:25 pm
Re: GUI math expression documentation
Hello,
I don't know of any documentation except the examples. There was a minimal documentation for the old MEI interpreter library, but that has been replaced with MEG (Generator replacing Interpretor) wich builds C code out of the given expressions. It will split declarations (outside loops) and asignments (inside loops), and you can look at a case's RESU/<run_id>/src/cs_meg*.c files of a case which has run (or neen initialized) to see what this looks like.
So in practice, you can any insert C code there, but for anything not very simple, I recommend user-defined functions rather than math expressions.
Though a loop for a fixed point algorithm for each face or cell of a zone would be a legitimate use of a formula...
Best regards,
Yvan
I don't know of any documentation except the examples. There was a minimal documentation for the old MEI interpreter library, but that has been replaced with MEG (Generator replacing Interpretor) wich builds C code out of the given expressions. It will split declarations (outside loops) and asignments (inside loops), and you can look at a case's RESU/<run_id>/src/cs_meg*.c files of a case which has run (or neen initialized) to see what this looks like.
So in practice, you can any insert C code there, but for anything not very simple, I recommend user-defined functions rather than math expressions.
Though a loop for a fixed point algorithm for each face or cell of a zone would be a legitimate use of a formula...
Best regards,
Yvan