output result to a file Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » output result to a file « Previous Next »

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

Jung Y. Huang (jyhuang)
New member
Username: jyhuang

Post Number: 1
Registered: 05-2006
Posted on Friday, May 19, 2006 - 07:03 am:   

Dear Sir:
I am trying to use FlexPDE as a solver for each case specified by other software. I ask FlexPDE output the calculated result to an output file, so that I can open the file and analyze the data from the application software. I currently use Plots section to do the job such as the following 1D script with a variable phi

Plots
history(B, EVAL(phi, d)) export format "#1#b#2" file="NLC_twist.txt"
history(B,integral(cos(dk*x/d)*dx(phi),"linecell")) export format "#1#b#2" file="NLC_tm.txt"

Unfortunately I have to repeat the calculation twice by using Stages=2 in order to use Stage-history combination. Is there a easier way to output the integral of the solution or the value of the solution at a specified location?

Thanks!

Jung Y. Huang
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 612
Registered: 06-2003
Posted on Friday, May 19, 2006 - 07:20 pm:   

You will still need to use VAL or EVAL to compute the value at a point, but you can use a SUMMARY plot with REPORT statements to write the values without resorting to a fake History (see SUMMARY in the Help Index). You can EXPORT a SUMMARY plot, but cannot use a FORMAT. You simply get what the SUMMARY writes. But the available controls for REPORTS should let you construct what you need.
Top of pagePrevious messageNext messageBottom of page Link to this message

Jung Y. Huang (jyhuang)
New member
Username: jyhuang

Post Number: 2
Registered: 05-2006
Posted on Sunday, May 21, 2006 - 08:31 pm:   

Thanks! Dr. Nelson,
It works! Based on your suggestion, the final script to do the file output from FlexPDE is:

Summary
Export file="NLC_Output.txt"
REPORT(B) as 'B'
Report (EVAL(phi, d)) as 'Phi(d)'
Report (integral(cos(dk*x/d)*dx(phi),"linecell")) as 'Ret'

I can now execute FlexPDE in my Fortran program and perform model parameters extraction.

Thanks!
Jung Y. Huang

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