Skip to content
Snippets Groups Projects
Commit d527a413 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Fixing subset and 3d bugs

parent 2baca256
No related branches found
No related tags found
No related merge requests found
Pipeline #2242 failed
openfpm_numerics @ f7b398cc
Subproject commit 7d1d7a70c8d1ee5eddbf5da91b614149a3118812
Subproject commit f7b398cc11330c6b15d0b44e4ee320731a71a77a
......@@ -23,6 +23,15 @@ class vector_dist_subset
size_t g_m = 0;
void update_gm()
{
g_m = 0;
for (size_t i = 0 ; i < pid.size() ; i++)
{
g_m += (pid.template get<0>(i) < vd.size_local())?1:0;
}
}
public:
//! property object
......@@ -45,12 +54,24 @@ public:
openfpm::vector<aggregate<int>> & pid)
:vd(vd),pid(pid)
{
update_gm();
}
/*! \brief Update the subset indexes
*
*/
inline void update(openfpm::vector<aggregate<int>> & pid)
{
this->pid.resize(pid.size());
for (size_t i = 0 ; i < pid.size() ; i++)
{
g_m += (pid.template get<0>(i) < vd.size_local())?1:0;
this->pid.template get<0>(i) = pid.template get<0>(i);
}
}
update_gm();
}
/*! \brief Get the decomposition
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment