Changeset 3c97ff0 in sasmodels for sasmodels/models/cylinder.c
- Timestamp:
- Jan 6, 2016 7:23:47 PM (8 years ago)
- 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:
- 3f832f9
- Parents:
- 74667d3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/cylinder.c
ref2861b r3c97ff0 33 33 // translate a point in [-1,1] to a point in [lower,upper] 34 34 //const double alpha = ( Gauss76Z[i]*(upper-lower) + upper + lower )/2.0; 35 const double alpha = 0.5*(Gauss76Z[i]*M_PI_2 + M_PI_2);35 const double alpha = M_PI_4*(Gauss76Z[i] + 1.0); 36 36 double sn, cn; 37 37 SINCOS(alpha, sn, cn); 38 38 // For a bit of efficiency, we are moving the 2 V delta rho constant 39 // factor, 2Vd , out of the loop, so this is fq/2Vdrather than fq.39 // factor, 2Vdrho, out of the loop, so this is fq/2Vdrho rather than fq. 40 40 const double fq = _cyl(qr*sn, qh*cn); 41 41 total += Gauss76Wt[i] * fq * fq * sn; … … 43 43 // translate dx in [-1,1] to dx in [lower,upper] 44 44 //const double form = (upper-lower)/2.0*total; 45 const double two vd= 2.0*(sld-solvent_sld)*form_volume(radius, length);46 return 1.0e-4 * two vd * twovd* total * M_PI_4;45 const double twoVdrho = 2.0*(sld-solvent_sld)*form_volume(radius, length); 46 return 1.0e-4 * twoVdrho * twoVdrho * total * M_PI_4; 47 47 } 48 48
Note: See TracChangeset
for help on using the changeset viewer.