Ignore:
Timestamp:
Jan 5, 2012 12:16:29 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:
011e0e4
Parents:
bbbed8c
Message:

refactored bunch of models

File:
1 edited

Legend:

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

    r67424cd r0ba3b08  
    2121 
    2222#include <math.h> 
    23 #include "models.hh" 
    2423#include "parameters.hh" 
    2524#include <stdio.h> 
    2625using namespace std; 
     26#include "DiamEllip.h" 
    2727 
    2828extern "C" { 
    2929        #include "libStructureFactor.h" 
    30         #include "DiamEllip.h" 
    3130} 
    3231 
     
    109108  return 0.0; 
    110109} 
    111 // Testing code 
    112 /* 
    113 int main(void) 
    114 { 
    115         SquareWellModel c = SquareWellModel(); 
    116  
    117         printf("I(Qx=%g,Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001)); 
    118         printf("I(Q=%g) = %g\n", 0.001, c(0.001)); 
    119         c.radius.dispersion = new GaussianDispersion(); 
    120         c.radius.dispersion->npts = 100; 
    121         c.radius.dispersion->width = 5; 
    122  
    123         //c.length.dispersion = GaussianDispersion(); 
    124         //c.length.dispersion.npts = 20; 
    125         //c.length.dispersion.width = 65; 
    126  
    127         printf("I(Q=%g) = %g\n", 0.001, c(0.001)); 
    128         printf("I(Q=%g) = %g\n", 0.001, c(0.001)); 
    129         printf("I(Qx=%g, Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001)); 
    130         printf("I(Q=%g,  Phi=%g) = %g\n", 0.00447, .7854, c.evaluate_rphi(sqrt(0.00002), .7854)); 
    131  
    132  
    133  
    134         double i_avg = c(0.01, 0.01); 
    135         double i_1d = c(sqrt(0.0002)); 
    136  
    137         printf("\nI(Qx=%g, Qy=%g) = %g\n", 0.01, 0.01, i_avg); 
    138         printf("I(Q=%g)         = %g\n", sqrt(0.0002), i_1d); 
    139         printf("ratio %g %g\n", i_avg/i_1d, i_1d/i_avg); 
    140  
    141  
    142         return 0; 
    143 } 
    144 */ 
Note: See TracChangeset for help on using the changeset viewer.