Commit 121d1dfc authored by incardon's avatar incardon
Browse files

Fixing ParticleIt_Cells and old compilers

parent 0b85159a
......@@ -391,7 +391,7 @@ BOOST_AUTO_TEST_CASE( ParticleIt_Cells_iterator )
}
//Test the iterator
ParticleIt_Cells<dim,CellList<dim,float,FAST,shift<dim,float>>> it_cl(NN,dom);
ParticleIt_Cells<dim,CellList<dim,float,FAST,shift<dim,float>>> it_cl(NN,dom,290);
size_t count = 0;
......@@ -401,7 +401,7 @@ BOOST_AUTO_TEST_CASE( ParticleIt_Cells_iterator )
++it_cl;
}
BOOST_REQUIRE_EQUAL(count,k);
BOOST_REQUIRE_EQUAL(count,290ul);
}
BOOST_AUTO_TEST_SUITE_END()
......
......@@ -34,6 +34,9 @@ private:
//! Celllist type
CellListType & cli;
//! Ghost marker
size_t g_m;
/*! \brief Adjust the counters to reach a valid particle element
*
*
......@@ -64,14 +67,13 @@ public:
*
* \param cli Cell-list
* \param dom_cell domain cell
* \param anom_dom_cell anomalous domain cell
* \param NNc_sym symmetric neighborhood
*
* \param g_m ghost marker
*
*/
ParticleIt_Cells(CellListType & cli,
const openfpm::vector<size_t> & dom_cell)
:cid(0),dom_cell(dom_cell),cli(cli)
const openfpm::vector<size_t> & dom_cell,
size_t g_m)
:cid(0),dom_cell(dom_cell),cli(cli),g_m(g_m)
{
size_t s_cell;
if (dom_cell.size() != 0)
......@@ -102,9 +104,14 @@ public:
ParticleIt_Cells & operator++()
{
++start;
selectValid();
while (*start >= g_m)
{
++start;
selectValid();
}
return *this;
}
......
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