Changeset 3a48772 in sasmodels for sasmodels/models/binary_hard_sphere.c


Ignore:
Timestamp:
Oct 14, 2016 5:23:40 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
a5b6997
Parents:
b716cc6
Message:

use predefined constants for fractions of pi

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/binary_hard_sphere.c

    r87bc707 r3a48772  
    4949    // /* do form factor calculations  */ 
    5050     
    51     v1 = 4.0*M_PI/3.0*r1*r1*r1; 
    52     v2 = 4.0*M_PI/3.0*r2*r2*r2; 
     51    v1 = M_4PI_3*r1*r1*r1; 
     52    v2 = M_4PI_3*r2*r2*r2; 
    5353     
    5454    n1 = phi1/v1; 
     
    7070    sc1 = sph_j1c(qr1); 
    7171    sc2 = sph_j1c(qr2); 
    72     b1 = r1*r1*r1*(rho1-rhos)*4.0/3.0*M_PI*sc1; 
    73     b2 = r2*r2*r2*(rho2-rhos)*4.0/3.0*M_PI*sc2; 
     72    b1 = r1*r1*r1*(rho1-rhos)*M_4PI_3*sc1; 
     73    b2 = r2*r2*r2*(rho2-rhos)*M_4PI_3*sc2; 
    7474    inten = n1*b1*b1*psf11; 
    7575    inten += sqrt(n1*n2)*2.0*b1*b2*psf12; 
Note: See TracChangeset for help on using the changeset viewer.