From: brian Date: Thu, 22 May 2003 15:13:39 +0000 (+0000) Subject: added empty() function X-Git-Tag: v8.0.0~16509 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e09fa8313522e9eb3410f9c158d40a51a2f70502;p=dealii.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,