diff --git a/CHANGELOG.md b/CHANGELOG.md index 5042a8a437cbc7c7bf9707b0faf4714c0871d0a2..8c03e493a68d63a98059df51670da5ad03a9e82c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,9 +13,16 @@ All notable changes to this project will be documented in this file. - Miss-compilation of SUITESPARSE on gcc-6.2 - vector_dist with negative domain (Now supported) - Grid 1D has been fixed -- One constructor of Box had arguments inverted. +- One constructor of Box had arguments inverted. + PLEASE CAREFULL ON THIS BUG + float xmin[] = {0.0,0.0}; + float xmax[] = {1.0,1.0}; + // Box<2,float> box(xmax,xmin) BUG IT WAS xmax,xmin + Box<2,float> box(xmin,xmax) <--- NOW IT IS xmin,xmax + Box<2,float> box({0.0,0.0},{1.0,1.0}) <---- This constructor is not affected by the BUG ### Changed +- On gcc the -fext-numeric-literals compilation flag is now mandatory ## [0.5.0] - 15 August 2016 diff --git a/configure.ac b/configure.ac index bff4f8b126ac2cd9c0759238142d2b833cf6601b..45305737cf35b7cb75f16002efc55dff7d520c2c 100644 --- a/configure.ac +++ b/configure.ac @@ -175,14 +175,11 @@ my_save_cflags="$CXXFLAGS" CXXFLAGS=-fext-numeric-literals AC_MSG_CHECKING([whether CXX supports -fext-numeric-literals]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], - [AC_MSG_RESULT([yes])], - [ - AM_CXXFLAGS=-fext-numeric-literals - echo "-fext-numeric-literals" > config_opt + [AC_MSG_RESULT([yes]) + AM_CXXFLAGS="-fext-numeric-literals" ], [ - AC_MSG_RESULT([no]), - echo "" > config_opt + AC_MSG_RESULT([no]) ] ) AC_LANG_POP([C++]) diff --git a/example/Numerics/PSE/0_Derivative_approx_1D/Makefile b/example/Numerics/PSE/0_Derivative_approx_1D/Makefile index 4399591ae91a611106e5536aa126a7b37fbbaf70..24da6b8b273eca8151fa17dbc1ffd567e83d30e9 100644 --- a/example/Numerics/PSE/0_Derivative_approx_1D/Makefile +++ b/example/Numerics/PSE/0_Derivative_approx_1D/Makefile @@ -7,7 +7,7 @@ LDIR = OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) pse_1d: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/PSE/1_Diffusion_1D/Makefile b/example/Numerics/PSE/1_Diffusion_1D/Makefile index 80cc4ffee6942f9638dff20b8b6ef4fa3b122fb4..241b3dfd4b4cb85c3d8ec4173ae895ecbd6f5db4 100644 --- a/example/Numerics/PSE/1_Diffusion_1D/Makefile +++ b/example/Numerics/PSE/1_Diffusion_1D/Makefile @@ -7,7 +7,7 @@ LDIR = OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) diff_1d: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile b/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile index b6512e4ce8a11840a6ea123ee2a7d6c8b3330bd9..3c6a733eb68fd0ab2510f233e9827ffd9f9eef81 100644 --- a/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile +++ b/example/Numerics/Stoke_flow/0_2D_incompressible/Makefile @@ -8,7 +8,7 @@ OBJ_EIGEN = main_eigen.o OBJ_PETSC = main_petsc.o %.o: %.cpp - $(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) all: stokes_2d_eigen stokes_2d_petsc diff --git a/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile b/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile index 37f936486b6cc6be32d4a89c8f4f7a648d8cee14..68f9098b56228aa4e90dc2b5d1bfce3bc424fd99 100644 --- a/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile +++ b/example/Numerics/Stoke_flow/1_3D_incompressible/Makefile @@ -8,7 +8,7 @@ OBJ_EIGEN = main_eigen.o OBJ_PETSC = main_petsc.o %.o: %.cpp - $(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) all: stokes_3d_eigen stokes_3d_petsc diff --git a/example/Vector/0_simple/Makefile b/example/Vector/0_simple/Makefile index 646357e9532c2ba26a3df94534201be645d20608..9afd8418782907e1913796cbb0cd9a7a95c8c430 100644 --- a/example/Vector/0_simple/Makefile +++ b/example/Vector/0_simple/Makefile @@ -7,7 +7,7 @@ LDIR = OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) vect: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/2_expressions/Makefile b/example/Vector/2_expressions/Makefile index a7705b979c6bc1afbfb7d920e5f21da8684f4cea..bfa50d406b5cf5b5e4b8109db571f30b7498d7d0 100644 --- a/example/Vector/2_expressions/Makefile +++ b/example/Vector/2_expressions/Makefile @@ -7,7 +7,7 @@ LDIR = OBJ = main.o %.o: %.cpp - $(CC) -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) expr: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/3_molecular_dynamic/Makefile b/example/Vector/3_molecular_dynamic/Makefile index 9c467c81200347d1095a4195d16202566f07968a..6d55806ec7a5643f4e95e499a145b277d5639604 100644 --- a/example/Vector/3_molecular_dynamic/Makefile +++ b/example/Vector/3_molecular_dynamic/Makefile @@ -12,7 +12,7 @@ OBJ_VL_SYM = main_vl_sym.o all: md_dyn md_dyn_expr md_dyn_vl md_dyn_vl_sym %.o: %.cpp - $(CC) -O3 -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH) md_dyn: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/4_complex_prop/Makefile b/example/Vector/4_complex_prop/Makefile index 47ec488c5a938e71a172d9bf27f2ffa67fe816fc..f41f44fc56f10c55e3700be0e69f0ab3c4055fb3 100644 --- a/example/Vector/4_complex_prop/Makefile +++ b/example/Vector/4_complex_prop/Makefile @@ -10,7 +10,7 @@ OBJ_SER = main_ser.o all: vect_cp vect_ser %.o: %.cpp - $(CC) -O0 -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -c --std=c++11 -o $@ $< $(INCLUDE_PATH) vect_cp: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/4_multiphase_celllist/Makefile b/example/Vector/4_multiphase_celllist/Makefile index 0acbf7c250aa29ced27edf2e97ebd17536e30c67..16168a458fb8b2d9c37bbe9e01d0b1ed7a3fbbaf 100644 --- a/example/Vector/4_multiphase_celllist/Makefile +++ b/example/Vector/4_multiphase_celllist/Makefile @@ -7,7 +7,7 @@ LDIR = OBJ = main.o %.o: %.cpp - $(CC) -O0 -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -g -c --std=c++11 -o $@ $< $(INCLUDE_PATH) cell: $(OBJ) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/example/Vector/4_reorder/Makefile b/example/Vector/4_reorder/Makefile index c5ada0a42e2a3fbefe910f8839e774e748913a69..0c5222d9b1dc22d3452bd76dcea52b3c967aa50f 100644 --- a/example/Vector/4_reorder/Makefile +++ b/example/Vector/4_reorder/Makefile @@ -13,7 +13,7 @@ all_test: OPT += -DTEST_RUN all_test: md_data_ord_test md_comp_ord_test %.o: %.cpp - $(CC) -O3 -g -c --std=c++11 $(OPT) -o $@ $< $(INCLUDE_PATH) + $(CC) -fext-numeric-literals -O3 -g -c --std=c++11 $(OPT) -o $@ $< $(INCLUDE_PATH) md_data_ord: $(OBJ_DORD) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) diff --git a/openfpm_data b/openfpm_data index fd67c2620e44caed20d3e3c30fad72c41cd9d48e..ebf5628ca2191c298589d36973da2bbaceb4ecfe 160000 --- a/openfpm_data +++ b/openfpm_data @@ -1 +1 @@ -Subproject commit fd67c2620e44caed20d3e3c30fad72c41cd9d48e +Subproject commit ebf5628ca2191c298589d36973da2bbaceb4ecfe diff --git a/openfpm_numerics b/openfpm_numerics index a384941b412db3d3aa280caae3cb3eaa874a86c2..c476b51f466d6e5ed746d7dd64a09a48b77bafdd 160000 --- a/openfpm_numerics +++ b/openfpm_numerics @@ -1 +1 @@ -Subproject commit a384941b412db3d3aa280caae3cb3eaa874a86c2 +Subproject commit c476b51f466d6e5ed746d7dd64a09a48b77bafdd diff --git a/src/Makefile.am b/src/Makefile.am index a2c3cee09ef8f486b54e2d8f32e81b7dbe327b6f..66860062a9e120c72870860985bc5207ca8d2182 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,7 +18,7 @@ nobase_include_HEADERS = Decomposition/CartDecomposition.hpp Decomposition/CartD lib_LIBRARIES = libofpm_pdata.a libofpm_pdata_a_SOURCES = lib/pdata.cpp -libofpm_pdata_a_CXXFLAGS = $(INCLUDES_PATH) $(BOOST_CPPFLAGS) -I/usr/local/include -Wno-unused-local-typedefs +libofpm_pdata_a_CXXFLAGS = $(AM_CXXFLAGS) $(INCLUDES_PATH) $(BOOST_CPPFLAGS) -I/usr/local/include -Wno-unused-local-typedefs libofpm_pdata_a_CFLAGS = .cu.o : diff --git a/src/Vector/vector_dist.hpp b/src/Vector/vector_dist.hpp index ef47a83d320a77bd5064b69160ae780a2c119c17..7fc66a8aa030cc0286ef84540f2bf330afd31a04 100644 --- a/src/Vector/vector_dist.hpp +++ b/src/Vector/vector_dist.hpp @@ -164,7 +164,7 @@ public: * */ vector_dist(const vector_dist<dim,St,prop,Decomposition,Memory> & v) - :vector_dist_comm<dim,St,prop,Decomposition,Memory>(v.dec),v_cl(v.v_cl) + :vector_dist_comm<dim,St,prop,Decomposition,Memory>(v.getDecomposition()),v_cl(v.v_cl) { #ifdef SE_CLASS2 check_new(this,8,VECTOR_DIST_EVENT,4); @@ -799,6 +799,16 @@ public: return vector_dist_comm<dim,St,prop,Decomposition,Memory>::getDecomposition(); } + /*! \brief Get the decomposition + * + * \return + * + */ + inline const Decomposition & getDecomposition() const + { + return vector_dist_comm<dim,St,prop,Decomposition,Memory>::getDecomposition(); + } + /*! \brief It move all the particles that does not belong to the local processor to the respective processor * * \tparam out of bound policy it specify what to do when the particles are detected out of bound @@ -1022,7 +1032,14 @@ public: */ void getCellListParams(St r_cut, size_t (&div)[dim],Box<dim, St> & box, Ghost<dim,St> enlarge = Ghost<dim,St>(0.0)) { - box = cl_param_calculate(div,r_cut,enlarge); + // get the processor bounding box + Box<dim, St> pbox = getDecomposition().getProcessorBounds(); + + // enlarge the processor bounding box by the ghost + Ghost<dim,St> g = getDecomposition().getGhost(); + pbox.enlarge(g); + + cl_param_calculate(pbox, div,r_cut,enlarge); } /*! \brief It return the id of structure in the allocation list diff --git a/src/Vector/vector_dist_comm.hpp b/src/Vector/vector_dist_comm.hpp index 585be039d8032a8819f0aeca5610b052616ea201..ca70fd9939a5700a4e3b440bca71e1c14a14634f 100644 --- a/src/Vector/vector_dist_comm.hpp +++ b/src/Vector/vector_dist_comm.hpp @@ -743,6 +743,17 @@ class vector_dist_comm public: + /*! \brief Copy Constructor + * + * \param v vector to copy + * + */ + vector_dist_comm(const vector_dist_comm<dim,St,prop,Decomposition,Memory> & v) + { + this->operator=(v); + } + + /*! \brief Constructor * * \param dec Domain decompositon @@ -999,6 +1010,16 @@ public: return dec; } + /*! \brief Get the decomposition + * + * \return + * + */ + inline const Decomposition & getDecomposition() const + { + return dec; + } + /*! \brief Copy a vector * * \param vc vector to copy