Changeset 2222134 in sasmodels for sasmodels/models/core_shell_ellipsoid_xt.c
- Timestamp:
- Sep 30, 2016 11:07:16 AM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- a807206
- Parents:
- 6e5b2a7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_ellipsoid_xt.c
re7678b2 r2222134 1 double form_volume(double equat_core,1 double form_volume(double radius_equat_core, 2 2 double polar_core, 3 3 double equat_shell, 4 4 double polar_shell); 5 5 double Iq(double q, 6 double equat_core,6 double radius_equat_core, 7 7 double x_core, 8 double t _shell,8 double thick_shell, 9 9 double x_polar_shell, 10 10 double core_sld, … … 14 14 15 15 double Iqxy(double qx, double qy, 16 double equat_core,16 double radius_equat_core, 17 17 double x_core, 18 double t _shell,18 double thick_shell, 19 19 double x_polar_shell, 20 20 double core_sld, … … 25 25 26 26 27 double form_volume(double equat_core,27 double form_volume(double radius_equat_core, 28 28 double x_core, 29 double t _shell,29 double thick_shell, 30 30 double x_polar_shell) 31 31 { 32 const double equat_shell = equat_core + t_shell;33 const double polar_shell = equat_core*x_core + t_shell*x_polar_shell;32 const double equat_shell = radius_equat_core + thick_shell; 33 const double polar_shell = radius_equat_core*x_core + thick_shell*x_polar_shell; 34 34 double vol = 4.0*M_PI/3.0*equat_shell*equat_shell*polar_shell; 35 35 return vol; … … 38 38 static double 39 39 core_shell_ellipsoid_xt_kernel(double q, 40 double equat_core,40 double radius_equat_core, 41 41 double x_core, 42 double t _shell,42 double thick_shell, 43 43 double x_polar_shell, 44 44 double core_sld, … … 55 55 56 56 57 const double polar_core = equat_core*x_core;58 const double equat_shell = equat_core + t_shell;59 const double polar_shell = equat_core*x_core + t_shell*x_polar_shell;57 const double polar_core = radius_equat_core*x_core; 58 const double equat_shell = radius_equat_core + thick_shell; 59 const double polar_shell = radius_equat_core*x_core + thick_shell*x_polar_shell; 60 60 61 61 for(int i=0;i<N_POINTS_76;i++) { 62 62 double zi = ( Gauss76Z[i]*(uplim-lolim) + uplim + lolim )/2.0; 63 63 double yyy = Gauss76Wt[i] * gfn4(zi, 64 equat_core,64 radius_equat_core, 65 65 polar_core, 66 66 equat_shell, … … 81 81 static double 82 82 core_shell_ellipsoid_xt_kernel_2d(double q, double q_x, double q_y, 83 double equat_core,83 double radius_equat_core, 84 84 double x_core, 85 double t _shell,85 double thick_shell, 86 86 double x_polar_shell, 87 87 double core_sld, … … 106 106 const double cos_val = cyl_x*q_x + cyl_y*q_y; 107 107 108 const double polar_core = equat_core*x_core;109 const double equat_shell = equat_core + t_shell;110 const double polar_shell = equat_core*x_core + t_shell*x_polar_shell;108 const double polar_core = radius_equat_core*x_core; 109 const double equat_shell = radius_equat_core + thick_shell; 110 const double polar_shell = radius_equat_core*x_core + thick_shell*x_polar_shell; 111 111 112 112 // Call the IGOR library function to get the kernel: 113 113 // MUST use gfn4 not gf2 because of the def of params. 114 114 double answer = gfn4(cos_val, 115 equat_core,115 radius_equat_core, 116 116 polar_core, 117 117 equat_shell, … … 128 128 129 129 double Iq(double q, 130 double equat_core,130 double radius_equat_core, 131 131 double x_core, 132 double t _shell,132 double thick_shell, 133 133 double x_polar_shell, 134 134 double core_sld, … … 137 137 { 138 138 double intensity = core_shell_ellipsoid_xt_kernel(q, 139 equat_core,139 radius_equat_core, 140 140 x_core, 141 t _shell,141 thick_shell, 142 142 x_polar_shell, 143 143 core_sld, … … 150 150 151 151 double Iqxy(double qx, double qy, 152 double equat_core,152 double radius_equat_core, 153 153 double x_core, 154 double t _shell,154 double thick_shell, 155 155 double x_polar_shell, 156 156 double core_sld, … … 163 163 q = sqrt(qx*qx+qy*qy); 164 164 double intensity = core_shell_ellipsoid_xt_kernel_2d(q, qx/q, qy/q, 165 equat_core,165 radius_equat_core, 166 166 x_core, 167 t _shell,167 thick_shell, 168 168 x_polar_shell, 169 169 core_sld,
Note: See TracChangeset
for help on using the changeset viewer.