Changeset 71b751d in sasmodels for sasmodels/models/core_shell_bicelle.c
- Timestamp:
- Aug 14, 2018 10:09:34 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 86aa992
- Parents:
- 2f8cbb9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_bicelle.c
r108e70e r71b751d 36 36 } 37 37 38 static double 39 Iq(double q, 38 static void 39 Fq(double q, 40 double *F1, 41 double *F2, 40 42 double radius, 41 43 double thick_radius, … … 51 53 const double halflength = 0.5*length; 52 54 53 double total = 0.0; 55 double total_F1 = 0.0; 56 double total_F2 = 0.0; 54 57 for(int i=0;i<GAUSS_N;i++) { 55 58 double theta = (GAUSS_Z[i] + 1.0)*uplim; 56 59 double sin_theta, cos_theta; // slots to hold sincos function output 57 60 SINCOS(theta, sin_theta, cos_theta); 58 double f q= bicelle_kernel(q*sin_theta, q*cos_theta, radius, thick_radius, thick_face,61 double form = bicelle_kernel(q*sin_theta, q*cos_theta, radius, thick_radius, thick_face, 59 62 halflength, sld_core, sld_face, sld_rim, sld_solvent); 60 total += GAUSS_W[i]*fq*fq*sin_theta; 63 total_F1 += GAUSS_W[i]*form*sin_theta; 64 total_F2 += GAUSS_W[i]*form*form*sin_theta; 61 65 } 66 // Correct for integration range 67 total_F1 *= uplim; 68 total_F2 *= uplim; 62 69 63 // calculate value of integral to return 64 double answer = total*uplim; 65 return 1.0e-4*answer; 70 *F1 = 1.0e-2*total_F1; 71 *F2 = 1.0e-4*total_F2; 66 72 } 67 73
Note: See TracChangeset
for help on using the changeset viewer.