Changeset 99658f6 in sasmodels for sasmodels/models/core_shell_bicelle.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_bicelle.c
rd42dd4a r99658f6 37 37 38 38 static double 39 radius_from_excluded_volume(double radius, double thick_rim, double thick_face, double length) 40 { 41 const double radius_tot = radius + thick_rim; 42 const double length_tot = length + 2.0*thick_face; 43 return 0.5*cbrt(0.75*radius_tot*(2.0*radius_tot*length_tot + (radius_tot + length_tot)*(M_PI*radius_tot + length_tot))); 44 } 45 46 static double 39 47 radius_from_volume(double radius, double thick_rim, double thick_face, double length) 40 48 { … … 56 64 switch (mode) { 57 65 default: 58 case 1: // equivalent sphere 66 case 1: // equivalent cylinder excluded volume 67 return radius_from_excluded_volume(radius, thick_rim, thick_face, length); 68 case 2: // equivalent sphere 59 69 return radius_from_volume(radius, thick_rim, thick_face, length); 60 case 2: // outer rim radius70 case 3: // outer rim radius 61 71 return radius + thick_rim; 62 case 3: // half outer thickness72 case 4: // half outer thickness 63 73 return 0.5*length + thick_face; 64 case 4: // half diagonal74 case 5: // half diagonal 65 75 return radius_from_diagonal(radius,thick_rim,thick_face,length); 66 76 }
Note: See TracChangeset
for help on using the changeset viewer.