Changeset 30946 in project


Ignore:
Timestamp:
05/31/14 13:32:02 (6 years ago)
Author:
Ivan Raikov
Message:

flsim: added rkv65 method to rk library

Location:
release/4/flsim/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/flsim/trunk/flsim.scm

    r30945 r30946  
    596596
    597597
    598 val tol = Real.Math.pow (10.0, ~6.0)
     598val tol = Real.Math.pow (10.0, ~7.0)
    599599val lb = 0.5 * tol
    600600val ub = 1.0 * tol
     
    627627          in
    628628              if Real.>= (hs, hf)
    629               then (let val (stn, etn) = (stepper hf) (x,ys)
    630                     in {tstep=hs, stn=stn} end)
     629              then (if Real.> (hf,0.0)
     630                    then (let val (stn, etn) = (stepper hf) (x,ys)
     631                          in {tstep=hf, stn=stn} end)
     632                    else {tstep=hs, stn=ys})
    631633              else (let val (stn, etn) = (stepper hs) (x,ys)
    632634                    in case predictor tol (hs,etn) of
  • release/4/flsim/trunk/sml-lib/rk/rk.sml

    r24082 r30946  
    514514
    515515
     516(* Verner, order 6/5 DVERK *)
     517
     518val cs_v65 = ratToReals [RAT 0, 1//6, 4//15, 2//3, 5//6, RAT 1, RAT 115, RAT 1]
     519val as_v65 = ratToRCLs
     520                 [[],
     521                  [1//6],
     522                  [4//75, 16//75],
     523                  [5//6, ~8//3, 5//2],
     524                  [~165//64, 55//6, ~425//64, 85//96],
     525                  [12//5, RAT ~8, 4015//612, ~11//36, 88//255],
     526                  [~8263//15000, 124//75, ~643//680, ~81//250, 2484//10625],
     527                  [3501//1720, ~300//43, 297275//52632, ~319//2322, 24068//84065, RAT 0, 3850//26703]]
     528(* sixth-order coeffs *)
     529val r1_v65 = [3//40, RAT 0, 875//2244, 23//72, 264//1955, RAT 0, 125//11592, 43//616]
     530(* fifth-order coeffs *)
     531val r2_v65 = [13//160, RAT 0, 2375//5984, 5//16, 12//85, 3//44]
     532val bs_v65 = ratToRCL r1_v65
     533val ds_v65 = ratToRCL (diffs (r1_v65, r2_v65))
     534fun make_rkv65 (): 'a stepper2 = core2 (cs_v65, as_v65, bs_v65, ds_v65)
     535val show_rkv65 = rk_show2 ("Verner 6(5) \"DVERK\"", cs_v65, as_v65, bs_v65, ds_v65)
     536
     537val bs_v65_aux = ratToRCL r2_v65
     538fun make_rkv65_aux (): 'a stepper1 = core1 (cs_v65, as_v65, bs_v65_aux)
     539val show_rkv65_aux = rk_show1 ("Verner (5)", cs_v65, as_v65, bs_v65_aux)
     540
    516541end
Note: See TracChangeset for help on using the changeset viewer.