Ignore:
Timestamp:
Jan 5, 2012 6:24:51 PM (13 years ago)
Author:
Mathieu Doucet <doucetm@…>
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
Message:

refactored bunch of models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/c_models/lamellarPS_HG.cpp

    r67424cd r82c11d3  
    1818 *   sansmodels/src/libigor 
    1919 * 
    20  *      TODO: refactor so that we pull in the old sansmodels.c_extensions 
    2120 *      TODO: add 2D function 
    2221 */ 
    2322 
    2423#include <math.h> 
    25 #include "models.hh" 
    2624#include "parameters.hh" 
    2725#include <stdio.h> 
    2826using namespace std; 
     27#include "lamellarPS_HG.h" 
    2928 
    3029extern "C" { 
    3130        #include "libCylinder.h" 
    32         #include "lamellarPS_HG.h" 
    3331} 
    3432 
     
    137135        return 0.0; 
    138136} 
    139  
    140 /* 
    141 double LamellarPSHGModel :: operator()(double qx, double qy) { 
    142         LamellarPSHGParameters dp; 
    143         // Fill parameter array 
    144         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 deltaT 
    156         vector<WeightPoint> weights_deltaT; 
    157         deltaT.get_weights(weights_deltaT); 
    158  
    159         // Get the dispersion points for the deltaH 
    160         vector<WeightPoint> weights_deltaH; 
    161         deltaH.get_weights(weights_deltaH); 
    162  
    163         // Perform the computation, with all weight points 
    164         double sum = 0.0; 
    165         double norm = 0.0; 
    166  
    167         // Loop over deltaT weight points 
    168         for(int i=0; i< (int)weights_deltaT.size(); i++) { 
    169                 dp.deltaT = weights_deltaT[i].value; 
    170  
    171                 // Loop over deltaH weight points 
    172                 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.