Changeset 0b717c5 in sasmodels
- Timestamp:
- Oct 14, 2016 12:53:59 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:
- 5bddd89
- Parents:
- ec9d329
- Location:
- sasmodels/models
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/bcc_paracrystal.c
r11ca2ab r0b717c5 98 98 99 99 const double qd = 0.5*q*dnn; 100 const double exp_qd = exp(0.5*square(qd*d_factor)*(a1*a1 + a2*a2 + a3*a3)); 101 const double sinh_qd = 0.5*exp_qd - 0.5/exp_qd; 102 const double cosh_qd = 0.5*exp_qd + 0.5/exp_qd; 103 104 const double Zq = sinh_qd/(cosh_qd - cos(qd*a1)) 105 * sinh_qd/(cosh_qd - cos(qd*a2)) 106 * sinh_qd/(cosh_qd - cos(qd*a3)); 100 const double arg = 0.5*square(qd*d_factor)*(a1*a1 + a2*a2 + a3*a3); 101 const double tanh_qd = tanh(arg); 102 const double cosh_qd = cosh(arg); 103 const double Zq = tanh_qd/(1. - cos(qd*a1)/cosh_qd) 104 * tanh_qd/(1. - cos(qd*a2)/cosh_qd) 105 * tanh_qd/(1. - cos(qd*a3)/cosh_qd); 107 106 108 107 const double Fq = sphere_form(q,radius,sld,solvent_sld)*Zq; -
sasmodels/models/fcc_paracrystal.c
rec9d329 r0b717c5 97 97 const double a3 = cos_a2 + cos_a1; 98 98 const double qd = 0.5*q*dnn; 99 const double exp_qd = exp(0.5*square(qd*d_factor)*(a1*a1 + a2*a2 + a3*a3)); 100 const double sinh_qd = 0.5*exp_qd - 0.5/exp_qd; 101 const double cosh_qd = 0.5*exp_qd + 0.5/exp_qd; 99 const double arg = 0.5*square(qd*d_factor)*(a1*a1 + a2*a2 + a3*a3); 100 const double tanh_qd = tanh(arg); 101 const double cosh_qd = cosh(arg); 102 const double Zq = tanh_qd/(1. - cos(qd*a1)/cosh_qd) 103 * tanh_qd/(1. - cos(qd*a2)/cosh_qd) 104 * tanh_qd/(1. - cos(qd*a3)/cosh_qd); 102 105 103 const double Zq = sinh_qd/(cosh_qd - cos(qd*a1)) 104 * sinh_qd/(cosh_qd - cos(qd*a2)) 105 * sinh_qd/(cosh_qd - cos(qd*a3)); 106 //if (isnan(Zq)) printf("q:(%g,%g) qd: %g a1: %g a2: %g a3: %g arg: %g\n", qx, qy, qd, a1, a2, a3, arg); 106 107 107 108 const double Fq = sphere_form(q,radius,sld,solvent_sld)*Zq; -
sasmodels/models/sc_paracrystal.c
r11ca2ab r0b717c5 116 116 117 117 const double qd = q*dnn; 118 const double exp_qd = exp(0.5*square(qd*d_factor)); 119 const double sinh_qd = 0.5*exp_qd - 0.5/exp_qd; 120 const double cosh_qd = 0.5*exp_qd + 0.5/exp_qd; 121 122 const double Zq = sinh_qd/(cosh_qd - cos(qd*cos_a1)) 123 * sinh_qd/(cosh_qd - cos(qd*cos_a2)) 124 * sinh_qd/(cosh_qd - cos(qd*cos_a3)); 118 const double arg = 0.5*square(qd*d_factor); 119 const double tanh_qd = tanh(arg); 120 const double cosh_qd = cosh(arg); 121 const double Zq = tanh_qd/(1. - cos(qd*cos_a1)/cosh_qd) 122 * tanh_qd/(1. - cos(qd*cos_a2)/cosh_qd) 123 * tanh_qd/(1. - cos(qd*cos_a3)/cosh_qd); 125 124 126 125 const double Fq = sphere_form(q, radius, sphere_sld, solvent_sld)*Zq;
Note: See TracChangeset
for help on using the changeset viewer.