Ignore:
Timestamp:
Oct 5, 2005, 8:17:26 AM (19 years ago)
Author:
dkearney
Message:
  1. More cleaning of RpUnits and RpLibrary? code
  2. added rp_result code to c++/fortran/c code
  3. added rp_children, rp_lib_node[comp,type,id] for fortran code (need to test)
  4. adjusted convert function to recognize statements as follows:

convert("5J","neV")
convert("3.12075e+28neV","J")

  1. made joules a metric unit in RpUnits.cc
  2. tested examples/app-fermi/fortran/fermi.f with new rappture library.

added units conversion.

Location:
trunk/examples/app-fermi/fortran
Files:
2 edited

Legend:

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

    r73 r83  
    1414
    1515LIB_DIR = $(RAPPTURE_DIR)/lib
    16 LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture
     16LIB_RAPPTURE    = -Wl,-rpath,$(LIB_DIR) -L$(LIB_DIR) -lrappture_test
    1717
    1818all: $(PROGS)
  • trunk/examples/app-fermi/fortran/fermi.f

    r66 r83  
    1313        IMPLICIT NONE
    1414
    15         integer rp_lib
    16         double precision rp_lib_get_double
     15        integer rp_lib, rp_units_convert_dbl, rp_units_add_presets
    1716
    18         integer driver
     17        integer driver, ok
    1918        double precision T, Ef, kT, Emin, Emax, dE, f, E
    20         CHARACTER*100 inFile
     19        CHARACTER*100 inFile, strVal
    2120        character*40 xy
    2221
     
    2423        driver = rp_lib(inFile)
    2524
    26         T = rp_lib_get_double(driver,
    27      +        "input.number(temperature).current")
    28         Ef = rp_lib_get_double(driver,
    29      +        "input.number(Ef).current")
     25        ok = rp_units_add_presets("all")
     26
     27        call rp_lib_get(driver,
     28     +        "input.number(temperature).current", strVal)
     29        ok = rp_units_convert_dbl(strVal,"K",T)
     30
     31        call rp_lib_get(driver,
     32     +        "input.number(Ef).current", strVal)
     33        ok = rp_units_convert_dbl(strVal,"K",Ef)
    3034
    3135        kT = 8.61734e-5 * T
Note: See TracChangeset for help on using the changeset viewer.