Changeset a94046f in sasmodels for sasmodels/models/core_multi_shell.c


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_multi_shell.c

    rd277229 ra94046f  
    3232static double 
    3333effective_radius(int mode, double core_radius, double fp_n, double thickness[]) 
     34// this seems regardless to always give the result for outer radius for n=1 shells; why?? 
     35// printf shows fp_n is always 1, not 0,1,2 
    3436{ 
    35     if (mode == 1) { 
     37//        printf("fp_n =%g \n",fp_n); 
     38        if (mode == 1) { 
    3639        double r = core_radius; 
    3740        int n = (int)(fp_n+0.5); 
    38         for (int i=0; i < n; i++) { 
    39             r += thickness[i]; 
     41        if ( n > 0) { 
     42            for (int i=0; i < n; i++) { 
     43                r += thickness[i]; 
     44            } 
    4045        } 
    4146        return r; 
Note: See TracChangeset for help on using the changeset viewer.