Ignore:
Timestamp:
Jan 5, 2012 2:23:15 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:
98fdccd
Parents:
0ba3b08
Message:

core-shell + ellipsoid refactor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/c_extensions/core_shell.h

    r67424cd r011e0e4  
    11#if !defined(core_shell_h) 
    22#define core_shell_h 
     3#include "parameters.hh" 
    34 
    45/** 
     
    2122 
    2223 
    23 typedef struct { 
    24     /// Scale factor 
    25     //  [DEFAULT]=scale=1.0 
    26     double scale; 
    27     /// Core Radius [A] 60.0 
    28     //  [DEFAULT]=radius=60.0 [A] 
    29     double radius; 
    30     /// Shell Thickness [A] 10.0 
    31     //  [DEFAULT]=thickness=10 [A] 
    32     double thickness; 
    33     /// Core SLD [1/A^(2)] 1.0e-6 
    34     //  [DEFAULT]=core_sld=1.0e-6 [1/A^(2)] 
    35     double core_sld; 
    36         /// Shell SLD [1/A^(2)] 2.0e-6 
    37         //  [DEFAULT]=shell_sld=2.0e-6 [1/A^(2)] 
    38         double shell_sld; 
    39         /// Solvent SLD [1/A^(2)] 3.0e-6 
    40         //  [DEFAULT]=solvent_sld=3.0e-6 [1/A^(2)] 
    41         double solvent_sld; 
    42         /// Incoherent Background [1/cm] 0.000 
    43         //  [DEFAULT]=background=0 [1/cm] 
    44         double background; 
    45 } CoreShellParameters; 
     24class CoreShellModel{ 
     25public: 
     26  // Model parameters 
     27 
     28  /// Core Radius [A] 60.0 
     29  //  [DEFAULT]=radius=60.0 [A] 
     30  Parameter radius; 
     31  /// Scale factor 
     32  //  [DEFAULT]=scale=1.0 
     33  Parameter scale; 
     34  /// Shell Thickness [A] 10.0 
     35  //  [DEFAULT]=thickness=10 [A] 
     36  Parameter thickness; 
     37  /// Core SLD [1/A^(2)] 1.0e-6 
     38  //  [DEFAULT]=core_sld=1.0e-6 [1/A^(2)] 
     39  Parameter core_sld; 
     40/// Shell SLD [1/A^(2)] 2.0e-6 
     41//  [DEFAULT]=shell_sld=2.0e-6 [1/A^(2)] 
     42  Parameter shell_sld; 
     43/// Solvent SLD [1/A^(2)] 3.0e-6 
     44//  [DEFAULT]=solvent_sld=3.0e-6 [1/A^(2)] 
     45  Parameter solvent_sld; 
     46/// Incoherent Background [1/cm] 0.000 
     47//  [DEFAULT]=background=0 [1/cm] 
     48  Parameter background; 
     49 
     50  // Constructor 
     51  CoreShellModel(); 
     52 
     53  // Operators to get I(Q) 
     54  double operator()(double q); 
     55  double operator()(double qx, double qy); 
     56  double calculate_ER(); 
     57  double evaluate_rphi(double q, double phi); 
     58}; 
    4659 
    4760 
    48  
    49 /// 1D scattering function 
    50 //double core_shell_analytical_1D(CoreShellParameters *pars, double q); 
    51  
    52 /// 2D scattering function 
    53 //double core_shell_analytical_2D(CoreShellParameters *pars, double q, double phi); 
    54 //double core_shell_analytical_2DXY(CoreShellParameters *pars, double qx, double qy); 
    55  
    5661#endif 
Note: See TracChangeset for help on using the changeset viewer.