From: Peter Munch Date: Thu, 4 Aug 2022 06:54:08 +0000 (+0200) Subject: Implement TensorProductMatrixSymmetricSumBase::memory_consumption() X-Git-Tag: v9.5.0-rc1~1052^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17882cf86f5ac747511314b70a2ea4c95b7c7db6;p=dealii.git Implement TensorProductMatrixSymmetricSumBase::memory_consumption() --- diff --git a/include/deal.II/lac/tensor_product_matrix.h b/include/deal.II/lac/tensor_product_matrix.h index 17d965128c..55206de235 100644 --- a/include/deal.II/lac/tensor_product_matrix.h +++ b/include/deal.II/lac/tensor_product_matrix.h @@ -121,6 +121,12 @@ public: apply_inverse(const ArrayView & dst, const ArrayView &src) const; + /** + * Return the memory consumption of the allocated memory in this class. + */ + std::size_t + memory_consumption() const; + protected: /** * Default constructor. @@ -624,6 +630,21 @@ TensorProductMatrixSymmetricSumBase::apply_inverse( } + +template +std::size_t +TensorProductMatrixSymmetricSumBase:: + memory_consumption() const +{ + return MemoryConsumption::memory_consumption(mass_matrix) + + MemoryConsumption::memory_consumption(derivative_matrix) + + MemoryConsumption::memory_consumption(eigenvalues) + + MemoryConsumption::memory_consumption(eigenvectors) + + MemoryConsumption::memory_consumption(tmp_array); +} + + + //---------------------- TensorProductMatrixSymmetricSum ---------------------- template