Changes in sasmodels/models/hollow_rectangular_prism.c [71b751d:d277229] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/hollow_rectangular_prism.c
r71b751d rd277229 11 11 double vol_shell = vol_total - vol_core; 12 12 return vol_shell; 13 } 14 15 static double 16 effective_radius(int mode, double length_a, double b2a_ratio, double c2a_ratio, double thickness) 17 { 18 if (mode == 1) { 19 return cbrt(0.75*cube(length_a)*b2a_ratio*c2a_ratio/M_PI); 20 } else if (mode == 2) { 21 return 0.5 * length_a; 22 } else if (mode == 3) { 23 return 0.5 * length_a*b2a_ratio; 24 } else if (mode == 4) { 25 return 0.5 * length_a*c2a_ratio; 26 } else if (mode == 5) { 27 return length_a*sqrt(b2a_ratio/M_PI); 28 } else if (mode == 6) { 29 return 0.5*sqrt(square(length_a) * (1.0 + square(b2a_ratio))); 30 } else { 31 return 0.5*sqrt(square(length_a) * (1.0 + square(b2a_ratio) + square(c2a_ratio))); 32 } 13 33 } 14 34
Note: See TracChangeset
for help on using the changeset viewer.