修订版 | adb72c59d2f73bc2989ee7f1f64aa5ae955a9a04 (tree) |
---|---|
时间 | 2008-01-07 19:00:56 |
作者 | iselllo |
Commiter | iselllo |
I simply modified the definition of the length I am using in the routine
for numerical derivatives; now it is worked out correctly every time I
define a new r vector where r is the independent variable.
@@ -314,6 +314,8 @@ | ||
314 | 314 | r_cut=1.1 |
315 | 315 | min_tabul_distance=0.01 #minimum tabulated distance for the force |
316 | 316 | r=s.linspace(min_tabul_distance,r_cut,NN) |
317 | +#r=s.linspace(0.9,r_cut,NN) | |
318 | + | |
317 | 319 | h_max=60. |
318 | 320 | sig=0.1 |
319 | 321 | h_min=-30. |
@@ -349,7 +351,9 @@ | ||
349 | 351 | my_f_analytic=myforce_modified(h_max,r_core, r_cut,sig,r_min,h_min,r) |
350 | 352 | |
351 | 353 | my_force=s.zeros(NN) |
352 | -length=r_cut-min_tabul_distance | |
354 | +#length=r_cut-min_tabul_distance | |
355 | +length=r.max()-r.min() | |
356 | + | |
353 | 357 | d.der1(my_pot,my_force,length) |
354 | 358 | |
355 | 359 | my_force=-my_force #the force is minus the grad of the potential! |