Page 1 of 1

GUI math expression documentation

Posted: Wed Jun 07, 2023 8:48 am
by jcharris
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)

Re: GUI math expression documentation

Posted: Thu Jun 08, 2023 12:37 pm
by Yvan Fournier
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