Ignore:
Timestamp:
Sep 7, 2018 3:29:38 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:
3c60146
Parents:
2a12351b
Message:

Models updated to include choices for effective interaction radii

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/hollow_rectangular_prism_thin_walls.c

    r71b751d rd277229  
    66    double vol_shell = 2.0 * (length_a*length_b + length_a*length_c + length_b*length_c); 
    77    return vol_shell; 
     8} 
     9 
     10static double 
     11effective_radius(int mode, double length_a, double b2a_ratio, double c2a_ratio) 
     12{ 
     13    if (mode == 1) { 
     14        return cbrt(0.75*cube(length_a)*b2a_ratio*c2a_ratio/M_PI); 
     15    } else if (mode == 2) { 
     16        return 0.5 * length_a; 
     17    } else if (mode == 3) { 
     18        return 0.5 * length_a*b2a_ratio; 
     19    } else if (mode == 4) { 
     20        return 0.5 * length_a*c2a_ratio; 
     21    } else if (mode == 5) { 
     22        return length_a*sqrt(b2a_ratio/M_PI); 
     23    } else if (mode == 6) { 
     24        return 0.5*sqrt(square(length_a) * (1.0 + square(b2a_ratio))); 
     25    } else { 
     26        return 0.5*sqrt(square(length_a) * (1.0 + square(b2a_ratio) + square(c2a_ratio))); 
     27    } 
    828} 
    929 
Note: See TracChangeset for help on using the changeset viewer.