Re: [ot-users] Simplified symbolic functions

2019-04-24 Thread BAUDIN Michael
82 13 De : regis_anne.lebrun_dut...@yahoo.fr [mailto:regis_anne.lebrun_dut...@yahoo.fr] Envoyé : vendredi 3 août 2018 18:40 À : bou...@gmail.com; BAUDIN Michael Cc : users@openturns.org Objet : Re: [ot-users] Simplified symbolic functions Hi Michael, Try this: import openturns as ot Q = 1013. Ks = 3

Re: [ot-users] Simplified symbolic functions

2018-08-03 Thread regis lebrun
a' What is the trick you used to make it work ? (This is with OT 1.11). Best regards, Michaël Michaël BAUDIN Ingénieur - Chercheur EDF – R&D Département Management des Risques Industriels 6, quai Watier 78401 CHATOU michael.bau...@edf.fr Tél. : 01 30 87 81 82 Fax : 01 30 87 82 13 -M

Re: [ot-users] Simplified symbolic functions

2018-08-03 Thread BAUDIN Michael
; What is the trick you used to make it work ? (This is with OT 1.11). Best regards, Michaël Michaël BAUDIN Ingénieur - Chercheur EDF – R&D Département Management des Risques Industriels 6, quai Watier 78401 CHATOU michael.bau...@edf.fr Tél. : 01 30 87 81 82 Fax : 01 30 87 82 13 -Mes

Re: [ot-users] Simplified symbolic functions

2018-03-16 Thread BAUDIN Michael
-- De : bou...@gmail.com [mailto:bou...@gmail.com] Envoyé : lundi 12 mars 2018 21:26 À : BAUDIN Michael Cc : users@openturns.org Objet : Re: [ot-users] Simplified symbolic functions Hello Michael, We investigated using ExprTk to parse analytical formulas instead of muParser, it is known to be f

Re: [ot-users] Simplified symbolic functions

2018-03-12 Thread D. Barbier
Hello Michael, We investigated using ExprTk to parse analytical formulas instead of muParser, it is known to be faster. Almost all muParser formulas can be parsed by ExprTk without changes, but it also provides many more features. And multiple outputs are trivial with this backend. This has been

Re: [ot-users] Simplified symbolic functions

2018-02-14 Thread regis lebrun
Hi Michael, You can try this: from openturns import *from math import sqrt def functionCrue(X) :     Q, Ks, Zv, Zm, Hd, Zb, L, B = X     alpha = (Zm - Zv)/L     H = (Q/(Ks*B*sqrt(alpha)))**(3.0/5.0)     Zc = H + Zv     Zd = Zb + Hd     S = Zc - Zd     return [H,S] myFunction = PythonFunction(8, 2,

Re: [ot-users] Simplified symbolic functions

2018-02-14 Thread Julien Schueller | Phimeca
Hello, You can use intermediate variables using multiple expressions with the comma separator: >>> f=ot.SymbolicFunction(['x1', 'x2', 'x3'], ['x3=x1+x2,x3']) >>> f([2,3,0]) class=Point name=Unnamed dimension=1 values=[5] But this only works to return a single value as only the last _express