Commit ec8936bf authored by Hans-Christian Ebke's avatar Hans-Christian Ebke
Browse files

Introduce ArrayKernel::clean_keep_reservation().

parent 201dee45
Pipeline #95 passed with stage
......@@ -177,6 +177,16 @@ void ArrayKernel::garbage_collection(bool _v, bool _e, bool _f)
garbage_collection( empty_vh,empty_hh,empty_fh,_v, _e, _f);
}
void ArrayKernel::clean_keep_reservation()
{
vertices_.clear();
edges_.clear();
faces_.clear();
}
void ArrayKernel::clean()
{
......
......@@ -306,6 +306,14 @@ public:
*/
void clean();
/** \brief Reset the whole mesh
*
* This will remove all elements from the mesh but keeps the properties.
* In contrast to clean() the memory used for the elements will remain
* allocated.
*/
void clean_keep_reservation();
// --- number of items ---
size_t n_vertices() const { return vertices_.size(); }
size_t n_halfedges() const { return 2*edges_.size(); }
......
Supports Markdown
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