Commit 7a4d5939 authored by incardon's avatar incardon

Latest modules

parent 4b6dfb72
openfpm_numerics @ 45013703
Subproject commit 6b5c7f13d3940e261e5218e58e0c243008eecc4e
Subproject commit 450137038552dbcf28dc4379b362087da7ad8a46
......@@ -11,10 +11,11 @@
template<typename T>
struct ref_wrap
{
bool is_sorted;
T & v;
ref_wrap(T & v)
:v(v)
ref_wrap(T & v, bool is_sorted)
:v(v),is_sorted(is_sorted)
{}
ref_wrap & operator=(const ref_wrap<T> & rw)
......@@ -44,9 +45,9 @@ public:
*
*
*/
void add(vector_dist_ker_type & v)
void add(vector_dist_ker_type & v, bool is_sorted)
{
ref_wrap<vector_dist_ker_type> rw(v);
ref_wrap<vector_dist_ker_type> rw(v,is_sorted);
vkers.add(rw);
......@@ -66,7 +67,17 @@ public:
{
for (size_t i = 0 ; i < vkers.size() ; i++)
{
vkers.get(i).v = v;
if (vkers.get(i).is_sorted == false)
{vkers.get(i).v = v;}
}
}
void update_sort(const vector_dist_ker_type & vs)
{
for (size_t i = 0 ; i < vkers.size() ; i++)
{
if (vkers.get(i).is_sorted == true)
{vkers.get(i).v = vs;}
}
}
......
......@@ -1270,6 +1270,10 @@ public:
cell_list.set_ndec(getDecomposition().get_ndec());
cell_list.set_gm(g_m);
#ifdef CUDA_GPU
this->update_sort(this->toKernel_sorted());
#endif
return cell_list;
}
......@@ -2727,6 +2731,46 @@ public:
return v_prp;
}
/*! \brief return the position vector of all the particles
*
* \return the particle position vector
*
*/
const openfpm::vector<Point<dim, St>,Memory,typename layout_base<Point<dim,St>>::type,layout_base> & getPosVectorSort() const
{
return v_pos_out;
}
/*! \brief return the position vector of all the particles
*
* \return the particle position vector
*
*/
openfpm::vector<Point<dim, St>,Memory,typename layout_base<Point<dim,St>>::type,layout_base> & getPosVectorSort()
{
return v_pos_out;
}
/*! \brief return the property vector of all the particles
*
* \return the particle property vector
*
*/
const openfpm::vector<prop,Memory,typename layout_base<prop>::type,layout_base> & getPropVectorSort() const
{
return v_prp_out;
}
/*! \brief return the property vector of all the particles
*
* \return the particle property vector
*
*/
openfpm::vector<prop,Memory,typename layout_base<prop>::type,layout_base> & getPropVectorSort()
{
return v_prp_out;
}
/*! \brief It return the sum of the particles in the previous processors
*
* \return the particles number
......
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