Commit 2ce94eb2 authored by incardon's avatar incardon

Stabilized LJ

parent b25ec63a
......@@ -440,8 +440,7 @@ public:
// Clear the cell list from the previous particles
cell_list.clear();
// for each particle add the particle to the cell list
// for each particle real and ghost, add the particle to the cell list
auto it = getIterator();
while (it.isNext())
......@@ -456,6 +455,45 @@ public:
cell_list.set_gm(g_m);
}
/*! \brief Update a cell list using the stored particles
*
* \tparam CellL CellList type to construct
*
* \param cell_list Cell list to update
*
*/
template<typename CellL = CellList<dim, St, FAST, shift<dim, St> > > void updateCellListSym(CellL & cell_list)
{
// Clear the cell list from the previous particles
cell_list.clear();
// for each particle real and ghost, add the particle to the cell list
auto it = getDomainIterator();
while (it.isNext())
{
auto key = it.get();
cell_list.addDom(this->getPos(key), key.getKey());
++it;
}
// for each particle real and ghost, add the particle to the cell list
it = getGhostIterator();
while (it.isNext())
{
auto key = it.get();
cell_list.addGhost(this->getPos(key), key.getKey());
++it;
}
cell_list.set_gm(g_m);
}
/*! \brief Construct a cell list starting from the stored particles
*
* It differ from the get getCellList for an additional parameter, in case the
......
......@@ -524,6 +524,9 @@ BOOST_AUTO_TEST_CASE( vector_dist_symmetric_cell_list )
for (size_t i = 0 ; i < vd.getProp<3>(p).size() ; i++)
ret &= vd.getProp<3>(p).get(i).id == vd.getProp<4>(p).get(i).id;
if (ret == false)
break;
++p_it3;
}
......
......@@ -1239,8 +1239,6 @@ BOOST_AUTO_TEST_CASE( vector_dist_cell_verlet_test )
vd.ghost_get<0>();
vd.write("Debug_output");
// calculate the distance of the first, second and third neighborhood particle
// Consider that they are on a regular grid
......
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