Changeset 9aa4881 in sasmodels
- Timestamp:
- Oct 17, 2016 11:46:14 AM (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:
- 92ce163
- Parents:
- f719764
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_cylinder.c
r5bddd89 r9aa4881 5 5 double radius, double thickness, double length, double theta, double phi); 6 6 7 // twovd = 2 *volume * delta_rho7 // vd = volume * delta_rho 8 8 // besarg = q * R * sin(alpha) 9 9 // siarg = q * L/2 * cos(alpha) 10 double _cyl(double twovd, double besarg, double siarg);11 double _cyl(double twovd, double besarg, double siarg)10 double _cyl(double vd, double besarg, double siarg); 11 double _cyl(double vd, double besarg, double siarg) 12 12 { 13 return twovd * sinc(siarg) * sas_J1c(besarg);13 return vd * sinc(siarg) * sas_J1c(besarg); 14 14 } 15 15 … … 30 30 const double core_qr = q*radius; 31 31 const double core_qh = q*0.5*length; 32 const double core_twovd = 2.0 * form_volume(radius,0,length) 33 * (core_sld-shell_sld); 32 const double core_vd = form_volume(radius,0,length) * (core_sld-shell_sld); 34 33 const double shell_qr = q*(radius + thickness); 35 34 const double shell_qh = q*(0.5*length + thickness); 36 const double shell_twovd = 2.0 * form_volume(radius,thickness,length) 37 * (shell_sld-solvent_sld); 35 const double shell_vd = form_volume(radius,thickness,length) * (shell_sld-solvent_sld); 38 36 double total = 0.0; 39 37 // double lower=0, upper=M_PI_2; … … 44 42 const double alpha = 0.5*(Gauss76Z[i]*M_PI_2 + M_PI_2); 45 43 SINCOS(alpha, sn, cn); 46 const double fq = _cyl(core_ twovd, core_qr*sn, core_qh*cn)47 + _cyl(shell_ twovd, shell_qr*sn, shell_qh*cn);44 const double fq = _cyl(core_vd, core_qr*sn, core_qh*cn) 45 + _cyl(shell_vd, shell_qr*sn, shell_qh*cn); 48 46 total += Gauss76Wt[i] * fq * fq * sn; 49 47 } … … 69 67 const double core_qr = q*radius; 70 68 const double core_qh = q*0.5*length; 71 const double core_twovd = 2.0 * form_volume(radius,0,length) 72 * (core_sld-shell_sld); 69 const double core_vd = form_volume(radius,0,length) * (core_sld-shell_sld); 73 70 const double shell_qr = q*(radius + thickness); 74 71 const double shell_qh = q*(0.5*length + thickness); 75 const double shell_twovd = 2.0 * form_volume(radius,thickness,length) 76 * (shell_sld-solvent_sld); 72 const double shell_vd = form_volume(radius,thickness,length) * (shell_sld-solvent_sld); 77 73 78 const double fq = _cyl(core_ twovd, core_qr*sin_alpha, core_qh*cos_alpha)79 + _cyl(shell_ twovd, shell_qr*sin_alpha, shell_qh*cos_alpha);74 const double fq = _cyl(core_vd, core_qr*sin_alpha, core_qh*cos_alpha) 75 + _cyl(shell_vd, shell_qr*sin_alpha, shell_qh*cos_alpha); 80 76 return 1.0e-4 * fq * fq; 81 77 }
Note: See TracChangeset
for help on using the changeset viewer.