OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
DcpseInterpolation.hpp
1//
2// Created by Abhinav Singh on 03.11.21.
3//
4
5#ifndef OPENFPM_PDATA_DCPSEINTERPOLATION_HPP
6#define OPENFPM_PDATA_DCPSEINTERPOLATION_HPP
7#include "DCPSE/Dcpse.hpp"
8
21template<typename particlesFrom_type, typename particlesTo_type>
23{
24
25 void *dcpse;
26
27 particlesFrom_type & particlesFrom;
28 particlesTo_type & particlesTo;
29
30public:
43 PPInterpolation(particlesFrom_type &particlesFrom,particlesTo_type &particlesTo, unsigned int ord, typename particlesFrom_type::stype rCut,
44 double oversampling_factor = dcpse_oversampling_factor,
45 support_options opt = support_options::RADIUS)
46 :particlesFrom(particlesFrom),particlesTo(particlesTo)
47 {
49 p.zero();
50 dcpse = new Dcpse<particlesFrom_type::dims, particlesFrom_type,particlesTo_type>(particlesFrom,particlesTo, p, ord, rCut, oversampling_factor, opt);
51 }
52
53 void deallocate() {
54 delete (Dcpse<particlesFrom_type::dims, particlesFrom_type, particlesTo_type> *) dcpse;
55 }
56
57 /* template<typename operand_type>
58 vector_dist_expression_op<operand_type, Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype>, VECT_DCPSE>
59 operator()(operand_type arg) {
60 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
61 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
62 }*/
63
64 template<unsigned int prp1,unsigned int prp2>
65 void p2p() {
66 auto dcpse_temp = (Dcpse<particlesFrom_type::dims, particlesFrom_type, particlesTo_type>*) dcpse;
67 dcpse_temp->template p2p<prp1,prp2>();
68
69 }
70
71 // template<unsigned int prp, typename particles_type>
72 // void DrawKernel(particles_type &particles, int k) {
73 // auto dcpse_temp = (Dcpse_type<particlesFrom_type::dims, particlesFrom_type, particlesTo_type> *) dcpse;
74 // dcpse_temp->template DrawKernel<prp>(particles, k);
75
76 // }
77
78 // template<unsigned int prp, typename particles_type>
79 // void DrawKernelNN(particles_type &particles, int k) {
80 // auto dcpse_temp = (Dcpse_type<particlesFrom_type::dims, particlesFrom_type,particlesTo_type> *) dcpse;
81 // dcpse_temp->template DrawKernelNN<prp>(particles, k);
82
83 // }
84
85 // template<typename particles_type>
86 // void checkMomenta(particles_type &particles) {
87 // auto dcpse_temp = (Dcpse_type<particles_type::dims, particlesFrom_type, particlesTo_type> *) dcpse;
88 // dcpse_temp->checkMomenta(particles);
89
90 // }
91
97 void update() {
98 auto dcpse_temp = (Dcpse<particlesFrom_type::dims, particlesFrom_type, particlesTo_type> *) dcpse;
99 dcpse_temp->initializeUpdate(particlesFrom,particlesTo);
100
101 }
102
103};
104
105
106
107#endif //OPENFPM_PDATA_DCPSEINTERPOLATION_HPP
Class for Creating the DCPSE Operator For the function approximation objects and computes DCPSE Kerne...
void update()
Method for Updating the DCPSE Operator by recomputing DCPSE Kernels.
PPInterpolation(particlesFrom_type &particlesFrom, particlesTo_type &particlesTo, unsigned int ord, typename particlesFrom_type::stype rCut, double oversampling_factor=dcpse_oversampling_factor, support_options opt=support_options::RADIUS)
Constructor for Creating the DCPSE Operator Dx and objects and computes DCPSE Kernels.
This class implement the point shape in an N-dimensional space.
Definition Point.hpp:28
__device__ __host__ void zero()
Set to zero the point coordinate.
Definition Point.hpp:284