Changeset 5eb9154 in sasview for sansmodels/src/sans/models/c_extensions
- Timestamp:
- Aug 31, 2009 5:25:44 PM (15 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:
- 5be36bb
- Parents:
- 572beba
- Location:
- sansmodels/src/sans/models/c_extensions
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/c_extensions/DiamCyl.c
rcabe74b r5eb9154 16 16 */ 17 17 double DiamCyld_analytical_1D(DiamCyldParameters *pars, double q) { 18 double dp[2]; 18 double cylh; 19 double cylr; 19 20 20 dp[0]= pars->radius;21 dp[1]= pars->length;22 return DiamCyl( dp, q);21 cylr = pars->radius; 22 cylh = pars->length; 23 return DiamCyl(cylh, cylr); 23 24 } 24 25 -
sansmodels/src/sans/models/c_extensions/DiamEllip.c
rcabe74b r5eb9154 16 16 */ 17 17 double DiamEllips_analytical_1D(DiamEllipsParameters *pars, double q) { 18 double dp[2];18 double ell_a, ell_b; 19 19 20 dp[0]= pars->radius_a;21 dp[1]= pars->radius_b;22 return DiamEllip( dp, q);20 ell_a = pars->radius_a; 21 ell_b = pars->radius_b; 22 return DiamEllip(ell_a, ell_b); 23 23 } 24 24 -
sansmodels/src/sans/models/c_extensions/Hardsphere.c
r25579e8 r5eb9154 11 11 /** 12 12 * Function to evaluate 1D scattering function 13 * @param pars: parameters of the HardsphereStructure 13 * @param pars: parameters of the HardsphereStructure 14 14 * @param q: q-value 15 15 * @return: function value … … 17 17 double Hardsphere_analytical_1D(HardsphereParameters *pars, double q) { 18 18 double dp[2]; 19 20 dp[0] = pars->radius; 21 dp[1] = pars->volfraction; 19 if (q == 0){ 20 return 0.2; 21 } 22 dp[0] = pars->effect_radius; 23 dp[1] = pars->volfraction; 22 24 return HardSphereStruct(dp, q); 23 25 } 24 26 25 27 /** 26 28 * Function to evaluate 2D scattering function … … 34 36 35 37 double Hardsphere_analytical_2DXY(HardsphereParameters *pars, double qx, double qy){ 36 return Hardsphere_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 38 return Hardsphere_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 37 39 } -
sansmodels/src/sans/models/c_extensions/Hardsphere.h
r1ed3834 r5eb9154 6 6 */ 7 7 //[PYTHONCLASS] = HardsphereStructure 8 //[DISP_PARAMS] = radius8 //[DISP_PARAMS] = effect_radius 9 9 //[DESCRIPTION] =<text>Structure factor for interacting particles: . 10 10 // … … 14 14 // = 0 , r >= 2R 15 15 // 16 // R: radius of the Hardsphere particle16 // R: effective radius of the Hardsphere particle 17 17 // V:The volume fraction 18 18 // … … 20 20 // Rev. 1958, 110, 1. 21 21 // </text> 22 //[FIXED]= radius.width22 //[FIXED]= effect_radius.width 23 23 24 24 25 25 typedef struct { 26 /// Radius of hardsphere [A]27 // [DEFAULT]= radius=50.0 [A]28 double radius;26 /// effect radius of hardsphere [A] 27 // [DEFAULT]=effect_radius=50.0 [A] 28 double effect_radius; 29 29 30 30 /// Volume fraction -
sansmodels/src/sans/models/c_extensions/HayterMSA.c
r25579e8 r5eb9154 1 1 /** 2 * SquareWell Structure factor 2 * SquareWell Structure factor 3 3 * @author: Jae Hie Cho / UTK 4 4 */ … … 18 18 double dp[6]; 19 19 20 dp[0] = pars-> radius;20 dp[0] = pars->effect_radius; 21 21 dp[1] = pars->charge; 22 22 dp[1] = pars->volfraction; … … 24 24 dp[4] = pars->saltconc; 25 25 dp[5] = pars->dielectconst; 26 26 27 27 return HayterPenfoldMSA(dp, q); 28 28 } 29 29 30 30 /** 31 31 * Function to evaluate 2D scattering function … … 39 39 40 40 double HayterMSA_analytical_2DXY(HayterMSAParameters *pars, double qx, double qy){ 41 return HayterMSA_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 41 return HayterMSA_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 42 42 } -
sansmodels/src/sans/models/c_extensions/HayterMSA.h
r1ed3834 r5eb9154 6 6 */ 7 7 //[PYTHONCLASS] = HayterMSAStructure 8 //[DISP_PARAMS] = radius8 //[DISP_PARAMS] = effect_radius 9 9 //[DESCRIPTION] =<text>To calculate the structure factor (the Fourier transform of the 10 10 // pair correlation function g(r)) for a system of … … 22 22 // 23 23 // </text> 24 //[FIXED]= radius.width24 //[FIXED]= effect_radius.width 25 25 26 26 typedef struct { 27 /// Radius of particle [A]28 // [DEFAULT]= radius=20.75 [A]29 double radius;27 /// effetitve radius of particle [A] 28 // [DEFAULT]=effect_radius=20.75 [A] 29 double effect_radius; 30 30 31 31 /// charge -
sansmodels/src/sans/models/c_extensions/SquareWell.c
r25579e8 r5eb9154 1 1 /** 2 * SquareWell Structure factor 2 * SquareWell Structure factor 3 3 * @author: Jae Hie Cho / UTK 4 4 */ … … 20 20 double dp[4]; 21 21 22 dp[0] = pars-> radius;22 dp[0] = pars->effect_radius; 23 23 dp[1] = pars->volfraction; 24 24 dp[2] = pars->welldepth; 25 25 dp[3] = pars->wellwidth; 26 26 27 27 return SquareWellStruct(dp, q); 28 28 } 29 29 30 30 /** 31 31 * Function to evaluate 2D scattering function … … 39 39 40 40 double SquareWell_analytical_2DXY(SquareWellParameters *pars, double qx, double qy){ 41 return SquareWell_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 41 return SquareWell_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 42 42 } -
sansmodels/src/sans/models/c_extensions/SquareWell.h
r1ed3834 r5eb9154 5 5 */ 6 6 // [PYTHONCLASS] = SquareWellStructure 7 // [DISP_PARAMS] = radius7 // [DISP_PARAMS] = effect_radius 8 8 // [DESCRIPTION] = <text> Structure Factor for interacting particles: . 9 9 // … … 14 14 // = 0 , r >= 2Rw 15 15 // 16 // R: radius (A)of the particle16 // R: effective radius (A)of the particle 17 17 // v: volume fraction 18 18 // d: well depth … … 23 23 // K. C., Physica, 1977, 89A, 213. 24 24 // </text> 25 // [FIXED]= radius.width25 // [FIXED]= effect_radius.width 26 26 //[ORIENTATION_PARAMS]= <text> </text> 27 27 28 28 29 29 typedef struct { 30 /// Radius of particle [A]31 // [DEFAULT]= radius=50.0 [A]32 double radius;30 /// effective radius of particle [A] 31 // [DEFAULT]=effect_radius=50.0 [A] 32 double effect_radius; 33 33 34 34 /// Volume fraction -
sansmodels/src/sans/models/c_extensions/StickyHS.c
r25579e8 r5eb9154 17 17 double StickyHS_analytical_1D(StickyHSParameters *pars, double q) { 18 18 double dp[4]; 19 20 dp[0] = pars-> radius;21 dp[1] = pars->volfraction; 19 20 dp[0] = pars->effect_radius; 21 dp[1] = pars->volfraction; 22 22 dp[2] = pars->perturb; 23 dp[3] = pars->stickiness; 23 dp[3] = pars->stickiness; 24 24 return StickyHS_Struct(dp, q); 25 25 } 26 26 27 27 /** 28 28 * Function to evaluate 2D scattering function … … 36 36 37 37 double StickyHS_analytical_2DXY(StickyHSParameters *pars, double qx, double qy){ 38 return StickyHS_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 38 return StickyHS_analytical_1D(pars,sqrt(qx*qx+qy*qy)); 39 39 } -
sansmodels/src/sans/models/c_extensions/StickyHS.h
r1ed3834 r5eb9154 6 6 */ 7 7 //[PYTHONCLASS] = StickyHSStructure 8 //[DISP_PARAMS] = radius8 //[DISP_PARAMS] = effect_radius 9 9 //[DESCRIPTION] =<text> Structure Factor for interacting particles: . 10 10 // … … 15 15 // = 0 , r >= 2R +w 16 16 // 17 // R: radius of the hardsphere17 // R: effective radius of the hardsphere 18 18 // stickiness = [exp(Uo/kT)]/(12*perturb) 19 19 // perturb = w/(w+ 2R) , 0.01 =< w <= 0.1 … … 24 24 // Phys., 1991, 95(12), 9186-9190. 25 25 // </text> 26 //[FIXED]= radius.width26 //[FIXED]= effect_radius.width 27 27 typedef struct { 28 /// Radius of hardsphere [A]29 // [DEFAULT]= radius=50.0 [A]30 double radius;28 /// effect radius of hardsphere [A] 29 // [DEFAULT]=effect_radius=50.0 [A] 30 double effect_radius; 31 31 32 32 /// Volume fraction -
sansmodels/src/sans/models/c_extensions/multishell.h
r2cc633b r5eb9154 7 7 [PYTHONCLASS] = MultiShellModel 8 8 [DISP_PARAMS] = core_radius, s_thickness, w_thickness 9 [DESCRIPTION] =<text> Model parameters:9 [DESCRIPTION] =<text> MultiShell (Sphere) Model (or Multilamellar Vesicles): Model parameters; 10 10 scale : scale factor 11 11 core_radius : Core radius of the multishell -
sansmodels/src/sans/models/c_extensions/spheroid.h
reddff027 r5eb9154 14 14 polar_core = polar radius of core, 15 15 equat_shell = equatorial radius of shell, 16 polar_shell = polar radius of shell,16 polar_shell = polar radius (revolution axis) of shell, 17 17 contrast = SLD_core - SLD_shell 18 18 sld_solvent = SLD_solvent … … 21 21 Note:It is the users' responsibility to ensure 22 22 that shell radii are larger than core radii. 23 oblate shell: equatorial radius > polarradius24 prolate shell: equatorial radius < polarradius23 oblate: polar radius < equatorial radius 24 prolate : polar radius > equatorial radius 25 25 </text> 26 26
Note: See TracChangeset
for help on using the changeset viewer.