Changeset 7296219 in sasview
- Timestamp:
- Nov 30, 2011 3:22:59 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:
- 01a870d
- Parents:
- 72da06f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_extensions/refl_adv.c
r890ac7f1 r7296219 15 15 double re_adv_kernel(double dp[], double q) { 16 16 int n = dp[0]; 17 int i,j ,fun_type[n+2];17 int i,j; 18 18 double nsl; 19 19 … … 25 25 double npts = dp[69]; //number of sub_layers in each interface 26 26 27 double sld[n+2],sld_im[n+2],thick_inter[n+2],thick[n+2],fun_coef[n+2],total_thick;27 double total_thick; 28 28 29 29 int n_s; … … 31 31 double sign,erfunc; 32 32 double pi; 33 34 int* fun_type; 35 double* sld; 36 double* sld_im 37 double* thick_inter; 38 double* thick; 39 double* fun_coef; 40 complex inv_n,phi1,alpha,alpha2,kn,fnm,fnp,rn,Xn,nn,nn2,an,nnp1,one,zero,two,n_sub,n_sup,knp1,Xnp1; 41 42 fun_type = (int*)malloc(n+2); 43 sld = (double*)malloc(n+2); 44 sld_im = (double*)malloc(n+2); 45 thick_inter = (double*)malloc(n+2); 46 thick = (double*)malloc(n+2); 47 fun_coef = (double*)malloc(n+2); 33 48 34 49 fun_type[0] = dp[3]; … … 57 72 nsl=npts;//21.0; //nsl = Num_sub_layer: MUST ODD number in double //no other number works now 58 73 59 complex inv_n,phi1,alpha,alpha2,kn,fnm,fnp,rn,Xn,nn,nn2,an,nnp1,one,zero,two,n_sub,n_sup,knp1,Xnp1;60 74 pi = 4.0*atan(1.0); 61 75 one = cassign(1.0,0.0); … … 138 152 R += background; 139 153 154 free(fun_type); 155 free(sld); 156 free(sld_im); 157 free(thick_inter); 158 free(thick); 159 free(fun_coef); 160 140 161 return R; 141 162
Note: See TracChangeset
for help on using the changeset viewer.