core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since 5378e40 was
5378e40,
checked in by Helen Park <HMP1@…>, 10 years ago
|
Initial commit
|
-
Property mode set to
100644
|
File size:
493 bytes
|
Line | |
---|
1 | __kernel void LamellarKernel(__global const float *qx, global const float *qy, __global float *ret, const float bi_thick, |
---|
2 | const float scale, const float sub, const float background, const int length) |
---|
3 | { |
---|
4 | int i = get_global_id(0); |
---|
5 | if(i < length) |
---|
6 | { |
---|
7 | float q = sqrt(qx[i]*qx[i]+qy[i]*qy[i]); |
---|
8 | float pi = 4.0*atan(1.0); |
---|
9 | float Pq = 2.0*sub*(sub/q)/q*(1.0-cos(q*bi_thick)); |
---|
10 | ret[i] = 2.0*pi*scale*Pq/(q*q)/bi_thick*1.0e8; |
---|
11 | ret[i] += background; |
---|
12 | } |
---|
13 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.