Changeset ff1fff5 in sasmodels for sasmodels/models/binary_hard_sphere.c
- Timestamp:
- Oct 16, 2016 2:14:15 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 7fcdc9f
- Parents:
- 4f79d94 (diff), a0d75ce (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/binary_hard_sphere.c
re481a39 r4f79d94 7 7 ); 8 8 9 double Iqxy(double qx, double qy,10 double lg_radius, double sm_radius,11 double lg_vol_frac, double sm_vol_frac,12 double lg_sld, double sm_sld, double solvent_sld13 );14 15 9 void calculate_psfs(double qval, 16 10 double r2, double nf2, … … 55 49 // /* do form factor calculations */ 56 50 57 v1 = 4.0*M_PI/3.0*r1*r1*r1;58 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; 59 53 60 54 n1 = phi1/v1; … … 64 58 qr2 = r2*q; 65 59 66 //if (qr1 == 0){67 //sc1 = 1.0/3.0;68 //}else{69 //sc1 = (sin(qr1)-qr1*cos(qr1))/qr1/qr1/qr1;70 //}71 //if (qr2 == 0){72 //sc2 = 1.0/3.0;73 //}else{74 //sc2 = (sin(qr2)-qr2*cos(qr2))/qr2/qr2/qr2;75 //}76 60 sc1 = sph_j1c(qr1); 77 61 sc2 = sph_j1c(qr2); 78 b1 = r1*r1*r1*(rho1-rhos)* 4.0/3.0*M_PI*sc1;79 b2 = r2*r2*r2*(rho2-rhos)* 4.0/3.0*M_PI*sc2;62 b1 = r1*r1*r1*(rho1-rhos)*M_4PI_3*sc1; 63 b2 = r2*r2*r2*(rho2-rhos)*M_4PI_3*sc2; 80 64 inten = n1*b1*b1*psf11; 81 65 inten += sqrt(n1*n2)*2.0*b1*b2*psf12; … … 88 72 } 89 73 90 91 double Iqxy(double qx, double qy,92 double lg_radius, double sm_radius,93 double lg_vol_frac, double sm_vol_frac,94 double lg_sld, double sm_sld, double solvent_sld)95 96 {97 double q = sqrt(qx*qx + qy*qy);98 return Iq(q,99 lg_radius, sm_radius,100 lg_vol_frac, sm_vol_frac,101 lg_sld, sm_sld, solvent_sld);102 }103 74 104 75 void calculate_psfs(double qval,
Note: See TracChangeset
for help on using the changeset viewer.