Changeset d277229 in sasmodels for sasmodels/models/rectangular_prism.c


Ignore:
Timestamp:
Sep 7, 2018 5: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/rectangular_prism.c

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