From f043283a7be4fac6e36d110c14b654118fed106d Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Mon, 7 Nov 2016 12:48:37 +0100 Subject: [PATCH] Correct LinearAlgebra::distributed::BlockVector::memory_consumption() --- include/deal.II/lac/la_parallel_block_vector.templates.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/deal.II/lac/la_parallel_block_vector.templates.h b/include/deal.II/lac/la_parallel_block_vector.templates.h index a36c5d4cf4..d2d02ad1d7 100644 --- a/include/deal.II/lac/la_parallel_block_vector.templates.h +++ b/include/deal.II/lac/la_parallel_block_vector.templates.h @@ -759,11 +759,9 @@ namespace LinearAlgebra std::size_t BlockVector::memory_consumption () const { - std::size_t mem = sizeof(this->n_blocks()); - for (size_type i=0; icomponents.size(); ++i) - mem += MemoryConsumption::memory_consumption (this->components[i]); - mem += MemoryConsumption::memory_consumption (this->block_indices); - return mem; + return (MemoryConsumption::memory_consumption (this->block_indices) + + + MemoryConsumption::memory_consumption (this->components)); } } // end of namespace distributed -- 2.39.5