From: Martin Kronbichler Date: Fri, 1 Nov 2024 18:47:48 +0000 (+0100) Subject: MatrixFree: Fix DoFInfo::memory_consumption X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F17825%2Fhead;p=dealii.git MatrixFree: Fix DoFInfo::memory_consumption --- diff --git a/source/matrix_free/dof_info.cc b/source/matrix_free/dof_info.cc index 4804548a36..91bbfcdfaa 100644 --- a/source/matrix_free/dof_info.cc +++ b/source/matrix_free/dof_info.cc @@ -1527,15 +1527,45 @@ namespace internal DoFInfo::memory_consumption() const { std::size_t memory = sizeof(*this); + for (const auto &storage : index_storage_variants) + memory += storage.capacity() * sizeof(storage[0]); memory += (row_starts.capacity() * sizeof(std::pair)); memory += MemoryConsumption::memory_consumption(dof_indices); + memory += MemoryConsumption::memory_consumption(dof_indices_interleaved); + memory += MemoryConsumption::memory_consumption(dof_indices_contiguous); + memory += + MemoryConsumption::memory_consumption(dof_indices_contiguous_sm); + memory += + MemoryConsumption::memory_consumption(dof_indices_interleave_strides); + memory += + MemoryConsumption::memory_consumption(n_vectorization_lanes_filled); + memory += MemoryConsumption::memory_consumption( + hanging_node_constraint_masks_comp); memory += MemoryConsumption::memory_consumption(hanging_node_constraint_masks); + memory += MemoryConsumption::memory_consumption(constrained_dofs); memory += MemoryConsumption::memory_consumption(row_starts_plain_indices); memory += MemoryConsumption::memory_consumption(plain_dof_indices); memory += MemoryConsumption::memory_consumption(constraint_indicator); memory += MemoryConsumption::memory_consumption(*vector_partitioner); + memory += MemoryConsumption::memory_consumption(n_components); + memory += MemoryConsumption::memory_consumption(start_components); + memory += MemoryConsumption::memory_consumption(component_to_base_index); + memory += + MemoryConsumption::memory_consumption(component_dof_indices_offset); + memory += MemoryConsumption::memory_consumption(dofs_per_cell); + memory += MemoryConsumption::memory_consumption(dofs_per_face); + memory += MemoryConsumption::memory_consumption(cell_active_fe_index); + memory += MemoryConsumption::memory_consumption(fe_index_conversion); + memory += + MemoryConsumption::memory_consumption(vector_zero_range_list_index); + memory += MemoryConsumption::memory_consumption(vector_zero_range_list); + memory += MemoryConsumption::memory_consumption(cell_loop_pre_list_index); + memory += MemoryConsumption::memory_consumption(cell_loop_pre_list); + memory += + MemoryConsumption::memory_consumption(cell_loop_post_list_index); + memory += MemoryConsumption::memory_consumption(cell_loop_post_list); return memory; } } // namespace MatrixFreeFunctions