From: Martin Kronbichler Date: Mon, 7 Nov 2016 11:48:37 +0000 (+0100) Subject: Correct LinearAlgebra::distributed::BlockVector::memory_consumption() X-Git-Tag: v8.5.0-rc1~436^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f043283a7be4fac6e36d110c14b654118fed106d;p=dealii.git Correct LinearAlgebra::distributed::BlockVector::memory_consumption() --- 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