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


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

Legend:

Unmodified
Added
Removed
  • sasmodels/models/bcc.c

    r7ed702f r9aac25d  
    4040} 
    4141 
    42 double _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 } 
    5042 
    5143double form_volume(double radius){ 
     
    8779 
    8880        answer = (vb-va)/2.0*summ; 
    89         answer = answer*_sphereform(q,radius,sld,solvent_sld)*latticescale; 
     81        answer = answer*sphere_form(q,radius,sld,solvent_sld)*latticescale; 
    9082 
    9183    return answer; 
     
    174166 
    175167  // Use SphereForm directly from libigor 
    176   answer = _sphereform(q,radius,sld,solvent_sld)*Zq*latticescale; 
     168  answer = sphere_form(q,radius,sld,solvent_sld)*Zq*latticescale; 
    177169 
    178170  return answer; 
  • sasmodels/models/bcc.py

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

    reeb8bac r9aac25d  
    77double _FCC_Integrand(double q, double dnn, double d_factor, double theta, double phi); 
    88double _FCCeval(double Theta, double Phi, double temp1, double temp3); 
    9 double _sphereform(double q, double radius, double sld, double solvent_sld); 
    109 
    1110 
     
    3938 
    4039        return (result); 
    41 } 
    42  
    43 double _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; 
    5040} 
    5141 
     
    8878 
    8979        answer = (vb-va)/2.0*summ; 
    90         answer = answer*_sphereform(q,radius,sld,solvent_sld)*latticescale; 
     80        answer = answer*sphere_form(q,radius,sld,solvent_sld)*latticescale; 
    9181 
    9282    return answer; 
     
    175165 
    176166  // Use SphereForm directly from libigor 
    177   answer = _sphereform(q,radius,sld,solvent_sld)*Zq*latticescale; 
     167  answer = sphere_form(q,radius,sld,solvent_sld)*Zq*latticescale; 
    178168 
    179169  return answer; 
  • sasmodels/models/fcc.py

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