// ---------------------------------------------------------------------
//
-// Copyright (C) 1998 - 2014 by the deal.II authors
+// Copyright (C) 1998 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
*/
std::vector<bool> coarsen_flags;
+
+ /**
+ * An integer that, for every active cell, stores the how
+ * many-th active cell this is. For non-active cells, this value
+ * is unused and set to an invalid value.
+ */
+ std::vector<unsigned int> active_cell_indices;
+
/**
* Levels and indices of the neighbors of the cells. Convention is, that
* the neighbors of the cell with index @p i are stored in the fields
//TODO: Replace TriaObjectsHex to avoid this specialization
/**
- * Specialization of TriaLevels for 3D. Since we need TriaObjectsHex
- * instead of TriaObjects. Refer to the documentation of the template for
- * details.
+ * Specialization of TriaLevels for 3D. Since we need
+ * TriaObjectsHex instead of TriaObjects. Refer to the
+ * documentation of the general class template for details.
*/
template<>
class TriaLevel<3>
public:
std::vector<unsigned char> refine_flags;
std::vector<bool> coarsen_flags;
+ std::vector<unsigned int> active_cell_indices;
std::vector<std::pair<int,int> > neighbors;
std::vector<types::subdomain_id> subdomain_ids;
std::vector<types::subdomain_id> level_subdomain_ids;
const unsigned int)
{
ar &refine_flags &coarsen_flags;
+ ar &active_cell_indices;
ar &neighbors;
ar &subdomain_ids;
ar &level_subdomain_ids;
const unsigned int)
{
ar &refine_flags &coarsen_flags;
+ ar &active_cell_indices;
ar &neighbors;
ar &subdomain_ids;
ar &level_subdomain_ids;
// ---------------------------------------------------------------------
//
-// Copyright (C) 2006 - 2014 by the deal.II authors
+// Copyright (C) 2006 - 2015 by the deal.II authors
//
// This file is part of the deal.II library.
//
total_cells - coarsen_flags.size(),
false);
+ active_cell_indices.reserve (total_cells);
+ active_cell_indices.insert (active_cell_indices.end(),
+ total_cells - active_cell_indices.size(),
+ numbers::invalid_unsigned_int);
+
subdomain_ids.reserve (total_cells);
subdomain_ids.insert (subdomain_ids.end(),
total_cells - subdomain_ids.size(),
{
return (MemoryConsumption::memory_consumption (refine_flags) +
MemoryConsumption::memory_consumption (coarsen_flags) +
+ MemoryConsumption::memory_consumption (active_cell_indices) +
MemoryConsumption::memory_consumption (neighbors) +
MemoryConsumption::memory_consumption (subdomain_ids) +
MemoryConsumption::memory_consumption (level_subdomain_ids) +
total_cells - coarsen_flags.size(),
false);
+ active_cell_indices.reserve (total_cells);
+ active_cell_indices.insert (active_cell_indices.end(),
+ total_cells - active_cell_indices.size(),
+ numbers::invalid_unsigned_int);
+
subdomain_ids.reserve (total_cells);
subdomain_ids.insert (subdomain_ids.end(),
total_cells - subdomain_ids.size(),
{
return (MemoryConsumption::memory_consumption (refine_flags) +
MemoryConsumption::memory_consumption (coarsen_flags) +
+ MemoryConsumption::memory_consumption (active_cell_indices) +
MemoryConsumption::memory_consumption (neighbors) +
MemoryConsumption::memory_consumption (subdomain_ids) +
MemoryConsumption::memory_consumption (parents) +