core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since 1596de3 was
2c74c11,
checked in by Paul Kienzle <pkienzle@…>, 8 years ago
|
implicit Iqxy; fix divide by 0 for q=0
|
-
Property mode set to
100644
|
File size:
557 bytes
|
Rev | Line | |
---|
[55b283e8] | 1 | double form_volume(void); |
---|
| 2 | |
---|
| 3 | double Iq(double q, double radius2, double arms); |
---|
| 4 | |
---|
| 5 | static double _mass_fractal_kernel(double q, double radius2, double arms) |
---|
| 6 | { |
---|
| 7 | |
---|
| 8 | double u_2 = radius2 * pow(q,2); |
---|
| 9 | double v = u_2 * arms / (3.0 * arms - 2.0); |
---|
| 10 | |
---|
| 11 | double term1 = v - 1.0 + exp(-v); |
---|
| 12 | double term2 = ((arms - 1.0)/2.0)* pow((1.0 - exp(-v)),2.0); |
---|
| 13 | |
---|
| 14 | return (2.0 * (term1 + term2)) / (arms * pow(v,2.0)); |
---|
| 15 | |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | double form_volume(void) |
---|
| 19 | { |
---|
| 20 | return 1.0; |
---|
| 21 | } |
---|
| 22 | |
---|
| 23 | double Iq(double q, double radius2, double arms) |
---|
| 24 | { |
---|
| 25 | return _mass_fractal_kernel(q, radius2, arms); |
---|
| 26 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.