Ignore:
Timestamp:
Jul 27, 2005 2:37:14 PM (16 years ago)
Author:
dkearney
Message:

adding fermi_fortran as an example of a working app

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/examples/app-fermi/fermi

    r10 r30  
    99# ======================================================================
    1010#\
    11 exec tclsh "$0" "*$"
     11exec tclsh "$0" "$*"
    1212# ----------------------------------------------------------------------
    1313# tclsh executes everything from here on...
     
    1616
    1717# open the XML file containing the run parameters
    18 set driver [Rappture::library driver.xml]
     18set driver [Rappture::library [lindex $argv 0]]
    1919
    20 set T 300
    21 set Ef -5.5
     20set T [$driver get input.(temperature).current]
     21set T [Rappture::Units::convert $T -to K -units off]
     22set Ef [$driver get input.(Ef).current]
     23set Ef [Rappture::Units::convert $Ef -to eV -units off]
    2224
    2325set kT [expr {8.61734e-5 * $T}]
     
    3436}
    3537
    36 $driver put output.curve(f12).label "Fermi-Dirac Factor"
     38$driver put output.curve(f12).about.label "Fermi-Dirac Factor"
     39$driver put output.curve(f12).xaxis.label "Energy"
     40$driver put output.curve(f12).xaxis.units "eV"
    3741$driver put output.curve(f12).component.xy $xy
    3842
     
    4145# Be sure to do this back in the original directory
    4246#
    43 set fid [open run.xml w]
     47set rfile "run[clock seconds].xml"
     48set fid [open $rfile w]
    4449puts $fid "<?xml version=\"1.0\"?>"
    4550puts $fid [$driver xml]
    4651close $fid
     52
     53puts "=RAPPTURE-RUN=>$rfile"
Note: See TracChangeset for help on using the changeset viewer.