Changes in / [216fa6d:98f3053] in sasmodels
- Location:
- sasmodels/models
- Files:
-
- 7 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/bcc.c
r7ed702f r9aac25d 40 40 } 41 41 42 double _sphereform(double q, double radius, double sld, double solvent_sld){43 const double qr = q*radius;44 double sn, cn;45 SINCOS(qr, sn, cn);46 const double bes = (qr == 0.0 ? 1.0 : 3.0*(sn-qr*cn)/(qr*qr*qr));47 const double fq = bes * (sld - solvent_sld)*form_volume(radius);48 return 1.0e-4*fq*fq;49 }50 42 51 43 double form_volume(double radius){ … … 87 79 88 80 answer = (vb-va)/2.0*summ; 89 answer = answer* _sphereform(q,radius,sld,solvent_sld)*latticescale;81 answer = answer*sphere_form(q,radius,sld,solvent_sld)*latticescale; 90 82 91 83 return answer; … … 174 166 175 167 // Use SphereForm directly from libigor 176 answer = _sphereform(q,radius,sld,solvent_sld)*Zq*latticescale;168 answer = sphere_form(q,radius,sld,solvent_sld)*Zq*latticescale; 177 169 178 170 return answer; -
sasmodels/models/bcc.py
r13ed84c r9aac25d 132 132 # pylint: enable=bad-whitespace, line-too-long 133 133 134 source = ["lib/J1.c", "lib/gauss150.c", " bcc.c"]134 source = ["lib/J1.c", "lib/gauss150.c", "lib/sphere_form.c", "bcc.c"] 135 135 136 136 # parameters for demo -
sasmodels/models/fcc.c
reeb8bac r9aac25d 7 7 double _FCC_Integrand(double q, double dnn, double d_factor, double theta, double phi); 8 8 double _FCCeval(double Theta, double Phi, double temp1, double temp3); 9 double _sphereform(double q, double radius, double sld, double solvent_sld);10 9 11 10 … … 39 38 40 39 return (result); 41 }42 43 double _sphereform(double q, double radius, double sld, double solvent_sld){44 const double qr = q*radius;45 double sn, cn;46 SINCOS(qr, sn, cn);47 const double bes = (qr == 0.0 ? 1.0 : 3.0*(sn-qr*cn)/(qr*qr*qr));48 const double fq = bes * (sld - solvent_sld)*form_volume(radius);49 return 1.0e-4*fq*fq;50 40 } 51 41 … … 88 78 89 79 answer = (vb-va)/2.0*summ; 90 answer = answer* _sphereform(q,radius,sld,solvent_sld)*latticescale;80 answer = answer*sphere_form(q,radius,sld,solvent_sld)*latticescale; 91 81 92 82 return answer; … … 175 165 176 166 // Use SphereForm directly from libigor 177 answer = _sphereform(q,radius,sld,solvent_sld)*Zq*latticescale;167 answer = sphere_form(q,radius,sld,solvent_sld)*Zq*latticescale; 178 168 179 169 return answer; -
sasmodels/models/fcc.py
r13ed84c r9aac25d 125 125 ] 126 126 127 source = ["lib/J1.c", "lib/gauss150.c", " fcc.c"]127 source = ["lib/J1.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc.c"] 128 128 129 129 # parameters for demo
Note: See TracChangeset
for help on using the changeset viewer.