Changeset 0f00d95 in sasmodels
- Timestamp:
- Jul 28, 2016 2:47:07 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 4f1f876
- Parents:
- 2547694
- Location:
- sasmodels
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/generate.py
r739aad4 r0f00d95 166 166 import re 167 167 import string 168 import warnings169 168 170 169 import numpy as np # type: ignore -
sasmodels/kernel_iq.c
r56547a8 r0f00d95 173 173 174 174 175 double spherical_correction=1.0; 175 #if MAX_PD>0 176 176 const int theta_par = details->theta_par; 177 #if MAX_PD>0178 177 const int fast_theta = (theta_par == p0); 179 178 const int slow_theta = (theta_par >= 0 && !fast_theta); 179 double spherical_correction = 1.0; 180 180 #else 181 const int slow_theta = (theta_par >= 0); 181 // Note: if not polydisperse the weights cancel and we don't need the 182 // spherical correction. 183 const double spherical_correction = 1.0; 182 184 #endif 183 185 … … 218 220 const double weight1 = 1.0; 219 221 #endif 220 if (slow_theta) { // Theta is not in inner loop 221 spherical_correction = fmax(fabs(cos(M_PI_180*pvec[theta_par])), 1.e-6);222 }223 #if MAX_PD>0 222 #if MAX_PD>0 223 if (slow_theta) { // Theta is not in inner loop 224 spherical_correction = fmax(fabs(cos(M_PI_180*pvec[theta_par])), 1.e-6); 225 } 224 226 while(i0 < n0) { 225 227 pvec[p0] = v0[i0]; -
sasmodels/kernel_iq.cl
r56547a8 r0f00d95 166 166 167 167 168 double spherical_correction=1.0; 168 #if MAX_PD>0 169 169 const int theta_par = details->theta_par; 170 #if MAX_PD>0 171 const int fast_theta = (theta_par == p0);172 const int slow_theta = (theta_par >= 0 && !fast_theta);170 const bool fast_theta = (theta_par == p0); 171 const bool slow_theta = (theta_par >= 0 && !fast_theta); 172 double spherical_correction = 1.0; 173 173 #else 174 const int slow_theta = (theta_par >= 0); 174 // Note: if not polydisperse the weights cancel and we don't need the 175 // spherical correction. 176 const double spherical_correction = 1.0; 175 177 #endif 176 178 … … 211 213 const double weight1 = 1.0; 212 214 #endif 213 if (slow_theta) { // Theta is not in inner loop 214 spherical_correction = fmax(fabs(cos(M_PI_180*pvec[theta_par])), 1.e-6);215 }216 #if MAX_PD>0 215 #if MAX_PD>0 216 if (slow_theta) { // Theta is not in inner loop 217 spherical_correction = fmax(fabs(cos(M_PI_180*pvec[theta_par])), 1.e-6); 218 } 217 219 while(i0 < n0) { 218 220 pvec[p0] = v0[i0];
Note: See TracChangeset
for help on using the changeset viewer.