]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Cleanup: Use LinearOperator instead of PointerMatrix
authorMatthias Maier <tamiko@43-1.org>
Thu, 13 Jul 2017 17:56:56 +0000 (12:56 -0500)
committerMatthias Maier <tamiko@43-1.org>
Thu, 13 Jul 2017 19:43:04 +0000 (14:43 -0500)
include/deal.II/multigrid/mg_block_smoother.h

index efaa62ae799783d163f0374b66e04b461252f637..1a9c1ceb569f6b59fe47d98f1f9734e6f375e531 100644 (file)
 
 
 #include <deal.II/base/config.h>
+#include <deal.II/base/mg_level_object.h>
 #include <deal.II/base/smartpointer.h>
-#include <deal.II/lac/pointer_matrix.h>
-#include <deal.II/lac/vector_memory.h>
 #include <deal.II/lac/block_vector.h>
+#include <deal.II/lac/linear_operator.h>
+#include <deal.II/lac/vector_memory.h>
 #include <deal.II/multigrid/mg_smoother.h>
-#include <deal.II/base/mg_level_object.h>
 #include <vector>
 
 DEAL_II_NAMESPACE_OPEN
@@ -114,12 +114,12 @@ private:
   /**
    * Pointer to the matrices.
    */
-  MGLevelObject<PointerMatrix<MatrixType, BlockVector<number> > > matrices;
+  MGLevelObject<LinearOperator<BlockVector<number> > > matrices;
 
   /**
    * Pointer to the matrices.
    */
-  MGLevelObject<PointerMatrix<RelaxationType, BlockVector<number> > > smoothers;
+  MGLevelObject<LinearOperator<BlockVector<number> > > smoothers;
 
   /**
    * Reverse?
@@ -174,8 +174,8 @@ MGSmootherBlock<MatrixType, RelaxationType, number>::clear ()
                max_level=matrices.max_level();
   for (; i<=max_level; ++i)
     {
-      smoothers[i] = nullptr;
-      matrices[i] = nullptr;
+      smoothers[i] = LinearOperator<BlockVector<number> >();
+      matrices[i] = LinearOperator<BlockVector<number> >();
     }
 }
 
@@ -194,8 +194,8 @@ MGSmootherBlock<MatrixType, RelaxationType, number>::initialize (const MGMatrixT
 
   for (unsigned int i=min; i<=max; ++i)
     {
-      matrices[i] = &m[i];
-      smoothers[i] = &s[i];
+      matrices[i] = linear_operator<BlockVector<number> >(m[i]);
+      smoothers[i] = linear_operator<BlockVector<number> >(s[i]);
     }
 }
 

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.