From 12af058725e0af949819db4a2fda435d9b8bb6f5 Mon Sep 17 00:00:00 2001 From: brian Date: Thu, 22 May 2003 15:13:39 +0000 Subject: [PATCH] added empty() function git-svn-id: https://svn.dealii.org/trunk@7669 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/pointer_matrix.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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, -- 2.39.5