Ignore:
Timestamp:
Aug 19, 2008 2:42:22 PM (17 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:
d30fdde
Parents:
a86bbe9
Message:

Update of all C models to the new style of C++ models

Location:
sansmodels/src/sans/models/c_extensions
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_extensions/c_models.cpp

    raf03ddd r0f5bc9f  
    99 
    1010void addCCylinderModel(PyObject *module); 
     11void addCSphereModel(PyObject *module); 
     12void addCCoreShellModel(PyObject *module); 
     13void addCCoreShellCylinderModel(PyObject *module); 
     14void addCEllipsoidModel(PyObject *module); 
     15void addCEllipticalCylinderModel(PyObject *module); 
     16 
    1117extern "C" { 
    12         void addCCoreShellCylinderModel(PyObject *module); 
    13         void addCCoreShellModel(PyObject *module); 
    14         void addCEllipsoidModel(PyObject *module); 
    15         void addCSphereModel(PyObject *module); 
    16         void addCEllipticalCylinderModel(PyObject *module); 
     18        //void addCCoreShellCylinderModel(PyObject *module); 
     19        //void addCCoreShellModel(PyObject *module); 
     20        //void addCEllipsoidModel(PyObject *module); 
     21        //void addCSphereModel(PyObject *module); 
     22        //void addCEllipticalCylinderModel(PyObject *module); 
    1723        void addDisperser(PyObject *module); 
    1824        void addCGaussian(PyObject *module); 
  • sansmodels/src/sans/models/c_extensions/core_shell.h

    rae3ce4e r0f5bc9f  
    22#define core_shell_h 
    33 
    4 /**  
    5  * Structure definition for core-shell parameters  
     4/** 
     5 * Structure definition for core-shell parameters 
    66 */ 
    77 //[PYTHONCLASS] = CoreShellModel 
     8 //[DISP_PARAMS] = radius, thickness 
    89typedef struct { 
    9     /// Scale factor  
     10    /// Scale factor 
    1011    //  [DEFAULT]=scale=1.0 
    1112    double scale; 
     
    2728        /// Incoherent Background (cm-1) 0.000 
    2829        //  [DEFAULT]=background=0 cm-1 
    29         double background;     
     30        double background; 
    3031} CoreShellParameters; 
    3132 
  • sansmodels/src/sans/models/c_extensions/core_shell_cylinder.h

    rae3ce4e r0f5bc9f  
    22#define core_shell_cylinder_h 
    33 
    4 /**  
    5  * Structure definition for core-shell cylinder parameters  
     4/** 
     5 * Structure definition for core-shell cylinder parameters 
    66 */ 
    77 //[PYTHONCLASS] = CoreShellCylinderModel 
     8 //[DISP_PARAMS] = radius, thickness, length, axis_theta, axis_phi 
    89typedef struct { 
    9     /// Scale factor  
     10    /// Scale factor 
    1011    //  [DEFAULT]=scale=1.0 
    1112    double scale; 
    12      
     13 
    1314    /// Core radius [A] 
    1415    //  [DEFAULT]=radius=20.0 A 
    1516    double radius; 
    16      
     17 
    1718    /// Shell thickness [A] 
    1819    //  [DEFAULT]=thickness=10.0 A 
    1920    double thickness; 
    20      
     21 
    2122    /// Core length [A] 
    2223    //  [DEFAULT]=length=400.0 A 
    2324    double length; 
    24      
     25 
    2526    /// Core SLD [A-2] 
    2627    //  [DEFAULT]=core_sld=1.0e-6 A-2 
    2728    double core_sld; 
    28      
     29 
    2930    /// Shell SLD [A-2] 
    3031    //  [DEFAULT]=shell_sld=4.0e-6 A-2 
    3132    double shell_sld; 
    32      
     33 
    3334    /// Solvent SLD [A-2] 
    3435    //  [DEFAULT]=solvent_sld=1.0e-6 A-2 
    3536    double solvent_sld; 
    36      
     37 
    3738        /// Incoherent Background [cm-1] 
    3839        //  [DEFAULT]=background=0 cm-1 
    39         double background;     
    40          
     40        double background; 
     41 
    4142    /// Orientation of the long axis of the core-shell cylinder w/respect incoming beam [rad] 
    4243    //  [DEFAULT]=axis_theta=1.57 rad 
    4344    double axis_theta; 
    44      
     45 
    4546    /// Orientation of the long axis of the core-shell cylinder in the plane of the detector [rad] 
    4647    //  [DEFAULT]=axis_phi=0.0 rad 
    47     double axis_phi;     
    48          
     48    double axis_phi; 
     49 
    4950} CoreShellCylinderParameters; 
    5051 
  • sansmodels/src/sans/models/c_extensions/ellipsoid.h

    rae3ce4e r0f5bc9f  
    22#define ellipsoid_h 
    33 
    4 /**  
    5  * Structure definition for ellipsoid parameters  
     4/** 
     5 * Structure definition for ellipsoid parameters 
    66 * The ellipsoid has axes radius_b, radius_b, radius_a. 
    77 * Ref: Jan Skov Pedersen, Advances in Colloid and Interface Science, 70 (1997) 171-210 
    88 */ 
    99 //[PYTHONCLASS] = EllipsoidModel 
     10 //[DISP_PARAMS] = radius_a, radius_b, axis_theta, axis_phi 
    1011typedef struct { 
    11     /// Scale factor  
     12    /// Scale factor 
    1213    //  [DEFAULT]=scale=1.0 
    1314    double scale; 
    14      
    15     /// Rotation axis radius_a [A]  
     15 
     16    /// Rotation axis radius_a [A] 
    1617    //  [DEFAULT]=radius_a=20.0 A 
    1718    double radius_a; 
    18      
    19     /// Radius_b [A]  
     19 
     20    /// Radius_b [A] 
    2021    //  [DEFAULT]=radius_b=400 A 
    2122    double radius_b; 
    22      
    23     /// Contrast [Å-2]  
     23 
     24    /// Contrast [Å-2] 
    2425    //  [DEFAULT]=contrast=3.0e-6 A-2 
    2526    double contrast; 
    26      
     27 
    2728        /// Incoherent Background [cm-1] 
    2829        //  [DEFAULT]=background=0 cm-1 
    29         double background;     
    30          
     30        double background; 
     31 
    3132    /// Orientation of the long axis of the ellipsoid w/respect incoming beam [rad] 
    3233    //  [DEFAULT]=axis_theta=1.57 rad 
     
    3435    /// Orientation of the long axis of the ellipsoid in the plane of the detector [rad] 
    3536    //  [DEFAULT]=axis_phi=0.0 rad 
    36     double axis_phi;     
     37    double axis_phi; 
    3738} EllipsoidParameters; 
    3839 
  • sansmodels/src/sans/models/c_extensions/elliptical_cylinder.h

    rae3ce4e r0f5bc9f  
    22#define ell_cylinder_h 
    33 
    4 /** Structure definition for cylinder parameters  
     4/** Structure definition for cylinder parameters 
    55 * [PYTHONCLASS] = EllipticalCylinderModel 
     6 * [DISP_PARAMS] = r_minor, r_ratio, length, cyl_theta, cyl_phi, cyl_psi 
     7 * 
    68 * */ 
    79typedef struct { 
    8     /// Scale factor  
     10    /// Scale factor 
    911    //  [DEFAULT]=scale=1.0 
    1012    double scale; 
     
    2325        /// Incoherent Background (cm-1) 0.000 
    2426        //  [DEFAULT]=background=0 cm-1 
    25         double background;     
     27        double background; 
    2628    /// Orientation of the cylinder axis w/respect incoming beam [rad] 
    2729    //  [DEFAULT]=cyl_theta=1.57 rad 
     
    2931    /// Orientation of the cylinder in the plane of the detector [rad] 
    3032    //  [DEFAULT]=cyl_phi=0.0 rad 
    31     double cyl_phi;     
     33    double cyl_phi; 
    3234    /// Orientation of major radius of the cross-section w/respect vector q [rad] 
    3335    //  [DEFAULT]=cyl_psi=0.0 rad 
    34     double cyl_psi;     
     36    double cyl_psi; 
    3537} EllipticalCylinderParameters; 
    3638 
  • sansmodels/src/sans/models/c_extensions/sphere.h

    rae3ce4e r0f5bc9f  
    22#define sphere_h 
    33 
    4 /**  
    5  * Structure definition for sphere parameters  
     4/** 
     5 * Structure definition for sphere parameters 
    66 */ 
    77 //[PYTHONCLASS] = SphereModel 
     8 //[DISP_PARAMS] = radius 
    89typedef struct { 
    9     /// Scale factor  
     10    /// Scale factor 
    1011    //  [DEFAULT]=scale=1.0e-6 
    1112    double scale; 
    12      
    13     /// Radius of sphere [A]  
     13 
     14    /// Radius of sphere [A] 
    1415    //  [DEFAULT]=radius=60.0 A 
    1516    double radius; 
    16      
    17     /// Contrast [Å-2]  
     17 
     18    /// Contrast [Å-2] 
    1819    //  [DEFAULT]=contrast=1.0 A-2 
    1920    double contrast; 
    20      
     21 
    2122        /// Incoherent Background [cm-1] 
    2223        //  [DEFAULT]=background=0 cm-1 
    23         double background;     
     24        double background; 
    2425} SphereParameters; 
    2526 
Note: See TracChangeset for help on using the changeset viewer.