* @ref GlossPeriodicConstraints "glossary entry on periodic conditions".
*/
FullMatrix<double> matrix;
+
+ /**
+ * Return an estimate, in bytes, for the memory consumption of the object.
+ */
+ std::size_t
+ memory_consumption() const;
};
+ template <typename CellIterator>
+ std::size_t
+ PeriodicFacePair<CellIterator>::memory_consumption() const
+ {
+ return sizeof(*this) + matrix.memory_consumption();
+ }
+
+
+
namespace internal
{
namespace ProjectToObject
void
serialize(Archive &archive, const unsigned int /*version*/);
+ /**
+ * Return the number of bytes used by an instance of this class.
+ */
+ static constexpr std::size_t
+ memory_consumption();
+
/**
* @}
*/
+inline constexpr std::size_t
+ReferenceCell::memory_consumption()
+{
+ return sizeof(ReferenceCells::Invalid);
+}
+
+
+
inline ArrayView<const unsigned int>
ReferenceCell::faces_for_given_vertex(const unsigned int vertex) const
{
std::size_t
Partitioner::memory_consumption() const
{
- std::size_t memory = (3 * sizeof(types::global_dof_index) +
- 4 * sizeof(unsigned int) + sizeof(MPI_Comm));
- memory += MemoryConsumption::memory_consumption(locally_owned_range_data);
+ std::size_t memory = MemoryConsumption::memory_consumption(global_size);
+ memory += locally_owned_range_data.memory_consumption();
+ memory += MemoryConsumption::memory_consumption(local_range_data);
+ memory += ghost_indices_data.memory_consumption();
+ memory += sizeof(n_ghost_indices_data);
memory += MemoryConsumption::memory_consumption(ghost_targets_data);
- memory += MemoryConsumption::memory_consumption(import_targets_data);
memory += MemoryConsumption::memory_consumption(import_indices_data);
+ memory += sizeof(import_indices_plain_dev) +
+ sizeof(*import_indices_plain_dev.begin()) *
+ import_indices_plain_dev.capacity();
+ memory += MemoryConsumption::memory_consumption(n_import_indices_data);
+ memory += MemoryConsumption::memory_consumption(import_targets_data);
memory += MemoryConsumption::memory_consumption(
import_indices_chunks_by_rank_data);
+ memory +=
+ MemoryConsumption::memory_consumption(n_ghost_indices_in_larger_set);
memory += MemoryConsumption::memory_consumption(
ghost_indices_subset_chunks_by_rank_data);
memory +=
MemoryConsumption::memory_consumption(ghost_indices_subset_data);
- memory += MemoryConsumption::memory_consumption(ghost_indices_data);
+ memory += MemoryConsumption::memory_consumption(my_pid);
+ memory += MemoryConsumption::memory_consumption(n_procs);
+ memory += MemoryConsumption::memory_consumption(communicator);
+ memory += MemoryConsumption::memory_consumption(have_ghost_indices);
return memory;
}
std::size_t
NumberCache<1>::memory_consumption() const
{
- return (MemoryConsumption::memory_consumption(n_levels) +
- MemoryConsumption::memory_consumption(n_lines) +
- MemoryConsumption::memory_consumption(n_lines_level) +
- MemoryConsumption::memory_consumption(n_active_lines) +
- MemoryConsumption::memory_consumption(n_active_lines_level));
+ std::size_t mem =
+ MemoryConsumption::memory_consumption(n_levels) +
+ MemoryConsumption::memory_consumption(n_lines) +
+ MemoryConsumption::memory_consumption(n_lines_level) +
+ MemoryConsumption::memory_consumption(n_active_lines) +
+ MemoryConsumption::memory_consumption(n_active_lines_level);
+
+ if (active_cell_index_partitioner)
+ mem += active_cell_index_partitioner->memory_consumption();
+
+ for (const auto &partitioner : level_cell_index_partitioners)
+ if (partitioner)
+ mem += partitioner->memory_consumption();
+
+ return mem;
}
Triangulation<dim, spacedim>::memory_consumption() const
{
std::size_t mem = 0;
+ mem += sizeof(MeshSmoothing);
+ mem += MemoryConsumption::memory_consumption(reference_cells);
+ mem += MemoryConsumption::memory_consumption(periodic_face_pairs_level_0);
mem += MemoryConsumption::memory_consumption(levels);
for (const auto &level : levels)
mem += MemoryConsumption::memory_consumption(*level);
return MemoryConsumption::memory_consumption(lines);
if (dim == 3)
return (MemoryConsumption::memory_consumption(quads) +
+ MemoryConsumption::memory_consumption(quads_line_orientations) +
+ MemoryConsumption::memory_consumption(quad_reference_cell) +
MemoryConsumption::memory_consumption(lines));
return 0;
std::size_t
TriaLevel::memory_consumption() const
{
- 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) +
- MemoryConsumption::memory_consumption(parents) +
- MemoryConsumption::memory_consumption(direction_flags) +
- MemoryConsumption::memory_consumption(cells));
+ return (
+ MemoryConsumption::memory_consumption(refine_flags) +
+ MemoryConsumption::memory_consumption(coarsen_flags) +
+ MemoryConsumption::memory_consumption(active_cell_indices) +
+ MemoryConsumption::memory_consumption(global_active_cell_indices) +
+ MemoryConsumption::memory_consumption(global_level_cell_indices) +
+ MemoryConsumption::memory_consumption(neighbors) +
+ MemoryConsumption::memory_consumption(subdomain_ids) +
+ MemoryConsumption::memory_consumption(level_subdomain_ids) +
+ MemoryConsumption::memory_consumption(parents) +
+ MemoryConsumption::memory_consumption(direction_flags) +
+ MemoryConsumption::memory_consumption(cells) +
+ MemoryConsumption::memory_consumption(face_orientations) +
+ MemoryConsumption::memory_consumption(reference_cell) +
+ MemoryConsumption::memory_consumption(cell_vertex_indices_cache));
}
} // namespace TriangulationImplementation
} // namespace internal