Changeset 8e36cdd in sasview for sansmodels/src/sans/models/c_models/parallelepiped.cpp
- Timestamp:
- Aug 20, 2009 1:24:23 PM (15 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:
- 1d67243
- Parents:
- 191b369
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/parallelepiped.cpp
r3c102d4 r8e36cdd 37 37 short_a = Parameter(35.0, true); 38 38 short_a.set_max(1.0); 39 long_b = Parameter(75.0, true);40 long_b.set_min(1.0);41 long er_c = Parameter(400.0, true);42 long er_c.set_min(1.0);39 short_b = Parameter(75.0, true); 40 short_b.set_min(1.0); 41 long_c = Parameter(400.0, true); 42 long_c.set_min(1.0); 43 43 contrast = Parameter(53.e-7); 44 44 background = Parameter(0.0); … … 61 61 dp[0] = scale(); 62 62 dp[1] = short_a(); 63 dp[2] = long_b();64 dp[3] = long er_c();63 dp[2] = short_b(); 64 dp[3] = long_c(); 65 65 dp[4] = contrast(); 66 66 dp[5] = 0.0; … … 71 71 72 72 // Get the dispersion points for the longer_edgeB 73 vector<WeightPoint> weights_ long_b;74 long_b.get_weights(weights_long_b);73 vector<WeightPoint> weights_short_b; 74 short_b.get_weights(weights_short_b); 75 75 76 76 // Get the dispersion points for the longuest_edgeC 77 vector<WeightPoint> weights_long er_c;78 long er_c.get_weights(weights_longer_c);77 vector<WeightPoint> weights_long_c; 78 long_c.get_weights(weights_long_c); 79 79 80 80 … … 89 89 90 90 // Loop over longer_edgeB weight points 91 for(int j=0; j< (int)weights_ long_b.size(); j++) {92 dp[2] = weights_ long_b[j].value;91 for(int j=0; j< (int)weights_short_b.size(); j++) { 92 dp[2] = weights_short_b[j].value; 93 93 94 94 // Loop over longuest_edgeC weight points 95 for(int k=0; k< (int)weights_long er_c.size(); k++) {96 dp[3] = weights_long er_c[k].value;97 98 sum += weights_short_a[i].weight * weights_ long_b[j].weight99 * weights_long er_c[k].weight * Parallelepiped(dp, q);95 for(int k=0; k< (int)weights_long_c.size(); k++) { 96 dp[3] = weights_long_c[k].value; 97 98 sum += weights_short_a[i].weight * weights_short_b[j].weight 99 * weights_long_c[k].weight * Parallelepiped(dp, q); 100 100 101 101 norm += weights_short_a[i].weight 102 * weights_ long_b[j].weight * weights_longer_c[k].weight;102 * weights_short_b[j].weight * weights_long_c[k].weight; 103 103 } 104 104 } … … 117 117 dp.scale = scale(); 118 118 dp.short_a = short_a(); 119 dp. long_b = long_b();120 dp.long er_c = longer_c();119 dp.short_b = short_b(); 120 dp.long_c = long_c(); 121 121 dp.contrast = contrast(); 122 122 dp.background = 0.0; … … 132 132 133 133 // Get the dispersion points for the longer_edgeB 134 vector<WeightPoint> weights_ long_b;135 long_b.get_weights(weights_long_b);134 vector<WeightPoint> weights_short_b; 135 short_b.get_weights(weights_short_b); 136 136 137 137 // Get angular averaging for the longuest_edgeC 138 vector<WeightPoint> weights_long er_c;139 long er_c.get_weights(weights_longer_c);138 vector<WeightPoint> weights_long_c; 139 long_c.get_weights(weights_long_c); 140 140 141 141 // Get angular averaging for theta … … 160 160 161 161 // Loop over longer_edgeB weight points 162 for(int j=0; j< (int)weights_ long_b.size(); j++) {163 dp. long_b = weights_long_b[j].value;162 for(int j=0; j< (int)weights_short_b.size(); j++) { 163 dp.short_b = weights_short_b[j].value; 164 164 165 165 // Average over longuest_edgeC distribution 166 for(int k=0; k< (int)weights_long er_c.size(); k++) {167 dp.long er_c = weights_longer_c[k].value;166 for(int k=0; k< (int)weights_long_c.size(); k++) { 167 dp.long_c = weights_long_c[k].value; 168 168 169 169 // Average over theta distribution … … 180 180 181 181 double _ptvalue = weights_short_a[i].weight 182 * weights_ long_b[j].weight183 * weights_long er_c[k].weight182 * weights_short_b[j].weight 183 * weights_long_c[k].weight 184 184 * weights_parallel_theta[l].weight 185 185 * weights_parallel_phi[m].weight … … 192 192 193 193 norm += weights_short_a[i].weight 194 * weights_ long_b[j].weight195 * weights_long er_c[k].weight194 * weights_short_b[j].weight 195 * weights_long_c[k].weight 196 196 * weights_parallel_theta[l].weight 197 197 * weights_parallel_phi[m].weight
Note: See TracChangeset
for help on using the changeset viewer.