Changeset 830622f in sasview
- Timestamp:
- Nov 30, 2011 1:27:22 PM (13 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 2585545
- Parents:
- 01a870d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_extensions/spheresld.c
r890ac7f1 r830622f 21 21 double background = dp[6]; 22 22 double npts = dp[57]; //number of sub_layers in each interface 23 24 double sld[n+2],thick_inter[n+2],thick[n+2],fun_coef[n+2],total_thick; 23 double nsl=npts;//21.0; //nsl = Num_sub_layer: MUST ODD number in double //no other number works now 24 int n_s; 25 int floor_nsl; 26 27 double sld_i,sld_f,dz,bes,fun,f,vol,vol_pre,vol_sub,qr,r,contr,f2; 28 double sign,slope=0.0; 29 double pi; 30 double r0 = 0.0, thick_inter_f; 31 32 int* fun_type; 33 double* sld; 34 double* thick_inter; 35 double* thick; 36 double* fun_coef; 37 38 double total_thick; 39 40 fun_type = (int*)malloc(n+2); 41 sld = (double*)malloc(n+2); 42 thick_inter = (double*)malloc(n+2); 43 thick = (double*)malloc(n+2); 44 fun_coef = (double*)malloc(n+2); 45 25 46 fun_type[0] = dp[3]; 26 47 fun_coef[0] = fabs(dp[58]); … … 40 61 thick_inter[n+1] = 0.0; 41 62 fun_coef[n+1] = 0.0; 42 43 double nsl=npts;//21.0; //nsl = Num_sub_layer: MUST ODD number in double //no other number works now44 int n_s;45 int floor_nsl;46 47 double sld_i,sld_f,dz,bes,fun,f,vol,vol_pre,vol_sub,qr,r,contr,f2;48 double sign,slope=0.0;49 double pi;50 double r0 = 0.0, thick_inter_f;51 63 52 64 pi = 4.0*atan(1.0); … … 144 156 f2 *= scale; 145 157 f2 += background; 158 159 free(fun_type); 160 free(sld); 161 free(sld_im); 162 free(thick_inter); 163 free(thick); 164 free(fun_coef); 165 146 166 return (f2); 147 167 }
Note: See TracChangeset
for help on using the changeset viewer.