diff --git a/images/Makefile.am b/images/Makefile.am index 3870711d832ecf35afd33083baa3010756f522c0..732e12116b43462c233790f1e30d78a47c8ef300 100644 --- a/images/Makefile.am +++ b/images/Makefile.am @@ -1,4 +1,4 @@ -LINKLIBS = $(OPENMP_LDFLAGS) $(LIBHILBERT_LIB) $(PETSC_LIB) $(METIS_LIB) $(PARMETIS_LIB) $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_IOSTREAMS_LIB) $(CUDA_LIBS) +LINKLIBS = $(HDF5_LDFLAGS) $(HDF5_LIBS) $(OPENMP_LDFLAGS) $(LIBHILBERT_LIB) $(PETSC_LIB) $(METIS_LIB) $(PARMETIS_LIB) $(PTHREAD_LIBS) $(OPT_LIBS) $(BOOST_LDFLAGS) $(BOOST_IOSTREAMS_LIB) $(CUDA_LIBS) noinst_PROGRAMS = cart_dec metis_dec dom_box vector_dist cart_dec_SOURCES = CartDecomposition_gen_vtk.cpp ../src/lib/pdata.cpp ../openfpm_devices/src/memory/HeapMemory.cpp ../openfpm_devices/src/memory/PtrMemory.cpp ../openfpm_vcluster/src/VCluster/VCluster.cpp ../openfpm_devices/src/Memleak_check.cpp diff --git a/src/Grid/grid_dist_id.hpp b/src/Grid/grid_dist_id.hpp index 88cb2af8ff1774fff7e415512dfc47862df9377a..461a3bb1cf2814306fec96d717d535963f81aa1a 100644 --- a/src/Grid/grid_dist_id.hpp +++ b/src/Grid/grid_dist_id.hpp @@ -1155,9 +1155,12 @@ public: * \return the selected element * */ - template <unsigned int p>inline auto getProp(const grid_dist_key_dx<dim> & v1) const -> decltype(this->template get<p>(v1)) + template <unsigned int p>inline auto get(const grid_dist_key_dx<dim> & v1) const -> typename std::add_lvalue_reference<decltype(loc_grid.get(v1.getSub()).template get<p>(v1.getKey()))>::type { - return this->template get<p>(v1); +#ifdef SE_CLASS2 + check_valid(this,8); +#endif + return loc_grid.get(v1.getSub()).template get<p>(v1.getKey()); } /*! \brief Get the reference of the selected element @@ -1168,12 +1171,14 @@ public: * \return the selected element * */ - template <unsigned int p>inline auto getProp(const grid_dist_key_dx<dim> & v1) -> decltype(this->template get<p>(v1)) + template <unsigned int p>inline auto get(const grid_dist_key_dx<dim> & v1) -> typename std::add_lvalue_reference<decltype(loc_grid.get(v1.getSub()).template get<p>(v1.getKey()))>::type { - return this->template get<p>(v1); +#ifdef SE_CLASS2 + check_valid(this,8); +#endif + return loc_grid.get(v1.getSub()).template get<p>(v1.getKey()); } - /*! \brief Get the reference of the selected element * * \tparam p property to get (is an integer) @@ -1182,12 +1187,9 @@ public: * \return the selected element * */ - template <unsigned int p>inline auto get(const grid_dist_key_dx<dim> & v1) const -> typename std::add_lvalue_reference<decltype(loc_grid.get(v1.getSub()).template get<p>(v1.getKey()))>::type + template <unsigned int p>inline auto getProp(const grid_dist_key_dx<dim> & v1) const -> decltype(this->template get<p>(v1)) { -#ifdef SE_CLASS2 - check_valid(this,8); -#endif - return loc_grid.get(v1.getSub()).template get<p>(v1.getKey()); + return this->template get<p>(v1); } /*! \brief Get the reference of the selected element @@ -1198,14 +1200,12 @@ public: * \return the selected element * */ - template <unsigned int p>inline auto get(const grid_dist_key_dx<dim> & v1) -> typename std::add_lvalue_reference<decltype(loc_grid.get(v1.getSub()).template get<p>(v1.getKey()))>::type + template <unsigned int p>inline auto getProp(const grid_dist_key_dx<dim> & v1) -> decltype(this->template get<p>(v1)) { -#ifdef SE_CLASS2 - check_valid(this,8); -#endif - return loc_grid.get(v1.getSub()).template get<p>(v1.getKey()); + return this->template get<p>(v1); } + //! Flag that indicate if the external ghost box has been initialized bool init_e_g_box = false;