Changeset a6f9577 in sasmodels for sasmodels/kernel_iq.c
- Timestamp:
- Mar 21, 2016 7:40:25 AM (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:
- 9f4409a
- Parents:
- 39cc3be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/kernel_iq.c
r39cc3be ra6f9577 18 18 19 19 typedef struct { 20 int32_t pd_par[MAX_PD]; // i ndexof the nth polydispersity variable20 int32_t pd_par[MAX_PD]; // id of the nth polydispersity variable 21 21 int32_t pd_length[MAX_PD]; // length of the nth polydispersity weight vector 22 22 int32_t pd_offset[MAX_PD]; // offset of pd weights in the par & weight vector … … 25 25 int32_t par_offset[NPARS]; // offset of par values in the par & weight vector 26 26 int32_t par_coord[NPARS]; // polydispersity coordination bitvector 27 int32_t fast_coord_ index[NPARS]; // indexof the fast coordination parameters27 int32_t fast_coord_pars[NPARS]; // ids of the fast coordination parameters 28 28 int32_t fast_coord_count; // number of parameters coordinated with pd 1 29 29 int32_t theta_var; // id of spherical correction variable 30 int32_t fast_theta; // true if spherical correction depends on pd 131 30 } ProblemDetails; 32 31 … … 55 54 double *pvec = (double *)(&local_pars); // Alias named parameters with a vector 56 55 57 local int offset[NPARS -2];56 local int offset[NPARS]; // NPARS excludes scale/background 58 57 59 58 #if 1 // defined(USE_SHORTCUT_OPTIMIZATION) … … 155 154 spherical_correction = fabs(cos(M_PI_180*pvec[problem->theta_var])); 156 155 } 157 if ( !problem->fast_theta) {156 if (problem->theta_var == problem->pd_par[0]) { 158 157 weight *= spherical_correction; 159 158 } … … 167 166 if (problem->pd_isvol[0]) vol_weight *= wi; 168 167 for (int k=0; k < problem->fast_coord_count; k++) { 169 pvec[problem->fast_coord_ index[k]]170 = pars[offset[problem->fast_coord_ index[k]]++];171 } 172 if (problem-> fast_theta) {168 pvec[problem->fast_coord_pars[k]] 169 = pars[offset[problem->fast_coord_pars[k]]++]; 170 } 171 if (problem->theta_var ==problem->pd_par[0]) { 173 172 weight *= fabs(cos(M_PI_180*pvec[problem->theta_var])); 174 173 }
Note: See TracChangeset
for help on using the changeset viewer.