importing parameter data Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » importing parameter data « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Fernando Buezas (fernandob)
Member
Username: fernandob

Post Number: 6
Registered: 02-2007
Posted on Thursday, June 14, 2007 - 06:25 pm:   

Dear Nelson
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?
Top of pagePrevious messageNext messageBottom of page Link to this message

Jared Barber (jared_barber)
Member
Username: jared_barber

Post Number: 7
Registered: 01-2007
Posted on Saturday, June 30, 2007 - 04:30 am:   

Hello,

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:

a = 7.8
b = 4

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.

I'm not sure if you already knew this, but hopefully this helped a bit.

Jared
Top of pagePrevious messageNext messageBottom of page Link to this message

Fernando Buezas (fernandob)
Member
Username: fernandob

Post Number: 7
Registered: 02-2007
Posted on Monday, July 02, 2007 - 10:29 am:   

Exelent!!!
it is exactly what I was needing.
Thank you very much Jared

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration