[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

# Re: [femm] multiple results using makeplot

- To: femm@yahoogroups.com
- Subject: Re: [femm] multiple results using makeplot
- From: David Meeker <dmeeker@ieee.org>
- Date: Sat, 15 Feb 2003 07:35:57 -0500
- References: <b2jpgk+p482@eGroups.com>
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826 MultiZilla/v1.1.22

You can pass the iteration number to the postprocessor in two ways. The first is to write the number to a temporary file in the preprocessor and then read the number out of the postprocessor. If k represented your iteration number, you'd write the value via the code snippet:
`handle=openfile("tempfile","w");
write(handle,k,"\n");
closefile(handle);
`
and the read the value in the postprocessor by doing
`handle=openfile("tempfile","r")
k=read(handle,"*n")
closefile(handle)`
Alternatively, several additional parameters can be included in the runpost call. A limited numberof variables can be passed to the postprocessor by adding a extra parameters of the form `-lua-var=variable=value`, e.g.:
`run_post("c:\\my-lua-script.lua","-lua-var=filename=myfilename")`
All variables are passed as strings so lua internal conversion routines (i.e. tonumber) must be employed to obtain numbers from the strings.
Dave.
alteredfrog wrote:

> `I am trying to right a bit of Lua code that will save the result from
> each step in a distinct file, or append the results to an existing
> file.
> In the pre-processor script If I knew how I could incriment the file
> name before each "analyse()" call. This would save each solution set.
> What may work better may be to pass the iteration step or file name
> value to the post-processor script and incriment or change the name
> of the file that the "makeplot()" data is saved to (graphical or data
> not to important which). Again I dont know how to do this.
> I've only been working with the LUA script for 4 afternoons so its
> all still new.
> My goal is a "slide show" of the tangetial field along a selected arc
> as two parts move away from each other.
> thanks for the help in advance
> `
> `Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.`

    --
    David Meeker
    dmeeker@ieee.org
    http://femm.berlios.de/dmeeker

- References:
  - multiple results using makeplot
    - From: "alteredfrog <alteredfrog@yahoo.com>" <alteredfrog@yahoo.com>

- Prev by Date: multiple results using makeplot
- Next by Date: adding material using lua scripting
- Previous by thread: multiple results using makeplot
- Next by thread: adding material using lua scripting
- Index(es):
  - Date
  - Thread