Changeset d277229 in sasmodels for sasmodels/models/hollow_rectangular_prism_thin_walls.c
- Timestamp:
- Sep 7, 2018 3:29:38 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3c60146
- Parents:
- 2a12351b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/hollow_rectangular_prism_thin_walls.c
r71b751d rd277229 6 6 double vol_shell = 2.0 * (length_a*length_b + length_a*length_c + length_b*length_c); 7 7 return vol_shell; 8 } 9 10 static double 11 effective_radius(int mode, double length_a, double b2a_ratio, double c2a_ratio) 12 { 13 if (mode == 1) { 14 return cbrt(0.75*cube(length_a)*b2a_ratio*c2a_ratio/M_PI); 15 } else if (mode == 2) { 16 return 0.5 * length_a; 17 } else if (mode == 3) { 18 return 0.5 * length_a*b2a_ratio; 19 } else if (mode == 4) { 20 return 0.5 * length_a*c2a_ratio; 21 } else if (mode == 5) { 22 return length_a*sqrt(b2a_ratio/M_PI); 23 } else if (mode == 6) { 24 return 0.5*sqrt(square(length_a) * (1.0 + square(b2a_ratio))); 25 } else { 26 return 0.5*sqrt(square(length_a) * (1.0 + square(b2a_ratio) + square(c2a_ratio))); 27 } 8 28 } 9 29
Note: See TracChangeset
for help on using the changeset viewer.