Changeset 116 for trunk/src/python


Ignore:
Timestamp:
Oct 26, 2005, 11:32:52 PM (19 years ago)
Author:
dkearney
Message:
  1. rewrote RpUnits::define(...) and RpUnits::convert(...) fxns.
  2. added functionality so you no longer need to call add_presets(...)
  3. RpUnits can now handle conversions as follows 1cm2/Vs -> 1e-7m2/kVus
  4. Cannot handle conversions dealing with Temperature very well because

Temperature conversions have offsets (+/- 32...). you can still do
F->C and Fs->Cs, but Fms->Cs provides unreliable results. (not to
mention that i'm still unsure how to do a conversion like this.

  1. still need to add Fo (delta fahrenheit) and Co (delta celcius)

units and conversions. These should not be effected by the notorious
temperature

  1. adjusted RpUnits_test.cc for testing. python.fortran and matlab

bindings have not been tested yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/python/PyRpUnits.cc

    r115 r116  
    473473    retStr = RpUnits::convert(fromVal_S,to_S,unitsVal,&result);
    474474
     475    std::cout << result << std::endl;
    475476    if ( (!retStr.empty()) && (result == 0) ) {
    476477        if (unitsVal) {
     
    555556
    556557    // add some standard units definitions and conversions.
    557 
    558     RpUnits::addPresets("all");
    559 }
     558    // RpUnits::addPresets("all");
     559}
Note: See TracChangeset for help on using the changeset viewer.