8#ifndef OPENFPM_NUMERICS_SRC_INTERPOLATION_INTERPOLATION_UNIT_TESTS_HPP_
9#define OPENFPM_NUMERICS_SRC_INTERPOLATION_INTERPOLATION_UNIT_TESTS_HPP_
11#define BOOST_TEST_DYN_LINK
12#include <boost/test/unit_test.hpp>
14#include "interpolation/mp4_kernel.hpp"
15#include "interpolation/lambda_kernel.hpp"
16#include "interpolation/z_spline.hpp"
17#include "interpolation.hpp"
18#include <boost/math/special_functions/pow.hpp>
19#include <Vector/vector_dist.hpp>
20#include <Operators/Vector/vector_dist_operators.hpp>
21#include <FiniteDifference/FD_op.hpp>
22#include <Grid/grid_dist_id.hpp>
24BOOST_AUTO_TEST_SUITE( interpolation_test )
26template<
typename gr
id,
unsigned int mom_p>
void momenta_grid(
grid & gd,
typename grid::stype (& mom_tot)[grid::dims])
28 auto it = gd.getDomainGhostIterator();
30 for (
size_t i = 0 ; i < grid::dims ; i++)
36 auto key_g = gd.getGKey(key);
38 for (
size_t i = 0 ; i < grid::dims ; i++)
40 typename grid::stype coord = gd.spacing(i)*key_g.get(i);
42 mom_tot[i] += boost::math::pow<mom_p>(coord)*gd.template getProp<0>(key);
49template<
typename gr
id,
unsigned int mom_p>
void momenta_grid_domain(
grid & gd,
typename grid::stype (& mom_tot)[grid::dims])
51 auto it = gd.getDomainIterator();
53 for (
size_t i = 0 ; i < grid::dims ; i++)
59 auto key_g = gd.getGKey(key);
61 for (
size_t i = 0 ; i < grid::dims ; i++)
63 typename grid::stype coord = gd.spacing(i)*key_g.get(i);
65 mom_tot[i] += boost::math::pow<mom_p>(coord)*gd.template getProp<0>(key);
72template<
typename vector,
unsigned int mom_p>
void momenta_vector(vector & vd,
typename vector::stype (& mom_tot)[vector::dims])
74 auto it = vd.getDomainIterator();
76 for (
size_t i = 0 ; i < vector::dims ; i++)
83 for (
size_t i = 0 ; i < vector::dims ; i++)
85 typename vector::stype coord = vd.getPos(key)[i];
87 mom_tot[i] += boost::math::pow<mom_p>(coord)*vd.template getProp<0>(key);
94template<
unsigned int dim,
typename T,
typename Kernel,
typename gr
id,
typename vector>
95void interp_test(
grid & gd, vector & vd,
bool single_particle,
unsigned int numberOfMomenta)
99 auto it2 = gd.getDomainGhostIterator();
103 auto key = it2.get();
105 gd.template get<0>(key) = 0.0;
112 if (single_particle ==
false)
113 {inte.template p2m<0,0>(vd,gd);}
116 auto it = vd.getDomainIterator();
122 inte.template p2m<0,0>(vd,gd,p);
130 vd.write(
"Particles");
133 if(numberOfMomenta>=0){
134 momenta_grid<grid,0>(gd,mg);
135 momenta_vector<vector,0>(vd,mv);
136 for (
size_t i = 0 ; i < dim ; i++)
137 {BOOST_REQUIRE_CLOSE(mg[i],mv[i],0.001);}
140 if(numberOfMomenta>=1){
141 momenta_grid<grid,1>(gd,mg);
142 momenta_vector<vector,1>(vd,mv);
143 for (
size_t i = 0 ; i < dim ; i++)
144 {BOOST_REQUIRE_CLOSE(mg[i],mv[i],0.001);}
147 if(numberOfMomenta>=2){
148 momenta_grid<grid,2>(gd,mg);
149 momenta_vector<vector,2>(vd,mv);
150 for (
size_t i = 0 ; i < dim ; i++)
151 {BOOST_REQUIRE_CLOSE(mg[i],mv[i],0.001);}
154 if(numberOfMomenta>=3){
155 momenta_grid<grid,3>(gd,mg);
156 momenta_vector<vector,3>(vd,mv);
157 for (
size_t i = 0 ; i < dim ; i++)
158 {BOOST_REQUIRE_CLOSE(mg[i],mv[i],0.001);}
161 if(numberOfMomenta>=4){
162 momenta_grid<grid,4>(gd,mg);
163 momenta_vector<vector,4>(vd,mv);
164 for (
size_t i = 0 ; i < dim ; i++)
165 {BOOST_REQUIRE_CLOSE(mg[i],mv[i],0.001);}
171BOOST_AUTO_TEST_CASE( interpolation_full_single_test_2D )
174 size_t sz[2] = {64,64};
179 size_t bc_v[2] = {PERIODIC,PERIODIC};
186 auto it = vd.getDomainIterator();
192 vd.getPos(p)[0] = (double)rand()/RAND_MAX;
193 vd.getPos(p)[1] = (double)rand()/RAND_MAX;
195 vd.getProp<0>(p) = 5.0;
202 interp_test<2,float,mp4_kernel<float>>(gd,vd,
true,2);
204 BOOST_AUTO_TEST_CASE( interpolation_full_single_test_2D_double )
207 size_t sz[2] = {64,64};
212 size_t bc_v[2] = {PERIODIC,PERIODIC};
219 auto it = vd.getDomainIterator();
225 vd.getPos(p)[0] = (double)rand()/RAND_MAX;
226 vd.getPos(p)[1] = (double)rand()/RAND_MAX;
228 vd.getProp<0>(p) = 5.0;
235 interp_test<2,double,lambda4_4kernel<double>>(gd,vd,
true,2);
239BOOST_AUTO_TEST_CASE( interpolation_full_test_2D )
242 size_t sz[2] = {64,64};
247 size_t bc_v[2] = {PERIODIC,PERIODIC};
255 auto it = vd.getDomainIterator();
261 vd.getPos(p)[0] = (double)rand()/RAND_MAX;
262 vd.getPos(p)[1] = (double)rand()/RAND_MAX;
264 vd.getProp<0>(p) = 5.0;
272 interp_test<2,float,mp4_kernel<float>>(gd,vd,
false,2);
277 auto & v_cl = create_vcluster();
287 auto it4 = vd.getGridIterator(sz);
291 auto key = it4.get();
295 vd.getLastPos()[0] = key.get(0) * it4.getSpacing(0) + domain.getLow(0) + 0.1*it4.getSpacing(0);
296 vd.getLastPos()[1] = key.get(1) * it4.getSpacing(1) + domain.getLow(1) + 0.1*it4.getSpacing(1);
298 vd.getLastProp<0>() = 0.0;
305 auto it5 = gd.getDomainGhostIterator();
309 auto key = it5.get();
311 gd.get<0>(key) = 0.0;
320 auto it6 = gd.getSubDomainIterator(start,stop);
323 auto key = it6.
get();
325 gd.get<0>(key) = 5.0;
333 inte.m2p<0,0>(gd,vd);
335 momenta_grid_domain<decltype(gd),0>(gd,mg);
336 momenta_vector<decltype(vd),0>(vd,mv);
344 BOOST_REQUIRE_CLOSE(mg[0],mv[0],0.001);
345 BOOST_REQUIRE_CLOSE(mg[1],mv[1],0.001);
347 momenta_grid_domain<decltype(gd),1>(gd,mg);
348 momenta_vector<decltype(vd),1>(vd,mv);
356 BOOST_REQUIRE_CLOSE(mg[0],mv[0],0.001);
357 BOOST_REQUIRE_CLOSE(mg[1],mv[1],0.001);
359 momenta_grid_domain<decltype(gd),2>(gd,mg);
360 momenta_vector<decltype(vd),2>(vd,mv);
368 BOOST_REQUIRE_CLOSE(mg[0],mv[0],0.001);
369 BOOST_REQUIRE_CLOSE(mg[1],mv[1],0.001);
374BOOST_AUTO_TEST_CASE( interpolation_full_single_test_3D )
377 size_t sz[3] = {64,64,64};
382 size_t bc_v[3] = {PERIODIC,PERIODIC,PERIODIC};
389 auto it = vd.getDomainIterator();
396 vd.getPos(p)[0] = (double)rand()/RAND_MAX;
398 vd.getPos(p)[1] = (double)rand()/RAND_MAX;
400 vd.getPos(p)[2] = (double)rand()/RAND_MAX;
402 vd.getProp<0>(p) = 5.0;
410 interp_test<3,double,mp4_kernel<float>>(gd,vd,
true,2);
413BOOST_AUTO_TEST_CASE( interpolation_getSubCheck )
416 size_t sz[3] = {64,64,64};
421 size_t bc_v[3] = {NON_PERIODIC,NON_PERIODIC,NON_PERIODIC};
426 vector vd(0,domain,bc_v,gv);
433 auto & dec = vd.getDecomposition();
435 int nl = dec.getNLocalSub();
437 for (
int i = 0 ; i < nl ; i++)
439 int nll = dec.getLocalNIGhost(i);
440 for (
int j = 0 ; j < nll ; j++)
442 auto ibx = dec.getLocalIGhostBox(i,j);
443 int x = dec.getLocalIGhostSub(i,j);
444 auto bx = dec.getSubDomain(x);
447 for (
int s = 0; s < 3 ; s++)
450 for (
int s1 = 0; s1 < 3 ; s1++)
452 p.
get(s1) = (ibx.getHigh(s1) - ibx.getLow(s1)) / 2.0 + ibx.getLow(s1);
455 if (ibx.getLow(s) == bx.getHigh(s))
457 p.
get(s) = ibx.getLow(s);
458 int sub = inte.getSub(p);
459 BOOST_REQUIRE_EQUAL(sub,i);
461 else if (ibx.getHigh(s) == bx.getLow(s))
463 p.
get(s) = ibx.getHigh(s);
464 int sub = inte.getSub(p);
465 BOOST_REQUIRE_EQUAL(sub,x);
472BOOST_AUTO_TEST_CASE( interpolation_full_test_3D )
475 size_t sz[3] = {64,64,64};
480 size_t bc_v[3] = {PERIODIC,PERIODIC,PERIODIC};
488 auto it = vd.getDomainIterator();
494 vd.getPos(p)[0] = (double)rand()/RAND_MAX;
495 vd.getPos(p)[1] = (double)rand()/RAND_MAX;
496 vd.getPos(p)[2] = (double)rand()/RAND_MAX;
498 vd.getProp<0>(p) = 5.0;
508 interp_test<3,double,mp4_kernel<float>>(gd,vd,
false,2);
510 auto & v_cl = create_vcluster();
521 auto it4 = vd.getGridIterator(sz);
525 auto key = it4.get();
529 vd.getLastPos()[0] = key.get(0) * it4.getSpacing(0) + domain.getLow(0) + 0.1*it4.getSpacing(0);
530 vd.getLastPos()[1] = key.get(1) * it4.getSpacing(1) + domain.getLow(1) + 0.1*it4.getSpacing(1);
531 vd.getLastPos()[2] = key.get(2) * it4.getSpacing(2) + domain.getLow(2) + 0.1*it4.getSpacing(2);
533 vd.getLastProp<0>() = 0.0;
540 auto it5 = gd.getDomainGhostIterator();
544 auto key = it5.get();
546 gd.get<0>(key) = 0.0;
555 auto it6 = gd.getSubDomainIterator(start,stop);
558 auto key = it6.
get();
560 gd.get<0>(key) = 5.0;
568 inte.m2p<0,0>(gd,vd);
570 momenta_grid_domain<decltype(gd),0>(gd,mg);
571 momenta_vector<decltype(vd),0>(vd,mv);
581 BOOST_REQUIRE_CLOSE(mg[0],mv[0],0.001);
582 BOOST_REQUIRE_CLOSE(mg[1],mv[1],0.001);
583 BOOST_REQUIRE_CLOSE(mg[2],mv[2],0.001);
585 momenta_grid_domain<decltype(gd),1>(gd,mg);
586 momenta_vector<decltype(vd),1>(vd,mv);
596 BOOST_REQUIRE_CLOSE(mg[0],mv[0],0.001);
597 BOOST_REQUIRE_CLOSE(mg[1],mv[1],0.001);
598 BOOST_REQUIRE_CLOSE(mg[2],mv[2],0.001);
600 momenta_grid_domain<decltype(gd),2>(gd,mg);
601 momenta_vector<decltype(vd),2>(vd,mv);
611 BOOST_REQUIRE_CLOSE(mg[0],mv[0],0.001);
612 BOOST_REQUIRE_CLOSE(mg[1],mv[1],0.001);
613 BOOST_REQUIRE_CLOSE(mg[2],mv[2],0.001);
618BOOST_AUTO_TEST_CASE( int_kernel_test )
626 tot += mp4.value(-1.3f,0);
627 tot += mp4.value(-0.3f,1);
628 tot += mp4.value(0.7f,2);
629 tot += mp4.value(1.7f,3);
631 BOOST_REQUIRE_CLOSE(tot,1.0f,0.001);
637 tot += -1.3f*mp4.value(-1.3f,0);
638 tot += -0.3f*mp4.value(-0.3f,1);
639 tot += 0.7f*mp4.value(0.7f,2);
640 tot += 1.7f*mp4.value(1.7f,3);
642 BOOST_REQUIRE_SMALL(tot,0.001f);
648 tot += (1.3f)*(1.3f)*mp4.value(-1.3f,0);
649 tot += (0.3f)*(0.3f)*mp4.value(-0.3f,1);
650 tot += (0.7f)*(0.7f)*mp4.value(0.7f,2);
651 tot += (1.7f)*(1.7f)*mp4.value(1.7f,3);
653 BOOST_REQUIRE_SMALL(tot,0.001f);
662 tot += zk1.value(-0.3f,0);
663 tot += zk1.value(0.7f,1);
665 BOOST_REQUIRE_CLOSE(tot,1.0f,0.001);
677 tot += zk3.value(-2.3f,0);
678 tot += zk3.value(-1.3f,1);
679 tot += zk3.value(-0.3f,2);
680 tot += zk3.value(0.7f,3);
681 tot += zk3.value(1.7f,4);
682 tot += zk3.value(2.7f,5);
684 BOOST_REQUIRE_CLOSE(tot,1.0f,0.001);
690 tot += -2.3*zk3.value(-2.3f,0);
691 tot += -1.3*zk3.value(-1.3f,1);
692 tot += -0.3*zk3.value(-0.3f,2);
693 tot += 0.7*zk3.value(0.7f,3);
694 tot += 1.7*zk3.value(1.7f,4);
695 tot += 2.7*zk3.value(2.7f,5);
697 BOOST_REQUIRE_SMALL(tot,0.001f);
703 tot += 2.3*2.3*zk3.value(-2.3f,0);
704 tot += 1.3*1.3*zk3.value(-1.3f,1);
705 tot += 0.3*0.3*zk3.value(-0.3f,2);
706 tot += 0.7*0.7*zk3.value(0.7f,3);
707 tot += 1.7*1.7*zk3.value(1.7f,4);
708 tot += 2.7*2.7*zk3.value(2.7f,5);
710 BOOST_REQUIRE_SMALL(tot,0.001f);
716 tot += -2.3*-2.3*-2.3*zk3.value(-2.3f,0);
717 tot += -1.3*-1.3*-1.3*zk3.value(-1.3f,1);
718 tot += -0.3*-0.3*-0.3*zk3.value(-0.3f,2);
719 tot += 0.7*0.7*0.7*zk3.value(0.7f,3);
720 tot += 1.7*1.7*1.7*zk3.value(1.7f,4);
721 tot += 2.7*2.7*2.7*zk3.value(2.7f,5);
723 BOOST_REQUIRE_SMALL(tot,0.001f);
734 tot += zk4.value(-3.3f,0);
735 tot += zk4.value(-2.3f,1);
736 tot += zk4.value(-1.3f,2);
737 tot += zk4.value(-0.3f,3);
738 tot += zk4.value(0.7f,4);
739 tot += zk4.value(1.7f,5);
740 tot += zk4.value(2.7f,6);
741 tot += zk4.value(3.7f,7);
743 BOOST_REQUIRE_CLOSE(tot,1.0f,0.001);
749 tot += -3.3*zk4.value(-3.3f,0);
750 tot += -2.3*zk4.value(-2.3f,1);
751 tot += -1.3*zk4.value(-1.3f,2);
752 tot += -0.3*zk4.value(-0.3f,3);
753 tot += 0.7*zk4.value(0.7f,4);
754 tot += 1.7*zk4.value(1.7f,5);
755 tot += 2.7*zk4.value(2.7f,6);
756 tot += 3.7*zk4.value(3.7f,7);
758 BOOST_REQUIRE_SMALL(tot,0.001f);
764 tot += 3.3*3.3*zk4.value(-3.3f,0);
765 tot += 2.3*2.3*zk4.value(-2.3f,1);
766 tot += 1.3*1.3*zk4.value(-1.3f,2);
767 tot += 0.3*0.3*zk4.value(-0.3f,3);
768 tot += 0.7*0.7*zk4.value(0.7f,4);
769 tot += 1.7*1.7*zk4.value(1.7f,5);
770 tot += 2.7*2.7*zk4.value(2.7f,6);
771 tot += 3.7*3.7*zk4.value(3.7f,7);
773 BOOST_REQUIRE_SMALL(tot,0.001f);
779 tot += -3.3*-3.3*-3.3*zk4.value(-3.3f,0);
780 tot += -2.3*-2.3*-2.3*zk4.value(-2.3f,1);
781 tot += -1.3*-1.3*-1.3*zk4.value(-1.3f,2);
782 tot += -0.3*-0.3*-0.3*zk4.value(-0.3f,3);
783 tot += 0.7*0.7*0.7*zk4.value(0.7f,4);
784 tot += 1.7*1.7*1.7*zk4.value(1.7f,5);
785 tot += 2.7*2.7*2.7*zk4.value(2.7f,6);
786 tot += 3.7*3.7*3.7*zk4.value(3.7f,7);
788 BOOST_REQUIRE_SMALL(tot,0.001f);
794 tot += -3.3*-3.3*-3.3*-3.3*zk4.value(-3.3f,0);
795 tot += -2.3*-2.3*-2.3*-2.3*zk4.value(-2.3f,1);
796 tot += -1.3*-1.3*-1.3*-1.3*zk4.value(-1.3f,2);
797 tot += -0.3*-0.3*-0.3*-0.3*zk4.value(-0.3f,3);
798 tot += 0.7*0.7*0.7*0.7*zk4.value(0.7f,4);
799 tot += 1.7*1.7*1.7*1.7*zk4.value(1.7f,5);
800 tot += 2.7*2.7*2.7*2.7*zk4.value(2.7f,6);
801 tot += 3.7*3.7*3.7*3.7*zk4.value(3.7f,7);
803 BOOST_REQUIRE_SMALL(tot,0.001f);
806BOOST_AUTO_TEST_CASE( int_kernel_test_double)
814 tot += mp4.value(-1.3,0);
815 tot += mp4.value(-0.3,1);
816 tot += mp4.value(0.7,2);
817 tot += mp4.value(1.7,3);
819 BOOST_REQUIRE_CLOSE(tot,1.0,0.001);
825 tot += -1.3*mp4.value(-1.3,0);
826 tot += -0.3*mp4.value(-0.3,1);
827 tot += 0.7*mp4.value(0.7,2);
828 tot += 1.7*mp4.value(1.7,3);
830 BOOST_REQUIRE_SMALL(tot,0.001);
836 tot += (1.3)*(1.3)*mp4.value(-1.3,0);
837 tot += (0.3)*(0.3)*mp4.value(-0.3,1);
838 tot += (0.7)*(0.7)*mp4.value(0.7,2);
839 tot += (1.7)*(1.7)*mp4.value(1.7,3);
841 BOOST_REQUIRE_SMALL(tot,0.001);
850 tot += zk1.value(-0.3,0);
851 tot += zk1.value(0.7,1);
853 BOOST_REQUIRE_CLOSE(tot,1.0,0.001);
865 tot += zk3.value(-2.3,0);
866 tot += zk3.value(-1.3,1);
867 tot += zk3.value(-0.3,2);
868 tot += zk3.value(0.7,3);
869 tot += zk3.value(1.7,4);
870 tot += zk3.value(2.7,5);
872 BOOST_REQUIRE_CLOSE(tot,1.0,0.001);
878 tot += -2.3*zk3.value(-2.3,0);
879 tot += -1.3*zk3.value(-1.3,1);
880 tot += -0.3*zk3.value(-0.3,2);
881 tot += 0.7*zk3.value(0.7,3);
882 tot += 1.7*zk3.value(1.7,4);
883 tot += 2.7*zk3.value(2.7,5);
885 BOOST_REQUIRE_SMALL(tot,0.001);
891 tot += 2.3*2.3*zk3.value(-2.3,0);
892 tot += 1.3*1.3*zk3.value(-1.3,1);
893 tot += 0.3*0.3*zk3.value(-0.3,2);
894 tot += 0.7*0.7*zk3.value(0.7,3);
895 tot += 1.7*1.7*zk3.value(1.7,4);
896 tot += 2.7*2.7*zk3.value(2.7,5);
898 BOOST_REQUIRE_SMALL(tot,0.001);
904 tot += -2.3*-2.3*-2.3*zk3.value(-2.3,0);
905 tot += -1.3*-1.3*-1.3*zk3.value(-1.3,1);
906 tot += -0.3*-0.3*-0.3*zk3.value(-0.3,2);
907 tot += 0.7*0.7*0.7*zk3.value(0.7,3);
908 tot += 1.7*1.7*1.7*zk3.value(1.7,4);
909 tot += 2.7*2.7*2.7*zk3.value(2.7,5);
911 BOOST_REQUIRE_SMALL(tot,0.001);
922 tot += zk4.value(-3.3,0);
923 tot += zk4.value(-2.3,1);
924 tot += zk4.value(-1.3,2);
925 tot += zk4.value(-0.3,3);
926 tot += zk4.value(0.7,4);
927 tot += zk4.value(1.7,5);
928 tot += zk4.value(2.7,6);
929 tot += zk4.value(3.7,7);
931 BOOST_REQUIRE_CLOSE(tot,1.0,0.001);
937 tot += -3.3*zk4.value(-3.3,0);
938 tot += -2.3*zk4.value(-2.3,1);
939 tot += -1.3*zk4.value(-1.3,2);
940 tot += -0.3*zk4.value(-0.3,3);
941 tot += 0.7*zk4.value(0.7,4);
942 tot += 1.7*zk4.value(1.7,5);
943 tot += 2.7*zk4.value(2.7,6);
944 tot += 3.7*zk4.value(3.7,7);
946 BOOST_REQUIRE_SMALL(tot,0.001);
952 tot += 3.3*3.3*zk4.value(-3.3,0);
953 tot += 2.3*2.3*zk4.value(-2.3,1);
954 tot += 1.3*1.3*zk4.value(-1.3,2);
955 tot += 0.3*0.3*zk4.value(-0.3,3);
956 tot += 0.7*0.7*zk4.value(0.7,4);
957 tot += 1.7*1.7*zk4.value(1.7,5);
958 tot += 2.7*2.7*zk4.value(2.7,6);
959 tot += 3.7*3.7*zk4.value(3.7,7);
961 BOOST_REQUIRE_SMALL(tot,0.001);
967 tot += -3.3*-3.3*-3.3*zk4.value(-3.3,0);
968 tot += -2.3*-2.3*-2.3*zk4.value(-2.3,1);
969 tot += -1.3*-1.3*-1.3*zk4.value(-1.3,2);
970 tot += -0.3*-0.3*-0.3*zk4.value(-0.3,3);
971 tot += 0.7*0.7*0.7*zk4.value(0.7,4);
972 tot += 1.7*1.7*1.7*zk4.value(1.7,5);
973 tot += 2.7*2.7*2.7*zk4.value(2.7,6);
974 tot += 3.7*3.7*3.7*zk4.value(3.7,7);
976 BOOST_REQUIRE_SMALL(tot,0.001);
982 tot += -3.3*-3.3*-3.3*-3.3*zk4.value(-3.3,0);
983 tot += -2.3*-2.3*-2.3*-2.3*zk4.value(-2.3,1);
984 tot += -1.3*-1.3*-1.3*-1.3*zk4.value(-1.3,2);
985 tot += -0.3*-0.3*-0.3*-0.3*zk4.value(-0.3,3);
986 tot += 0.7*0.7*0.7*0.7*zk4.value(0.7,4);
987 tot += 1.7*1.7*1.7*1.7*zk4.value(1.7,5);
988 tot += 2.7*2.7*2.7*2.7*zk4.value(2.7,6);
989 tot += 3.7*3.7*3.7*3.7*zk4.value(3.7,7);
991 BOOST_REQUIRE_SMALL(tot,0.001);
1247BOOST_AUTO_TEST_SUITE_END()
This class represent an N-dimensional box.
This class implement the point shape in an N-dimensional space.
__device__ __host__ const T & get(unsigned int i) const
Get coordinate.
This is a distributed grid.
grid_key_dx is the key to access any element in the grid
__device__ __host__ index_type get(index_type i) const
Get the i index.
Main class for interpolation Particle to mest p2m and Mesh to particle m2p.
KeyT const ValueT ValueT OffsetIteratorT OffsetIteratorT int
[in] The number of segments that comprise the sorting data