Changeset 0ba3b08 in sasview for sansmodels/src/c_extensions/Hardsphere.h
- Timestamp:
- Jan 5, 2012 12:16:29 PM (13 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/c_extensions/Hardsphere.h
r67424cd r0ba3b08 1 1 #if !defined(Hardsphere_h) 2 2 #define Hardsphere_h 3 #include "parameters.hh" 3 4 4 5 /** 5 6 * Structure definition for HardsphereStructure (factor) parameters 6 7 */ 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 8 //[PYTHONCLASS] = HardsphereStructure 9 //[DISP_PARAMS] = effect_radius 10 //[DESCRIPTION] =<text>Structure factor for interacting particles: . 11 // 12 // The interparticle potential is 13 // 14 // U(r)= inf , r < 2R 15 // = 0 , r >= 2R 16 // 17 // R: effective radius of the Hardsphere particle 18 // V:The volume fraction 19 // 20 // Ref: Percus., J. K.,etc., J. Phy. 21 // Rev. 1958, 110, 1. 22 // </text> 23 //[FIXED]= effect_radius.width 23 24 25 class HardsphereStructure{ 26 public: 27 // Model parameters 28 /// effect radius of hardsphere [A] 29 // [DEFAULT]=effect_radius=50.0 [A] 30 Parameter effect_radius; 24 31 25 typedef struct { 26 /// effect radius of hardsphere [A] 27 // [DEFAULT]=effect_radius=50.0 [A] 28 double effect_radius; 32 /// Volume fraction 33 // [DEFAULT]=volfraction= 0.2 34 Parameter volfraction; 29 35 30 /// Volume fraction 31 // [DEFAULT]=volfraction= 0.2 32 double volfraction; 33 } HardsphereParameters; 36 // Constructor 37 HardsphereStructure(); 34 38 35 36 37 /// 1D scattering function 38 //double Hardsphere_analytical_1D(HardsphereParameters *pars, double q); 39 40 /// 2D scattering function 41 //double Hardsphere_analytical_2D(HardsphereParameters *pars, double q, double phi); 42 //double Hardsphere_analytical_2DXY(HardsphereParameters *pars, double qx, double qy); 39 // Operators to get I(Q) 40 double operator()(double q); 41 double operator()(double qx, double qy); 42 double calculate_ER(); 43 double evaluate_rphi(double q, double phi); 44 }; 43 45 44 46 #endif
Note: See TracChangeset
for help on using the changeset viewer.