source: sasmodels/Kernel-Lamellar.cpp @ 8a20be5

core_shell_microgelscostrafo411magnetic_modelrelease_v0.94release_v0.95ticket-1257-vesicle-productticket_1156ticket_1265_superballticket_822_more_unit_tests
Last change on this file since 8a20be5 was 8a20be5, checked in by HMP1 <helen.park@…>, 10 years ago

Added a fit2 (fits two different models at different angles)
(preliminary) Added CoreshellCyl? and CapCyl? Kernels
(preliminary) Updated kernels to include functions

  • Property mode set to 100644
File size: 524 bytes
Line 
1#ifndef real
2# define real float
3#endif
4
5__kernel void LamellarKernel(__global const real *qx, global const real *qy, __global real *ret, const real bi_thick,
6 const real scale, const real sub, const real background, const int length)
7{
8    int i = get_global_id(0);
9    if(i < length)
10    {
11        real q = sqrt(qx[i]*qx[i]+qy[i]*qy[i]);
12        real pi = 4.0*atan(1.0);
13        real Pq = 2.0*sub*(sub/q)/q*(1.0-cos(q*bi_thick));
14        ret[i] = 2.0*pi*scale*Pq/(q*q)/bi_thick*1.0e8;
15        ret[i] += background;
16    }
17}
Note: See TracBrowser for help on using the repository browser.