5#ifndef OPENFPM_PDATA_DCPSE_SURFACE_OP_HPP
6#define OPENFPM_PDATA_DCPSE_SURFACE_OP_HPP
9#include "DCPSE/DCPSE_op/DCPSE_op.hpp"
11template<
unsigned int NORMAL_ID>
12class SurfaceDerivative_x {
29 template<
typename particles_type>
30 SurfaceDerivative_x(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
31 support_options opt = support_options::RADIUS) {
36 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
39 template<
typename particles_type>
41 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
44 template<
typename operand_type>
46 operator()(operand_type arg) {
47 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
52 template<
typename particles_type>
54 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
59 template<
unsigned int prp,
typename particles_type>
61 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
62 dcpse_temp->template DrawKernel<prp>(
particles, k);
71 template<
typename particles_type>
73 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
74 dcpse_temp->save(file);
81 template<
typename particles_type>
83 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
84 dcpse_temp->load(file);
92 template<
typename particles_type>
94 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
95 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
97 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
101template<
unsigned int NORMAL_ID>
102class SurfaceDerivative_y {
119 template<
typename particles_type>
120 SurfaceDerivative_y(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
121 support_options opt = support_options::RADIUS) {
126 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
129 template<
typename particles_type>
131 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
134 template<
typename operand_type>
136 operator()(operand_type arg) {
137 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
142 template<
typename particles_type>
144 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
149 template<
unsigned int prp,
typename particles_type>
151 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
152 dcpse_temp->template DrawKernel<prp>(
particles, k);
162 template<
typename particles_type>
164 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
165 dcpse_temp->save(file);
172 template<
typename particles_type>
174 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
175 dcpse_temp->load(file);
182 template<
typename particles_type>
184 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
185 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
187 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
192template<
unsigned int NORMAL_ID>
193class SurfaceDerivative_z {
210 template<
typename particles_type>
211 SurfaceDerivative_z(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
212 support_options opt = support_options::RADIUS) {
217 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
220 template<
typename particles_type>
222 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
225 template<
typename operand_type>
227 operator()(operand_type arg) {
228 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
233 template<
typename particles_type>
235 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
240 template<
unsigned int prp,
typename particles_type>
242 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
243 dcpse_temp->template DrawKernel<prp>(
particles, k);
252 template<
typename particles_type>
254 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
255 dcpse_temp->save(file);
262 template<
typename particles_type>
264 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
265 dcpse_temp->load(file);
272 template<
typename particles_type>
274 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
275 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
277 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
282template<
unsigned int NORMAL_ID>
283class Laplace_Beltrami {
300 template<
typename particles_type>
301 Laplace_Beltrami(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
302 support_options opt = support_options::RADIUS) {
309 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
312 template<
typename particles_type>
314 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
317 template<
typename operand_type>
319 operator()(operand_type arg) {
320 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
325 template<
typename particles_type>
327 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
332 template<
unsigned int prp,
typename particles_type>
334 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
335 dcpse_temp->template DrawKernel<prp>(
particles, k);
344 template<
typename particles_type>
346 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
347 dcpse_temp->save(file);
354 template<
typename particles_type>
356 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
357 dcpse_temp->load(file);
364 template<
typename particles_type>
366 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
367 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
368 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
370 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
374template<
unsigned int NORMAL_ID>
375class SurfaceDerivative_xx {
392 template<
typename particles_type>
393 SurfaceDerivative_xx(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
394 support_options opt = support_options::RADIUS) {
399 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
402 template<
typename particles_type>
404 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
407 template<
typename operand_type>
409 operator()(operand_type arg) {
410 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
415 template<
typename particles_type>
417 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
422 template<
unsigned int prp,
typename particles_type>
424 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
425 dcpse_temp->template DrawKernel<prp>(
particles, k);
434 template<
typename particles_type>
436 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
437 dcpse_temp->save(file);
444 template<
typename particles_type>
446 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
447 dcpse_temp->load(file);
454 template<
typename particles_type>
456 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
457 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
458 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
460 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
465template<
unsigned int NORMAL_ID>
466class SurfaceDerivative_yy {
483 template<
typename particles_type>
484 SurfaceDerivative_yy(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
485 support_options opt = support_options::RADIUS) {
490 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
493 template<
typename particles_type>
495 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
498 template<
typename operand_type>
500 operator()(operand_type arg) {
501 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
506 template<
typename particles_type>
508 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
513 template<
unsigned int prp,
typename particles_type>
515 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
516 dcpse_temp->template DrawKernel<prp>(
particles, k);
525 template<
typename particles_type>
527 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
528 dcpse_temp->save(file);
535 template<
typename particles_type>
537 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
538 dcpse_temp->load(file);
545 template<
typename particles_type>
547 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
548 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
550 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
555template<
unsigned int NORMAL_ID>
556class SurfaceDerivative_zz {
573 template<
typename particles_type>
574 SurfaceDerivative_zz(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
575 support_options opt = support_options::RADIUS) {
580 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
583 template<
typename particles_type>
585 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
588 template<
typename operand_type>
590 operator()(operand_type arg) {
591 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
596 template<
typename particles_type>
598 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
603 template<
unsigned int prp,
typename particles_type>
605 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
606 dcpse_temp->template DrawKernel<prp>(
particles, k);
615 template<
typename particles_type>
617 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
618 dcpse_temp->save(file);
625 template<
typename particles_type>
627 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
628 dcpse_temp->load(file);
635 template<
typename particles_type>
637 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
638 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
641 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
646template<
unsigned int NORMAL_ID>
647class SurfaceDerivative_xy {
664 template<
typename particles_type>
665 SurfaceDerivative_xy(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
666 support_options opt = support_options::RADIUS) {
672 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
675 template<
typename particles_type>
677 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
680 template<
typename operand_type>
682 operator()(operand_type arg) {
683 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
688 template<
typename particles_type>
690 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
695 template<
unsigned int prp,
typename particles_type>
697 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
698 dcpse_temp->template DrawKernel<prp>(
particles, k);
707 template<
typename particles_type>
709 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
710 dcpse_temp->save(file);
717 template<
typename particles_type>
719 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
720 dcpse_temp->load(file);
727 template<
typename particles_type>
729 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
730 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
732 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
738template<
unsigned int NORMAL_ID>
739class SurfaceDerivative_yz {
756 template<
typename particles_type>
757 SurfaceDerivative_yz(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
758 support_options opt = support_options::RADIUS) {
764 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
767 template<
typename particles_type>
769 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
772 template<
typename operand_type>
774 operator()(operand_type arg) {
775 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
780 template<
typename particles_type>
782 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
787 template<
unsigned int prp,
typename particles_type>
789 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
790 dcpse_temp->template DrawKernel<prp>(
particles, k);
799 template<
typename particles_type>
801 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
802 dcpse_temp->save(file);
809 template<
typename particles_type>
811 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
812 dcpse_temp->load(file);
819 template<
typename particles_type>
821 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
822 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
824 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
830template<
unsigned int NORMAL_ID>
831class SurfaceDerivative_xz {
848 template<
typename particles_type>
849 SurfaceDerivative_xz(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
850 support_options opt = support_options::RADIUS) {
856 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
859 template<
typename particles_type>
861 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
864 template<
typename operand_type>
866 operator()(operand_type arg) {
867 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
872 template<
typename particles_type>
874 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
879 template<
unsigned int prp,
typename particles_type>
881 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
882 dcpse_temp->template DrawKernel<prp>(
particles, k);
891 template<
typename particles_type>
893 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
894 dcpse_temp->save(file);
901 template<
typename particles_type>
903 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
904 dcpse_temp->load(file);
911 template<
typename particles_type>
913 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
914 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
916 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
921template<
unsigned int NORMAL_ID>
922class SurfaceDerivative_G {
939 template<
typename particles_type>
940 SurfaceDerivative_G(
particles_type &parts,
unsigned int ord,
typename particles_type::stype rCut,
typename particles_type::stype nSpacing,
943 dcpse =
new Dcpse<particles_type::dims, particles_type>(parts, p, ord, rCut,nSpacing,value_t<NORMAL_ID>(), opt);
946 template<
typename particles_type>
948 delete (Dcpse<particles_type::dims, particles_type> *) dcpse;
951 template<
typename operand_type>
953 operator()(operand_type arg) {
954 typedef Dcpse<operand_type::vtype::dims, typename operand_type::vtype> dcpse_type;
959 template<
typename particles_type>
961 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
966 template<
unsigned int prp,
typename particles_type>
968 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
969 dcpse_temp->template DrawKernel<prp>(
particles, k);
978 template<
typename particles_type>
980 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
981 dcpse_temp->save(file);
988 template<
typename particles_type>
990 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
991 dcpse_temp->load(file);
998 template<
typename particles_type>
1000 auto dcpse_temp = (Dcpse<particles_type::dims, particles_type> *) dcpse;
1001 dcpse_temp->template createNormalParticles<NORMAL_ID>(
particles);
1002 dcpse_temp->initializeUpdate(
particles);
1003 dcpse_temp->accumulateAndDeleteNormalParticles(
particles);
This class implement the point shape in an N-dimensional space.
__device__ __host__ void zero()
Set to zero the point coordinate.
__device__ __host__ const T & get(unsigned int i) const
Get coordinate.
Unknown operation specialization.
bool write(std::string out, int opt=VTK_WRITER)
Output particle position and properties.