Changeset 513efc5 in sasmodels for sasmodels/models/triaxial_ellipsoid.c


Ignore:
Timestamp:
Jan 20, 2016 2:50:50 AM (8 years ago)
Author:
piotr
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:
7ed702f
Parents:
30b4ddf
Message:

Code review issues from PK addressed.

Added Taylor expansion utility function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/triaxial_ellipsoid.c

    rd53d3cd r513efc5  
    3636            const double y = 0.5*(Gauss76Z[j] + 1.0); 
    3737            const double t = q*sqrt(acosx2 + bsinx2*(1.0-y*y) + c2*y*y); 
    38             SINCOS(t, st, ct); 
    39             //const double fq = ( t==0.0 ? 1.0 : 3.0*(st-t*ct)/(t*t*t) ); 
    40             const double tsq = t*t; 
    41             const double fq = (t < 1.e-1) 
    42                 ? 1.0 + tsq*(-3./30. + tsq*(3./840. + tsq*(-3./45360.)))// + tsq*(3./3991680.)))) 
    43                 : 3.0*(st/t - ct)/tsq; 
     38            const double fq = J1c(t); 
    4439            inner += Gauss76Wt[j] * fq * fq ; 
    4540        } 
Note: See TracChangeset for help on using the changeset viewer.