From 3e09a9a6b936f2dde2ae90005aaabc3ecb5de1d4 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Tue, 16 Nov 2021 20:31:14 +0100 Subject: [PATCH] ConstraintKinds: implement memory_consumption() --- include/deal.II/matrix_free/hanging_nodes_internal.h | 11 +++++++++++ source/matrix_free/dof_info.cc | 2 ++ 2 files changed, 13 insertions(+) diff --git a/include/deal.II/matrix_free/hanging_nodes_internal.h b/include/deal.II/matrix_free/hanging_nodes_internal.h index a5e0a0b5a9..97263a1820 100644 --- a/include/deal.II/matrix_free/hanging_nodes_internal.h +++ b/include/deal.II/matrix_free/hanging_nodes_internal.h @@ -109,6 +109,17 @@ namespace internal + /** + * Return the memory consumption in bytes of this enum class. + */ + inline std::size_t + memory_consumption(const ConstraintKinds &) + { + return sizeof(ConstraintKinds); + } + + + /** * Global operator which returns an object in which all bits are set which * are either set in the first or the second argument. This operator exists diff --git a/source/matrix_free/dof_info.cc b/source/matrix_free/dof_info.cc index 7c249bd461..8e0eaf5a73 100644 --- a/source/matrix_free/dof_info.cc +++ b/source/matrix_free/dof_info.cc @@ -1478,6 +1478,8 @@ namespace internal memory += (row_starts.capacity() * sizeof(std::pair)); memory += MemoryConsumption::memory_consumption(dof_indices); + memory += + MemoryConsumption::memory_consumption(hanging_node_constraint_masks); memory += MemoryConsumption::memory_consumption(row_starts_plain_indices); memory += MemoryConsumption::memory_consumption(plain_dof_indices); memory += MemoryConsumption::memory_consumption(constraint_indicator); -- 2.39.5