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_extensions/SquareWell.h

    r67424cd r0ba3b08  
    11#if !defined(SquareWell_h) 
    22#define SquareWell_h 
     3#include "parameters.hh" 
    34 
    45/**Structure definition for SquareWell parameters 
    5 */ 
     6 */ 
    67//   [PYTHONCLASS] = SquareWellStructure 
    78//   [DISP_PARAMS] = effect_radius 
     
    2627//[ORIENTATION_PARAMS]= <text> </text> 
    2728 
     29class SquareWellStructure{ 
     30public: 
     31  // Model parameters 
     32  /// effective radius of particle [A] 
     33  //  [DEFAULT]=effect_radius=50.0 [A] 
     34  Parameter effect_radius; 
    2835 
    29 typedef struct { 
    30     /// effective radius of particle [A] 
    31     //  [DEFAULT]=effect_radius=50.0 [A] 
    32     double effect_radius; 
     36  /// Volume fraction 
     37  //  [DEFAULT]=volfraction= 0.040 
     38  Parameter volfraction; 
    3339 
    34     /// Volume fraction 
    35     //  [DEFAULT]=volfraction= 0.040 
    36     double volfraction; 
     40  /// Well depth [kT] 
     41  //  [DEFAULT]=welldepth= 1.50 [kT] 
     42  Parameter welldepth; 
    3743 
    38     /// Well depth [kT] 
    39     //  [DEFAULT]=welldepth= 1.50 [kT] 
    40     double welldepth; 
     44  /// Well width 
     45  //  [DEFAULT]=wellwidth= 1.20 
     46  Parameter wellwidth; 
    4147 
    42     /// Well width 
    43     //  [DEFAULT]=wellwidth= 1.20 
    44     double wellwidth; 
     48  // Constructor 
     49  SquareWellStructure(); 
    4550 
    46 } SquareWellParameters; 
    47  
    48  
    49  
    50 /// 1D scattering function 
    51 //double SquareWell_analytical_1D(SquareWellParameters *pars, double q); 
    52  
    53 /// 2D scattering function 
    54 //double SquareWell_analytical_2D(SquareWellParameters *pars, double q, double phi); 
    55 //double SquareWell_analytical_2DXY(SquareWellParameters *pars, double qx, double qy); 
     51  // Operators to get I(Q) 
     52  double operator()(double q); 
     53  double operator()(double qx, double qy); 
     54  double calculate_ER(); 
     55  double evaluate_rphi(double q, double phi); 
     56}; 
    5657 
    5758#endif 
Note: See TracChangeset for help on using the changeset viewer.