From e8b658eb9738e7b77ea925af286224f335dc8eb9 Mon Sep 17 00:00:00 2001 From: guido Date: Tue, 3 May 2005 07:45:28 +0000 Subject: [PATCH] allow for change of matrices in ProductMatrix git-svn-id: https://svn.dealii.org/trunk@10615 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/matrix_lib.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/deal.II/lac/include/lac/matrix_lib.h b/deal.II/lac/include/lac/matrix_lib.h index 5dbe026c3e..501f6f243e 100644 --- a/deal.II/lac/include/lac/matrix_lib.h +++ b/deal.II/lac/include/lac/matrix_lib.h @@ -52,7 +52,13 @@ class ProductMatrix : public PointerMatrixBase ProductMatrix(const MATRIX1& m1, const MATRIX2& m2, VectorMemory& mem); - + + /** + * Change the matrices. + */ + template + void reinit(const MATRIX1& m1, const MATRIX2& m2); + /** * Destructor. */ @@ -302,6 +308,20 @@ ProductMatrix::ProductMatrix ( } +template +template +void +ProductMatrix::reinit ( + const MATRIX1& mat1, + const MATRIX2& mat2) +{ + delete m1; + delete m2; + m1 = new PointerMatrix(&mat1); + m2 = new PointerMatrix(&mat2); +} + + template ProductMatrix::~ProductMatrix () { -- 2.39.5