查看完整版本: importing parameter data

michael 2007-9-4 11:09

importing parameter data

[size=2]how can I import one or several numerical parameters to the model so that the execute it from the command line, and the script read it of a file and execute it as if it have to do with a stage?[/size]

michael 2007-9-4 11:10

[size=2]I'm not completely sure what you're asking but it sounds like you should look up the "#include" command. As a quick example. Say you have two parameters: "a" and "b". What you can do is create a text file with the following lines:
qv8YqI9V,Z\
*QU-kq8Yk9D5cO:e a = 7.8
] t/km.x h b = 4
:[m*Tgtc p?Dg.r $O2Y u+B2`z:_l6Y4[J9Z
You can call the two line text file "vars.txt". Then underneath the "definitions" section you can type #INCLUDE "vars.txt" if the text file and pde file are in the same directory. Otherwise you can type #INCLUDE "c:\[entire path to vars]\vars.txt". Now if you run your program from, for instance, the command line, flexpde will read the text file and define a and b as the text file suggests. :lx)u1rTSM_,By

Pm/f6S {/D Z q(r I'm not sure if you already knew this, but hopefully this helped a bit. [/size]

ע 2008-4-21 13:16

我顶

[url=http://www.dreamathk.com/][img]http://t2.baidu.com/it/u=3325683543,542541397&fm=0&gp=24.jpg[/img][/url]
/U;n7nn;RrqmGD7F [url=http://www.dreamathk.com]注册香港公司[/url]站[url=http://www.54admin.org][i]交换友情链接[/i][/url]
页: [1]
查看完整版本: importing parameter data