Changeset 42f193a in sasview for sansmodels/src/sans/models/c_models/vesicle.cpp
- Timestamp:
- Aug 4, 2009 11:20:01 AM (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:
- 8e91f01
- Parents:
- 2cc633b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_models/vesicle.cpp
r3d25331f r42f193a 34 34 core_radius = Parameter(100.0, true); 35 35 core_radius.set_min(0.0); 36 thickness = Parameter(30.0); 36 thickness = Parameter(30.0, true); 37 thickness.set_min(0.0); 37 38 core_sld = Parameter(6.36e-6); 38 39 shell_sld = Parameter(5.0e-7); … … 57 58 dp[4] = shell_sld(); 58 59 dp[5] = background(); 59 60 60 61 61 62 // Get the dispersion points for the core radius 62 63 vector<WeightPoint> weights_core_radius; 63 64 core_radius.get_weights(weights_core_radius); 65 // Get the dispersion points for the thickness 66 vector<WeightPoint> weights_thickness; 67 thickness.get_weights(weights_thickness); 64 68 65 69 // Perform the computation, with all weight points … … 70 74 for(int i=0; i< (int)weights_core_radius.size(); i++) { 71 75 dp[1] = weights_core_radius[i].value; 72 73 sum += weights_core_radius[i].weight 74 * VesicleForm(dp, q); 75 norm += weights_core_radius[i].weight; 76 for(int j=0; j< (int)weights_core_radius.size(); j++) { 77 dp[2] = weights_thickness[j].value; 78 sum += weights_core_radius[i].weight 79 * weights_thickness[j].weight * VesicleForm(dp, q); 80 norm += weights_core_radius[i].weight * weights_thickness[j].weight; 81 } 76 82 } 77 83 return sum/norm + background();
Note: See TracChangeset
for help on using the changeset viewer.