Commit 5ad87499 authored by incardon's avatar incardon

Latest modules

parent 17c7b493
...@@ -14,8 +14,15 @@ All notable changes to this project will be documented in this file. ...@@ -14,8 +14,15 @@ All notable changes to this project will be documented in this file.
- vector_dist with negative domain (Now supported) - vector_dist with negative domain (Now supported)
- Grid 1D has been fixed - 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 ### Changed
- On gcc the -fext-numeric-literals compilation flag is now mandatory
## [0.5.0] - 15 August 2016 ## [0.5.0] - 15 August 2016
......
...@@ -175,14 +175,11 @@ my_save_cflags="$CXXFLAGS" ...@@ -175,14 +175,11 @@ my_save_cflags="$CXXFLAGS"
CXXFLAGS=-fext-numeric-literals CXXFLAGS=-fext-numeric-literals
AC_MSG_CHECKING([whether CXX supports -fext-numeric-literals]) AC_MSG_CHECKING([whether CXX supports -fext-numeric-literals])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])
[ AM_CXXFLAGS="-fext-numeric-literals"
AM_CXXFLAGS=-fext-numeric-literals
echo "-fext-numeric-literals" > config_opt
], ],
[ [
AC_MSG_RESULT([no]), AC_MSG_RESULT([no])
echo "" > config_opt
] ]
) )
AC_LANG_POP([C++]) AC_LANG_POP([C++])
......
...@@ -7,7 +7,7 @@ LDIR = ...@@ -7,7 +7,7 @@ LDIR =
OBJ = main.o OBJ = main.o
%.o: %.cpp %.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) pse_1d: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
...@@ -7,7 +7,7 @@ LDIR = ...@@ -7,7 +7,7 @@ LDIR =
OBJ = main.o OBJ = main.o
%.o: %.cpp %.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) diff_1d: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
...@@ -8,7 +8,7 @@ OBJ_EIGEN = main_eigen.o ...@@ -8,7 +8,7 @@ OBJ_EIGEN = main_eigen.o
OBJ_PETSC = main_petsc.o OBJ_PETSC = main_petsc.o
%.o: %.cpp %.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 all: stokes_2d_eigen stokes_2d_petsc
......
...@@ -8,7 +8,7 @@ OBJ_EIGEN = main_eigen.o ...@@ -8,7 +8,7 @@ OBJ_EIGEN = main_eigen.o
OBJ_PETSC = main_petsc.o OBJ_PETSC = main_petsc.o
%.o: %.cpp %.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 all: stokes_3d_eigen stokes_3d_petsc
......
...@@ -7,7 +7,7 @@ LDIR = ...@@ -7,7 +7,7 @@ LDIR =
OBJ = main.o OBJ = main.o
%.o: %.cpp %.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) vect: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
...@@ -7,7 +7,7 @@ LDIR = ...@@ -7,7 +7,7 @@ LDIR =
OBJ = main.o OBJ = main.o
%.o: %.cpp %.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) expr: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
...@@ -12,7 +12,7 @@ OBJ_VL_SYM = main_vl_sym.o ...@@ -12,7 +12,7 @@ OBJ_VL_SYM = main_vl_sym.o
all: md_dyn md_dyn_expr md_dyn_vl md_dyn_vl_sym all: md_dyn md_dyn_expr md_dyn_vl md_dyn_vl_sym
%.o: %.cpp %.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) md_dyn: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
...@@ -10,7 +10,7 @@ OBJ_SER = main_ser.o ...@@ -10,7 +10,7 @@ OBJ_SER = main_ser.o
all: vect_cp vect_ser all: vect_cp vect_ser
%.o: %.cpp %.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) vect_cp: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
...@@ -7,7 +7,7 @@ LDIR = ...@@ -7,7 +7,7 @@ LDIR =
OBJ = main.o OBJ = main.o
%.o: %.cpp %.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) cell: $(OBJ)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
...@@ -13,7 +13,7 @@ all_test: OPT += -DTEST_RUN ...@@ -13,7 +13,7 @@ all_test: OPT += -DTEST_RUN
all_test: md_data_ord_test md_comp_ord_test all_test: md_data_ord_test md_comp_ord_test
%.o: %.cpp %.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) md_data_ord: $(OBJ_DORD)
$(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS) $(CC) -o $@ $^ $(CFLAGS) $(LIBS_PATH) $(LIBS)
......
openfpm_data @ ebf5628c
Subproject commit fd67c2620e44caed20d3e3c30fad72c41cd9d48e Subproject commit ebf5628ca2191c298589d36973da2bbaceb4ecfe
openfpm_numerics @ c476b51f
Subproject commit a384941b412db3d3aa280caae3cb3eaa874a86c2 Subproject commit c476b51f466d6e5ed746d7dd64a09a48b77bafdd
...@@ -18,7 +18,7 @@ nobase_include_HEADERS = Decomposition/CartDecomposition.hpp Decomposition/CartD ...@@ -18,7 +18,7 @@ nobase_include_HEADERS = Decomposition/CartDecomposition.hpp Decomposition/CartD
lib_LIBRARIES = libofpm_pdata.a lib_LIBRARIES = libofpm_pdata.a
libofpm_pdata_a_SOURCES = lib/pdata.cpp 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 = libofpm_pdata_a_CFLAGS =
.cu.o : .cu.o :
......
...@@ -164,7 +164,7 @@ public: ...@@ -164,7 +164,7 @@ public:
* *
*/ */
vector_dist(const vector_dist<dim,St,prop,Decomposition,Memory> & v) 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 #ifdef SE_CLASS2
check_new(this,8,VECTOR_DIST_EVENT,4); check_new(this,8,VECTOR_DIST_EVENT,4);
...@@ -799,6 +799,16 @@ public: ...@@ -799,6 +799,16 @@ public:
return vector_dist_comm<dim,St,prop,Decomposition,Memory>::getDecomposition(); 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 /*! \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 * \tparam out of bound policy it specify what to do when the particles are detected out of bound
...@@ -1022,7 +1032,14 @@ public: ...@@ -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)) 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 /*! \brief It return the id of structure in the allocation list
......
...@@ -743,6 +743,17 @@ class vector_dist_comm ...@@ -743,6 +743,17 @@ class vector_dist_comm
public: 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 /*! \brief Constructor
* *
* \param dec Domain decompositon * \param dec Domain decompositon
...@@ -999,6 +1010,16 @@ public: ...@@ -999,6 +1010,16 @@ public:
return dec; return dec;
} }
/*! \brief Get the decomposition
*
* \return
*
*/
inline const Decomposition & getDecomposition() const
{
return dec;
}
/*! \brief Copy a vector /*! \brief Copy a vector
* *
* \param vc vector to copy * \param vc vector to copy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment