Changes in / [98f3053:216fa6d] in sasmodels


Ignore:
Location:
sasmodels/models
Files:
7 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/bcc.c

    r9aac25d r7ed702f  
    4040} 
    4141 
     42double _sphereform(double q, double radius, double sld, double solvent_sld){ 
     43    const double qr = q*radius; 
     44    double sn, cn; 
     45    SINCOS(qr, sn, cn); 
     46    const double bes = (qr == 0.0 ? 1.0 : 3.0*(sn-qr*cn)/(qr*qr*qr)); 
     47    const double fq = bes * (sld - solvent_sld)*form_volume(radius); 
     48    return 1.0e-4*fq*fq; 
     49} 
    4250 
    4351double form_volume(double radius){ 
     
    7987 
    8088        answer = (vb-va)/2.0*summ; 
    81         answer = answer*sphere_form(q,radius,sld,solvent_sld)*latticescale; 
     89        answer = answer*_sphereform(q,radius,sld,solvent_sld)*latticescale; 
    8290 
    8391    return answer; 
     
    166174 
    167175  // Use SphereForm directly from libigor 
    168   answer = sphere_form(q,radius,sld,solvent_sld)*Zq*latticescale; 
     176  answer = _sphereform(q,radius,sld,solvent_sld)*Zq*latticescale; 
    169177 
    170178  return answer; 
  • sasmodels/models/bcc.py

    r9aac25d r13ed84c  
    132132# pylint: enable=bad-whitespace, line-too-long 
    133133 
    134 source = ["lib/J1.c", "lib/gauss150.c", "lib/sphere_form.c", "bcc.c"] 
     134source = ["lib/J1.c", "lib/gauss150.c", "bcc.c"] 
    135135 
    136136# parameters for demo 
  • sasmodels/models/fcc.c

    r9aac25d reeb8bac  
    77double _FCC_Integrand(double q, double dnn, double d_factor, double theta, double phi); 
    88double _FCCeval(double Theta, double Phi, double temp1, double temp3); 
     9double _sphereform(double q, double radius, double sld, double solvent_sld); 
    910 
    1011 
     
    3839 
    3940        return (result); 
     41} 
     42 
     43double _sphereform(double q, double radius, double sld, double solvent_sld){ 
     44    const double qr = q*radius; 
     45    double sn, cn; 
     46    SINCOS(qr, sn, cn); 
     47    const double bes = (qr == 0.0 ? 1.0 : 3.0*(sn-qr*cn)/(qr*qr*qr)); 
     48    const double fq = bes * (sld - solvent_sld)*form_volume(radius); 
     49    return 1.0e-4*fq*fq; 
    4050} 
    4151 
     
    7888 
    7989        answer = (vb-va)/2.0*summ; 
    80         answer = answer*sphere_form(q,radius,sld,solvent_sld)*latticescale; 
     90        answer = answer*_sphereform(q,radius,sld,solvent_sld)*latticescale; 
    8191 
    8292    return answer; 
     
    165175 
    166176  // Use SphereForm directly from libigor 
    167   answer = sphere_form(q,radius,sld,solvent_sld)*Zq*latticescale; 
     177  answer = _sphereform(q,radius,sld,solvent_sld)*Zq*latticescale; 
    168178 
    169179  return answer; 
  • sasmodels/models/fcc.py

    r9aac25d r13ed84c  
    125125             ] 
    126126 
    127 source = ["lib/J1.c", "lib/gauss150.c", "lib/sphere_form.c", "fcc.c"] 
     127source = ["lib/J1.c", "lib/gauss150.c", "fcc.c"] 
    128128 
    129129# parameters for demo 
Note: See TracChangeset for help on using the changeset viewer.