Ignore:
Timestamp:
Aug 14, 2018 12:09:34 PM (2 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/lamellar_stack_paracrystal.c

    r5467cd8 r71b751d  
    1818        int n2 = n1 + 1; 
    1919        const double xn = (double)n2 - fp_Nlayers;      //fractional contribution of n1 
    20          
     20 
    2121        const double ww = exp(-0.5*square(qval*pd*davg)); 
    2222 
     
    2727 
    2828        Znq = xn*Snq; 
    29          
     29 
    3030        //calculate the n2 contribution 
    3131        an = paraCryst_an(ww,qval,davg,n2); 
     
    3333 
    3434        Znq += (1.0-xn)*Snq; 
    35          
     35 
    3636        //and the independent contribution 
    3737        Znq += (1.0-ww*ww)/(1.0+ww*ww-2.0*ww*cos(qval*davg)); 
    38          
     38 
    3939        //the limit when Nlayers approaches infinity 
    4040//      Zq = (1-ww^2)/(1+ww^2-2*ww*cos(qval*davg)) 
    41          
     41 
    4242        const double xi = th/2.0;               //use 1/2 the bilayer thickness 
    4343        const double Pbil = square(sas_sinx_x(qval*xi)); 
    44          
     44 
    4545        const double contr = sld - solvent_sld; 
    4646        const double inten = 2.0*M_PI*contr*contr*Pbil*Znq/(qval*qval); 
     
    5252double 
    5353paraCryst_sn(double ww, double qval, double davg, int Nlayers, double an) { 
    54          
     54 
    5555        double Snq; 
    5656 
    5757        Snq = an/( (double)Nlayers*square(1.0+ww*ww-2.0*ww*cos(qval*davg)) ); 
    58          
     58 
    5959        return Snq; 
    6060} 
     
    6363paraCryst_an(double ww, double qval, double davg, int Nlayers) { 
    6464        double an; 
    65          
     65 
    6666        an = 4.0*ww*ww - 2.0*(ww*ww*ww+ww)*cos(qval*davg); 
    6767        an -= 4.0*pow(ww,(Nlayers+2))*cos((double)Nlayers*qval*davg); 
    6868        an += 2.0*pow(ww,(Nlayers+3))*cos((double)(Nlayers-1)*qval*davg); 
    6969        an += 2.0*pow(ww,(Nlayers+1))*cos((double)(Nlayers+1)*qval*davg); 
    70          
     70 
    7171        return an; 
    7272} 
Note: See TracChangeset for help on using the changeset viewer.