core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change
on this file since 1f21edf was
099e053,
checked in by HMP1 <helen.park@…>, 10 years ago
|
further organizing
|
-
Property mode set to
100644
|
File size:
709 bytes
|
Line | |
---|
1 | __kernel void OneDCylKernel(__global const real *q, __global real *answer, const real sub, const real length, |
---|
2 | const real radius, const real scale, const real size, const real uplim, const real lolim) |
---|
3 | { |
---|
4 | int k = get_global_id(0); |
---|
5 | if(k < size) |
---|
6 | { |
---|
7 | real Pi = 4.0*atan(1.0); |
---|
8 | real up = uplim*Pi/180; |
---|
9 | real low = lolim*Pi/180; |
---|
10 | |
---|
11 | real summ = 0.0; real zi = 0; |
---|
12 | real halfheight = length/2.0; |
---|
13 | |
---|
14 | for(int i=0; i<76; i++) |
---|
15 | { |
---|
16 | zi = (Gauss76Z(i)*(up-low) + up + low )/2.0; |
---|
17 | summ += Gauss76Wt(i)*CylKernel(q[k], radius, halfheight, zi); |
---|
18 | } |
---|
19 | |
---|
20 | answer[k] = (up-low)/2.0*summ*sub*sub*1.0e8*scale*Pi*radius*radius*length; |
---|
21 | |
---|
22 | } |
---|
23 | } |
---|
24 | |
---|
25 | |
---|
Note: See
TracBrowser
for help on using the repository browser.