Changeset 3c60146 in sasmodels


Ignore:
Timestamp:
Sep 7, 2018 4:08:32 AM (6 years ago)
Author:
grethevj
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
Message:

minor change in effective_radius()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_ellipsoid.c

    rd277229 r3c60146  
    4949{ 
    5050    // 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; 
    5252    if ((radius_equat_core + thick_shell)*(radius_equat_core*x_core + thick_shell*x_polar_shell) == 0.)  return 0.; 
    5353 
     
    7070effective_radius(int mode, double radius_equat_core, double x_core, double thick_shell, double x_polar_shell) 
    7171{ 
     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 
    7275    if (mode == 1) { 
    7376        return radius_from_volume(radius_equat_core, x_core, thick_shell, x_polar_shell); 
     
    7578        return radius_from_curvature(radius_equat_core, x_core, thick_shell, x_polar_shell); 
    7679    } 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; 
    7980        return (radius_polar_tot < radius_equat_tot ? radius_polar_tot : radius_equat_tot); 
    8081    } 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; 
    8382        return (radius_polar_tot > radius_equat_tot ? radius_polar_tot : radius_equat_tot); 
    8483    } 
Note: See TracChangeset for help on using the changeset viewer.