Changeset 99658f6 in sasmodels for sasmodels/models/core_shell_cylinder.c
- Timestamp:
- Nov 6, 2018 2:10:43 PM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- cf3d0ce
- Parents:
- 5024a56
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_cylinder.c
rd42dd4a r99658f6 11 11 { 12 12 return M_PI*square(radius+thickness)*(length+2.0*thickness); 13 } 14 15 static double 16 radius_from_excluded_volume(double radius, double thickness, double length) 17 { 18 const double radius_tot = radius + thickness; 19 const double length_tot = length + 2.0*thickness; 20 return 0.5*cbrt(0.75*radius_tot*(2.0*radius_tot*length_tot + (radius_tot + length_tot)*(M_PI*radius_tot + length_tot))); 13 21 } 14 22 … … 33 41 switch (mode) { 34 42 default: 35 case 1: // equivalent sphere 43 case 1: //cylinder excluded volume 44 return radius_from_excluded_volume(radius, thickness, length); 45 case 2: // equivalent volume sphere 36 46 return radius_from_volume(radius, thickness, length); 37 case 2: // outer radius47 case 3: // outer radius 38 48 return radius + thickness; 39 case 3: // half outer length49 case 4: // half outer length 40 50 return 0.5*length + thickness; 41 case 4: // half min outer length51 case 5: // half min outer length 42 52 return (radius < 0.5*length ? radius + thickness : 0.5*length + thickness); 43 case 5: // half max outer length53 case 6: // half max outer length 44 54 return (radius > 0.5*length ? radius + thickness : 0.5*length + thickness); 45 case 6: // half outer diagonal55 case 7: // half outer diagonal 46 56 return radius_from_diagonal(radius,thickness,length); 47 57 }
Note: See TracChangeset
for help on using the changeset viewer.