Changeset 8faffcd in sasmodels for Kernel-CapCyl.cpp


Ignore:
Timestamp:
Jul 10, 2014 2:06:29 PM (10 years ago)
Author:
HMP1 <helen.park@…>
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:
2de9a5e
Parents:
8a20be5
Message:

Update for Aaron

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Kernel-CapCyl.cpp

    r8a20be5 r8faffcd  
    2222        float vaj = -1.0*hDist/rad_cap; 
    2323 
    24         for(j=0;j<76;j++) //the value 76 was pre-set in the kernel... 
     24        for(j=0;j<76;j++) //the 76 corresponds to the Gauss constants 
    2525        { 
    26             zij = ( Gauss76Z[j]*(1.0-vaj) + vaj + 1.0 )/2.0;    //the "t" dummy 
    27             yyy = Gauss76Wt[j]*ConvLens_kernel(dp,q,zij,alpha);    //uses the same Kernel as the Dumbbell, here L>0 
     26            zij = (Gauss76Z[j]*(1.0-vaj)+vaj+1.0)/2.0; 
     27            yyy = Gauss76Wt[j]*ConvLens_kernel(length,rad_cyl,rad_cap,q,zij,alpha); 
    2828            summj += yyy; 
    2929        } 
     
    3535        if(arg2 == 0) {be = 0.5;} 
    3636        else { 
    37             float ax=fabs(arg2); 
    38             if ((ax < 8.0) { 
    39                 y=arg2*arg2; 
    40                 ans1=arg2*(72362614232.0+y*(-7895059235.0+y*(242396853.1+y*(-2972611.439+y*(15704.48260+y*(-30.16036606)))))); 
    41                 ans2=144725228442.0+y*(2300535178.0+y*(18583304.74+y*(99447.43394+y*(376.9991397+y*1.0)))); 
    42                 ans=ans1/ans2; 
    43             }  
    44             else { 
    45                 y=64.0/(ax*ax); 
    46                 xx=ax-2.356194491; 
    47                 ans1=1.0+y*(0.183105e-2+y*(-0.3516396496e-4+y*(0.2457520174e-5+y*(-0.240337019e-6)))); 
    48                 ans2=0.04687499995+y*(-0.2002690873e-3+y*(0.8449199096e-5+y*(-0.88228987e-6+y*0.105787412e-6))); 
    49                 ans=sqrt(0.636619772/ax)*(cos(xx)*ans1-(8.0/ax)*sin(xx)*ans2); 
    50                 if (arg2 < 0.0) {ans *= -1;} 
    51                 } 
    52                 be = ans/arg2 
     37            be = NR_BessJ1(arg2)/arg2; 
    5338        } 
    5439 
    55         if(arg1 == 0.0) {   //limiting value of sinc(0) is 1; sinc is not defined in math.h 
     40        if(arg1 == 0.0) { 
    5641            yyy += pi*rad_cyl*rad_cyl*length*2.0*be; 
    5742        }  
Note: See TracChangeset for help on using the changeset viewer.