Changeset 82c11d3 in sasview for sansmodels/src/c_models/lamellarPS_HG.cpp
- Timestamp:
- Jan 5, 2012 6:24:51 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:
- 20d91bd
- Parents:
- 98fdccd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/c_models/lamellarPS_HG.cpp
r67424cd r82c11d3 18 18 * sansmodels/src/libigor 19 19 * 20 * TODO: refactor so that we pull in the old sansmodels.c_extensions21 20 * TODO: add 2D function 22 21 */ 23 22 24 23 #include <math.h> 25 #include "models.hh"26 24 #include "parameters.hh" 27 25 #include <stdio.h> 28 26 using namespace std; 27 #include "lamellarPS_HG.h" 29 28 30 29 extern "C" { 31 30 #include "libCylinder.h" 32 #include "lamellarPS_HG.h"33 31 } 34 32 … … 137 135 return 0.0; 138 136 } 139 140 /*141 double LamellarPSHGModel :: operator()(double qx, double qy) {142 LamellarPSHGParameters dp;143 // Fill parameter array144 dp.scale = scale();145 dp.spacing = spacing();146 dp.deltaT = deltaT();147 dp.deltaH = deltaH();148 dp.sld_tail = sld_tail();149 dp.sld_head = sld_head();150 dp.sld_solvent = sld_solvent();151 dp.n_plates = n_plates();152 dp.caille = caille();153 dp.background = background();154 155 // Get the dispersion points for the deltaT156 vector<WeightPoint> weights_deltaT;157 deltaT.get_weights(weights_deltaT);158 159 // Get the dispersion points for the deltaH160 vector<WeightPoint> weights_deltaH;161 deltaH.get_weights(weights_deltaH);162 163 // Perform the computation, with all weight points164 double sum = 0.0;165 double norm = 0.0;166 167 // Loop over deltaT weight points168 for(int i=0; i< (int)weights_deltaT.size(); i++) {169 dp.deltaT = weights_deltaT[i].value;170 171 // Loop over deltaH weight points172 for(int j=0; j< (int)weights_deltaH.size(); j++) {173 dp.deltaH = weights_deltaH[j].value;174 175 sum += weights_deltaT[i].weight *weights_deltaH[j].weight *lamellarPS_HG_analytical_2DXY(&dp, qx, qy);176 norm += weights_deltaT[i].weight * weights_deltaH[j].weight;177 }178 }179 return sum/norm + background();180 }181 */182 183
Note: See TracChangeset
for help on using the changeset viewer.