Changeset 2a0b2b1 in sasmodels for sasmodels/models/stacked_disks.c
- Timestamp:
- Apr 14, 2017 6:30:29 AM (7 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- fdd56a1
- Parents:
- 9901384
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/stacked_disks.c
r19f996b r2a0b2b1 1 1 static double stacked_disks_kernel( 2 double q, 2 double qab, 3 double qc, 3 4 double halfheight, 4 5 double thick_layer, … … 9 10 double layer_sld, 10 11 double solvent_sld, 11 double sin_alpha,12 double cos_alpha,13 12 double d) 14 13 … … 20 19 // zi is the dummy variable for the integration (x in Feigin's notation) 21 20 22 const double besarg1 = q*radius*sin_alpha;23 //const double besarg2 = q*radius*sin_alpha;21 const double besarg1 = radius*qab; 22 //const double besarg2 = radius*qab; 24 23 25 const double sinarg1 = q*halfheight*cos_alpha;26 const double sinarg2 = q*(halfheight+thick_layer)*cos_alpha;24 const double sinarg1 = halfheight*qc; 25 const double sinarg2 = (halfheight+thick_layer)*qc; 27 26 28 27 const double be1 = sas_2J1x_x(besarg1); … … 43 42 44 43 // loop for the structure factor S(q) 45 double qd_cos_alpha = q*d*cos_alpha;44 double qd_cos_alpha = d*qc; 46 45 //d*cos_alpha is the projection of d onto q (in other words the component 47 46 //of d that is parallel to q. … … 84 83 double sin_alpha, cos_alpha; // slots to hold sincos function output 85 84 SINCOS(zi, sin_alpha, cos_alpha); 86 double yyy = stacked_disks_kernel(q ,85 double yyy = stacked_disks_kernel(q*sin_alpha, q*cos_alpha, 87 86 halfheight, 88 87 thick_layer, … … 93 92 layer_sld, 94 93 solvent_sld, 95 sin_alpha,96 cos_alpha,97 94 d); 98 95 summ += Gauss76Wt[i] * yyy * sin_alpha; … … 155 152 double q, sin_alpha, cos_alpha; 156 153 ORIENT_SYMMETRIC(qx, qy, theta, phi, q, sin_alpha, cos_alpha); 154 const double qab = q*sin_alpha; 155 const double qc = q*cos_alpha; 157 156 158 157 double d = 2.0 * thick_layer + thick_core; 159 158 double halfheight = 0.5*thick_core; 160 double answer = stacked_disks_kernel(q ,159 double answer = stacked_disks_kernel(qab, qc, 161 160 halfheight, 162 161 thick_layer, … … 167 166 layer_sld, 168 167 solvent_sld, 169 sin_alpha,170 cos_alpha,171 168 d); 172 169
Note: See TracChangeset
for help on using the changeset viewer.