From: prill Date: Fri, 25 Jan 2008 20:24:39 +0000 (+0000) Subject: Added (empty) memory_consumption routines to petsc_vector_base, block_vector_base. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb80a5cbcfa58f255a5acb0d554fe2a86e25c667;p=dealii-svn.git Added (empty) memory_consumption routines to petsc_vector_base, block_vector_base. git-svn-id: https://svn.dealii.org/trunk@15687 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/block_vector_base.h b/deal.II/lac/include/lac/block_vector_base.h index f7c030a784..516d0c18e5 100644 --- a/deal.II/lac/include/lac/block_vector_base.h +++ b/deal.II/lac/include/lac/block_vector_base.h @@ -999,6 +999,13 @@ class BlockVectorBase : public Subscriptor */ void equ (const value_type a, const BlockVectorBase& V, const value_type b, const BlockVectorBase& W); + + /** + * Estimate for the memory + * consumption (not implemented + * for this class). + */ + unsigned int memory_consumption () const; protected: /** @@ -2072,6 +2079,16 @@ void BlockVectorBase::equ (const value_type a, } + +template +unsigned int BlockVectorBase::memory_consumption () const +{ + AssertThrow(false, ExcNotImplemented() ); + return 0; +} + + + template template void BlockVectorBase::equ (const value_type a, diff --git a/deal.II/lac/include/lac/petsc_vector_base.h b/deal.II/lac/include/lac/petsc_vector_base.h index be949df8c7..41cea4e9c6 100644 --- a/deal.II/lac/include/lac/petsc_vector_base.h +++ b/deal.II/lac/include/lac/petsc_vector_base.h @@ -633,6 +633,13 @@ namespace PETScWrappers * vector. */ operator const Vec & () const; + + /** + * Estimate for the memory + * consumption (not implemented + * for this class). + */ + unsigned int memory_consumption () const; protected: /** diff --git a/deal.II/lac/source/petsc_vector_base.cc b/deal.II/lac/source/petsc_vector_base.cc index 816ce19eda..748809f287 100644 --- a/deal.II/lac/source/petsc_vector_base.cc +++ b/deal.II/lac/source/petsc_vector_base.cc @@ -849,6 +849,15 @@ namespace PETScWrappers + unsigned int + VectorBase::memory_consumption () const + { + AssertThrow(false, ExcNotImplemented() ); + return 0; + } + + + void VectorBase::do_set_add_operation (const std::vector &indices, const std::vector &values,