From: brian Date: Thu, 22 May 2003 15:13:39 +0000 (+0000) Subject: added empty() function X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=12af058725e0af949819db4a2fda435d9b8bb6f5;p=dealii-svn.git added empty() function git-svn-id: https://svn.dealii.org/trunk@7669 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/pointer_matrix.h b/deal.II/lac/include/lac/pointer_matrix.h index 2d8b5eb42c..e659c9082c 100644 --- a/deal.II/lac/include/lac/pointer_matrix.h +++ b/deal.II/lac/include/lac/pointer_matrix.h @@ -95,6 +95,12 @@ public: */ PointerMatrix (const MATRIX* M=0); + /** + * Return whether the object is + * empty. + */ + bool empty () const; + /** * Assign a new matrix * pointer. Deletes the old pointer @@ -159,6 +165,16 @@ PointerMatrix::operator= (const MATRIX* M) return *this; } + +template +inline bool +PointerMatrix::empty () const +{ + if (m == 0) + return true; + return m->empty(); +} + template inline void PointerMatrix::vmult (VECTOR& dst,