Changeset ff7119b in sasmodels for sasmodels/models/lib/cylkernel.c


Ignore:
Timestamp:
Aug 26, 2014 8:27:06 PM (10 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
5d4777d
Parents:
a7684e5
Message:

docu update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/lib/cylkernel.c

    r14de349 rff7119b  
    11// Compute the form factor for a cylinder 
    2 // qq is the q-value for the calculation (1/A) 
     2//     F^2(q) sin a 
     3// given 
     4//     F(q) = sin(Q L/2 cos a)/(Q L/2 cos a) * 2 J1(Q R sin a) / (Q R sin a) 
     5// q is the q-value for the calculation (1/A) 
    36// radius is the radius of the cylinder (A) 
    4 // h is the HALF-LENGTH of the cylinder = L/2 (A) 
    5 real CylKernel(real q, real radius, real h, real theta); 
    6 real CylKernel(real q, real radius, real h, real theta) 
     7// halflength is the HALF-LENGTH of the cylinder = L/2 (A) 
     8real CylKernel(real q, real radius, real halflength, real theta); 
     9real CylKernel(real q, real radius, real halflength, real theta) 
    710{ 
    811    real sn, cn; 
    912    SINCOS(theta, sn, cn); 
    1013    const real besarg = q*radius*sn; 
    11     const real siarg = q*h*cn; 
     14    const real siarg = q*halflength*cn; 
    1215    // lim_{x->0} J1(x)/x = 1/2,  lim_{x->0} sin(x)/x = 1 
    1316    const real bj = (besarg == REAL(0.0) ? REAL(0.5) : J1(besarg)/besarg); 
    1417    const real si = (siarg == REAL(0.0) ? REAL(1.0) : sin(siarg)/siarg); 
    15     return REAL(4.0)*sin(theta)*bj*bj*si*si; 
     18    return REAL(4.0)*sn*bj*bj*si*si; 
    1619} 
Note: See TracChangeset for help on using the changeset viewer.