Changes in / [5c962df:8696a87] in sasmodels
- Location:
- sasmodels/models
- Files:
-
- 4 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/lib/wrc_cyl.c
rf94d8a2 r504abee 297 297 } 298 298 299 299 static double 300 Sdebye_kernel(double arg) 301 { 302 // ORIGINAL 303 double result = 2.0*(exp(-arg) + arg -1.0)/(pow((arg),2)); 304 305 // CONVERSION 1 from http://herbie.uwplse.org/ 306 // 307 // exhibits discontinuity - needs more investigation 308 //double a1 = 1.0/6.0; 309 //double a2 = 1.0/72.0; 310 //double a3 = 1.0/24.0; 311 //double result = pow((1.0 - a1*arg - (a2+a3)*arg*arg), 2); 312 313 return result; 314 } 300 315 static double 301 316 Sdebye(double q, double L, double b) 302 317 { 303 return 2.0*(exp(-u_WR(q,L,b)) + u_WR(q,L,b) -1.0)/(pow((u_WR(q,L,b)),2)); 318 double arg = u_WR(q,L,b); 319 return Sdebye_kernel(arg); 304 320 } 305 321 … … 308 324 Sdebye1(double q, double L, double b) 309 325 { 310 return 2.0*(exp(-u1(q,L,b)) + u1(q,L,b) -1.0)/( pow((u1(q,L,b)),2.0) ); 326 double arg = u1(q,L,b); 327 return Sdebye_kernel(arg); 328 311 329 } 312 330
Note: See TracChangeset
for help on using the changeset viewer.