Changeset 99658f6 in sasmodels for sasmodels/models/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/cylinder.c
rd42dd4a r99658f6 11 11 { 12 12 return sas_2J1x_x(qab*radius) * sas_sinx_x(qc*0.5*length); 13 } 14 15 static double 16 radius_from_excluded_volume(double radius, double length) 17 { 18 return 0.5*cbrt(0.75*radius*(2.0*radius*length + (radius + length)*(M_PI*radius + length))); 13 19 } 14 20 … … 31 37 default: 32 38 case 1: 39 return radius_from_excluded_volume(radius, length); 40 case 2: 33 41 return radius_from_volume(radius, length); 34 case 2:42 case 3: 35 43 return radius; 36 case 3:44 case 4: 37 45 return 0.5*length; 38 case 4:46 case 5: 39 47 return (radius < 0.5*length ? radius : 0.5*length); 40 case 5:48 case 6: 41 49 return (radius > 0.5*length ? radius : 0.5*length); 42 case 6:50 case 7: 43 51 return radius_from_diagonal(radius,length); 44 52 }
Note: See TracChangeset
for help on using the changeset viewer.