Ignore:
Timestamp:
Aug 16, 2009 10:30:27 AM (15 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
7d11b81
Parents:
b0d0723
Message:

Changed the def. of lengths of sides for 2D,thus consistent w/ 1D. And shortened the names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_extensions/parallelepiped.c

    rd5bd424 r2cb89e7  
    2222        // Fill paramater array 
    2323        dp[0] = pars->scale; 
    24         dp[1] = pars->short_edgeA; 
    25         dp[2] = pars->longer_edgeB; 
    26         dp[3] = pars->longuest_edgeC; 
     24        dp[1] = pars->short_a; 
     25        dp[2] = pars->long_b; 
     26        dp[3] = pars->longer_c; 
    2727        dp[4] = pars->contrast; 
    2828        dp[5] = pars->background; 
     
    3838 
    3939    //handle arg=0 separately, as sin(t)/t -> 1 as t->0 
    40     argA = a*ala; 
    41     argB = b*alb; 
    42     argC = c*alc; 
     40    argA = a*ala/2; 
     41    argB = b*alb/2; 
     42    argC = c*alc/2; 
    4343    if(argA==0.0) { 
    4444                tmp1 = 1.0; 
     
    105105        double pi = 4.0*atan(1.0); 
    106106 
    107         edgeA = pars->short_edgeA; 
    108         edgeB = pars->longer_edgeB; 
    109         edgeC = pars->longuest_edgeC; 
     107        edgeA = pars->short_a; 
     108        edgeB = pars->long_b; 
     109        edgeC = pars->longer_c; 
    110110 
    111111 
     
    152152        //normalize by cylinder volume 
    153153        //NOTE that for this (Fournet) definition of the integral, one must MULTIPLY by Vparallel 
    154     vol = 8*edgeA* edgeB * edgeC; 
     154    vol = edgeA* edgeB * edgeC; 
    155155        answer *= vol; 
    156156 
Note: See TracChangeset for help on using the changeset viewer.