Changeset bde38b5 in sasmodels for sasmodels/kernel_iq.cl
- Timestamp:
- Aug 14, 2016 9:12:40 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:
- ac98886
- Parents:
- b1c40bee
- git-author:
- Paul Kienzle <pkienzle@…> (08/14/16 21:08:59)
- git-committer:
- Paul Kienzle <pkienzle@…> (08/14/16 21:12:40)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_iq.cl
r4f1f876 rbde38b5 22 22 int32_t pd_stride[MAX_PD]; // stride to move to the next index at this level 23 23 #endif // MAX_PD > 0 24 int32_t pd_prod;// total number of voxels in hypercube25 int32_t pd_sum;// total length of the weights vector24 int32_t num_eval; // total number of voxels in hypercube 25 int32_t num_weights; // total length of the weights vector 26 26 int32_t num_active; // number of non-trivial pd loops 27 27 int32_t theta_par; // id of spherical correction variable … … 90 90 91 91 // Storage for the current parameter values. These will be updated as we 92 // walk the polydispersity cube. local_values will be aliased to pvec.92 // walk the polydispersity cube. 93 93 ParameterBlock local_values; 94 95 // Fill in the initial variables96 for (int i=0; i < NUM_PARS; i++) {97 local_values.vector[i] = values[2+i];98 //if (q_index==0) printf("p%d = %g\n",i, local_values.vector[i]);99 }100 94 101 95 #if defined(MAGNETIC) && NUM_MAGNETIC>0 … … 117 111 #endif // MAGNETIC 118 112 119 double pd_norm, this_result; 120 if (pd_start == 0) { 121 pd_norm = this_result = 0.0; 122 } else { 123 pd_norm = result[nq]; 124 this_result = result[q_index]; 125 } 113 // Fill in the initial variables 114 // values[0] is scale 115 // values[1] is background 116 for (int i=0; i < NUM_PARS; i++) { 117 local_values.vector[i] = values[2+i]; 118 //if (q_index==0) printf("p%d = %g\n",i, local_values.vector[i]); 119 } 120 //if (q_index==0) printf("NUM_VALUES:%d NUM_PARS:%d MAX_PD:%d\n", NUM_VALUES, NUM_PARS, MAX_PD); 121 //if (q_index==0) printf("start:%d stop:%d\n", pd_start, pd_stop); 122 123 double pd_norm = (pd_start == 0 ? 0.0 : result[nq]); 124 double this_result = (pd_start == 0 ? 0.0 : result[q_index]); 126 125 //if (q_index==0) printf("start %d %g %g\n", pd_start, pd_norm, this_result); 127 126 128 127 #if MAX_PD>0 129 global const double *pd_value = values + NUM_VALUES + 2;130 global const double *pd_weight = pd_value + details-> pd_sum;128 global const double *pd_value = values + NUM_VALUES; 129 global const double *pd_weight = pd_value + details->num_weights; 131 130 #endif 132 131 … … 256 255 // TODO: what is the magnetic scattering at q=0 257 256 if (qsq > 1.e-16) { 258 double p[4]; // spin_i, spin_f257 double p[4]; // dd, du, ud, uu 259 258 p[0] = (qy*cos_mspin + qx*sin_mspin)/qsq; 260 259 p[3] = -p[0];
Note: See TracChangeset
for help on using the changeset viewer.