]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
ProductMatrix moved to matrix_lib.h
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 18 Jul 2002 12:36:50 +0000 (12:36 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 18 Jul 2002 12:36:50 +0000 (12:36 +0000)
git-svn-id: https://svn.dealii.org/trunk@6261 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/pointer_matrix.h

index 2f95805ae0d7947bcec120270f5a5ad3a6e79d4a..5eddb1e271e6755e16065dd71abaca2bdb421131 100644 (file)
@@ -121,71 +121,6 @@ private:
 };
 
 
-/**
- * Poor man's matrix product. Stores two matrices $m_1$ and $m_2$ and
- * implements matrix-vector multiplications for the product $m_1 m_2$
- * by performing multiplication with both factors consecutively.
- *
- * @author Guido Kanschat, 2000, 2001, 2002
- */
-template<class MATRIX1, class MATRIX2, class VECTOR>
-class ProductMatrix : public PointerMatrixBase<VECTOR>
-{
-  public:
-                                  /**
-                                   * Constructor.  Additionally to
-                                   * the two constituting matrices, a
-                                   * memory pool for the auxiliary
-                                   * vector must be provided.
-                                   */
-  ProductMatrix(const MATRIX1& m1,
-               const MATRIX2& m2,
-               VectorMemory<VECTOR>& mem);
-  
-                                  /**
-                                   * Matrix-vector product.
-                                   */
-  virtual void vmult (VECTOR& dst,
-                     const VECTOR& src) const;
-  
-                                  /**
-                                   * Tranposed matrix-vector product.
-                                   */
-  virtual void Tvmult (VECTOR& dst,
-                      const VECTOR& src) const;
-  
-                                  /**
-                                   * Matrix-vector product, adding to
-                                   * @p{dst}.
-                                   */
-  virtual void vmult_add (VECTOR& dst,
-                         const VECTOR& src) const;
-  
-                                  /**
-                                   * Tranposed matrix-vector product,
-                                   * adding to @p{dst}.
-                                   */
-  virtual void Tvmult_add (VECTOR& dst,
-                          const VECTOR& src) const;
-  
-  private:
-                                  /**
-                                   * The left matrix of the product.
-                                   */
-  SmartPointer<const MATRIX1> m1;
-
-                                  /**
-                                   * The right matrix of the product.
-                                   */
-  SmartPointer<const MATRIX2> m2;
-
-                                  /**
-                                   * Memory for auxiliary vector.
-                                   */
-  SmartPointer<VectorMemory<VECTOR> > mem;
-};
-
-
 //----------------------------------------------------------------------//
 
 template<class VECTOR>
@@ -248,71 +183,5 @@ PointerMatrix<MATRIX, VECTOR>::Tvmult_add (VECTOR& dst,
 }
 
 
-//----------------------------------------------------------------------//
-
-template<class MATRIX1, class MATRIX2, class VECTOR>
-ProductMatrix<MATRIX1, MATRIX2, VECTOR>::ProductMatrix (
-  const MATRIX1& mat1,
-  const MATRIX2& mat2,
-  VectorMemory<VECTOR>& m)
-  : m1(&mat1),
-    m2(&mat2),
-    mem(&m)
-{}
-
-
-template<class MATRIX1, class MATRIX2, class VECTOR>
-void
-ProductMatrix<MATRIX1, MATRIX2, VECTOR>::vmult (VECTOR& dst,
-                                     const VECTOR& src) const
-{
-  VECTOR* v = mem->alloc();
-  v->reinit(dst);
-  m2->vmult (*v, src);
-  m1->vmult (dst, *v);
-  mem->free(v);
-}
-
-
-template<class MATRIX1, class MATRIX2, class VECTOR>
-void
-ProductMatrix<MATRIX1, MATRIX2, VECTOR>::vmult_add (VECTOR& dst,
-                                         const VECTOR& src) const
-{
-  VECTOR* v = mem->alloc();
-  v->reinit(dst);
-  m2->vmult (*v, src);
-  m1->vmult_add (dst, *v);
-  mem->free(v);
-}
-
-
-template<class MATRIX1, class MATRIX2, class VECTOR>
-void
-ProductMatrix<MATRIX1, MATRIX2, VECTOR>::Tvmult (
-  VECTOR& dst,
-  const VECTOR& src) const
-{
-  VECTOR* v = mem->alloc();
-  v->reinit(dst);
-  m1->Tvmult (*v, src);
-  m2->Tvmult (dst, *v);
-  mem->free(v);
-}
-
-
-template<class MATRIX1, class MATRIX2, class VECTOR>
-void
-ProductMatrix<MATRIX1, MATRIX2, VECTOR>::Tvmult_add (
-  VECTOR& dst,
-  const VECTOR& src) const
-{
-  VECTOR* v = mem->alloc();
-  v->reinit(dst);
-  m1->Tvmult (*v, src);
-  m2->Tvmult_add (dst, *v);
-  mem->free(v);
-}
-
 
 #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.