OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
DCPSE_op.hpp
1/*
2 * DCPSE_op.hpp
3 *
4 * Created on: Jan 7, 2020
5 * Author: Abhinav Singh, Pietro Incardona
6 */
7
8#ifndef DCPSE_OP_HPP_
9#define DCPSE_OP_HPP_
10#ifdef HAVE_EIGEN
11
12#include "Decomposition/CartDecomposition.hpp"
13#include "DCPSE/Dcpse.hpp"
14#include "Operators/Vector/vector_dist_operators.hpp"
15#if defined(__NVCC__)
16#include "DCPSE/Dcpse.cuh"
17#endif
18
19
20const double dcpse_oversampling_factor = 1.9;
21const double rcut_verlet = 3.1;
22
29template<typename exp1, typename DCPSE_type>
30class vector_dist_expression_op<exp1, DCPSE_type, VECT_DCPSE> {
32 const exp1 o1;
33
34 DCPSE_type &dcp;
35
36public:
37
38 typedef std::false_type is_ker;
39
40 typedef std::false_type NN_type;
41
42 typedef std::false_type is_sort;
43
44 typedef typename exp1::vtype vtype;
45
47 inline vector_dist_expression_op(const exp1 &o1, DCPSE_type &dcp)
48 : o1(o1), dcp(dcp) {}
49
55 inline void init() const {
56 o1.init();
57 }
58
66 template<typename r_type=typename std::remove_reference<decltype(o1.value(vect_dist_key_dx()))>::type>
67 inline r_type value(const vect_dist_key_dx &key) const {
68 return dcp.computeDifferentialOperator(key, o1);
69 }
70
71 template<typename Sys_eqs, typename pmap_type, typename unordered_map_type, typename coeff_type>
72 inline void value_nz(pmap_type &p_map, const vect_dist_key_dx &key, unordered_map_type &cols, coeff_type &coeff,
73 unsigned int comp) const {
74 // for all NN of key
75 for (int j = 0; j < dcp.getNumNN(key); j++) {
76 auto coeff_dc = dcp.getCoeffNN(key, j);
77 auto k = dcp.getIndexNN(key, j);
78
79 auto k_coeff = coeff_dc * coeff * dcp.getEpsilonInvPrefactor(key);
80 o1.template value_nz<Sys_eqs>(p_map, k, cols, k_coeff, comp);
81
82 auto kk_coeff = dcp.getSign() * coeff_dc * coeff * dcp.getEpsilonInvPrefactor(key);
83 o1.template value_nz<Sys_eqs>(p_map, key, cols, kk_coeff, comp);
84 }
85 }
86
94 vtype &getVector() {
95 return o1.getVector();
96 }
97
105 const vtype &getVector() const {
106 return o1.getVector();
107 }
108};
109
110template<typename exp1, typename DCPSE_type>
113 const exp1 o1;
114
115 DCPSE_type (&dcp)[DCPSE_type::vtype::dims];
116
117 static const int dims = DCPSE_type::vtype::dims;
118 typedef typename DCPSE_type::vtype::stype stype;
119
120public:
121
122 typedef std::false_type is_ker;
123
124 typedef std::false_type NN_type;
125
126 typedef std::false_type is_sort;
127
128 typedef typename exp1::vtype vtype;
129
131 inline vector_dist_expression_op(const exp1 &o1, DCPSE_type (&dcp)[DCPSE_type::vtype::dims])
132 : o1(o1), dcp(dcp) {}
133
139 inline void init() const {
140 o1.init();
141 }
142
150 template<typename r_type=VectorS<dims, stype> >
151 inline r_type value(const vect_dist_key_dx &key) const {
153
154 for (int i = 0; i < dims; i++) {
155 v_grad.get(i) = dcp[i].computeDifferentialOperator(key, o1);
156 }
157
158 return v_grad;
159 }
160
161 template<typename Sys_eqs, typename pmap_type, typename unordered_map_type, typename coeff_type>
162 inline void value_nz(pmap_type &p_map, const vect_dist_key_dx &key, unordered_map_type &cols, coeff_type &coeff,
163 unsigned int comp) const {
164 for (int i = 0; i < DCPSE_type::vtype::dims; i++) {
165 // for all NN of key
166 for (int j = 0; j < dcp[i].getNumNN(key); j++) {
167 auto coeff_dc = dcp[i].getCoeffNN(key, j);
168 auto k = dcp[i].getIndexNN(key, j);
169
170 auto k_coeff = coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
171 o1.template value_nz<Sys_eqs>(p_map, k, cols, k_coeff, comp);
172
173 auto kk_coeff = dcp[i].getSign() * coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
174 o1.template value_nz<Sys_eqs>(p_map, key, cols, kk_coeff, comp);
175
176
177 //cols[p_map. template getProp<0>(k)*Sys_eqs::nvar + comp] += coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
178
179 //cols[p_map. template getProp<0>(key)*Sys_eqs::nvar + comp] += dcp[i].getSign() * coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
180 }
181 }
182 }
183
191 vtype &getVector() {
192 return o1.getVector();
193 }
194
202 const vtype &getVector() const {
203 return o1.getVector();
204 }
205
206};
207
208
209template<typename exp1, typename DCPSE_type>
212 const exp1 o1;
213
214 DCPSE_type (&dcp)[DCPSE_type::vtype::dims];
215
216 static const int dims = DCPSE_type::vtype::dims;
217 typedef typename DCPSE_type::vtype::stype stype;
218
219public:
220
221 typedef std::false_type is_ker;
222
223 typedef std::false_type NN_type;
224
225 typedef std::false_type is_sort;
226
227 typedef typename exp1::vtype vtype;
228
230 inline vector_dist_expression_op(const exp1 &o1, DCPSE_type (&dcp)[DCPSE_type::vtype::dims])
231 : o1(o1), dcp(dcp) {}
232
238 inline void init() const {
239 o1.init();
240 }
241
249 template<typename r_type=VectorS<dims, stype> >
250 inline r_type value(const vect_dist_key_dx &key) const {
252 v_grad.get(0) = dcp[0].computeDifferentialOperator(key, o1);
253 v_grad.get(1) = -dcp[1].computeDifferentialOperator(key, o1);
254
255 return v_grad;
256 }
257
258 template<typename Sys_eqs, typename pmap_type, typename unordered_map_type, typename coeff_type>
259 inline void value_nz(pmap_type &p_map, const vect_dist_key_dx &key, unordered_map_type &cols, coeff_type &coeff,
260 unsigned int comp) const {
261 for (int i = 0; i < DCPSE_type::vtype::dims; i++) {
262 // for all NN of key
263 for (int j = 0; j < dcp[i].getNumNN(key); j++) {
264 auto coeff_dc = dcp[i].getCoeffNN(key, j);
265 auto k = dcp[i].getIndexNN(key, j);
266
267 auto k_coeff = coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
268 o1.template value_nz<Sys_eqs>(p_map, k, cols, k_coeff, comp);
269
270 auto kk_coeff = dcp[i].getSign() * coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
271 o1.template value_nz<Sys_eqs>(p_map, key, cols, kk_coeff, comp);
272
273
274 //cols[p_map. template getProp<0>(k)*Sys_eqs::nvar + comp] += coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
275
276 //cols[p_map. template getProp<0>(key)*Sys_eqs::nvar + comp] += dcp[i].getSign() * coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
277 }
278 }
279 }
280
288 vtype &getVector() {
289 return o1.getVector();
290 }
291
299 const vtype &getVector() const {
300 return o1.getVector();
301 }
302
303};
304
305
306template<>
308 mutable int i;
309
313
314public:
315
316 typedef std::false_type is_ker;
317
318 typedef std::false_type NN_type;
319
320 typedef std::false_type is_sort;
321
323 : l1(l1), l2(l2) {}
324
325 template<typename Sys_eqs, typename pmap_type, typename unordered_map_type, typename coeff_type>
326 inline void value_nz(pmap_type &p_map, const vect_dist_key_dx &key, unordered_map_type &cols, coeff_type &coeff,
327 unsigned int comp) const {
328 if (l1.template get<0>(i) != key.getKey()) {
329 std::cout << "ERROR" << std::endl;
330 }
331
332 cols[p_map.template getProp<0>(key) * Sys_eqs::nvar + comp] += coeff;
333 std::cout << "L2: " << l2.template get<0>(i) << std::endl;
334 cols[p_map.template getProp<0>(l2.template get<0>(i)) * Sys_eqs::nvar + comp] -= coeff;
335
336 i++;
337 }
338};
339
340
341template<>
342class vector_dist_expression_op<void, void, VECT_COPY_1_TO_N> {
343 mutable int i = 0;
344
347 int l2_key;
348
349public:
350
351 typedef std::false_type is_ker;
352
353 typedef std::false_type NN_type;
354
355 typedef std::false_type is_sort;
356
358 : l1(l1), l2_key(l2_key) {}
359
360 template<typename Sys_eqs, typename pmap_type, typename unordered_map_type, typename coeff_type>
361 inline void value_nz(pmap_type &p_map, const vect_dist_key_dx &key, unordered_map_type &cols, coeff_type &coeff,
362 unsigned int comp) const {
363 if (l1.template get<0>(i) != key.getKey()) {
364 std::cout << "ERROR" << std::endl;
365 }
366
367 cols[p_map.template getProp<0>(key) * Sys_eqs::nvar + comp] += coeff;
368 cols[p_map.template getProp<0>(l2_key) * Sys_eqs::nvar + comp] -= coeff;
369 i++;
370 }
371};
372
373
374template<typename exp1, typename DCPSE_type>
375class vector_dist_expression_op<exp1, DCPSE_type, VECT_DCPSE_V_SUM> {
377 const exp1 o1;
378
379 DCPSE_type (&dcp)[DCPSE_type::vtype::dims];
380
381 static const int dims = DCPSE_type::vtype::dims;
382 typedef typename DCPSE_type::vtype::stype stype;
383
384public:
385
386 typedef std::false_type is_ker;
387
388 typedef std::false_type NN_type;
389
390 typedef std::false_type is_sort;
391
392 typedef typename exp1::vtype vtype;
393
394 inline vector_dist_expression_op(const exp1 &o1, DCPSE_type (&dcp)[DCPSE_type::vtype::dims])
395 : o1(o1), dcp(dcp) {}
396
397 inline void init() const {
398 o1.init();
399 }
400
401 template<typename r_type= typename std::remove_reference<decltype(o1.value(vect_dist_key_dx(0)))>::type>
402 inline r_type value(const vect_dist_key_dx &key) const {
403
404 typename std::remove_reference<decltype(o1.value(key))>::type v_lap;
405 v_lap = 0.0;
406
407
408 for (int i = 0; i < dims; i++) {
409 v_lap += dcp[i].computeDifferentialOperator(key, o1);
410 }
411
412 return v_lap;
413 }
414
415 template<typename Sys_eqs, typename pmap_type, typename unordered_map_type, typename coeff_type>
416 inline void value_nz(pmap_type &p_map, const vect_dist_key_dx &key, unordered_map_type &cols, coeff_type &coeff,
417 unsigned int comp) const {
418 for (int i = 0; i < DCPSE_type::vtype::dims; i++) {
419 // for all NN of key
420 for (int j = 0; j < dcp[i].getNumNN(key); j++) {
421 auto coeff_dc = dcp[i].getCoeffNN(key, j);
422 auto k = dcp[i].getIndexNN(key, j);
423
424 auto coeff_k = coeff_dc * coeff * dcp[i].getEpsilonInvPrefactor(key);
425 o1.template value_nz<Sys_eqs>(p_map, k, cols, coeff_k, comp);
426
427 auto coeff_kk = dcp[i].getSign() * coeff_dc * coeff * dcp[i].getEpsilonInvPrefactor(key);
428 o1.template value_nz<Sys_eqs>(p_map, key, cols, coeff_kk, comp);
429 }
430 }
431 }
432
440 vtype &getVector() {
441 return o1.getVector();
442 }
443
451 const vtype &getVector() const {
452 return o1.getVector();
453 }
454};
455
456
457template<typename exp1, typename DCPSE_type>
460 const exp1 o1;
461
462 DCPSE_type (&dcp)[DCPSE_type::vtype::dims];
463
464 static const int dims = DCPSE_type::vtype::dims;
465 typedef typename DCPSE_type::vtype::stype stype;
466
467public:
468
469 typedef std::false_type is_ker;
470
471 typedef std::false_type NN_type;
472
473 typedef std::false_type is_sort;
474
475 typedef typename exp1::vtype vtype;
476
477 inline vector_dist_expression_op(const exp1 &o1, DCPSE_type (&dcp)[DCPSE_type::vtype::dims])
478 : o1(o1), dcp(dcp) {}
479
480 inline void init() const {
481 o1.init();
482 }
483
484 template<typename r_type= typename std::remove_reference<decltype(o1.value(vect_dist_key_dx(0)))>::type::coord_type>
485 inline r_type value(const vect_dist_key_dx &key) const {
486 //typedef typename std::remove_reference<decltype(o1.value(key))>::type::blabla blabla;
487
488 typename std::remove_reference<decltype(o1.value(key))>::type::coord_type v_div;
489 v_div = 0.0;
490
491 for (int i = 0; i < dims; i++) {
492 v_div += dcp[i].computeDifferentialOperator(key, o1, i);
493 }
494
495 return v_div;
496 }
497
498 template<typename Sys_eqs, typename pmap_type, typename unordered_map_type, typename coeff_type>
499 inline void value_nz(pmap_type &p_map, const vect_dist_key_dx &key, unordered_map_type &cols, coeff_type &coeff,
500 unsigned int comp) const {
501 for (int i = 0; i < DCPSE_type::vtype::dims; i++) {
502 // for all NN of key
503 for (int j = 0; j < dcp[i].getNumNN(key); j++) {
504 auto coeff_dc = dcp[i].getCoeffNN(key, j);
505 auto k = dcp[i].getIndexNN(key, j);
506
507 auto k_coeff = coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
508 o1.template value_nz<Sys_eqs>(p_map, k, cols, k_coeff, comp);
509
510 auto kk_coeff = dcp[i].getSign() * coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
511 o1.template value_nz<Sys_eqs>(p_map, key, cols, kk_coeff, comp);
512
513
514 //cols[p_map. template getProp<0>(k)*Sys_eqs::nvar + comp] += coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
515
516 //cols[p_map. template getProp<0>(key)*Sys_eqs::nvar + comp] += dcp[i].getSign() * coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
517 }
518 }
519 }
520
528 vtype &getVector() {
529 return o1.getVector();
530 }
531
539 const vtype &getVector() const {
540 return o1.getVector();
541 }
542};
543
544template<typename exp1, typename exp2_pr>
546 typedef typename std::tuple_element<1, exp2_pr>::type DCPSE_type;
547 typedef typename std::tuple_element<0, exp2_pr>::type exp2;
548
550 const exp1 o1;
551 const exp2 o2;
552
553 DCPSE_type (&dcp)[DCPSE_type::vtype::dims];
554
555 static const int dims = DCPSE_type::vtype::dims;
556 typedef typename DCPSE_type::vtype::stype stype;
557
558public:
559
560 typedef std::false_type is_ker;
561
562 typedef std::false_type NN_type;
563
564 typedef std::false_type is_sort;
565
567 typedef typename first_or_second<has_vtype<exp1>::value, exp1, exp2>::vtype vtype;
568 //typedef typename exp2::vtype vtype;
569
570
571 inline vector_dist_expression_op(const exp1 &o1, const exp2 &o2, DCPSE_type (&dcp)[DCPSE_type::vtype::dims])
572 : o1(o1), o2(o2), dcp(dcp) {}
573
574 inline void init() const {
575 o1.init();
576 o2.init();
577 }
578
579 //template<typename r_type=VectorS<dims,stype> > inline r_type value(const vect_dist_key_dx & key) const
580 template<typename r_type= typename std::remove_reference<decltype(o2.value(vect_dist_key_dx(0)))>::type>
581 inline r_type value(const vect_dist_key_dx &key) const {
582 //typedef typename std::remove_reference<decltype(o1.value(key))>::type::blabla blabla;
583 typename std::remove_reference<decltype(o2.value(key))>::type adv;
584 adv = 0.0;
585 for (int i = 0; i < dims; i++) {
586 adv += o1.value(key)[i] * dcp[i].computeDifferentialOperator(key, o2);
587
588 }
589 return adv;
590 }
591
592
593 template<typename Sys_eqs, typename pmap_type, typename unordered_map_type, typename coeff_type>
594 inline void value_nz(pmap_type &p_map, const vect_dist_key_dx &key, unordered_map_type &cols, coeff_type &coeff,
595 unsigned int comp) const {
596 for (int i = 0; i < DCPSE_type::vtype::dims; i++) {
597 // for all NN of key
598 for (int j = 0; j < dcp[i].getNumNN(key); j++) {
599 auto coeff_dc = dcp[i].getCoeffNN(key, j);
600 auto k = dcp[i].getIndexNN(key, j);
601
602 auto k_coeff = o1.value(k) * coeff_dc * coeff * dcp[i].getEpsilonInvPrefactor(key);
603 o2.template value_nz<Sys_eqs>(p_map, k, cols, k_coeff, comp);
604
605 auto kk_coeff =
606 o1.value(key) * dcp[i].getSign() * coeff_dc * coeff * dcp[i].getEpsilonInvPrefactor(key);
607 o2.template value_nz<Sys_eqs>(p_map, key, cols, kk_coeff, comp);
608
609 //cols[p_map. template getProp<0>(k)*Sys_eqs::nvar + comp] += o1.value(key)[i] * coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
610 //cols[p_map. template getProp<0>(key)*Sys_eqs::nvar + comp] += o1.value(key)[i] * dcp[i].getSign() * coeff_dc * coeff / dcp[i].getEpsilonPrefactor(key);
611 }
612 }
613 }
614
622 vtype &getVector() {
623 return first_or_second<has_vtype<exp1>::value, exp1, exp2>::getVector(o1, o2);
624 }
625
633 const vtype &getVector() const {
634 return first_or_second<has_vtype<exp1>::value, exp1, exp2>::getVector(o1, o2);
635 }
636
637};
638
639 /*
640 template<typename operand_type>
641 class Derivative_x_node
642 {
643 operand_type arg;
644
645 public:
646 typedef int it_is_a_node;
647 Derivative_x_node(operand_type &arg)
648 :arg(arg)
649 {}
650 };
651 */
652
653
666template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
667class Derivative_x_T {
668
669 void *dcpse;
670
671public:
684 template<typename particles_type>
685 Derivative_x_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
686 double oversampling_factor = dcpse_oversampling_factor,
687 support_options opt = support_options::RADIUS) {
689 p.zero();
690 p.get(0) = 1;
691
692 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
693 }
694
695 template<typename particles_type>
696 void deallocate(particles_type &parts) {
697 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
698 }
699
700 template<typename operand_type>
702 operator()(operand_type arg) {
703 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
704
706 }
707
708 template<unsigned int prp, typename particles_type>
709 void DrawKernel(particles_type &particles, int k) {
710 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
711 dcpse_temp->template DrawKernel<prp>(particles, k);
712
713 }
714
715 template<unsigned int prp, typename particles_type>
716 void DrawKernelNN(particles_type &particles, int k) {
717 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
718 dcpse_temp->template DrawKernelNN<prp>(particles, k);
719
720 }
721
722 template<typename particles_type>
723 void checkMomenta(particles_type &particles) {
724 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
725 dcpse_temp->checkMomenta(particles);
726
727 }
728
734 template<typename particles_type>
735 void save(particles_type &particles, const std::string &file) {
736 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
737 dcpse_temp->save(file);
738 }
744 template<typename particles_type>
745 void load(particles_type &particles, const std::string &file) {
746 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
747 dcpse_temp->load(file);
748 }
754 template<typename particles_type>
755 void update(particles_type &particles) {
756 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
757 dcpse_temp->initializeUpdate(particles);
758
759 }
760
761};
762
775template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
776class Derivative_y_T {
777
778 void *dcpse;
779
780public:
781
794 template<typename particles_type>
795 Derivative_y_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
796 double oversampling_factor = dcpse_oversampling_factor,
797 support_options opt = support_options::RADIUS) {
799 p.zero();
800 p.get(1) = 1;
801
802 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
803 }
804
805 template<typename particles_type>
806 void deallocate(particles_type &parts) {
807 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
808 }
809
810 template<typename operand_type>
811
813 operator()(operand_type arg) {
814 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
815
817 }
818
819 template<unsigned int prp, typename particles_type>
820 void DrawKernel(particles_type &particles, int k) {
821 auto dcpse2 = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
822 dcpse2->template DrawKernel<prp>(particles, k);
823
824 }
825
826 template<typename particles_type>
827 void checkMomenta(particles_type &particles) {
828 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
829 dcpse_temp->checkMomenta(particles);
830
831 }
832
838 template<typename particles_type>
839 void save(particles_type &particles, const std::string &file) {
840 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
841 dcpse_temp->save(file);
842 }
848 template<typename particles_type>
849 void load(particles_type &particles, const std::string &file) {
850 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
851 dcpse_temp->load(file);
852 }
858 template<typename particles_type>
859 void update(particles_type &particles) {
860 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
861 dcpse_temp->initializeUpdate(particles);
862
863 }
864};
865
878template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
879class Derivative_z_T {
880
881 void *dcpse;
882
883public:
896 template<typename particles_type>
897 Derivative_z_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
898 double oversampling_factor = dcpse_oversampling_factor,
899 support_options opt = support_options::RADIUS) {
901 p.zero();
902 p.get(2) = 1;
903
904 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
905 }
906
907 template<typename particles_type>
908 void deallocate(particles_type &parts) {
909 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
910 }
911
912 template<typename operand_type>
914 operator()(operand_type arg) {
915 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
916
918 }
919
925 template<typename particles_type>
926 void save(particles_type &particles, const std::string &file) {
927 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
928 dcpse_temp->save(file);
929 }
935 template<typename particles_type>
936 void load(particles_type &particles, const std::string &file) {
937 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
938 dcpse_temp->load(file);
939 }
945 template<typename particles_type>
946 void update(particles_type &particles) {
947 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
948 dcpse_temp->initializeUpdate(particles);
949
950 }
951
952 template<typename particles_type>
953 void checkMomenta(particles_type &particles) {
954 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
955 dcpse_temp->checkMomenta(particles);
956
957 }
958
959};
960
975template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
976class Gradient_T {
977
978 void *dcpse;
979
980public:
995 template<typename particles_type>
996 Gradient_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
997 double oversampling_factor = dcpse_oversampling_factor,
998 support_options opt = support_options::RADIUS) {
999 typedef Dcpse_type<particles_type::dims, particles_type> DCPSE_type;
1000
1001 dcpse = new unsigned char[particles_type::dims * sizeof(DCPSE_type)];
1002
1003 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1004
1005 for (int i = 0; i < particles_type::dims; i++) {
1007 p.zero();
1008 p.get(i) = 1;
1009
1010 if (i)
1011 new(&dcpse_ptr[i]) Dcpse_type<particles_type::dims, particles_type>(parts, dcpse_ptr[0], p, ord, rCut, oversampling_factor, opt);
1012 else
1013 new(&dcpse_ptr[i]) Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1014 }
1015 }
1016
1017 template<typename particles_type>
1018 void deallocate(particles_type &parts) {
1019 for (int i = 0; i < particles_type::dims; i++) {
1020 delete &(((Dcpse_type<particles_type::dims, particles_type> *) dcpse)[i]);
1021 }
1022 }
1023
1024 template<typename operand_type>
1026 operator()(operand_type arg) {
1027 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1028
1030 *(dcpse_type(*)[operand_type::vtype::dims]) dcpse);
1031 }
1032
1033 template<unsigned int prp, typename particles_type>
1034 void DrawKernel(particles_type &particles, int k) {
1035 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1036
1037 for (int i = 0; i < particles_type::dims; i++) {
1038 dcpse_ptr[i].template DrawKernel<prp>(particles, i, k);
1039 }
1040
1041 }
1042
1048 template<typename particles_type>
1049 void update(particles_type &particles) {
1050 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1051 for (int i = 0; i < particles_type::dims; i++) {
1052 dcpse_ptr[i].initializeUpdate(particles);
1053 }
1054
1055 }
1056
1057
1058};
1073template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1074class Curl2D_T {
1075
1076 void *dcpse;
1077public:
1092 template<typename particles_type>
1093 Curl2D_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1094 double oversampling_factor = dcpse_oversampling_factor, support_options opt = support_options::RADIUS) {
1095 typedef Dcpse_type<particles_type::dims, particles_type> DCPSE_type;
1096
1097 dcpse = new unsigned char[particles_type::dims * sizeof(DCPSE_type)];
1098
1099 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1101
1102 p.zero();
1103 p.get(1) = 1;
1104 new(dcpse_ptr) Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1105
1106 p.zero();
1107 p.get(0) = 1;
1108 new(dcpse_ptr+1) Dcpse_type<particles_type::dims, particles_type>(parts, dcpse_ptr[0], p, ord, rCut, oversampling_factor, opt);
1109
1110 }
1111
1112 template<typename operand_type>
1114 operator()(operand_type arg) {
1115 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1116
1118 *(dcpse_type(*)[operand_type::vtype::dims]) dcpse);
1119 }
1120};
1135template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1136class Laplacian_T {
1137
1138 void *dcpse;
1139
1140public:
1155 template<typename particles_type>
1156 Laplacian_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1157 double oversampling_factor = dcpse_oversampling_factor,
1158 support_options opt = support_options::RADIUS) {
1159 typedef Dcpse_type<particles_type::dims, particles_type> DCPSE_type;
1160 dcpse = new unsigned char[particles_type::dims * sizeof(DCPSE_type)];
1161
1162 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1163
1164 for (int i = 0; i < particles_type::dims; i++) {
1166 p.zero();
1167 p.get(i) = 2;
1168
1169 if (i)
1170 new(&dcpse_ptr[i]) Dcpse_type<particles_type::dims, particles_type>(parts, dcpse_ptr[0], p, ord, rCut, oversampling_factor, opt);
1171 else
1172 new(&dcpse_ptr[i]) Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1173 }
1174 }
1175
1176 template<typename operand_type>
1178 operator()(operand_type arg) {
1179 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1180
1182 *(dcpse_type(*)[operand_type::vtype::dims]) dcpse);
1183 }
1184
1185
1186 template<typename particles_type>
1187 void checkMomenta(particles_type &particles) {
1188 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1189
1190 for (int i = 0; i < particles_type::dims; i++) {
1191 dcpse_ptr[i].checkMomenta(particles);
1192 }
1193
1194 }
1195
1196 template<unsigned int prp, typename particles_type>
1197 void DrawKernel(particles_type &particles, int k) {
1198 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1199
1200 for (int i = 0; i < particles_type::dims; i++) {
1201 dcpse_ptr[i].template DrawKernel<prp>(particles, k);
1202 }
1203
1204 }
1205 template<typename particles_type>
1206 void deallocate(particles_type &parts) {
1207 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1208 }
1214 template<typename particles_type>
1215 void update(particles_type &particles) {
1216 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1217 for (int i = 0; i < particles_type::dims; i++) {
1218 dcpse_ptr[i].initializeUpdate(particles);
1219 }
1220
1221 }
1222
1223
1224};
1225
1240template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1241class Divergence_T {
1242
1243 void *dcpse;
1244
1245public:
1260 template<typename particles_type>
1261 Divergence_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1262 double oversampling_factor = dcpse_oversampling_factor,
1263 support_options opt = support_options::RADIUS) {
1264 typedef Dcpse_type<particles_type::dims, particles_type> DCPSE_type;
1265
1266 dcpse = new unsigned char[particles_type::dims * sizeof(DCPSE_type)];
1267
1268 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1269
1270 for (int i = 0; i < particles_type::dims; i++) {
1272 p.zero();
1273 p.get(i) = 1;
1274
1275 if (i)
1276 new(&dcpse_ptr[i]) Dcpse_type<particles_type::dims, particles_type>(parts, dcpse_ptr[0], p, ord, rCut, oversampling_factor, opt);
1277 else
1278 new(&dcpse_ptr[i]) Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1279 }
1280 }
1281
1282 template<typename operand_type>
1284 operator()(operand_type arg) {
1285 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1286
1288 *(dcpse_type(*)[operand_type::vtype::dims]) dcpse);
1289 }
1290
1296 template<typename particles_type>
1297 void update(particles_type &particles) {
1298 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1299 for (int i = 0; i < particles_type::dims; i++) {
1300 dcpse_ptr[i].initializeUpdate(particles);
1301 }
1302
1303 }
1304
1305};
1306
1321template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1322class Advection_T {
1323
1324 void *dcpse;
1325
1326public:
1341 template<typename particles_type>
1342 Advection_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1343 double oversampling_factor = dcpse_oversampling_factor,
1344 support_options opt = support_options::RADIUS) {
1345 typedef Dcpse_type<particles_type::dims, particles_type> DCPSE_type;
1346
1347 dcpse = new unsigned char[particles_type::dims * sizeof(DCPSE_type)];
1348
1349 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1350
1351 for (int i = 0; i < particles_type::dims; i++) {
1353 p.zero();
1354 p.get(i) = 1;
1355
1356 if (i)
1357 new(&dcpse_ptr[i]) Dcpse_type<particles_type::dims, particles_type>(parts, dcpse_ptr[0], p, ord, rCut, oversampling_factor, opt);
1358 else
1359 new(&dcpse_ptr[i]) Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1360 }
1361
1362
1363 }
1364
1365 template<typename operand_type1, typename operand_type2>
1367 operator()(operand_type1 arg, operand_type2 arg2) {
1368 typedef Dcpse_type<operand_type2::vtype::dims, typename operand_type2::vtype> dcpse_type;
1369
1371 arg2,
1372 *(dcpse_type(*)[operand_type2::vtype::dims]) dcpse);
1373 }
1374
1375 template<typename particles_type>
1376 void checkMomenta(particles_type &particles) {
1377 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1378
1379 for (int i = 0; i < particles_type::dims; i++) {
1380 dcpse_ptr[i].checkMomenta(particles);
1381 }
1382
1383 }
1384
1385 template<unsigned int prp, typename particles_type>
1386 void DrawKernel(particles_type &particles, int k) {
1387 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1388
1389 for (int i = 0; i < particles_type::dims; i++) {
1390 dcpse_ptr[i].template DrawKernel<prp>(particles, i, k);
1391 }
1392
1393 }
1394
1400 template<typename particles_type>
1401 void update(particles_type &particles) {
1402 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1403 for (int i = 0; i < particles_type::dims; i++) {
1404 dcpse_ptr[i].initializeUpdate(particles);
1405 }
1406
1407 }
1408
1409
1410};
1411
1424template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1425class Derivative_xy_T {
1426
1427 void *dcpse;
1428
1429public:
1442 template<typename particles_type>
1443 Derivative_xy_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1444 double oversampling_factor = dcpse_oversampling_factor,
1445 support_options opt = support_options::RADIUS) {
1447 p.zero();
1448 p.get(0) = 1;
1449 p.get(1) = 1;
1450
1451 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1452 }
1453
1454 template<typename particles_type>
1455 void deallocate(particles_type &parts) {
1456 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1457 }
1458
1459 template<typename operand_type>
1461 operator()(operand_type arg) {
1462 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1463
1464 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
1465 }
1466
1467 template<unsigned int prp, typename particles_type>
1468 void DrawKernel(particles_type &particles, int k) {
1469 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1470
1471 dcpse_ptr[0].template DrawKernel<prp>(particles, k);
1472
1473 }
1474
1475 template<typename particles_type>
1476 void checkMomenta(particles_type &particles) {
1477 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1478 dcpse_temp->checkMomenta(particles);
1479
1480 }
1481
1487 template<typename particles_type>
1488 void save(particles_type &particles, const std::string &file) {
1489 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1490 dcpse_temp->save(file);
1491 }
1497 template<typename particles_type>
1498 void load(particles_type &particles, const std::string &file) {
1499 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1500 dcpse_temp->load(file);
1501 }
1507 template<typename particles_type>
1508 void update(particles_type &particles) {
1509 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1510 dcpse_temp->initializeUpdate(particles);
1511
1512 }
1513};
1526template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1527class Derivative_yz_T {
1528
1529 void *dcpse;
1530
1531public:
1544 template<typename particles_type>
1545 Derivative_yz_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1546 double oversampling_factor = dcpse_oversampling_factor,
1547 support_options opt = support_options::RADIUS) {
1549 p.zero();
1550 p.get(1) = 1;
1551 p.get(2) = 1;
1552
1553 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1554 }
1555
1556 template<typename particles_type>
1557 void deallocate(particles_type &parts) {
1558 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1559 }
1560
1561 template<typename operand_type>
1563 operator()(operand_type arg) {
1564 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1565
1566 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
1567 }
1568
1569 template<unsigned int prp, typename particles_type>
1570 void DrawKernel(particles_type &particles, int k) {
1571 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1572
1573 dcpse_ptr[0].template DrawKernel<prp>(particles, k);
1574
1575 }
1576
1577 template<typename particles_type>
1578 void checkMomenta(particles_type &particles) {
1579 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1580 dcpse_temp->checkMomenta(particles);
1581
1582 }
1583
1589 template<typename particles_type>
1590 void save(particles_type &particles, const std::string &file) {
1591 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1592 dcpse_temp->save(file);
1593 }
1599 template<typename particles_type>
1600 void load(particles_type &particles, const std::string &file) {
1601 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1602 dcpse_temp->load(file);
1603 }
1609 template<typename particles_type>
1610 void update(particles_type &particles) {
1611 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1612 dcpse_temp->initializeUpdate(particles);
1613
1614 }
1615};
1628template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1629class Derivative_xz_T {
1630
1631 void *dcpse;
1632
1633public:
1646 template<typename particles_type>
1647 Derivative_xz_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1648 double oversampling_factor = dcpse_oversampling_factor,
1649 support_options opt = support_options::RADIUS) {
1651 p.zero();
1652 p.get(0) = 1;
1653 p.get(2) = 1;
1654
1655 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1656 }
1657
1658 template<typename particles_type>
1659 void deallocate(particles_type &parts) {
1660 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1661 }
1662
1663 template<typename operand_type>
1665 operator()(operand_type arg) {
1666 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1667
1668 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
1669 }
1670
1671 template<unsigned int prp, typename particles_type>
1672 void DrawKernel(particles_type &particles, int k) {
1673 Dcpse_type<particles_type::dims, particles_type> *dcpse_ptr = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1674
1675 dcpse_ptr[0].template DrawKernel<prp>(particles, k);
1676
1677 }
1678
1679 template<typename particles_type>
1680 void checkMomenta(particles_type &particles) {
1681 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1682 dcpse_temp->checkMomenta(particles);
1683
1684 }
1685
1691 template<typename particles_type>
1692 void save(particles_type &particles, const std::string &file) {
1693 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1694 dcpse_temp->save(file);
1695 }
1701 template<typename particles_type>
1702 void load(particles_type &particles, const std::string &file) {
1703 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1704 dcpse_temp->load(file);
1705 }
1711 template<typename particles_type>
1712 void update(particles_type &particles) {
1713 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1714 dcpse_temp->initializeUpdate(particles);
1715
1716 }
1717};
1718
1731template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1732class Derivative_xx_T {
1733
1734 void *dcpse;
1735
1736public:
1749 template<typename particles_type>
1750 Derivative_xx_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1751 double oversampling_factor = dcpse_oversampling_factor,
1752 support_options opt = support_options::RADIUS) {
1754 p.zero();
1755 p.get(0) = 2;
1756 p.get(1) = 0;
1757
1758 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1759 }
1760
1761 template<typename particles_type>
1762 void deallocate(particles_type &parts) {
1763 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1764 }
1765
1766 template<typename operand_type>
1768 operator()(operand_type arg) {
1769 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1770
1771 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
1772 }
1773
1774 template<typename particles_type>
1775 void checkMomenta(particles_type &particles) {
1776 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1777 dcpse_temp->checkMomenta(particles);
1778
1779 }
1780
1781 template<unsigned int prp, typename particles_type>
1782 void DrawKernel(particles_type &particles, int k) {
1783 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1784 dcpse_temp->template DrawKernel<prp>(particles, k);
1785
1786 }
1787
1793 template<typename particles_type>
1794 void save(particles_type &particles, const std::string &file) {
1795 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1796 dcpse_temp->save(file);
1797 }
1803 template<typename particles_type>
1804 void load(particles_type &particles, const std::string &file) {
1805 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1806 dcpse_temp->load(file);
1807 }
1813 template<typename particles_type>
1814 void update(particles_type &particles) {
1815 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1816 dcpse_temp->initializeUpdate(particles);
1817
1818 }
1819};
1820
1833template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1834class Derivative_yy_T {
1835
1836 void *dcpse;
1837
1838public:
1851 template<typename particles_type>
1852 Derivative_yy_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1853 double oversampling_factor = dcpse_oversampling_factor,
1854 support_options opt = support_options::RADIUS) {
1856 p.zero();
1857 p.get(0) = 0;
1858 p.get(1) = 2;
1859
1860 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1861 }
1862
1863 template<typename particles_type>
1864 void deallocate(particles_type &parts) {
1865 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1866 }
1867
1868 template<typename operand_type>
1870 operator()(operand_type arg) {
1871 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1872
1873 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
1874 }
1875
1876 template<typename particles_type>
1877 void checkMomenta(particles_type &particles) {
1878 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1879 dcpse_temp->checkMomenta(particles);
1880
1881 }
1882
1883 template<unsigned int prp, typename particles_type>
1884 void DrawKernel(particles_type &particles, int k) {
1885 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1886 dcpse_temp->template DrawKernel<prp>(particles, k);
1887
1888 }
1889
1895 template<typename particles_type>
1896 void save(particles_type &particles, const std::string &file) {
1897 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1898 dcpse_temp->save(file);
1899 }
1905 template<typename particles_type>
1906 void load(particles_type &particles, const std::string &file) {
1907 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1908 dcpse_temp->load(file);
1909 }
1915 template<typename particles_type>
1916 void update(particles_type &particles) {
1917 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1918 dcpse_temp->initializeUpdate(particles);
1919
1920 }
1921};
1934template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
1935class Derivative_zz_T {
1936
1937 void *dcpse;
1938
1939public:
1952 template<typename particles_type>
1953 Derivative_zz_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
1954 double oversampling_factor = dcpse_oversampling_factor,
1955 support_options opt = support_options::RADIUS) {
1957 p.zero();
1958 p.get(2) = 2;
1959
1960 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
1961 }
1962
1963 template<typename particles_type>
1964 void deallocate(particles_type &parts) {
1965 delete (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1966 }
1967
1968 template<typename operand_type>
1970 operator()(operand_type arg) {
1971 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
1972
1973 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
1974 }
1975
1976 template<typename particles_type>
1977 void checkMomenta(particles_type &particles) {
1978 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1979 dcpse_temp->checkMomenta(particles);
1980
1981 }
1982
1983 template<unsigned int prp, typename particles_type>
1984 void DrawKernel(particles_type &particles, int k) {
1985 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1986 dcpse_temp->template DrawKernel<prp>(particles, k);
1987
1988 }
1989
1995 template<typename particles_type>
1996 void save(particles_type &particles, const std::string &file) {
1997 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
1998 dcpse_temp->save(file);
1999 }
2005 template<typename particles_type>
2006 void load(particles_type &particles, const std::string &file) {
2007 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2008 dcpse_temp->load(file);
2009 }
2015 template<typename particles_type>
2016 void update(particles_type &particles) {
2017 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2018 dcpse_temp->initializeUpdate(particles);
2019
2020 }
2021};
2022
2023template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
2024class Derivative_xxx_T {
2025
2026 void *dcpse;
2027
2028public:
2029
2030 template<typename particles_type>
2031 Derivative_xxx_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
2032 double oversampling_factor = dcpse_oversampling_factor,
2033 support_options opt = support_options::RADIUS) {
2035 p.zero();
2036 p.get(0) = 3;
2037 p.get(1) = 0;
2038
2039 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
2040 }
2041
2042 template<typename operand_type>
2043
2045 operator()(operand_type arg) {
2046 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
2047
2048 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
2049 }
2050
2051 template<typename particles_type>
2052 void checkMomenta(particles_type &particles) {
2053 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2054 dcpse_temp->checkMomenta(particles);
2055
2056 }
2057
2058 template<unsigned int prp, typename particles_type>
2059 void DrawKernel(particles_type &particles, int k) {
2060 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2061 dcpse_temp->template DrawKernel<prp>(particles, k);
2062
2063 }
2064
2070 template<typename particles_type>
2071 void save(particles_type &particles, const std::string &file) {
2072 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2073 dcpse_temp->save(file);
2074 }
2080 template<typename particles_type>
2081 void load(particles_type &particles, const std::string &file) {
2082 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2083 dcpse_temp->load(file);
2084 }
2090 template<typename particles_type>
2091 void update(particles_type &particles) {
2092 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2093 dcpse_temp->initializeUpdate(particles);
2094
2095 }
2096};
2097
2098template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
2099class Derivative_xxy_T {
2100
2101 void *dcpse;
2102
2103public:
2104
2105 template<typename particles_type>
2106 Derivative_xxy_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
2107 double oversampling_factor = dcpse_oversampling_factor,
2108 support_options opt = support_options::RADIUS) {
2110 p.zero();
2111 p.get(0) = 2;
2112 p.get(1) = 1;
2113
2114 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
2115 }
2116
2117 template<typename operand_type>
2118
2120 operator()(operand_type arg) {
2121 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
2122
2123 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
2124 }
2125
2126 template<typename particles_type>
2127 void checkMomenta(particles_type &particles) {
2128 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2129 dcpse_temp->checkMomenta(particles);
2130
2131 }
2132
2133 template<unsigned int prp, typename particles_type>
2134 void DrawKernel(particles_type &particles, int k) {
2135 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2136 dcpse_temp->template DrawKernel<prp>(particles, k);
2137
2138 }
2139
2145 template<typename particles_type>
2146 void save(particles_type &particles, const std::string &file) {
2147 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2148 dcpse_temp->save(file);
2149 }
2155 template<typename particles_type>
2156 void load(particles_type &particles, const std::string &file) {
2157 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2158 dcpse_temp->load(file);
2159 }
2165 template<typename particles_type>
2166 void update(particles_type &particles) {
2167 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2168 dcpse_temp->initializeUpdate(particles);
2169
2170 }
2171};
2172
2173template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
2174class Derivative_yyx_T {
2175
2176 void *dcpse;
2177
2178public:
2179
2180 template<typename particles_type>
2181 Derivative_yyx_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
2182 double oversampling_factor = dcpse_oversampling_factor,
2183 support_options opt = support_options::RADIUS) {
2185 p.zero();
2186 p.get(0) = 1;
2187 p.get(1) = 2;
2188
2189 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
2190 }
2191
2192 template<typename operand_type>
2193
2195 operator()(operand_type arg) {
2196 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
2197
2198 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
2199 }
2200
2201 template<typename particles_type>
2202 void checkMomenta(particles_type &particles) {
2203 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2204 dcpse_temp->checkMomenta(particles);
2205
2206 }
2207
2208 template<unsigned int prp, typename particles_type>
2209 void DrawKernel(particles_type &particles, int k) {
2210 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2211 dcpse_temp->template DrawKernel<prp>(particles, k);
2212
2213 }
2214
2220 template<typename particles_type>
2221 void save(particles_type &particles, const std::string &file) {
2222 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2223 dcpse_temp->save(file);
2224 }
2230 template<typename particles_type>
2231 void load(particles_type &particles, const std::string &file) {
2232 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2233 dcpse_temp->load(file);
2234 }
2240 template<typename particles_type>
2241 void update(particles_type &particles) {
2242 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2243 dcpse_temp->initializeUpdate(particles);
2244
2245 }
2246};
2247
2248template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
2249class Derivative_yyy_T {
2250
2251 void *dcpse;
2252
2253public:
2254
2255 template<typename particles_type>
2256 Derivative_yyy_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
2257 double oversampling_factor = dcpse_oversampling_factor,
2258 support_options opt = support_options::RADIUS) {
2260 p.zero();
2261 p.get(0) = 0;
2262 p.get(1) = 3;
2263
2264 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
2265 }
2266
2267 template<typename operand_type>
2268
2270 operator()(operand_type arg) {
2271 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
2272
2273 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
2274 }
2275
2276 template<typename particles_type>
2277 void checkMomenta(particles_type &particles) {
2278 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2279 dcpse_temp->checkMomenta(particles);
2280
2281 }
2282
2283 template<unsigned int prp, typename particles_type>
2284 void DrawKernel(particles_type &particles, int k) {
2285 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2286 dcpse_temp->template DrawKernel<prp>(particles, k);
2287
2288 }
2289
2295 template<typename particles_type>
2296 void save(particles_type &particles, const std::string &file) {
2297 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2298 dcpse_temp->save(file);
2299 }
2305 template<typename particles_type>
2306 void load(particles_type &particles, const std::string &file) {
2307 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2308 dcpse_temp->load(file);
2309 }
2315 template<typename particles_type>
2316 void update(particles_type &particles) {
2317 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2318 dcpse_temp->initializeUpdate(particles);
2319
2320 }
2321};
2322
2323
2324template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
2325class Derivative_xxxx_T {
2326
2327 void *dcpse;
2328
2329public:
2330
2331 template<typename particles_type>
2332 Derivative_xxxx_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
2333 double oversampling_factor = dcpse_oversampling_factor,
2334 support_options opt = support_options::RADIUS) {
2336 p.zero();
2337 p.get(0) = 4;
2338 p.get(1) = 0;
2339
2340 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
2341 }
2342
2343 template<typename operand_type>
2344
2346 operator()(operand_type arg) {
2347 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
2348
2349 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
2350 }
2351
2352 template<typename particles_type>
2353 void checkMomenta(particles_type &particles) {
2354 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2355 dcpse_temp->checkMomenta(particles);
2356
2357 }
2358
2359 template<unsigned int prp, typename particles_type>
2360 void DrawKernel(particles_type &particles, int k) {
2361 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2362 dcpse_temp->template DrawKernel<prp>(particles, k);
2363
2364 }
2365
2371 template<typename particles_type>
2372 void save(particles_type &particles, const std::string &file) {
2373 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2374 dcpse_temp->save(file);
2375 }
2381 template<typename particles_type>
2382 void load(particles_type &particles, const std::string &file) {
2383 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2384 dcpse_temp->load(file);
2385 }
2391 template<typename particles_type>
2392 void update(particles_type &particles) {
2393 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2394 dcpse_temp->initializeUpdate(particles);
2395
2396 }
2397};
2398
2399
2400template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
2401class Derivative_yyyy_T {
2402
2403 void *dcpse;
2404
2405public:
2406
2407 template<typename particles_type>
2408 Derivative_yyyy_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
2409 double oversampling_factor = dcpse_oversampling_factor,
2410 support_options opt = support_options::RADIUS) {
2412 p.zero();
2413 p.get(0) = 0;
2414 p.get(1) = 4;
2415
2416 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
2417 }
2418
2419 template<typename operand_type>
2420
2422 operator()(operand_type arg) {
2423 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
2424
2425 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
2426 }
2427
2428 template<typename particles_type>
2429 void checkMomenta(particles_type &particles) {
2430 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2431 dcpse_temp->checkMomenta(particles);
2432
2433 }
2434
2435 template<unsigned int prp, typename particles_type>
2436 void DrawKernel(particles_type &particles, int k) {
2437 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2438 dcpse_temp->template DrawKernel<prp>(particles, k);
2439
2440 }
2441
2447 template<typename particles_type>
2448 void save(particles_type &particles, const std::string &file) {
2449 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2450 dcpse_temp->save(file);
2451 }
2457 template<typename particles_type>
2458 void load(particles_type &particles, const std::string &file) {
2459 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2460 dcpse_temp->load(file);
2461 }
2467 template<typename particles_type>
2468 void update(particles_type &particles) {
2469 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2470 dcpse_temp->initializeUpdate(particles);
2471
2472 }
2473};
2474
2475template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
2476class Derivative_xxyy_T {
2477
2478 void *dcpse;
2479
2480public:
2481
2482 template<typename particles_type>
2483 Derivative_xxyy_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
2484 double oversampling_factor = dcpse_oversampling_factor,
2485 support_options opt = support_options::RADIUS) {
2487 p.zero();
2488 p.get(0) = 2;
2489 p.get(1) = 2;
2490
2491 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
2492 }
2493
2494 template<typename operand_type>
2495
2497 operator()(operand_type arg) {
2498 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
2499
2500 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
2501 }
2502
2503 template<typename particles_type>
2504 void checkMomenta(particles_type &particles) {
2505 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2506 dcpse_temp->checkMomenta(particles);
2507
2508 }
2509
2510 template<unsigned int prp, typename particles_type>
2511 void DrawKernel(particles_type &particles, int k) {
2512 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2513 dcpse_temp->template DrawKernel<prp>(particles, k);
2514
2515 }
2516
2522 template<typename particles_type>
2523 void save(particles_type &particles, const std::string &file) {
2524 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2525 dcpse_temp->save(file);
2526 }
2532 template<typename particles_type>
2533 void load(particles_type &particles, const std::string &file) {
2534 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2535 dcpse_temp->load(file);
2536 }
2542 template<typename particles_type>
2543 void update(particles_type &particles) {
2544 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2545 dcpse_temp->initializeUpdate(particles);
2546
2547 }
2548};
2549
2550
2551template<template<unsigned int, typename, typename...> class Dcpse_type = Dcpse>
2552class Derivative_G_T {
2553
2554 void *dcpse;
2555
2556public:
2557
2558 template<typename particles_type>
2559 Derivative_G_T(particles_type &parts, unsigned int ord, typename particles_type::stype rCut,
2560 const Point<particles_type::dims, unsigned int> &p,double oversampling_factor = dcpse_oversampling_factor,
2561 support_options opt = support_options::RADIUS) {
2562 dcpse = new Dcpse_type<particles_type::dims, particles_type>(parts, p, ord, rCut, oversampling_factor, opt);
2563 }
2564
2565 template<typename operand_type>
2567 operator()(operand_type arg) {
2568 typedef Dcpse_type<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
2569
2570 return vector_dist_expression_op<operand_type, dcpse_type, VECT_DCPSE>(arg, *(dcpse_type *) dcpse);
2571 }
2572
2573 template<typename particles_type>
2574 void checkMomenta(particles_type &particles) {
2575 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2576 dcpse_temp->checkMomenta(particles);
2577
2578 }
2579
2580 template<unsigned int prp, typename particles_type>
2581 void DrawKernel(particles_type &particles, int k) {
2582 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2583 dcpse_temp->template DrawKernel<prp>(particles, k);
2584
2585 }
2586
2592 template<typename particles_type>
2593 void save(particles_type &particles, const std::string &file) {
2594 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2595 dcpse_temp->save(file);
2596 }
2602 template<typename particles_type>
2603 void load(particles_type &particles, const std::string &file) {
2604 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2605 dcpse_temp->load(file);
2606 }
2612 template<typename particles_type>
2613 void update(particles_type &particles) {
2614 auto dcpse_temp = (Dcpse_type<particles_type::dims, particles_type> *) dcpse;
2615 dcpse_temp->initializeUpdate(particles);
2616
2617 }
2618};
2619
2620//typedef PPInterpolation_T<Dcpse> PPInterpolation;
2621typedef Derivative_x_T<Dcpse> Derivative_x;
2622typedef Derivative_y_T<Dcpse> Derivative_y;
2623typedef Derivative_z_T<Dcpse> Derivative_z;
2624typedef Gradient_T<Dcpse> Gradient;
2625typedef Curl2D_T<Dcpse> Curl2D;
2626typedef Laplacian_T<Dcpse> Laplacian;
2627typedef Divergence_T<Dcpse> Divergence;
2628typedef Advection_T<Dcpse> Advection;
2629typedef Derivative_xy_T<Dcpse> Derivative_xy;
2630typedef Derivative_yz_T<Dcpse> Derivative_yz;
2631typedef Derivative_xz_T<Dcpse> Derivative_xz;
2632typedef Derivative_xx_T<Dcpse> Derivative_xx;
2633typedef Derivative_yy_T<Dcpse> Derivative_yy;
2634typedef Derivative_zz_T<Dcpse> Derivative_zz;
2635typedef Derivative_xxx_T<Dcpse> Derivative_xxx;
2636typedef Derivative_xxy_T<Dcpse> Derivative_xxy;
2637typedef Derivative_yyx_T<Dcpse> Derivative_yyx;
2638typedef Derivative_yyy_T<Dcpse> Derivative_yyy;
2639typedef Derivative_xxxx_T<Dcpse> Derivative_xxxx;
2640typedef Derivative_yyyy_T<Dcpse> Derivative_yyyy;
2641typedef Derivative_xxyy_T<Dcpse> Derivative_xxyy;
2642typedef Derivative_G_T<Dcpse> Derivative_G;
2643
2644
2645#if defined(__NVCC__)
2646typedef Derivative_x_T<Dcpse_gpu> Derivative_x_gpu;
2647typedef Derivative_y_T<Dcpse_gpu> Derivative_y_gpu;
2648typedef Derivative_z_T<Dcpse_gpu> Derivative_z_gpu;
2649typedef Gradient_T<Dcpse_gpu> Gradient_gpu;
2650typedef Curl2D_T<Dcpse_gpu> Curl2D_gpu;
2651typedef Laplacian_T<Dcpse_gpu> Laplacian_gpu;
2652typedef Divergence_T<Dcpse_gpu> Divergence_gpu;
2653typedef Advection_T<Dcpse_gpu> Advection_gpu;
2654typedef Derivative_xy_T<Dcpse_gpu> Derivative_xy_gpu;
2655typedef Derivative_yz_T<Dcpse_gpu> Derivative_yz_gpu;
2656typedef Derivative_xz_T<Dcpse_gpu> Derivative_xz_gpu;
2657typedef Derivative_xx_T<Dcpse_gpu> Derivative_xx_gpu;
2658typedef Derivative_yy_T<Dcpse_gpu> Derivative_yy_gpu;
2659typedef Derivative_zz_T<Dcpse_gpu> Derivative_zz_gpu;
2660typedef Derivative_xxx_T<Dcpse_gpu> Derivative_xxx_gpu;
2661typedef Derivative_xxy_T<Dcpse_gpu> Derivative_xxy_gpu;
2662typedef Derivative_yyx_T<Dcpse_gpu> Derivative_yyx_gpu;
2663typedef Derivative_yyy_T<Dcpse_gpu> Derivative_yyy_gpu;
2664typedef Derivative_G_T<Dcpse_gpu> Derivative_G_gpu;
2665#endif
2666
2667#endif /*EIGEN */
2668#endif /* DCPSE_OP_HPP_ */
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
__device__ __host__ const T & get(unsigned int i) const
Get coordinate.
Definition Point.hpp:172
Implementation of 1-D std::vector like structure.
Grid key for a distributed grid.
__device__ __host__ size_t getKey() const
Get the key.
Unknown operation specialization.
Distributed vector.
static const unsigned int dims
template parameters typedefs
KeyT const ValueT ValueT OffsetIteratorT OffsetIteratorT int
[in] The number of segments that comprise the sorting data
OutputIteratorT OffsetT ReductionOpT OuputT init
< [in] The initial value of the reduction
aggregate of properties, from a list of object if create a struct that follow the OPENFPM native stru...