Changeset e481a39 in sasmodels for sasmodels/models/binary_hard_sphere.c


Ignore:
Timestamp:
Mar 20, 2016 5:06:10 AM (8 years ago)
Author:
butler
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:
3f12f59
Parents:
dff1088
Message:

cleanup of binary hard sphere model - now passes tests and docs works.
also removed some compilser warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/binary_hard_sphere.c

    r115d0f0 re481a39  
    1313    ); 
    1414 
    15 int calculate_psfs(double qval, 
     15void calculate_psfs(double qval, 
    1616    double r2, double nf2, 
    1717    double aa, double phi, 
     
    3434    double phi1,phi2,phr,a3; 
    3535    double v1,v2,n1,n2,qr1,qr2,b1,b2,sc1,sc2; 
    36     int err; 
    3736     
    3837    r2 = lg_radius; 
     
    5251    nf2 = phr*a3/(1.0-phr+phr*a3); 
    5352    // calculate the PSF's here 
    54     err = calculate_psfs(q,r2,nf2,aa,phi,&psf11,&psf22,&psf12); 
     53    calculate_psfs(q,r2,nf2,aa,phi,&psf11,&psf22,&psf12); 
    5554     
    5655    // /* do form factor calculations  */ 
     
    103102} 
    104103 
    105 int calculate_psfs(double qval, 
     104void calculate_psfs(double qval, 
    106105    double r2, double nf2, 
    107106    double aa, double phi, 
     
    112111     
    113112    //   calculate constant terms 
    114     double s1,s2,v,a3,v1,v2,g11,g12,g22,wmv,wmv3,wmv4; 
     113    double s2,v,a3,v1,v2,g11,g12,g22,wmv,wmv3,wmv4; 
    115114    double a1,a2i,a2,b1,b2,b12,gm1,gm12; 
    116     double err=0.0,yy,ay,ay2,ay3,t1,t2,t3,f11,y2,y3,tt1,tt2,tt3; 
     115    double yy,ay,ay2,ay3,t1,t2,t3,f11,y2,y3,tt1,tt2,tt3; 
    117116    double c11,c22,c12,f12,f22,ttt1,ttt2,ttt3,ttt4,yl,y13; 
    118117    double t21,t22,t23,t31,t32,t33,t41,t42,yl3,wma3,y1; 
    119118     
    120119    s2 = 2.0*r2; 
    121     s1 = aa*s2; 
     120//    s1 = aa*s2;  why is this never used?  check original paper? 
    122121    v = phi; 
    123122    a3 = aa*aa*aa; 
     
    189188    *s12=-c12/((1.+c11)*(1.+c22)-(c12)*(c12));    
    190189     
    191     return(err); 
     190    return; 
    192191} 
    193192 
Note: See TracChangeset for help on using the changeset viewer.