Changeset a94046f in sasmodels for sasmodels/models/core_shell_parallelepiped.c
- Timestamp:
- Sep 8, 2018 8:55:23 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:
- fbaef04
- Parents:
- b763f9d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_parallelepiped.c
rd277229 ra94046f 45 45 effective_radius(int mode, double length_a, double length_b, double length_c, 46 46 double thick_rim_a, double thick_rim_b, double thick_rim_c) 47 //effective_radius_type = ["equivalent sphere","half outer length_a", "half outer length_b", "half outer length_c", 48 // "equivalent circular cross-section","half outer ab diagonal","half outer diagonal"] 49 // note the core box is A*B*C with slabs ta, tb & tc on each face but missing the corners, though that fact is ignored here 50 // in the equvalent sphere option 47 51 { 48 52 if (mode == 1) { 49 53 return radius_from_volume(length_a, length_b, length_c, thick_rim_a, thick_rim_b, thick_rim_c); 50 54 } else if (mode == 2) { 51 return 0.5 * (length_a + thick_rim_a);55 return 0.5 * length_a + thick_rim_a; 52 56 } else if (mode == 3) { 53 return 0.5 * (length_b + thick_rim_b);57 return 0.5 * length_b + thick_rim_b; 54 58 } else if (mode == 4) { 55 return 0.5 * (length_c + thick_rim_c);59 return 0.5 * length_c + thick_rim_c; 56 60 } else if (mode == 5) { 57 61 return radius_from_crosssection(length_a, length_b, thick_rim_a, thick_rim_b); 58 62 } else if (mode == 6) { 59 return 0.5*sqrt(square(length_a+ thick_rim_a) + square(length_b+thick_rim_b));63 return 0.5*sqrt(square(length_a+ 2.0*thick_rim_a) + square(length_b+ 2.0*thick_rim_b)); 60 64 } else { 61 return 0.5*sqrt(square(length_a+ thick_rim_a) + square(length_b+thick_rim_b) + square(length_c+thick_rim_c));65 return 0.5*sqrt(square(length_a+ 2.0*thick_rim_a) + square(length_b+ 2.0*thick_rim_b) + square(length_c+ 2.0*thick_rim_c)); 62 66 } 63 67 }
Note: See TracChangeset
for help on using the changeset viewer.