Changeset 504abee in sasmodels


Ignore:
Timestamp:
Feb 1, 2016 4:38:22 AM (9 years ago)
Author:
piotr
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
8696a87
Parents:
ed82794
Message:

converted FlexibleCylinderEx?

Location:
sasmodels/models
Files:
4 added
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/lib/wrc_cyl.c

    rf94d8a2 r504abee  
    297297} 
    298298 
    299  
     299static double 
     300Sdebye_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} 
    300315static double 
    301316Sdebye(double q, double L, double b) 
    302317{ 
    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); 
    304320} 
    305321 
     
    308324Sdebye1(double q, double L, double b) 
    309325{ 
    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 
    311329} 
    312330 
Note: See TracChangeset for help on using the changeset viewer.