Changeset a807206 in sasmodels for sasmodels/models/ellipsoid.c


Ignore:
Timestamp:
Sep 30, 2016 10:42:06 PM (8 years ago)
Author:
butler
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
caddb14, 5031ca3
Parents:
2222134
Message:

updating more parameter names addressing #649

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/ellipsoid.c

    r50e1e40 ra807206  
    1 double form_volume(double rpolar, double requatorial); 
    2 double Iq(double q, double sld, double solvent_sld, double rpolar, double requatorial); 
    3 double Iqxy(double qx, double qy, double sld, double solvent_sld, 
    4     double rpolar, double requatorial, double theta, double phi); 
     1double form_volume(double radius_polar, double radius_equatorial); 
     2double Iq(double q, double sld, double sld_solvent, double radius_polar, double radius_equatorial); 
     3double Iqxy(double qx, double qy, double sld, double sld_solvent, 
     4    double radius_polar, double radius_equatorial, double theta, double phi); 
    55 
    6 double _ellipsoid_kernel(double q, double rpolar, double requatorial, double sin_alpha); 
    7 double _ellipsoid_kernel(double q, double rpolar, double requatorial, double sin_alpha) 
     6double _ellipsoid_kernel(double q, double radius_polar, double radius_equatorial, double sin_alpha); 
     7double _ellipsoid_kernel(double q, double radius_polar, double radius_equatorial, double sin_alpha) 
    88{ 
    9     double ratio = rpolar/requatorial; 
    10     const double u = q*requatorial*sqrt(1.0 
     9    double ratio = radius_polar/radius_equatorial; 
     10    const double u = q*radius_equatorial*sqrt(1.0 
    1111                   + sin_alpha*sin_alpha*(ratio*ratio - 1.0)); 
    1212    const double f = sph_j1c(u); 
     
    1515} 
    1616 
    17 double form_volume(double rpolar, double requatorial) 
     17double form_volume(double radius_polar, double radius_equatorial) 
    1818{ 
    19     return M_4PI_3*rpolar*requatorial*requatorial; 
     19    return M_4PI_3*radius_polar*radius_equatorial*radius_equatorial; 
    2020} 
    2121 
    2222double Iq(double q, 
    2323    double sld, 
    24     double solvent_sld, 
    25     double rpolar, 
    26     double requatorial) 
     24    double sld_solvent, 
     25    double radius_polar, 
     26    double radius_equatorial) 
    2727{ 
    2828    // translate a point in [-1,1] to a point in [0, 1] 
     
    3333        //const double sin_alpha = (Gauss76Z[i]*(upper-lower) + upper + lower)/2; 
    3434        const double sin_alpha = Gauss76Z[i]*zm + zb; 
    35         total += Gauss76Wt[i] * _ellipsoid_kernel(q, rpolar, requatorial, sin_alpha); 
     35        total += Gauss76Wt[i] * _ellipsoid_kernel(q, radius_polar, radius_equatorial, sin_alpha); 
    3636    } 
    3737    // translate dx in [-1,1] to dx in [lower,upper] 
    3838    const double form = total*zm; 
    39     const double s = (sld - solvent_sld) * form_volume(rpolar, requatorial); 
     39    const double s = (sld - sld_solvent) * form_volume(radius_polar, radius_equatorial); 
    4040    return 1.0e-4 * s * s * form; 
    4141} 
     
    4343double Iqxy(double qx, double qy, 
    4444    double sld, 
    45     double solvent_sld, 
    46     double rpolar, 
    47     double requatorial, 
     45    double sld_solvent, 
     46    double radius_polar, 
     47    double radius_equatorial, 
    4848    double theta, 
    4949    double phi) 
     
    5555    // TODO: check if this is actually sin(alpha), not cos(alpha) 
    5656    const double cos_alpha = cn*cos(phi*M_PI_180)*(qx/q) + sn*(qy/q); 
    57     const double form = _ellipsoid_kernel(q, rpolar, requatorial, cos_alpha); 
    58     const double s = (sld - solvent_sld) * form_volume(rpolar, requatorial); 
     57    const double form = _ellipsoid_kernel(q, radius_polar, radius_equatorial, cos_alpha); 
     58    const double s = (sld - sld_solvent) * form_volume(radius_polar, radius_equatorial); 
    5959 
    6060    return 1.0e-4 * form * s * s; 
Note: See TracChangeset for help on using the changeset viewer.