Changeset 40a87fa in sasmodels for sasmodels/models/elliptical_cylinder.c


Ignore:
Timestamp:
Aug 8, 2016 11:24:11 AM (8 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:
2472141
Parents:
2d65d51
Message:

lint and latex cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/elliptical_cylinder.c

    rabdd01c r40a87fa  
    1919 
    2020    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); 
    2723    return retval*retval ; 
    2824} 
     
    6864        //now calculate the value of the inner integral 
    6965        answer = (vbj-vaj)/2.0*summj; 
    70         //divide integral by Pi 
    71         answer /= M_PI; 
    7266 
    7367        //now calculate outer integral 
    7468        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)); 
    8070        yyy = Gauss76Wt[i] * answer * si; 
    8171        summ += yyy; 
    8272    } 
    8373 
    84     answer = (vb-va)/2.0*summ; 
     74    //divide integral by Pi 
     75    answer = (vb-va)/2.0*summ/M_PI; 
    8576    // Multiply by contrast^2 
    8677    answer *= delrho*delrho; 
Note: See TracChangeset for help on using the changeset viewer.