Changeset 40a87fa in sasmodels for sasmodels/models/elliptical_cylinder.c
- Timestamp:
- Aug 8, 2016 11:24:11 AM (8 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:
- 2472141
- Parents:
- 2d65d51
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/elliptical_cylinder.c
rabdd01c r40a87fa 19 19 20 20 arg = q*r_minor*sqrt((1.0+r_ratio*r_ratio)/2+(1.0-r_ratio*r_ratio)*cos(theta)/2); 21 if (arg == 0.0){ 22 retval = 1.0; 23 }else{ 24 //retval = 2.0*NR_BessJ1(arg)/arg; 25 retval = sas_J1c(arg); 26 } 21 //retval = 2.0*J1(arg)/arg; 22 retval = sas_J1c(arg); 27 23 return retval*retval ; 28 24 } … … 68 64 //now calculate the value of the inner integral 69 65 answer = (vbj-vaj)/2.0*summj; 70 //divide integral by Pi71 answer /= M_PI;72 66 73 67 //now calculate outer integral 74 68 arg = q*length*zi/2.0; 75 if (arg == 0.0){ 76 si = 1.0; 77 }else{ 78 si = sin(arg) * sin(arg) / arg / arg; 79 } 69 si = square(sinc(arg)); 80 70 yyy = Gauss76Wt[i] * answer * si; 81 71 summ += yyy; 82 72 } 83 73 84 answer = (vb-va)/2.0*summ; 74 //divide integral by Pi 75 answer = (vb-va)/2.0*summ/M_PI; 85 76 // Multiply by contrast^2 86 77 answer *= delrho*delrho;
Note: See TracChangeset
for help on using the changeset viewer.