core_shell_microgelscostrafo411magnetic_modelticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since a5b6997 was
ba32cdd,
checked in by Paul Kienzle <pkienzle@…>, 8 years ago
|
fix opencl compile; still doesn't run
|
-
Property mode set to
100644
|
File size:
424 bytes
|
Rev | Line | |
---|
[ba32cdd] | 1 | double sphere_volume(double radius); |
---|
| 2 | double sphere_form(double q, double radius, double sld, double solvent_sld); |
---|
| 3 | |
---|
| 4 | double sphere_volume(double radius) |
---|
[9aac25d] | 5 | { |
---|
[ad90df9] | 6 | return M_4PI_3*cube(radius); |
---|
[9aac25d] | 7 | } |
---|
| 8 | |
---|
[ba32cdd] | 9 | double sphere_form(double q, double radius, double sld, double solvent_sld) |
---|
[9aac25d] | 10 | { |
---|
[ad90df9] | 11 | const double fq = sphere_volume(radius) * sph_j1c(q*radius); |
---|
| 12 | const double contrast = (sld - solvent_sld); |
---|
| 13 | return 1.0e-4*square(contrast * fq); |
---|
| 14 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.