Changeset d277229 in sasmodels for sasmodels/models/barbell.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/barbell.c
r71b751d rd277229 62 62 } 63 63 64 static double 65 radius_from_volume(double radius_bell, double radius, double length) 66 { 67 const double vol_barbell = form_volume(radius_bell,radius,length); 68 return cbrt(0.75*vol_barbell/M_PI); 69 } 70 71 static double 72 radius_from_totallength(double radius_bell, double radius, double length) 73 { 74 const double hdist = sqrt(square(radius_bell) - square(radius)); 75 return 0.5*length + hdist + radius_bell; 76 } 77 78 static double 79 effective_radius(int mode, double radius_bell, double radius, double length) 80 { 81 if (mode == 1) { 82 return radius_from_volume(radius_bell, radius , length); 83 } else if (mode == 2) { 84 return radius; 85 } else if (mode == 3) { 86 return 0.5*length; 87 } else { 88 return radius_from_totallength(radius_bell,radius,length); 89 } 90 } 91 64 92 static void 65 93 Fq(double q,double *F1, double *F2, double sld, double solvent_sld,
Note: See TracChangeset
for help on using the changeset viewer.