GUI math expression documentation

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
User avatar
jcharris
Posts: 48
Joined: Tue Apr 16, 2019 7:28 pm

GUI math expression documentation

Post 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)
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: GUI math expression documentation

Post 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
Post Reply