Changeset f4f85b3 in sasmodels
- Timestamp:
- Mar 22, 2017 9:31:01 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:
- d605080
- Parents:
- b260926
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_bicelle_elliptical.c
r592343f rf4f85b3 32 32 } 33 33 34 double 35 Iq(double qq, 36 double rad, 37 double x_core, 38 double radthick, 39 double facthick, 40 double length, 41 double rhoc, 42 double rhoh, 43 double rhor, 44 double rhosolv) 34 double Iq(double q, 35 double rad, 36 double x_core, 37 double radthick, 38 double facthick, 39 double length, 40 double rhoc, 41 double rhoh, 42 double rhor, 43 double rhosolv) 45 44 { 46 45 double si1,si2,be1,be2; … … 74 73 const double sin_alpha = sqrt(1.0 - cos_alpha*cos_alpha); 75 74 double inner_sum=0; 76 double sinarg1 = q q*halfheight*cos_alpha;77 double sinarg2 = q q*(halfheight+facthick)*cos_alpha;75 double sinarg1 = q*halfheight*cos_alpha; 76 double sinarg2 = q*(halfheight+facthick)*cos_alpha; 78 77 si1 = sas_sinx_x(sinarg1); 79 78 si2 = sas_sinx_x(sinarg2); … … 83 82 const double beta = ( Gauss76Z[j] +1.0)*M_PI_2; 84 83 const double rr = sqrt(rA - rB*cos(beta)); 85 double besarg1 = q q*rr*sin_alpha;86 double besarg2 = q q*(rr+radthick)*sin_alpha;84 double besarg1 = q*rr*sin_alpha; 85 double besarg2 = q*(rr+radthick)*sin_alpha; 87 86 be1 = sas_2J1x_x(besarg1); 88 87 be2 = sas_2J1x_x(besarg2); … … 114 113 { 115 114 // THIS NEEDS TESTING 116 double q q, cos_val, cos_mu, cos_nu;117 ORIENT_ASYMMETRIC(qx, qy, theta, phi, psi, q q, cos_val, cos_mu, cos_nu);115 double q, xhat, yhat, zhat; 116 ORIENT_ASYMMETRIC(qx, qy, theta, phi, psi, q, xhat, yhat, zhat); 118 117 const double dr1 = rhoc-rhoh; 119 118 const double dr2 = rhor-rhosolv; … … 125 124 const double vol3 = M_PI*rad*radius_major*2.0*(halfheight+facthick); 126 125 127 // Compute: r = sqrt((radius_major* cos_nu)^2 + (radius_minor*cos_mu)^2)126 // Compute: r = sqrt((radius_major*zhat)^2 + (radius_minor*yhat)^2) 128 127 // Given: radius_major = r_ratio * radius_minor 129 128 // ASSUME the sin_alpha is included in the separate integration over orientation of rod angle 130 const double r = rad*sqrt(square(x_core*cos_nu) + cos_mu*cos_mu); 131 const double be1 = sas_2J1x_x( qq*r ); 132 const double be2 = sas_2J1x_x( qq*(r + radthick ) ); 133 const double si1 = sas_sinx_x( qq*halfheight*cos_val ); 134 const double si2 = sas_sinx_x( qq*(halfheight + facthick)*cos_val ); 129 const double rad_minor = rad; 130 const double rad_major = rad*x_core; 131 const double r_hat = sqrt(square(rad_major*xhat) + square(rad_minor*yhat)); 132 const double rshell_hat = sqrt(square((rad_major+radthick)*xhat) 133 + square((rad_minor+radthick)*yhat)); 134 const double be1 = sas_2J1x_x( q*r_hat ); 135 const double be2 = sas_2J1x_x( q*rshell_hat ); 136 const double si1 = sas_sinx_x( q*halfheight*zhat ); 137 const double si2 = sas_sinx_x( q*(halfheight + facthick)*zhat ); 135 138 const double Aq = square( vol1*dr1*si1*be1 + vol2*dr2*si2*be2 + vol3*dr3*si2*be1); 136 139 //const double vol = form_volume(radius_minor, r_ratio, length);
Note: See TracChangeset
for help on using the changeset viewer.