Ignore:
Timestamp:
Sep 8, 2018 8:55:23 AM (6 years ago)
Author:
richardh
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
fbaef04
Parents:
b763f9d
Message:

some corrections to R_eff options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_parallelepiped.c

    rd277229 ra94046f  
    4545effective_radius(int mode, double length_a, double length_b, double length_c, 
    4646                 double thick_rim_a, double thick_rim_b, double thick_rim_c) 
     47//effective_radius_type = ["equivalent sphere","half outer length_a", "half outer length_b", "half outer length_c", 
     48//                         "equivalent circular cross-section","half outer ab diagonal","half outer diagonal"] 
     49// note the core box is A*B*C with slabs ta, tb & tc on each face but missing the corners, though that fact is ignored here 
     50// in the equvalent sphere option 
    4751{ 
    4852    if (mode == 1) { 
    4953        return radius_from_volume(length_a, length_b, length_c, thick_rim_a, thick_rim_b, thick_rim_c); 
    5054    } else if (mode == 2) { 
    51         return 0.5 * (length_a + thick_rim_a); 
     55        return 0.5 * length_a + thick_rim_a; 
    5256    } else if (mode == 3) { 
    53         return 0.5 * (length_b + thick_rim_b); 
     57        return 0.5 * length_b + thick_rim_b; 
    5458    } else if (mode == 4) { 
    55         return 0.5 * (length_c + thick_rim_c); 
     59        return 0.5 * length_c + thick_rim_c; 
    5660    } else if (mode == 5) { 
    5761        return radius_from_crosssection(length_a, length_b, thick_rim_a, thick_rim_b); 
    5862    } else if (mode == 6) { 
    59         return 0.5*sqrt(square(length_a+thick_rim_a) + square(length_b+thick_rim_b)); 
     63        return 0.5*sqrt(square(length_a+ 2.0*thick_rim_a) + square(length_b+ 2.0*thick_rim_b)); 
    6064    } else { 
    61         return 0.5*sqrt(square(length_a+thick_rim_a) + square(length_b+thick_rim_b) + square(length_c+thick_rim_c)); 
     65        return 0.5*sqrt(square(length_a+ 2.0*thick_rim_a) + square(length_b+ 2.0*thick_rim_b) + square(length_c+ 2.0*thick_rim_c)); 
    6266    } 
    6367} 
Note: See TracChangeset for help on using the changeset viewer.