Changeset 3a48772 in sasmodels for sasmodels/models/star_polymer.c
- Timestamp:
- Oct 14, 2016 5:23:40 PM (8 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- a5b6997
- Parents:
- b716cc6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/star_polymer.c
r2c74c11 r3a48772 6 6 { 7 7 8 double u_2 = radius2 * pow(q,2);8 double u_2 = radius2 * q * q; 9 9 double v = u_2 * arms / (3.0 * arms - 2.0); 10 10 11 double term1 = v - 1.0 + exp(-v);12 double term2 = ((arms - 1.0)/2.0) * pow((1.0 - exp(-v)),2.0);11 double term1 = v + expm1(-v); 12 double term2 = ((arms - 1.0)/2.0) * square(expm1(-v)); 13 13 14 return (2.0 * (term1 + term2)) / (arms * pow(v,2.0));14 return (2.0 * (term1 + term2)) / (arms * v * v); 15 15 16 16 }
Note: See TracChangeset
for help on using the changeset viewer.