diff --git a/src/.deps/pdata-main.Po b/src/.deps/pdata-main.Po index 9e9db061c5ee3ac8fb935bdf13bcaca219fa7471..8e5c0d408d14cae764f2af8461a83b20ddd07d16 100644 --- a/src/.deps/pdata-main.Po +++ b/src/.deps/pdata-main.Po @@ -1309,6 +1309,11 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \ ../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IallreduceW.hpp \ ../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IrecvW.hpp \ ../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IsendW.hpp \ + ../../OpenFPM_data/src/util/check_no_pointers.hpp \ + ../../OpenFPM_data/src/util/common.hpp \ + ../../OpenFPM_data/src/util/util_debug.hpp \ + /usr/include/c++/4.9.2/cxxabi.h \ + /usr/include/c++/4.9.2/x86_64-redhat-linux/bits/cxxabi_tweaks.h \ ../../OpenFPM_vcluster/src/util/Vcluster_log.hpp \ ../../OpenFPM_data/src/timer.hpp \ ../../OpenFPM_data/src/Space/SpaceBox.hpp \ @@ -1322,10 +1327,7 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \ ../../OpenFPM_data/src/util/object_util.hpp \ ../../OpenFPM_data/src/util/object_creator.hpp \ ../../OpenFPM_data/src/util/util_debug.hpp \ - /usr/include/c++/4.9.2/cxxabi.h \ - /usr/include/c++/4.9.2/x86_64-redhat-linux/bits/cxxabi_tweaks.h \ ../../OpenFPM_data/src/util/check_no_pointers.hpp \ - ../../OpenFPM_data/src/util/common.hpp \ ../../OpenFPM_data/src/util/object_s_di.hpp \ ../../OpenFPM_data/src/util/object_si_d.hpp \ ../../OpenFPM_devices/src/memory/ExtPreAlloc.hpp \ @@ -1400,7 +1402,6 @@ pdata-main.o: main.cpp /usr/include/stdc-predef.h \ ../../OpenFPM_vcluster/src/Packer.hpp \ ../../OpenFPM_data/src/Grid/util.hpp \ ../../OpenFPM_data/src/Vector/util.hpp \ - ../../OpenFPM_data/src/util/util_debug.hpp \ ../../OpenFPM_vcluster/src/Pack_stat.hpp \ ../../OpenFPM_vcluster/src/Pack_selector.hpp \ ../../OpenFPM_vcluster/src/Unpacker.hpp \ @@ -4323,6 +4324,16 @@ Grid/grid_dist_id.hpp: ../../OpenFPM_vcluster/src/MPI_wrapper/MPI_IsendW.hpp: +../../OpenFPM_data/src/util/check_no_pointers.hpp: + +../../OpenFPM_data/src/util/common.hpp: + +../../OpenFPM_data/src/util/util_debug.hpp: + +/usr/include/c++/4.9.2/cxxabi.h: + +/usr/include/c++/4.9.2/x86_64-redhat-linux/bits/cxxabi_tweaks.h: + ../../OpenFPM_vcluster/src/util/Vcluster_log.hpp: ../../OpenFPM_data/src/timer.hpp: @@ -4351,14 +4362,8 @@ Grid/grid_dist_key.hpp: ../../OpenFPM_data/src/util/util_debug.hpp: -/usr/include/c++/4.9.2/cxxabi.h: - -/usr/include/c++/4.9.2/x86_64-redhat-linux/bits/cxxabi_tweaks.h: - ../../OpenFPM_data/src/util/check_no_pointers.hpp: -../../OpenFPM_data/src/util/common.hpp: - ../../OpenFPM_data/src/util/object_s_di.hpp: ../../OpenFPM_data/src/util/object_si_d.hpp: @@ -4507,8 +4512,6 @@ Grid/grid_dist_key.hpp: ../../OpenFPM_data/src/Vector/util.hpp: -../../OpenFPM_data/src/util/util_debug.hpp: - ../../OpenFPM_vcluster/src/Pack_stat.hpp: ../../OpenFPM_vcluster/src/Pack_selector.hpp: diff --git a/src/Decomposition/CartDecomposition.hpp b/src/Decomposition/CartDecomposition.hpp index e35d3f69edf6abe6b66c8123529ce165ca98a404..fba3abea11785a4b73cf780edaed46e62dbabc55 100644 --- a/src/Decomposition/CartDecomposition.hpp +++ b/src/Decomposition/CartDecomposition.hpp @@ -335,10 +335,24 @@ private: // Initialize ss_box and bbox if (loc_box.size() >= 0) { - SpaceBox<dim,T> sub_d(loc_box.get(0)); + SpaceBox<dim,size_t> sub_dc = loc_box.get(0); + SpaceBox<dim,T> sub_d(sub_dc); sub_d.mul(spacing); sub_d.expand(spacing); + // Fixing sub-domains to cover all the domain + + // Fixing sub_d + // if (loc_box) is a the boundary we have to ensure that the box span the full + // domain (avoiding rounding off error) + for (size_t i = 0 ; i < dim ; i++) + { + if (sub_dc.getHigh(i) == cd.getGrid().size(i) - 1) + { + sub_d.setHigh(i,domain.getHigh(i)); + } + } + // add the sub-domain sub_domains.add(sub_d); @@ -349,12 +363,26 @@ private: // convert into sub-domain for (size_t s = 1 ; s < loc_box.size() ; s++) { - SpaceBox<dim,T> sub_d(loc_box.get(s)); + SpaceBox<dim,size_t> sub_dc = loc_box.get(s); + SpaceBox<dim,T> sub_d(sub_dc); // re-scale and add spacing (the end is the starting point of the next domain + spacing) sub_d.mul(spacing); sub_d.expand(spacing); + // Fixing sub-domains to cover all the domain + + // Fixing sub_d + // if (loc_box) is a the boundary we have to ensure that the box span the full + // domain (avoiding rounding off error) + for (size_t i = 0 ; i < dim ; i++) + { + if (sub_dc.getHigh(i) == cd.getGrid().size(i) - 1) + { + sub_d.setHigh(i,domain.getHigh(i)); + } + } + // add the sub-domain sub_domains.add(sub_d);