Changeset 3c60146 in sasmodels
- Timestamp:
- Sep 7, 2018 4:08:32 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:
- c11d09f
- Parents:
- d277229
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/core_shell_ellipsoid.c
rd277229 r3c60146 49 49 { 50 50 // Trivial cases 51 if ( x_core == x_polar_shell == 1.0) return radius_equat_core + thick_shell;51 if (1.0 == x_core && 1.0 == x_polar_shell) return radius_equat_core + thick_shell; 52 52 if ((radius_equat_core + thick_shell)*(radius_equat_core*x_core + thick_shell*x_polar_shell) == 0.) return 0.; 53 53 … … 70 70 effective_radius(int mode, double radius_equat_core, double x_core, double thick_shell, double x_polar_shell) 71 71 { 72 const double radius_equat_tot = radius_equat_core + thick_shell; 73 const double radius_polar_tot = radius_equat_core*x_core + thick_shell*x_polar_shell; 74 72 75 if (mode == 1) { 73 76 return radius_from_volume(radius_equat_core, x_core, thick_shell, x_polar_shell); … … 75 78 return radius_from_curvature(radius_equat_core, x_core, thick_shell, x_polar_shell); 76 79 } else if (mode == 3) { 77 const double radius_equat_tot = radius_equat_core + thick_shell;78 const double radius_polar_tot = radius_equat_core*x_core + thick_shell*x_polar_shell;79 80 return (radius_polar_tot < radius_equat_tot ? radius_polar_tot : radius_equat_tot); 80 81 } else { 81 const double radius_equat_tot = radius_equat_core + thick_shell;82 const double radius_polar_tot = radius_equat_core*x_core + thick_shell*x_polar_shell;83 82 return (radius_polar_tot > radius_equat_tot ? radius_polar_tot : radius_equat_tot); 84 83 }
Note: See TracChangeset
for help on using the changeset viewer.