Changes in sasmodels/models/capped_cylinder.c [71b751d:ee60aa7] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/capped_cylinder.c
r71b751d ree60aa7 84 84 } 85 85 86 static double 87 radius_from_volume(double radius, double radius_cap, double length) 88 { 89 const double vol_cappedcyl = form_volume(radius,radius_cap,length); 90 return cbrt(0.75*vol_cappedcyl/M_PI); 91 } 92 93 static double 94 radius_from_totallength(double radius, double radius_cap, double length) 95 { 96 const double hc = radius_cap - sqrt(radius_cap*radius_cap - radius*radius); 97 return 0.5*length + hc; 98 } 99 100 static double 101 effective_radius(int mode, double radius, double radius_cap, double length) 102 { 103 switch (mode) { 104 case 1: // equivalent sphere 105 return radius_from_volume(radius, radius_cap, length); 106 case 2: // radius 107 return radius; 108 case 3: // half length 109 return 0.5*length; 110 case 4: // half total length 111 return radius_from_totallength(radius, radius_cap,length); 112 } 113 } 114 86 115 static void 87 116 Fq(double q,double *F1, double *F2, double sld, double solvent_sld,
Note: See TracChangeset
for help on using the changeset viewer.