core_shell_microgelscostrafo411magnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since 4f79d94 was
3a48772,
checked in by Paul Kienzle <pkienzle@…>, 8 years ago
|
use predefined constants for fractions of pi
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Line | |
---|
1 | double form_volume(double radius); |
---|
2 | |
---|
3 | double Iq(double q, |
---|
4 | double fractal_dim_mass, |
---|
5 | double fractal_dim_surf, |
---|
6 | double rg_cluster, |
---|
7 | double rg_primary); |
---|
8 | |
---|
9 | static double _mass_surface_fractal_kernel(double q, |
---|
10 | double fractal_dim_mass, |
---|
11 | double fractal_dim_surf, |
---|
12 | double rg_cluster, |
---|
13 | double rg_primary) |
---|
14 | { |
---|
15 | //computation |
---|
16 | double tot_dim = 6.0 - fractal_dim_surf - fractal_dim_mass; |
---|
17 | fractal_dim_mass /= 2.0; |
---|
18 | tot_dim /= 2.0; |
---|
19 | |
---|
20 | double rc_norm = rg_cluster * rg_cluster / (3.0 * fractal_dim_mass); |
---|
21 | double rp_norm = rg_primary * rg_primary / (3.0 * tot_dim); |
---|
22 | |
---|
23 | //x for P |
---|
24 | double x_val1 = 1.0 + q * q * rc_norm; |
---|
25 | double x_val2 = 1.0 + q * q * rp_norm; |
---|
26 | |
---|
27 | double inv_form = pow(x_val1, fractal_dim_mass) * pow(x_val2, tot_dim); |
---|
28 | |
---|
29 | //another singular |
---|
30 | if (inv_form == 0.0) return 0.0; |
---|
31 | |
---|
32 | double form_factor = 1.0; |
---|
33 | form_factor /= inv_form; |
---|
34 | |
---|
35 | return (form_factor); |
---|
36 | } |
---|
37 | double form_volume(double radius){ |
---|
38 | |
---|
39 | return M_4PI_3*radius*radius*radius; |
---|
40 | } |
---|
41 | |
---|
42 | double Iq(double q, |
---|
43 | double fractal_dim_mass, |
---|
44 | double fractal_dim_surf, |
---|
45 | double rg_cluster, |
---|
46 | double rg_primary) |
---|
47 | { |
---|
48 | return _mass_surface_fractal_kernel(q, |
---|
49 | fractal_dim_mass, |
---|
50 | fractal_dim_surf, |
---|
51 | rg_cluster, |
---|
52 | rg_primary); |
---|
53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.