Commit 0613ac5c authored by incardon's avatar incardon

Latest version

parent 9ed2c3e3
openfpm_data @ a31eedec
Subproject commit 874297aafc931ce5d2681b9cebcbec9d63716a3d
Subproject commit a31eedec0332143e886d4d71fe2a2d258f9eebab
......@@ -86,7 +86,7 @@ public:
Decomposition_encap<Decomposition,garray> operator=(const Decomposition_encap<Decomposition,garray> & de) const
{
for(size_t i = 0 ; i < gd_array.size() ; i++)
{gd_array.get(i).getDecomposition() = de.dec;}
{gd_array.get(i).getDecomposition() = de.gd_array.get(i).getDecomposition();}
return *this;
}
......@@ -137,7 +137,12 @@ class grid_dist_amr<dim,St,T,AMR_IMPL_TRIVIAL,Decomposition,Memory,device_grid>
periodicity<dim> bc;
//! array of grids
openfpm::vector<grid_dist_id<dim,St,T,Decomposition,Memory,device_grid>> gd_array;
//
openfpm::vector<grid_dist_id<dim,St,T,Decomposition,Memory,device_grid>,
HeapMemory,
typename memory_traits_lin<grid_dist_id<dim,St,T,Decomposition,Memory,device_grid>>::type,
memory_traits_lin,
openfpm::grow_policy_identity,STD_VECTOR> gd_array;
//! Type of structure sub-grid iterator
typedef decltype(device_grid::type_of_subiterator()) device_sub_it;
......@@ -175,6 +180,10 @@ class grid_dist_amr<dim,St,T,AMR_IMPL_TRIVIAL,Decomposition,Memory,device_grid>
gd_array.add(grid_dist_id<dim,St,T,Decomposition,Memory,device_grid>(gd_array.get(0).getDecomposition(),g_sz_lvl,g_int));
gd_array.last().setBackgroundValue(bck);
gd_array.last().getDecomposition().free_geo_cell();
gd_array.last().getDecomposition().getDistribution().destroy_internal_graph();
gd_array.last().getDecomposition().free_fines();
}
recalculate_mvoff();
......
......@@ -347,7 +347,7 @@ public:
if (bound.isValidN() == true)
{
// Not necessary, but I prefer
bound.enlarge(ghost);
//bound.enlarge(ghost);
// calculate the sub-divisions
size_t div[dim];
......@@ -1586,6 +1586,23 @@ public:
return v_cl;
}
/*! \brief Deallocate structures that identify a point to which internal ghost is located
*
*/
void free_geo_cell()
{
ie_ghost<dim,T>::free_geo_cell();
}
/*! \brief Deallocate structures that identify a point to which internal ghost is located
*
*/
void free_fines()
{
fine_s.clear();
fine_s.shrink_to_fit();
}
/*! \brief function to check the consistency of the information of the decomposition
*
* \return false if is inconsistent
......
......@@ -615,6 +615,22 @@ public:
return gp.getNChilds(id);
}
/*! \brief In case we do not do Dynamic load balancing this this data-structure it is safe to eliminate the full internal graph
*
*
*
*/
void destroy_internal_graph()
{
gp.destroy();
partitions.clear();
partitions.shrink_to_fit();
v_per_proc.clear();
v_per_proc.shrink_to_fit();
m2g.clear();
m2g.rehash(0);
}
/*! \brief Print the current distribution and save it to VTK file
*
* \param file filename
......
......@@ -199,6 +199,14 @@ protected:
geo_cell.Initialize(domain,div);
}
/*! \brief Deallocate structures that identify a point to which internal ghost is located
*
*/
void free_geo_cell()
{
geo_cell.destroy();
}
/*! \brief Create the box_nn_processor_int (bx part) structure
*
* For each sub-domain of the local processor it store the intersection between the enlarged
......
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