1#include "Vector/vector_dist.hpp"
2#include "Operators/Vector/vector_dist_operators.hpp"
76 float dist = norm(p-q);
79 return Pq * exp(- dist * dist / sigma);
85 inline Point<3,double> value(
size_t p,
size_t q,
Point<3,double> & Pp,
Point<3,double> & Pq,
const vector_dist<3,
double,
aggregate<
double,
double,
Point<3,double>,
Point<3,double>> > & v)
88 float dist = norm(p-q);
91 return Pq * exp(- dist * dist / sigma);
97int main(
int argc,
char* argv[])
115 openfpm_init(&argc,&argv);
121 size_t bc[3]={PERIODIC,PERIODIC,PERIODIC};
147 vector_dist<3,double, aggregate<double,double,Point<3,double>,
Point<3,double>> > vd(4096,domain,bc,g);
168 auto it = vd.getDomainIterator();
174 vd.getPos(p)[0] = (double)rand() / RAND_MAX;
175 vd.getPos(p)[1] = (double)rand() / RAND_MAX;
176 vd.getPos(p)[2] = (double)rand() / RAND_MAX;
178 vd2.getPos(p)[0] = (double)rand() / RAND_MAX;
179 vd2.getPos(p)[1] = (double)rand() / RAND_MAX;
180 vd2.getPos(p)[2] = (double)rand() / RAND_MAX;
224 auto vA = getV<A>(vd);
225 auto vB = getV<B>(vd);
226 auto vC = getV<C>(vd);
227 auto vD = getV<D>(vd);
230 auto vPOS = getV<PROP_POS>(vd);
233 auto v2A = getV<0>(vd);
234 auto v2POS = getV<PROP_POS>(vd);
295 vA = vA + sin(2.0 * vD) * exp(1.2 * vD);
305 vC = pmul(vD,vD) * dt;
308 vD = vD / sqrt( vD * vD );
351 auto p0_e = getVExpr(p0);
355 auto expr1 = 1.0/2.0/sqrt(M_PI)*exp(-(v2POS-p0_e)*(v2POS-p0_e)/2.0);
424 auto cl = vd.getCellList(0.1);
464 vC = applyKernel_in( vD / norm(vD) ,vd,cl,ker) + vD;
472 vC = applyKernel_in_gen( vD / norm(vD) ,vd,cl,ker) + vD;
This class represent an N-dimensional box.
Derivative second order on h (spacing)
This class implement the point shape in an N-dimensional space.
aggregate of properties, from a list of object if create a struct that follow the OPENFPM native stru...
__device__ __host__ float value(const Point< 3, float > &p, const Point< 3, float > &q, float pA, float pB)
Result of the exponential kernel.