Last change
on this file was
71b751d,
checked in by Paul Kienzle <pkienzle@…>, 6 years ago
|
update remaining form factors to use Fq interface
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | /******************************************************************* |
---|
2 | |
---|
3 | core_shell_kernel |
---|
4 | |
---|
5 | Form factor used in core_shell and fractal_core_shell |
---|
6 | |
---|
7 | ********************************************************************/ |
---|
8 | static |
---|
9 | double core_shell_fq(double q, |
---|
10 | double radius, |
---|
11 | double thickness, |
---|
12 | double core_sld, |
---|
13 | double shell_sld, |
---|
14 | double solvent_sld) |
---|
15 | { |
---|
16 | // Core first, then add in shell |
---|
17 | const double core_qr = q * radius; |
---|
18 | const double core_contrast = core_sld - shell_sld; |
---|
19 | const double core_bes = sas_3j1x_x(core_qr); |
---|
20 | const double core_volume = M_4PI_3 * cube(radius); |
---|
21 | double f = core_volume * core_bes * core_contrast; |
---|
22 | |
---|
23 | // Now the shell |
---|
24 | const double shell_qr = q * (radius + thickness); |
---|
25 | const double shell_contrast = shell_sld - solvent_sld; |
---|
26 | const double shell_bes = sas_3j1x_x(shell_qr); |
---|
27 | const double shell_volume = M_4PI_3 * cube(radius + thickness); |
---|
28 | f += shell_volume * shell_bes * shell_contrast; |
---|
29 | return f; |
---|
30 | } |
---|
31 | |
---|
32 | // Deprecated function: use core_shell_fq instead. |
---|
33 | static |
---|
34 | double core_shell_kernel(double q, |
---|
35 | double radius, |
---|
36 | double thickness, |
---|
37 | double core_sld, |
---|
38 | double shell_sld, |
---|
39 | double solvent_sld) |
---|
40 | { |
---|
41 | const double fq = core_shell_fq(q, radius, thickness, core_sld, shell_sld, solvent_sld); |
---|
42 | return 1.0e-4 * fq*fq; |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.