- Timestamp:
- Apr 20, 2017 11:59:12 AM (8 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 4a43871
- Parents:
- 7e0b281
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
explore/sc.c
r7e0b281 r64ca163 4 4 // Rewriting equations for efficiency, accuracy and readability, and so 5 5 // code is reusable between 1D and 2D models. 6 #if 1 // SC 6 7 const double a1 = qa; 7 8 const double a2 = qb; 8 9 const double a3 = qc; 10 #elif 1 // BCC 11 const double a1 = (+qa + qb + qc)/2.; 12 const double a2 = (-qa - qb + qc)/2.; 13 const double a3 = (-qa + qb - qc)/2.; 14 #elif 1 // FCC 15 const double a1 = ( qa + qb)/2.0; 16 const double a2 = (-qa + qc)/2.0; 17 const double a3 = (-qa + qb)/2.0; 18 #endif 9 19 10 20 const double arg = -0.5*square(dnn*d_factor)*(a1*a1 + a2*a2 + a3*a3); … … 113 123 } 114 124 115 return Zq;125 //return Zq; 116 126 const double Pq = sphere_form(q, radius, sld, solvent_sld); 117 127 return sc_volume_fraction(radius, dnn) * Pq * Zq; … … 134 144 const double Pq = sphere_form(q, radius, sld, solvent_sld); 135 145 const double Zq = sc_Zq(qa, qb, qc, dnn, d_factor); 146 return Zq; 136 147 return sc_volume_fraction(radius, dnn) * Pq * Zq; 137 148 }
Note: See TracChangeset
for help on using the changeset viewer.