Commit cb2d2030 authored by incardon's avatar incardon

Small add and fixes

parent 3b816b8c
......@@ -241,10 +241,16 @@ AX_LIB_HILBERT([],[echo "Cannot detect libhilbert, use the --with-libhilbert opt
AC_LANG_PUSH([C++])
AC_CHECK_HEADER(quadmath.h, , [])
AC_CHECK_LIB(quadmath, sinq, [ AC_DEFINE(HAVE_LIBQUADMATH,[],[Have quad math lib])
LIBQUADMATH=" -lquadmath "
], [])
have_quad_lib=no
have_quad_head=no
AC_CHECK_LIB(quadmath, sinq, [have_quad_lib=yes], [])
AC_CHECK_HEADER(quadmath.h,[have_quad_head=yes],[])
if [x"have_quad_math" == x"yes" $&& x"have_quad_math" == x"yes" ]; then
AC_DEFINE(HAVE_LIBQUADMATH,[],[Have quad math lib])
LIBQUADMATH=" -lquadmath "
fi
AC_LANG_POP([C++])
......
......@@ -32,11 +32,11 @@ template<unsigned int dim> void test_all_grid(size_t sz)
{szz[i] = sz;}
{grid_cpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
c3.setMemory();
test_layout_gridNd<dim>(c3,sz);}
{grid_cpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
c3.setMemory();
test_layout_gridObjNd<dim>(c3,sz);}
#ifdef CUDA_GPU
......@@ -52,21 +52,21 @@ template<unsigned int dim> void test_all_grid(size_t sz)
#endif
{grid_cpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
c3.setMemory();
test_layout_gridObjNd<dim>(c3,sz);}
{grid_cpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
c3.setMemory();
test_layout_gridNd<dim>(c3,sz);}
#ifdef CUDA_GPU
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
c3.setMemory();
test_layout_gridNd<dim>(c3,sz);}
{grid_gpu<dim, Point_test<float> > c3(szz);
c3.template setMemory();
c3.setMemory();
test_layout_gridObjNd<dim>(c3,sz);}
#endif
......@@ -554,7 +554,7 @@ BOOST_AUTO_TEST_CASE( grid_safety_check )
error = false;
try
{g.template get<p::x>(keyOut);}
{g.get<p::x>(keyOut);}
catch (size_t e)
{
error = true;
......@@ -566,7 +566,7 @@ BOOST_AUTO_TEST_CASE( grid_safety_check )
error = false;
g.setMemory();
try
{g.template get<p::x>(keyOut);}
{g.get<p::x>(keyOut);}
catch (size_t e)
{
error = true;
......@@ -602,7 +602,7 @@ BOOST_AUTO_TEST_CASE( grid_safety_check )
error = false;
try
{g.template get<p::x>(keyNeg);}
{g.get<p::x>(keyNeg);}
catch (size_t e)
{
error = true;
......@@ -827,8 +827,8 @@ BOOST_AUTO_TEST_CASE(grid_operator_equal)
{
auto key = it.get();
g1.template get<b::p1>(key)[0] = key.get(0);
g1.template get<b::p2>(key)[1] = key.get(1);
g1.get<b::p1>(key)[0] = key.get(0);
g1.get<b::p2>(key)[1] = key.get(1);
++it;
}
......@@ -860,8 +860,8 @@ void fill_2_grid_data(grid_cpu<2,Box<2,float>> & g1, grid_cpu<2,Box<2,float>> &
{
auto key = it1.get();
g1.template get<b::p1>(key)[0] = key.get(0);
g1.template get<b::p2>(key)[1] = key.get(1);
g1.get<b::p1>(key)[0] = key.get(0);
g1.get<b::p2>(key)[1] = key.get(1);
++it1;
}
......@@ -872,8 +872,8 @@ void fill_2_grid_data(grid_cpu<2,Box<2,float>> & g1, grid_cpu<2,Box<2,float>> &
{
auto key = it2.get();
g2.template get<b::p1>(key)[0] = key.get(0);
g2.template get<b::p2>(key)[1] = key.get(1);
g2.get<b::p1>(key)[0] = key.get(0);
g2.get<b::p2>(key)[1] = key.get(1);
++it2;
}
......
......@@ -70,9 +70,8 @@ template<unsigned int dim, typename St> static inline void cl_param_calculate(Bo
*
* \param[in] dom Simulation domain
* \param[output] cd_sm This cell-decomposer is set according to the needed division
* \param[in] g Ghost dimensions
* \param[output] pad required padding for the cell-list
* \param[in] r_cut interation radius or size of each cell
* \param[out] pad padding required for the cell list
*
* \return the processor bounding box
*/
......@@ -95,6 +94,29 @@ template<unsigned int dim, typename St> static inline void cl_param_calculateSym
cd_sm.setDimensions(dom,div,pad);
}
/*! \brief Calculate parameters for the symmetric cell list
*
* \param[in] dom Simulation domain
* \param[out] cd_sm This cell-decomposer is set according to the needed division
* \param[in] g Ghost part extension
* \param[out] pad required padding for the cell-list
*
* \return the processor bounding box
*/
template<unsigned int dim, typename St> static inline void cl_param_calculateSym(const Box<dim,St> & dom, CellDecomposer_sm<dim,St,shift<dim,St>> & cd_sm, Ghost<dim,St> g, size_t & pad)
{
size_t div[dim];
for (size_t i = 0 ; i < dim ; i++)
div[i] = (dom.getHigh(i) - dom.getLow(i)) / g.getHigh(i);
g.magnify(1.013);
pad = 1;
cd_sm.setDimensions(dom,div,pad);
}
#include "CellListFast.hpp"
#include "CellListBal.hpp"
#include "CellListMem.hpp"
......
......@@ -224,6 +224,7 @@ private:
// Get the neighborhood of the particle
NN_type NN = NNType<dim,T,CellListImpl,type>::get(pos,xp,i,cli,r_cut);
while (NN.isNext())
{
auto nnp = NN.get();
......@@ -348,7 +349,7 @@ public:
create(pos,r_cut,g_m,cli,opt);
}
/*! \brief Initialize the symmetric verlet list
/*! \brief Initialize the symmetric Verlet-list
*
* \param box Simulation domain
* \param dom Processor domain
......
......@@ -384,7 +384,7 @@ public:
//! constructor from expression
inline point_expression_op(const exp1 & o1)
:o1(o1)
:o1(o1),scal(0.0)
{}
//! initialize the the expression
......
......@@ -45,7 +45,7 @@ int main(int argc, char* argv[])
#include "NN/CellList/CellListIterator_test.hpp"
#include "Vector/map_vector_std_util_unit_test.hpp"
#include "NN/VerletList/VerletList_test.hpp"
//#include "Grid/iterators/grid_iterators_unit_tests.cpp"
#include "Grid/iterators/grid_iterators_unit_tests.cpp"
#ifdef PERFORMANCE_TEST
#include "performance.hpp"
#endif
......
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