]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
empty function added
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 6 Jan 2003 09:06:01 +0000 (09:06 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 6 Jan 2003 09:06:01 +0000 (09:06 +0000)
git-svn-id: https://svn.dealii.org/trunk@6865 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/multigrid/multigrid.h
deal.II/lac/include/lac/precondition_block.h

index a83843198416a9bc43c607fe3db2070905f9fc5e..50b49f8a0df371769cf334c8fdcd3988331a290d 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -255,6 +255,11 @@ class PreconditionMG : public Subscriptor
     PreconditionMG(const MGDoFHandler<dim>&     mg_dof,
                   Multigrid<VECTOR>&           mg,
                   const TRANSFER& transfer);
+
+                                    /**
+                                     * Dummy function needed by other classes.
+                                     */
+    bool empty () const;
     
                                     /**
                                      * Preconditioning operator.
@@ -370,6 +375,12 @@ PreconditionMG<dim, VECTOR, TRANSFER>
   transfer(&transfer)
 {}
 
+template<int dim, class VECTOR, class TRANSFER>
+bool
+PreconditionMG<dim, VECTOR, TRANSFER>::empty () const
+{
+  return false;
+}
 
 template<int dim, class VECTOR, class TRANSFER>
 void
index f5af2a83e2a185221c1c3b5965adf58397c57290..5181683551121bce408f55b3d9b6f45053bba506 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 1998, 1999, 2000, 2001, 2002 by the deal.II authors
+//    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -122,6 +122,11 @@ class PreconditionBlock : public virtual Subscriptor
                                      */
     void clear();
 
+                                    /**
+                                     * Checks whether the object is empty.
+                                     */
+    bool empty () const;
+
                                     /**
                                      * Use only the inverse of the
                                      * first diagonal block to save
@@ -321,6 +326,11 @@ class PreconditionBlockJacobi : public virtual Subscriptor,
                                      */
     PreconditionBlock<MATRIX, inverse_type>::clear;
 
+                                    /**
+                                     * Make function of base class public again.
+                                     */
+    PreconditionBlock<MATRIX, inverse_type>::empty;
+
                                     /**
                                      * Make function of base class public again.
                                      */
@@ -418,6 +428,11 @@ class PreconditionBlockSOR : public virtual Subscriptor,
                                      */
     PreconditionBlock<MATRIX, inverse_type>::clear;
 
+                                    /**
+                                     * Make function of base class public again.
+                                     */
+    PreconditionBlock<MATRIX, inverse_type>::empty;
+
                                     /**
                                      * Make function of base class public again.
                                      */
@@ -502,6 +517,11 @@ class PreconditionBlockSSOR : public virtual Subscriptor,
                                      */
     PreconditionBlockSOR<MATRIX,inverse_type>::clear;
 
+                                    /**
+                                     * Make function of base class public again.
+                                     */
+    PreconditionBlock<MATRIX, inverse_type>::empty;
+
                                     /**
                                      * Make function of base class public again.
                                      */
@@ -534,5 +554,15 @@ class PreconditionBlockSSOR : public virtual Subscriptor,
     void Tvmult (Vector<number2>&, const Vector<number2>&) const;
 };
 
+//----------------------------------------------------------------------//
+
+template<class MATRIX, typename inverse_type>
+bool
+PreconditionBlock<MATRIX, inverse_type>::empty () const
+{
+  if (A == 0)
+    return true;
+  return A->empty();
+}
 
 #endif

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.