Changeset d277229 in sasmodels for sasmodels/models/core_shell_bicelle.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/core_shell_bicelle.c
r71b751d rd277229 34 34 35 35 return t; 36 } 37 38 static double 39 radius_from_volume(double radius, double thick_rim, double thick_face, double length) 40 { 41 const double volume_bicelle = form_volume(radius,thick_rim,thick_face,length); 42 return cbrt(0.75*volume_bicelle/M_PI); 43 } 44 45 static double 46 radius_from_diagonal(double radius, double thick_rim, double thick_face, double length) 47 { 48 const double radius_tot = radius + thick_rim; 49 const double length_tot = length + 2.0*thick_face; 50 return sqrt(radius_tot*radius_tot + 0.25*length_tot*length_tot); 51 } 52 53 static double 54 effective_radius(int mode, double radius, double thick_rim, double thick_face, double length) 55 { 56 if (mode == 1) { 57 return radius_from_volume(radius, thick_rim, thick_face, length); 58 } else if (mode == 2) { 59 return radius + thick_rim; 60 } else if (mode == 3) { 61 return 0.5*length + thick_face; 62 } else { 63 return radius_from_diagonal(radius,thick_rim,thick_face,length); 64 } 36 65 } 37 66
Note: See TracChangeset
for help on using the changeset viewer.