Changeset 0ba3b08 in sasview for sansmodels/src/c_models/DiamCyl.cpp


Ignore:
Timestamp:
Jan 5, 2012 10:16:29 AM (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/DiamCyl.cpp

    r67424cd r0ba3b08  
    1818 *   sansmodels/src/libigor 
    1919 * 
    20  *      TODO: refactor so that we pull in the old sansmodels.c_extensions 
    2120 */ 
    2221 
    2322#include <math.h> 
    24 #include "models.hh" 
    2523#include "parameters.hh" 
    2624#include <stdio.h> 
    2725using namespace std; 
     26#include "DiamCyl.h" 
    2827 
    2928extern "C" { 
    3029        #include "libStructureFactor.h" 
    31         #include "DiamCyl.h" 
    3230} 
    3331 
     
    112110  return 0.0; 
    113111} 
    114 // Testing code 
    115  
    116 /** 
    117 int main(void) 
    118 { 
    119         DiamCylFunc c = DiamCylFunc(); 
    120  
    121         printf("I(Qx=%g,Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001)); 
    122         printf("I(Q=%g) = %g\n", 0.001, c(0.001)); 
    123         c.radius.dispersion = new GaussianDispersion(); 
    124         c.radius.dispersion->npts = 100; 
    125         c.radius.dispersion->width = 20; 
    126  
    127         //c.length.dispersion = GaussianDispersion(); 
    128         //c.length.dispersion.npts = 20; 
    129         //c.length.dispersion.width = 65; 
    130  
    131         //printf("I(Q=%g) = %g\n", 0.001, c(0.001)); 
    132         //printf("I(Q=%g) = %g\n", 0.001, c(0.001)); 
    133         //printf("I(Qx=%g, Qy=%g) = %g\n", 0.001, 0.001, c(0.001, 0.001)); 
    134         //printf("I(Q=%g,  Phi=%g) = %g\n", 0.00447, .7854, c.evaluate_rphi(sqrt(0.00002), .7854)); 
    135  
    136  
    137  
    138         double i_avg = c(0.01, 0.01); 
    139         double i_1d = c(sqrt(0.0002)); 
    140  
    141         printf("\nI(Qx=%g, Qy=%g) = %g\n", 0.01, 0.01, i_avg); 
    142         printf("I(Q=%g)         = %g\n", sqrt(0.0002), i_1d); 
    143         printf("ratio %g %g\n", i_avg/i_1d, i_1d/i_avg); 
    144  
    145  
    146         return 0; 
    147 } 
    148  **/ 
Note: See TracChangeset for help on using the changeset viewer.