Changeset 4788822 in sasmodels for sasmodels/models/fractal.c


Ignore:
Timestamp:
Mar 19, 2017 11:21:34 PM (7 years ago)
Author:
butler
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
df89d77
Parents:
9f12fbe
Message:

added polydispersity back to fractal (as it used to be, as the
documentation implies and as core_shell_fractal already has). Also
formatted documentation according to current standard for references and
authorship/verification. Fixes #877

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/fractal.c

    r925ad6e r4788822  
    11#define INVALID(p) (p.fractal_dim < 0.0) 
     2 
     3 static double 
     4 form_volume(double radius) 
     5 { 
     6     return M_4PI_3 * cube(radius); 
     7 } 
    28 
    39static double 
     
    1319 
    1420    //calculate P(q) for the spherical subunits 
    15     const double V = M_4PI_3*cube(radius); 
    16     const double pq = V * square((sld_block-sld_solvent)*sas_3j1x_x(q*radius)); 
     21    const double pq = square(form_volume(radius) * (sld_block-sld_solvent) 
     22                      *sas_3j1x_x(q*radius)); 
    1723 
    1824    // scale to units cm-1 sr-1 (assuming data on absolute scale) 
Note: See TracChangeset for help on using the changeset viewer.