Changeset 71b751d in sasmodels for sasmodels/models/core_shell_cylinder.c
- Timestamp:
- Aug 14, 2018 12:09:34 PM (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_cylinder.c
rd86f0fc r71b751d 13 13 } 14 14 15 static double 16 Iq(double q, 15 static void 16 Fq(double q, 17 double *F1, 18 double *F2, 17 19 double core_sld, 18 20 double shell_sld, … … 29 31 const double shell_h = (0.5*length + thickness); 30 32 const double shell_vd = form_volume(radius,thickness,length) * (shell_sld-solvent_sld); 31 double total = 0.0; 33 double total_F1 = 0.0; 34 double total_F2 = 0.0; 32 35 for (int i=0; i<GAUSS_N ;i++) { 33 36 // translate a point in [-1,1] to a point in [0, pi/2] … … 40 43 const double fq = _cyl(core_vd, core_r*qab, core_h*qc) 41 44 + _cyl(shell_vd, shell_r*qab, shell_h*qc); 42 total += GAUSS_W[i] * fq * fq * sin_theta; 45 total_F1 += GAUSS_W[i] * fq * sin_theta; 46 total_F2 += GAUSS_W[i] * fq * fq * sin_theta; 43 47 } 44 48 // translate dx in [-1,1] to dx in [lower,upper] 45 49 //const double form = (upper-lower)/2.0*total; 46 return 1.0e-4 * total * M_PI_4; 50 *F1 = 1.0e-2 * total_F1 * M_PI_4; 51 *F2 = 1.0e-4 * total_F2 * M_PI_4; 47 52 } 48 49 53 50 54 static double
Note: See TracChangeset
for help on using the changeset viewer.