Changeset 6d5601c in sasmodels


Ignore:
Timestamp:
Oct 25, 2018 5:03:37 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
304c775
Parents:
149eb53
Message:

use 4/3 pi constant when computing R_eff

Location:
sasmodels/models
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/barbell.c

    ree60aa7 r6d5601c  
    6666{ 
    6767    const double vol_barbell = form_volume(radius_bell,radius,length); 
    68     return cbrt(0.75*vol_barbell/M_PI); 
     68    return cbrt(vol_barbell/M_4PI_3); 
    6969} 
    7070 
  • sasmodels/models/capped_cylinder.c

    ree60aa7 r6d5601c  
    8888{ 
    8989    const double vol_cappedcyl = form_volume(radius,radius_cap,length); 
    90     return cbrt(0.75*vol_cappedcyl/M_PI); 
     90    return cbrt(vol_cappedcyl/M_4PI_3); 
    9191} 
    9292 
  • sasmodels/models/core_shell_bicelle.c

    ree60aa7 r6d5601c  
    4040{ 
    4141    const double volume_bicelle = form_volume(radius,thick_rim,thick_face,length); 
    42     return cbrt(0.75*volume_bicelle/M_PI); 
     42    return cbrt(volume_bicelle/M_4PI_3); 
    4343} 
    4444 
  • sasmodels/models/core_shell_bicelle_elliptical.c

    ree60aa7 r6d5601c  
    1414{ 
    1515    const double volume_bicelle = form_volume(r_minor, x_core, thick_rim,thick_face,length); 
    16     return cbrt(0.75*volume_bicelle/M_PI); 
     16    return cbrt(volume_bicelle/M_4PI_3); 
    1717} 
    1818 
  • sasmodels/models/core_shell_bicelle_elliptical_belt_rough.c

    rd299327 r6d5601c  
    1515{ 
    1616    const double volume_bicelle = form_volume(r_minor, x_core, thick_rim,thick_face,length); 
    17     return cbrt(0.75*volume_bicelle/M_PI); 
     17    return cbrt(volume_bicelle/M_4PI_3); 
    1818} 
    1919 
  • sasmodels/models/core_shell_cylinder.c

    ree60aa7 r6d5601c  
    1717{ 
    1818    const double volume_outer_cyl = form_volume(radius,thickness,length); 
    19     return cbrt(0.75*volume_outer_cyl/M_PI); 
     19    return cbrt(volume_outer_cyl/M_4PI_3); 
    2020} 
    2121 
  • sasmodels/models/core_shell_ellipsoid.c

    ree60aa7 r6d5601c  
    4242{ 
    4343    const double volume_ellipsoid = form_volume(radius_equat_core, x_core, thick_shell, x_polar_shell); 
    44     return cbrt(0.75*volume_ellipsoid/M_PI); 
     44    return cbrt(volume_ellipsoid/M_4PI_3); 
    4545} 
    4646 
  • sasmodels/models/cylinder.c

    ree60aa7 r6d5601c  
    1616radius_from_volume(double radius, double length) 
    1717{ 
    18     return cbrt(0.75*radius*radius*length); 
     18    return cbrt(M_PI*radius*radius*length/M_4PI_3); 
    1919} 
    2020 
  • sasmodels/models/elliptical_cylinder.c

    ree60aa7 r6d5601c  
    99{ 
    1010    const double volume_ellcyl = form_volume(radius_minor,r_ratio,length); 
    11     return cbrt(0.75*volume_ellcyl/M_PI); 
     11    return cbrt(volume_ellcyl/M_4PI_3); 
    1212} 
    1313 
  • sasmodels/models/hollow_cylinder.c

    re44432d r6d5601c  
    1717{ 
    1818    const double volume_outer_cyl = M_PI*square(radius + thickness)*length; 
    19     return cbrt(0.75*volume_outer_cyl/M_PI); 
     19    return cbrt(volume_outer_cyl/M_4PI_3); 
    2020} 
    2121 
  • sasmodels/models/hollow_rectangular_prism.c

    re44432d r6d5601c  
    2727    switch (mode) { 
    2828    case 1: // equivalent sphere 
    29         return cbrt(0.75*cube(length_a)*b2a_ratio*c2a_ratio/M_PI); 
     29        return cbrt(cube(length_a)*b2a_ratio*c2a_ratio/M_4PI_3); 
    3030    case 2: // half length_a 
    3131        return 0.5 * length_a; 
  • sasmodels/models/hollow_rectangular_prism_thin_walls.c

    re44432d r6d5601c  
    2222    switch (mode) { 
    2323    case 1: // equivalent sphere 
    24         return cbrt(0.75*cube(length_a)*b2a_ratio*c2a_ratio/M_PI); 
     24        return cbrt(cube(length_a)*b2a_ratio*c2a_ratio/M_4PI_3); 
    2525    case 2: // half length_a 
    2626        return 0.5 * length_a; 
  • sasmodels/models/parallelepiped.c

    ree60aa7 r6d5601c  
    1010    switch (mode) { 
    1111    case 1: // equivalent sphere 
    12         return cbrt(0.75*length_a*length_b*length_c/M_PI); 
     12        return cbrt(length_a*length_b*length_c/M_4PI_3); 
    1313    case 2: // half length_a 
    1414        return 0.5 * length_a; 
  • sasmodels/models/pringle.c

    ree60aa7 r6d5601c  
    109109    switch (mode) { 
    110110    case 1: // equivalent sphere 
    111         return cbrt(0.75*radius*radius*thickness); 
     111        return cbrt(M_PI*radius*radius*thickness/M_4PI_3); 
    112112    case 2: // radius 
    113113        return radius; 
  • sasmodels/models/rectangular_prism.c

    ree60aa7 r6d5601c  
    1010    switch (mode) { 
    1111    case 1: // equivalent sphere 
    12         return cbrt(0.75*cube(length_a)*b2a_ratio*c2a_ratio/M_PI); 
     12        return cbrt(cube(length_a)*b2a_ratio*c2a_ratio/M_4PI_3); 
    1313    case 2: // half length_a 
    1414        return 0.5 * length_a; 
Note: See TracChangeset for help on using the changeset viewer.