Changeset cf85329 in sasmodels


Ignore:
Timestamp:
Feb 29, 2016 4:28:02 PM (9 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:
c437dbb
Parents:
73860b6
Message:

add sinc() function to kernel template

Location:
sasmodels
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernel_template.c

    r73860b6 rcf85329  
    104104//inline double square(double x) { return pow(x,2.0); } 
    105105//inline double square(double x) { return pown(x,2); } 
    106 inline double square(x) { return x*x; } 
     106inline double square(double x) { return x*x; } 
    107107inline double cube(double x) { return x*x*x; } 
     108inline double sinc(double x) { return x==0 ? 1.0 : sin(x)/x; } 
    108109 
    109110 
  • sasmodels/models/core_shell_bicelle.c

    re7678b2 rcf85329  
    2828    return M_PI*(radius+rim_thickness)*(radius+rim_thickness)*(length+2*face_thickness); 
    2929} 
    30  
    31 inline double sinc(double x) {return x==0 ? 1.0 : sin(x)/x;} 
    3230 
    3331static double 
  • sasmodels/models/linear_pearls.c

    r577912b rcf85329  
    2929    // Return total volume 
    3030    return num_pearls * pearl_vol;; 
    31 } 
    32  
    33 // If used elsewhere - factor out to lib/ 
    34 static 
    35 double sinc(double x) 
    36 { 
    37   if (x==0.0){ 
    38     return 1.0; 
    39   } 
    40   return sin(x)/x; 
    4131} 
    4232 
  • sasmodels/models/pearl_necklace.c

    rf12357f rcf85329  
    44double form_volume(double radius, double edge_separation, 
    55        double string_thickness, double number_of_pearls); 
    6 double sinc(double x); 
    7          
     6 
    87double Iq(double q, double radius, double edge_separation, 
    98        double string_thickness, double number_of_pearls, double sld,  
     
    124123} 
    125124 
    126 double sinc(double x) 
    127 { 
    128         double num = sin(x); 
    129         double denom = x; 
    130         return num/denom; 
    131 } 
    132  
    133  
    134125double Iq(double q, double radius, double edge_separation, 
    135126        double string_thickness, double number_of_pearls, double sld,  
Note: See TracChangeset for help on using the changeset viewer.