From: Peter Munch Date: Tue, 16 Nov 2021 19:31:14 +0000 (+0100) Subject: ConstraintKinds: implement memory_consumption() X-Git-Tag: v9.4.0-rc1~827^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F12959%2Fhead;p=dealii.git ConstraintKinds: implement memory_consumption() --- 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);