Changeset 34c2649 in sasview for sansmodels/src/sans/models/c_models
- Timestamp:
- Nov 21, 2011 2:52:25 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:
- 1810613
- Parents:
- afea8fe
- Location:
- sansmodels/src/sans/models/c_models
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/CHardsphereStructure.cpp
r35aface r34c2649 175 175 { 176 176 PyArrayObject *result; 177 int i, j, x_len, y_len, dims[1];177 int i, x_len, dims[1]; 178 178 //check validity of input vectors 179 179 if (x->nd != 1 || x->descr->type_num != PyArray_DOUBLE … … 188 188 189 189 x_len = dims[0]= x->dimensions[0]; 190 y_len = dims[0]= y->dimensions[0];191 190 192 191 // Make a new double matrix of same dims … … 346 345 static PyObject * calculate_ER(CHardsphereStructure *self) { 347 346 348 PyObject* pars;349 int npars;350 351 347 // Get parameters 352 348 -
sansmodels/src/sans/models/c_models/barbell.cpp
r4628e31 r34c2649 83 83 pi = 4.0*atan(1.0); 84 84 // Loop over radius weight points 85 for( int i=0; i<weights_rad_bar.size(); i++) {85 for(size_t i=0; i<weights_rad_bar.size(); i++) { 86 86 dp[1] = weights_rad_bar[i].value; 87 for( int j=0; j<weights_len_bar.size(); j++) {87 for(size_t j=0; j<weights_len_bar.size(); j++) { 88 88 dp[2] = weights_len_bar[j].value; 89 for( int k=0; k<weights_rad_bell.size(); k++) {89 for(size_t k=0; k<weights_rad_bell.size(); k++) { 90 90 dp[3] = weights_rad_bell[k].value; 91 91 … … 125 125 BarBellParameters dp; 126 126 127 double q = sqrt(qx*qx + qy*qy);128 127 dp.scale = scale(); 129 128 dp.rad_bar = rad_bar(); … … 163 162 double norm_vol = 0.0; 164 163 double vol = 0.0; 165 double pi,hDist ,result;164 double pi,hDist; 166 165 double vol_i = 0.0; 167 166 pi = 4.0*atan(1.0); 168 167 169 168 // Loop over radius weight points 170 for( int i=0; i<weights_rad_bar.size(); i++) {169 for(size_t i=0; i<weights_rad_bar.size(); i++) { 171 170 dp.rad_bar = weights_rad_bar[i].value; 172 for( int j=0; j<weights_len_bar.size(); j++) {171 for(size_t j=0; j<weights_len_bar.size(); j++) { 173 172 dp.len_bar = weights_len_bar[j].value; 174 for( int k=0; k<weights_rad_bell.size(); k++) {173 for(size_t k=0; k<weights_rad_bell.size(); k++) { 175 174 dp.rad_bell = weights_rad_bell[k].value; 176 175 // Average over theta distribution 177 for( int l=0; l< weights_theta.size(); l++) {176 for(size_t l=0; l< weights_theta.size(); l++) { 178 177 dp.theta = weights_theta[l].value; 179 178 // Average over phi distribution 180 for( int m=0; m< weights_phi.size(); m++) {179 for(size_t m=0; m< weights_phi.size(); m++) { 181 180 dp.phi = weights_phi[m].value; 182 181 //Un-normalize Form by volume … … 251 250 double BarBellModel :: calculate_ER() { 252 251 //NOT implemented yet!!! 253 } 252 return 0.0; 253 } -
sansmodels/src/sans/models/c_models/bcc.cpp
r4628e31 r34c2649 75 75 76 76 // Loop over radius weight points 77 for( int i=0; i<weights_rad.size(); i++) {77 for(size_t i=0; i<weights_rad.size(); i++) { 78 78 dp[3] = weights_rad[i].value; 79 79 … … 107 107 double BCCrystalModel :: operator()(double qx, double qy) { 108 108 BCParameters dp; 109 double q = sqrt(qx*qx + qy*qy);110 109 dp.scale = scale(); 111 110 dp.dnn = dnn(); … … 142 141 143 142 // Loop over radius weight points 144 for( int i=0; i<weights_rad.size(); i++) {143 for(size_t i=0; i<weights_rad.size(); i++) { 145 144 dp.radius = weights_rad[i].value; 146 145 // Average over theta distribution 147 for( int j=0; j< weights_theta.size(); j++) {146 for(size_t j=0; j< weights_theta.size(); j++) { 148 147 dp.theta = weights_theta[j].value; 149 148 // Average over phi distribution 150 for( int k=0; k< weights_phi.size(); k++) {149 for(size_t k=0; k< weights_phi.size(); k++) { 151 150 dp.phi = weights_phi[k].value; 152 151 // Average over phi distribution 153 for( int l=0; l< weights_psi.size(); l++) {152 for(size_t l=0; l< weights_psi.size(); l++) { 154 153 dp.psi = weights_psi[l].value; 155 154 //Un-normalize SphereForm by volume … … 207 206 double BCCrystalModel :: calculate_ER() { 208 207 //NOT implemented yet!!! 209 } 208 return 0.0; 209 } -
sansmodels/src/sans/models/c_models/binaryHS.cpp
rf9bf661 r34c2649 122 122 double BinaryHSModel :: calculate_ER() { 123 123 //NOT implemented yet!!! 124 double rad_out;124 return 0.0; 125 125 } 126 126 -
sansmodels/src/sans/models/c_models/binaryHS_PSF11.cpp
rf9bf661 r34c2649 120 120 double BinaryHSPSF11Model :: calculate_ER() { 121 121 //NOT implemented yet!!! 122 return 0.0; 122 123 } -
sansmodels/src/sans/models/c_models/capcyl.cpp
r4628e31 r34c2649 83 83 pi = 4.0*atan(1.0); 84 84 // Loop over radius weight points 85 for( int i=0; i<weights_rad_cyl.size(); i++) {85 for(size_t i=0; i<weights_rad_cyl.size(); i++) { 86 86 dp[1] = weights_rad_cyl[i].value; 87 for( int j=0; j<weights_len_cyl.size(); j++) {87 for(size_t j=0; j<weights_len_cyl.size(); j++) { 88 88 dp[2] = weights_len_cyl[j].value; 89 for( int k=0; k<weights_rad_cap.size(); k++) {89 for(size_t k=0; k<weights_rad_cap.size(); k++) { 90 90 dp[3] = weights_rad_cap[k].value; 91 91 … … 125 125 CapCylParameters dp; 126 126 127 double q = sqrt(qx*qx + qy*qy);128 127 dp.scale = scale(); 129 128 dp.rad_cyl = rad_cyl(); … … 162 161 double norm_vol = 0.0; 163 162 double vol = 0.0; 164 double pi,hDist ,result;163 double pi,hDist; 165 164 double vol_i = 0.0; 166 165 pi = 4.0*atan(1.0); 167 166 168 167 // Loop over radius weight points 169 for( int i=0; i<weights_rad_cyl.size(); i++) {168 for(size_t i=0; i<weights_rad_cyl.size(); i++) { 170 169 dp.rad_cyl = weights_rad_cyl[i].value; 171 for( int j=0; j<weights_len_cyl.size(); j++) {170 for(size_t j=0; j<weights_len_cyl.size(); j++) { 172 171 dp.len_cyl = weights_len_cyl[j].value; 173 for( int k=0; k<weights_rad_cap.size(); k++) {172 for(size_t k=0; k<weights_rad_cap.size(); k++) { 174 173 dp.rad_cap = weights_rad_cap[k].value; 175 174 // Average over theta distribution 176 for( int l=0; l< weights_theta.size(); l++) {175 for(size_t l=0; l< weights_theta.size(); l++) { 177 176 dp.theta = weights_theta[l].value; 178 177 // Average over phi distribution 179 for( int m=0; m< weights_phi.size(); m++) {178 for(size_t m=0; m< weights_phi.size(); m++) { 180 179 dp.phi = weights_phi[m].value; 181 180 //Un-normalize Form by volume … … 250 249 double CappedCylinderModel :: calculate_ER() { 251 250 //NOT implemented yet!!! 252 } 251 return 0.0; 252 } -
sansmodels/src/sans/models/c_models/corefourshell.cpp
r339ce67 r34c2649 103 103 104 104 // Loop over radius weight points 105 for( int i=0; i<weights_rad.size(); i++) {105 for(size_t i=0; i<weights_rad.size(); i++) { 106 106 dp[1] = weights_rad[i].value; 107 107 // Loop over radius weight points 108 for( int j=0; j<weights_s1.size(); j++) {108 for(size_t j=0; j<weights_s1.size(); j++) { 109 109 dp[3] = weights_s1[j].value; 110 110 // Loop over radius weight points 111 for( int k=0; k<weights_s2.size(); k++) {111 for(size_t k=0; k<weights_s2.size(); k++) { 112 112 dp[5] = weights_s2[k].value; 113 113 // Loop over radius weight points 114 for( int l=0; l<weights_s3.size(); l++) {114 for(size_t l=0; l<weights_s3.size(); l++) { 115 115 dp[7] = weights_s3[l].value; 116 116 // Loop over radius weight points 117 for( int m=0; m<weights_s4.size(); m++) {117 for(size_t m=0; m<weights_s4.size(); m++) { 118 118 dp[9] = weights_s4[m].value; 119 119 //Un-normalize FourShell by volume … … 206 206 207 207 // Loop over radius weight points 208 for( int i=0; i<weights_rad.size(); i++) {208 for(size_t i=0; i<weights_rad.size(); i++) { 209 209 dp.rad_core0 = weights_rad[i].value; 210 210 // Loop over radius weight points 211 for( int j=0; j<weights_s1.size(); j++) {211 for(size_t j=0; j<weights_s1.size(); j++) { 212 212 dp.thick_shell1 = weights_s1[j].value; 213 213 // Loop over radius weight points 214 for( int k=0; k<weights_s2.size(); k++) {214 for(size_t k=0; k<weights_s2.size(); k++) { 215 215 dp.thick_shell2 = weights_s2[k].value; 216 216 // Loop over radius weight points 217 for( int l=0; l<weights_s3.size(); l++) {217 for(size_t l=0; l<weights_s3.size(); l++) { 218 218 dp.thick_shell3 = weights_s3[l].value; 219 219 // Loop over radius weight points 220 for( int m=0; m<weights_s4.size(); m++) {220 for(size_t m=0; m<weights_s4.size(); m++) { 221 221 dp.thick_shell4 = weights_s4[m].value; 222 222 //Un-normalize FourShell by volume -
sansmodels/src/sans/models/c_models/coreshellcylinder.cpp
r4628e31 r34c2649 85 85 86 86 // Loop over radius weight points 87 for( int i=0; i<weights_rad.size(); i++) {87 for(size_t i=0; i<weights_rad.size(); i++) { 88 88 dp[1] = weights_rad[i].value; 89 89 90 90 // Loop over length weight points 91 for( int j=0; j<weights_len.size(); j++) {91 for(size_t j=0; j<weights_len.size(); j++) { 92 92 dp[3] = weights_len[j].value; 93 93 94 94 // Loop over thickness weight points 95 for( int k=0; k<weights_thick.size(); k++) {95 for(size_t k=0; k<weights_thick.size(); k++) { 96 96 dp[2] = weights_thick[k].value; 97 97 //Un-normalize by volume … … 169 169 double pi = 4.0*atan(1.0); 170 170 // Loop over radius weight points 171 for( int i=0; i<weights_rad.size(); i++) {171 for(size_t i=0; i<weights_rad.size(); i++) { 172 172 dp.radius = weights_rad[i].value; 173 173 174 174 175 175 // Loop over length weight points 176 for( int j=0; j<weights_len.size(); j++) {176 for(size_t j=0; j<weights_len.size(); j++) { 177 177 dp.length = weights_len[j].value; 178 178 179 179 // Loop over thickness weight points 180 for( int m=0; m<weights_thick.size(); m++) {180 for(size_t m=0; m<weights_thick.size(); m++) { 181 181 dp.thickness = weights_thick[m].value; 182 182 183 183 // Average over theta distribution 184 for( int k=0; k<weights_theta.size(); k++) {184 for(size_t k=0; k<weights_theta.size(); k++) { 185 185 dp.axis_theta = weights_theta[k].value; 186 186 187 187 // Average over phi distribution 188 for( int l=0; l<weights_phi.size(); l++) {188 for(size_t l=0; l<weights_phi.size(); l++) { 189 189 dp.axis_phi = weights_phi[l].value; 190 190 //Un-normalize by volume -
sansmodels/src/sans/models/c_models/coreshellsphere.cpp
rc451be9 r34c2649 78 78 79 79 // Loop over radius weight points 80 for( int i=0; i<weights_rad.size(); i++) {80 for(size_t i=0; i<weights_rad.size(); i++) { 81 81 dp[1] = weights_rad[i].value; 82 82 83 83 // Loop over thickness weight points 84 for( int j=0; j<weights_thick.size(); j++) {84 for(size_t j=0; j<weights_thick.size(); j++) { 85 85 dp[2] = weights_thick[j].value; 86 86 //Un-normalize SphereForm by volume -
sansmodels/src/sans/models/c_models/cylinder.cpp
r4628e31 r34c2649 78 78 79 79 // Loop over radius weight points 80 for( int i=0; i<weights_rad.size(); i++) {80 for(size_t i=0; i<weights_rad.size(); i++) { 81 81 dp[1] = weights_rad[i].value; 82 82 83 83 // Loop over length weight points 84 for( int j=0; j<weights_len.size(); j++) {84 for(size_t j=0; j<weights_len.size(); j++) { 85 85 dp[2] = weights_len[j].value; 86 86 //Un-normalize by volume … … 144 144 double pi = 4.0*atan(1.0); 145 145 // Loop over radius weight points 146 for( int i=0; i<weights_rad.size(); i++) {146 for(size_t i=0; i<weights_rad.size(); i++) { 147 147 dp.radius = weights_rad[i].value; 148 148 149 149 150 150 // Loop over length weight points 151 for( int j=0; j<weights_len.size(); j++) {151 for(size_t j=0; j<weights_len.size(); j++) { 152 152 dp.length = weights_len[j].value; 153 153 154 154 // Average over theta distribution 155 for( int k=0; k<weights_theta.size(); k++) {155 for(size_t k=0; k<weights_theta.size(); k++) { 156 156 dp.cyl_theta = weights_theta[k].value; 157 157 158 158 // Average over phi distribution 159 for( int l=0; l<weights_phi.size(); l++) {159 for(size_t l=0; l<weights_phi.size(); l++) { 160 160 dp.cyl_phi = weights_phi[l].value; 161 161 //Un-normalize by volume -
sansmodels/src/sans/models/c_models/ellipsoid.cpp
r4628e31 r34c2649 78 78 79 79 // Loop over radius_a weight points 80 for( int i=0; i<weights_rad_a.size(); i++) {80 for(size_t i=0; i<weights_rad_a.size(); i++) { 81 81 dp[1] = weights_rad_a[i].value; 82 82 83 83 // Loop over radius_b weight points 84 for( int j=0; j<weights_rad_b.size(); j++) {84 for(size_t j=0; j<weights_rad_b.size(); j++) { 85 85 dp[2] = weights_rad_b[j].value; 86 86 //Un-normalize by volume … … 147 147 double pi = 4.0*atan(1.0); 148 148 // Loop over radius weight points 149 for( int i=0; i<weights_rad_a.size(); i++) {149 for(size_t i=0; i<weights_rad_a.size(); i++) { 150 150 dp.radius_a = weights_rad_a[i].value; 151 151 152 152 153 153 // Loop over length weight points 154 for( int j=0; j<weights_rad_b.size(); j++) {154 for(size_t j=0; j<weights_rad_b.size(); j++) { 155 155 dp.radius_b = weights_rad_b[j].value; 156 156 157 157 // Average over theta distribution 158 for( int k=0; k<weights_theta.size(); k++) {158 for(size_t k=0; k<weights_theta.size(); k++) { 159 159 dp.axis_theta = weights_theta[k].value; 160 160 161 161 // Average over phi distribution 162 for( int l=0; l<weights_phi.size(); l++) {162 for(size_t l=0; l<weights_phi.size(); l++) { 163 163 dp.axis_phi = weights_phi[l].value; 164 164 //Un-normalize by volume -
sansmodels/src/sans/models/c_models/ellipticalcylinder.cpp
r4628e31 r34c2649 84 84 85 85 // Loop over r_minor weight points 86 for( int i=0; i<weights_rad.size(); i++) {86 for(size_t i=0; i<weights_rad.size(); i++) { 87 87 dp[1] = weights_rad[i].value; 88 88 89 89 // Loop over r_ratio weight points 90 for( int j=0; j<weights_rat.size(); j++) {90 for(size_t j=0; j<weights_rat.size(); j++) { 91 91 dp[2] = weights_rat[j].value; 92 92 93 93 // Loop over length weight points 94 for( int k=0; k<weights_len.size(); k++) {94 for(size_t k=0; k<weights_len.size(); k++) { 95 95 dp[3] = weights_len[k].value; 96 96 //Un-normalize by volume … … 172 172 double pi = 4.0*atan(1.0); 173 173 // Loop over minor radius weight points 174 for( int i=0; i<weights_rad.size(); i++) {174 for(size_t i=0; i<weights_rad.size(); i++) { 175 175 dp.r_minor = weights_rad[i].value; 176 176 177 177 178 178 // Loop over length weight points 179 for( int j=0; j<weights_len.size(); j++) {179 for(size_t j=0; j<weights_len.size(); j++) { 180 180 dp.length = weights_len[j].value; 181 181 182 182 // Loop over r_ration weight points 183 for( int m=0; m<weights_rat.size(); m++) {183 for(size_t m=0; m<weights_rat.size(); m++) { 184 184 dp.r_ratio = weights_rat[m].value; 185 185 186 186 // Average over theta distribution 187 for( int k=0; k<weights_theta.size(); k++) {187 for(size_t k=0; k<weights_theta.size(); k++) { 188 188 dp.cyl_theta = weights_theta[k].value; 189 189 190 190 // Average over phi distribution 191 for( int l=0; l<weights_phi.size(); l++) {191 for(size_t l=0; l<weights_phi.size(); l++) { 192 192 dp.cyl_phi = weights_phi[l].value; 193 193 194 194 // Average over phi distribution 195 for( int o=0; o<weights_psi.size(); o++) {195 for(size_t o=0; o<weights_psi.size(); o++) { 196 196 dp.cyl_psi = weights_psi[o].value; 197 197 //Un-normalize by volume … … 270 270 dp.length = length(); 271 271 double rad_out = 0.0; 272 double pi = 4.0*atan(1.0);273 272 double suf_rad = sqrt(dp.r_minor*dp.r_minor*dp.r_ratio); 274 273 … … 290 289 291 290 // Loop over minor radius weight points 292 for( int i=0; i<weights_rad.size(); i++) {291 for(size_t i=0; i<weights_rad.size(); i++) { 293 292 dp.r_minor = weights_rad[i].value; 294 293 295 294 // Loop over length weight points 296 for( int j=0; j<weights_len.size(); j++) {295 for(size_t j=0; j<weights_len.size(); j++) { 297 296 dp.length = weights_len[j].value; 298 297 299 298 // Loop over r_ration weight points 300 for( int m=0; m<weights_rat.size(); m++) {299 for(size_t m=0; m<weights_rat.size(); m++) { 301 300 dp.r_ratio = weights_rat[m].value; 302 301 //Calculate surface averaged radius -
sansmodels/src/sans/models/c_models/fcc.cpp
r4628e31 r34c2649 75 75 76 76 // Loop over radius weight points 77 for( int i=0; i<weights_rad.size(); i++) {77 for(size_t i=0; i<weights_rad.size(); i++) { 78 78 dp[3] = weights_rad[i].value; 79 79 … … 107 107 double FCCrystalModel :: operator()(double qx, double qy) { 108 108 FCParameters dp; 109 double q = sqrt(qx*qx + qy*qy);110 109 dp.scale = scale(); 111 110 dp.dnn = dnn(); … … 142 141 double pi = 4.0*atan(1.0); 143 142 // Loop over radius weight points 144 for( int i=0; i<weights_rad.size(); i++) {143 for(size_t i=0; i<weights_rad.size(); i++) { 145 144 dp.radius = weights_rad[i].value; 146 145 // Average over theta distribution 147 for( int j=0; j< weights_theta.size(); j++) {146 for(size_t j=0; j< weights_theta.size(); j++) { 148 147 dp.theta = weights_theta[j].value; 149 148 // Average over phi distribution 150 for( int k=0; k< weights_phi.size(); k++) {149 for(size_t k=0; k< weights_phi.size(); k++) { 151 150 dp.phi = weights_phi[k].value; 152 151 // Average over phi distribution 153 for( int l=0; l< weights_psi.size(); l++) {152 for(size_t l=0; l< weights_psi.size(); l++) { 154 153 dp.psi = weights_psi[l].value; 155 154 //Un-normalize SphereForm by volume … … 206 205 double FCCrystalModel :: calculate_ER() { 207 206 //NOT implemented yet!!! 208 } 207 return 0.0; 208 } -
sansmodels/src/sans/models/c_models/fractal.cpp
rc724ccd r34c2649 71 71 72 72 // Loop over radius weight points 73 for( int i=0; i<weights_rad.size(); i++) {73 for(size_t i=0; i<weights_rad.size(); i++) { 74 74 dp[1] = weights_rad[i].value; 75 75 … … 118 118 double FractalModel :: calculate_ER() { 119 119 //NOT implemented yet!!! 'cause None shape Model 120 return 0.0; 120 121 } -
sansmodels/src/sans/models/c_models/fuzzysphere.cpp
rc724ccd r34c2649 68 68 69 69 // Loop over radius weight points 70 for( int i=0; i<weights_radius.size(); i++) {70 for(size_t i=0; i<weights_radius.size(); i++) { 71 71 dp[1] = weights_radius[i].value; 72 72 // Loop over fuzziness weight points 73 for( int j=0; j<weights_fuzziness.size(); j++) {73 for(size_t j=0; j<weights_fuzziness.size(); j++) { 74 74 dp[2] = weights_fuzziness[j].value; 75 75 … … 119 119 */ 120 120 double FuzzySphereModel :: calculate_ER() { 121 FuzzySphereParameters dp;122 dp.scale = scale();123 dp.radius = radius();124 dp.fuzziness = fuzziness();125 dp.sldSph = sldSph();126 dp.sldSolv = sldSolv();127 dp.background = background();128 121 double rad_out = 0.0; 129 122 … … 137 130 radius.get_weights(weights_radius); 138 131 // Loop over radius weight points to average the radius value 139 for( int i=0; i<weights_radius.size(); i++) {132 for(size_t i=0; i<weights_radius.size(); i++) { 140 133 sum += weights_radius[i].weight 141 134 * weights_radius[i].value; -
sansmodels/src/sans/models/c_models/lamellar.cpp
rf9bf661 r34c2649 106 106 double LamellarModel :: calculate_ER() { 107 107 //NOT implemented yet!!! 108 return 0.0; 108 109 } -
sansmodels/src/sans/models/c_models/lamellarFF_HG.cpp
rf9bf661 r34c2649 119 119 double LamellarFFHGModel :: calculate_ER() { 120 120 //NOT implemented yet!!! 121 return 0.0; 121 122 } -
sansmodels/src/sans/models/c_models/lamellarPC.cpp
r339ce67 r34c2649 118 118 double LamellarPCrystalModel :: calculate_ER() { 119 119 //NOT implemented yet!!! 120 return 0.0; 120 121 } -
sansmodels/src/sans/models/c_models/lamellarPS.cpp
rf10063e r34c2649 117 117 double LamellarPSModel :: calculate_ER() { 118 118 //NOT implemented yet!!! 119 return 0.0; 119 120 } 120 121 -
sansmodels/src/sans/models/c_models/lamellarPS_HG.cpp
rf9bf661 r34c2649 135 135 double LamellarPSHGModel :: calculate_ER() { 136 136 //NOT implemented yet!!! 137 return 0.0; 137 138 } 138 139 -
sansmodels/src/sans/models/c_models/onion.cpp
r339ce67 r34c2649 223 223 224 224 // Loop over radius weight points 225 for( int i=0; i<weights_rad.size(); i++) {225 for(size_t i=0; i<weights_rad.size(); i++) { 226 226 dp[2] = weights_rad[i].value; 227 227 // Loop over radius weight points 228 for( int j=0; j<weights_s1.size(); j++) {228 for(size_t j=0; j<weights_s1.size(); j++) { 229 229 dp[36] = weights_s1[j].value; 230 230 // Loop over radius weight points 231 for( int k=0; k<weights_s2.size(); k++) {231 for(size_t k=0; k<weights_s2.size(); k++) { 232 232 dp[37] = weights_s2[k].value; 233 233 // Loop over radius weight points 234 for( int l=0; l<weights_s3.size(); l++) {234 for(size_t l=0; l<weights_s3.size(); l++) { 235 235 dp[38] = weights_s3[l].value; 236 236 // Loop over radius weight points 237 for( int m=0; m<weights_s4.size(); m++) {237 for(size_t m=0; m<weights_s4.size(); m++) { 238 238 dp[39] = weights_s4[m].value; 239 for( int n=0; n<weights_s5.size(); n++) {239 for(size_t n=0; n<weights_s5.size(); n++) { 240 240 dp[40] = weights_s5[n].value; 241 for( int o=0; o<weights_s6.size(); o++) {241 for(size_t o=0; o<weights_s6.size(); o++) { 242 242 dp[41] = weights_s6[o].value; 243 for( int p=0; p<weights_s7.size(); p++) {243 for(size_t p=0; p<weights_s7.size(); p++) { 244 244 dp[42] = weights_s7[p].value; 245 for( int t=0; t<weights_s8.size(); t++) {245 for(size_t t=0; t<weights_s8.size(); t++) { 246 246 dp[43] = weights_s8[t].value; 247 for( int r=0; r<weights_s9.size(); r++) {247 for(size_t r=0; r<weights_s9.size(); r++) { 248 248 dp[44] = weights_s9[r].value; 249 for( int s=0; s<weights_s10.size(); s++) {249 for(size_t s=0; s<weights_s10.size(); s++) { 250 250 dp[45] = weights_s10[s].value; 251 251 //Un-normalize Shells by volume … … 375 375 376 376 // Loop over radius weight points 377 for( int i=0; i<weights_rad.size(); i++) {377 for(size_t i=0; i<weights_rad.size(); i++) { 378 378 dp.rad_core0 = weights_rad[i].value; 379 379 // Loop over radius weight points 380 for( int j=0; j<weights_s1.size(); j++) {380 for(size_t j=0; j<weights_s1.size(); j++) { 381 381 dp.thick_shell1 = weights_s1[j].value; 382 382 // Loop over radius weight points 383 for( int k=0; k<weights_s2.size(); k++) {383 for(size_t k=0; k<weights_s2.size(); k++) { 384 384 dp.thick_shell2 = weights_s2[k].value; 385 385 // Loop over radius weight points 386 for( int l=0; l<weights_s3.size(); l++) {386 for(size_t l=0; l<weights_s3.size(); l++) { 387 387 dp.thick_shell3 = weights_s3[l].value; 388 388 // Loop over radius weight points 389 for( int m=0; m<weights_s4.size(); m++) {389 for(size_t m=0; m<weights_s4.size(); m++) { 390 390 dp.thick_shell4 = weights_s4[m].value; 391 391 // Loop over radius weight points 392 for( int n=0; j<weights_s5.size(); n++) {392 for(size_t n=0; j<weights_s5.size(); n++) { 393 393 dp.thick_shell5 = weights_s5[n].value; 394 394 // Loop over radius weight points 395 for( int o=0; k<weights_s6.size(); o++) {395 for(size_t o=0; k<weights_s6.size(); o++) { 396 396 dp.thick_shell6 = weights_s6[o].value; 397 397 // Loop over radius weight points 398 for( int p=0; l<weights_s7.size(); p++) {398 for(size_t p=0; l<weights_s7.size(); p++) { 399 399 dp.thick_shell7 = weights_s7[p].value; 400 400 // Loop over radius weight points 401 for( int t=0; m<weights_s8.size(); t++) {401 for(size_t t=0; m<weights_s8.size(); t++) { 402 402 dp.thick_shell8 = weights_s8[t].value; 403 403 // Loop over radius weight points 404 for( int r=0; l<weights_s9.size(); r++) {404 for(size_t r=0; l<weights_s9.size(); r++) { 405 405 dp.thick_shell8 = weights_s9[r].value; 406 406 // Loop over radius weight points 407 for( int s=0; m<weights_s10.size(); s++) {407 for(size_t s=0; m<weights_s10.size(); s++) { 408 408 dp.thick_shell10 = weights_s10[s].value; 409 409 //Un-normalize FourShell by volume -
sansmodels/src/sans/models/c_models/parameters.cpp
ra5e14410 r34c2649 171 171 172 172 double rectangle_weight(double mean, double sigma, double x) { 173 double vary, expo_value;174 173 double wid = fabs(sigma) * sqrt(3.0); 175 174 if (x>= (mean-wid) && x<=(mean+wid)){ … … 265 264 double value = (*par)(); 266 265 double sig; 267 double log_value;268 266 if (npts<2) { 269 267 weights.insert(weights.end(), WeightPoint(value, 1.0)); … … 316 314 317 315 double schulz_weight(double mean, double sigma, double x) { 318 double vary, expo_value;319 316 double z = pow(mean/ sigma, 2.0)-1.0; 320 317 double R= x/mean; … … 463 460 double Parameter :: operator=(double _value){ 464 461 value = _value; 465 } 462 return value; 463 } -
sansmodels/src/sans/models/c_models/pearlnecklace.cpp
r463eb76e r34c2649 60 60 double tot_vol = 0.0; 61 61 // Loop over core weight points 62 for( int i=0; i<weights_radius.size(); i++) {62 for(size_t i=0; i<weights_radius.size(); i++) { 63 63 dp[1] = weights_radius[i].value; 64 64 // Loop over thick_inter0 weight points 65 for( int j=0; j<weights_edge_separation.size(); j++) {65 for(size_t j=0; j<weights_edge_separation.size(); j++) { 66 66 dp[2] = weights_edge_separation[j].value; 67 67 pearl_vol = 4.0 /3.0 * pi * pow(dp[1], 3); … … 142 142 double tot_vol = 0.0; 143 143 // Loop over core weight points 144 for( int i=0; i<weights_radius.size(); i++) {144 for(size_t i=0; i<weights_radius.size(); i++) { 145 145 dp.radius = weights_radius[i].value; 146 146 // Loop over thick_inter0 weight points 147 for( int j=0; j<weights_edge_separation.size(); j++) {147 for(size_t j=0; j<weights_edge_separation.size(); j++) { 148 148 dp.edge_separation = weights_edge_separation[j].value; 149 149 pearl_vol = 4.0 /3.0 * pi * pow(dp.radius , 3); -
sansmodels/src/sans/models/c_models/polygausscoil.cpp
r8569cb9 r34c2649 67 67 68 68 // Loop over radius weight points 69 for( int i=0; i<weights_rad.size(); i++) {69 for(size_t i=0; i<weights_rad.size(); i++) { 70 70 dp[1] = weights_rad[i].value; 71 71 … … 117 117 */ 118 118 double Poly_GaussCoil :: calculate_ER() { 119 PolyGaussCoilParameters dp;120 dp.scale = scale();121 dp.rg= rg();122 dp.poly_m = poly_m();123 dp.background = background();124 119 double rad_out = 0.0; 125 120 … … 132 127 rg.get_weights(weights_rad); 133 128 // Loop over radius weight points to average the radius value 134 for( int i=0; i<weights_rad.size(); i++) {129 for(size_t i=0; i<weights_rad.size(); i++) { 135 130 sum += weights_rad[i].weight 136 131 * weights_rad[i].value; -
sansmodels/src/sans/models/c_models/refl.cpp
raae7a8d r34c2649 170 170 double ReflModel :: calculate_ER() { 171 171 //NOT implemented yet!!! 172 return 0.0; 172 173 } -
sansmodels/src/sans/models/c_models/refl_adv.cpp
raae7a8d r34c2649 222 222 double ReflAdvModel :: calculate_ER() { 223 223 //NOT implemented yet!!! 224 } 224 return 0.0; 225 } -
sansmodels/src/sans/models/c_models/rpa.cpp
r35aface r34c2649 149 149 double RPAModel :: calculate_ER() { 150 150 //NOT implemented!!! 151 return 0.0; 151 152 } -
sansmodels/src/sans/models/c_models/sc.cpp
r4628e31 r34c2649 75 75 76 76 // Loop over radius weight points 77 for( int i=0; i<weights_rad.size(); i++) {77 for(size_t i=0; i<weights_rad.size(); i++) { 78 78 dp[3] = weights_rad[i].value; 79 79 … … 107 107 double SCCrystalModel :: operator()(double qx, double qy) { 108 108 SCParameters dp; 109 double q = sqrt(qx*qx + qy*qy);110 109 dp.scale = scale(); 111 110 dp.dnn = dnn(); … … 142 141 double pi = 4.0*atan(1.0); 143 142 // Loop over radius weight points 144 for( int i=0; i<weights_rad.size(); i++) {143 for(size_t i=0; i<weights_rad.size(); i++) { 145 144 dp.radius = weights_rad[i].value; 146 145 // Average over theta distribution 147 for( int j=0; j< weights_theta.size(); j++) {146 for(size_t j=0; j< weights_theta.size(); j++) { 148 147 dp.theta = weights_theta[j].value; 149 148 // Average over phi distribution 150 for( int k=0; k< weights_phi.size(); k++) {149 for(size_t k=0; k< weights_phi.size(); k++) { 151 150 dp.phi = weights_phi[k].value; 152 151 // Average over phi distribution 153 for( int l=0; l< weights_psi.size(); l++) {152 for(size_t l=0; l< weights_psi.size(); l++) { 154 153 dp.psi = weights_psi[l].value; 155 154 //Un-normalize SphereForm by volume … … 212 211 double SCCrystalModel :: calculate_ER() { 213 212 //NOT implemented yet!!! 214 } 213 return 0.0; 214 } -
sansmodels/src/sans/models/c_models/sld_cal.cpp
r0164899a r34c2649 69 69 double SLDCalFunc :: calculate_ER() { 70 70 //NOT implemented yet!!! 71 return 0.0; 71 72 } -
sansmodels/src/sans/models/c_models/sphere.cpp
rf10063e r34c2649 67 67 68 68 // Loop over radius weight points 69 for( int i=0; i<weights_rad.size(); i++) {69 for(size_t i=0; i<weights_rad.size(); i++) { 70 70 dp[1] = weights_rad[i].value; 71 71 … … 113 113 */ 114 114 double SphereModel :: calculate_ER() { 115 SphereParameters dp;116 dp.scale = scale();117 dp.radius = radius();118 dp.sldSph = sldSph();119 dp.sldSolv = sldSolv();120 dp.background = background();121 115 double rad_out = 0.0; 122 116 … … 129 123 radius.get_weights(weights_rad); 130 124 // Loop over radius weight points to average the radius value 131 for( int i=0; i<weights_rad.size(); i++) {125 for(size_t i=0; i<weights_rad.size(); i++) { 132 126 sum += weights_rad[i].weight 133 127 * weights_rad[i].value; -
sansmodels/src/sans/models/c_models/spheresld.cpp
r7a8faf8 r34c2649 174 174 175 175 // Loop over core weight points 176 for( int i=0; i<weights_rad_core0.size(); i++) {176 for(size_t i=0; i<weights_rad_core0.size(); i++) { 177 177 dp[59] = weights_rad_core0[i].value; 178 178 // Loop over thick_inter0 weight points 179 for( int j=0; j<weights_thick_inter0.size(); j++) {179 for(size_t j=0; j<weights_thick_inter0.size(); j++) { 180 180 dp[2] = weights_thick_inter0[j].value; 181 181 … … 273 273 thick_inter0.get_weights(weights_thick_inter0); 274 274 // Loop over radius weight points 275 for( int i=0; i<weights_rad_core0.size(); i++) {275 for(size_t i=0; i<weights_rad_core0.size(); i++) { 276 276 dp.rad_core0 = weights_rad_core0[i].value; 277 277 // Loop over radius weight points 278 for( int j=0; j<weights_thick_inter0.size(); j++) {278 for(size_t j=0; j<weights_thick_inter0.size(); j++) { 279 279 dp.thick_inter0 = weights_thick_inter0[j].value; 280 280 rad_out = dp.rad_core0 + dp.thick_inter0;
Note: See TracChangeset
for help on using the changeset viewer.