Changeset 71b751d in sasmodels for sasmodels/models/core_shell_cylinder.c


Ignore:
Timestamp:
Aug 14, 2018 12:09:34 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
86aa992
Parents:
2f8cbb9
Message:

update remaining form factors to use Fq interface

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_cylinder.c

    rd86f0fc r71b751d  
    1313} 
    1414 
    15 static double 
    16 Iq(double q, 
     15static void 
     16Fq(double q, 
     17    double *F1, 
     18    double *F2, 
    1719    double core_sld, 
    1820    double shell_sld, 
     
    2931    const double shell_h = (0.5*length + thickness); 
    3032    const double shell_vd = form_volume(radius,thickness,length) * (shell_sld-solvent_sld); 
    31     double total = 0.0; 
     33    double total_F1 = 0.0; 
     34    double total_F2 = 0.0; 
    3235    for (int i=0; i<GAUSS_N ;i++) { 
    3336        // translate a point in [-1,1] to a point in [0, pi/2] 
     
    4043        const double fq = _cyl(core_vd, core_r*qab, core_h*qc) 
    4144            + _cyl(shell_vd, shell_r*qab, shell_h*qc); 
    42         total += GAUSS_W[i] * fq * fq * sin_theta; 
     45        total_F1 += GAUSS_W[i] * fq * sin_theta; 
     46        total_F2 += GAUSS_W[i] * fq * fq * sin_theta; 
    4347    } 
    4448    // translate dx in [-1,1] to dx in [lower,upper] 
    4549    //const double form = (upper-lower)/2.0*total; 
    46     return 1.0e-4 * total * M_PI_4; 
     50    *F1 = 1.0e-2 * total_F1 * M_PI_4; 
     51    *F2 = 1.0e-4 * total_F2 * M_PI_4; 
    4752} 
    48  
    4953 
    5054static double 
Note: See TracChangeset for help on using the changeset viewer.