Changeset 8faffcd in sasmodels for Kernel-CapCyl.cpp
- Timestamp:
- Jul 10, 2014 2:06:29 PM (10 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Kernel-CapCyl.cpp
r8a20be5 r8faffcd 22 22 float vaj = -1.0*hDist/rad_cap; 23 23 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 25 25 { 26 zij = ( Gauss76Z[j]*(1.0-vaj) + vaj + 1.0 )/2.0; //the "t" dummy27 yyy = Gauss76Wt[j]*ConvLens_kernel( dp,q,zij,alpha); //uses the same Kernel as the Dumbbell, here L>026 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); 28 28 summj += yyy; 29 29 } … … 35 35 if(arg2 == 0) {be = 0.5;} 36 36 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; 53 38 } 54 39 55 if(arg1 == 0.0) { //limiting value of sinc(0) is 1; sinc is not defined in math.h40 if(arg1 == 0.0) { 56 41 yyy += pi*rad_cyl*rad_cyl*length*2.0*be; 57 42 }
Note: See TracChangeset
for help on using the changeset viewer.