Changeset ec1d4bc in sasmodels for sasmodels/models/multilayer_vesicle.c


Ignore:
Timestamp:
Feb 1, 2017 7:52:41 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
d3e3f756
Parents:
66ca2a6
Message:

fix multilayer vesicle polydispersity, docs and parameter names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/multilayer_vesicle.c

    r925ad6e rec1d4bc  
    1 static 
    2 double multilayer_vesicle_kernel(double q, 
     1static double 
     2form_volume(double radius, 
     3          double thick_shell, 
     4          double thick_solvent, 
     5          double fp_n_shells) 
     6{ 
     7    int n_shells = (int)(fp_n_shells + 0.5); 
     8    double R_N = radius + n_shells*(thick_shell+thick_solvent) - thick_solvent; 
     9    return M_4PI_3*cube(R_N); 
     10} 
     11 
     12static double 
     13multilayer_vesicle_kernel(double q, 
    314          double volfraction, 
    415          double radius, 
     
    718          double sld_solvent, 
    819          double sld, 
    9           double n_pairs) 
     20          int n_shells) 
    1021{ 
    1122    //calculate with a loop, two shells at a time 
     
    2940 
    3041        //do 2 layers at a time 
    31         ii += 1; 
     42        ii++; 
    3243 
    33     } while(ii <= n_pairs-1);  //change to make 0 < n_pairs < 2 correspond to 
     44    } while(ii <= n_shells-1);  //change to make 0 < n_shells < 2 correspond to 
    3445                               //unilamellar vesicles (C. Glinka, 11/24/03) 
    3546 
    36     fval *= volfraction*1.0e-4*fval/voli; 
    37  
    38     return(fval); 
     47    return 1.0e-4*volfraction*fval*fval;  // Volume normalization happens in caller 
    3948} 
    4049 
    41 static 
    42 double Iq(double q, 
     50static double 
     51Iq(double q, 
    4352          double volfraction, 
    4453          double radius, 
     
    4756          double sld_solvent, 
    4857          double sld, 
    49           double n_pairs) 
     58          double fp_n_shells) 
    5059{ 
     60    int n_shells = (int)(fp_n_shells + 0.5); 
    5161    return multilayer_vesicle_kernel(q, 
    5262           volfraction, 
     
    5666           sld_solvent, 
    5767           sld, 
    58            n_pairs); 
     68           n_shells); 
    5969} 
    6070 
Note: See TracChangeset for help on using the changeset viewer.