Changeset 7e82256 in sasview for src/sas/sascalc/calculator/c_extensions/sld2i.c
- Timestamp:
- Nov 13, 2017 11:51:56 AM (7 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 95d7c4f
- Parents:
- f926abb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/calculator/c_extensions/sld2i.c
r54b0650 r7e82256 65 65 66 66 double count = 0.0; 67 //check if this computation is for averaging67 int i, j; 68 68 69 69 //Assume that pixel volumes are given in vol_pix in A^3 unit … … 75 75 76 76 //printf("npoints: %d, npix: %d\n", npoints, this->n_pix); 77 for(i nt i=0; i<npoints; i++){77 for(i=0; i<npoints; i++){ 78 78 //I_out[i] = 0.0; 79 79 sumj_uu = cassign(0.0, 0.0); … … 84 84 //q = sqrt(qx[i]*qx[i] + qy[i]*qy[i]); // + qz[i]*qz[i]); 85 85 86 for( intj=0; j<this->n_pix; j++){86 for(j=0; j<this->n_pix; j++){ 87 87 if (this->sldn_val[j]!=0.0 88 88 ||this->mx_val[j]!=0.0 … … 156 156 double sld_j = 0.0; 157 157 double count = 0.0; 158 int i, j, k; 159 158 160 //Assume that pixel volumes are given in vol_pix in A^3 unit 159 161 // Loop over q-values and multiply apply matrix 160 for(i nt i=0; i<npoints; i++){162 for(i=0; i<npoints; i++){ 161 163 sumj =0.0; 162 for( intj=0; j<this->n_pix; j++){164 for(j=0; j<this->n_pix; j++){ 163 165 //Isotropic: Assumes all slds are real (no magnetic) 164 166 //Also assumes there is no polarization: No dependency on spin … … 177 179 //full calculation 178 180 //pragma omp parallel for 179 for( intk=0; k<this->n_pix; k++){181 for(k=0; k<this->n_pix; k++){ 180 182 sld_j = this->sldn_val[j] * this->sldn_val[k] * this->vol_pix[j] * this->vol_pix[k]; 181 183 qr = (this->x_val[j]-this->x_val[k])*(this->x_val[j]-this->x_val[k])+
Note: See TracChangeset
for help on using the changeset viewer.