From: wolf Date: Tue, 22 Jun 2004 16:10:35 +0000 (+0000) Subject: Fix a few things that did not work when instantiating X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaefed49f069c96dd56e59ef8ed7de8432129401;p=dealii-svn.git Fix a few things that did not work when instantiating vmult(Vector,Vector) and similar functions. git-svn-id: https://svn.dealii.org/trunk@9452 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/lac/include/lac/sparse_matrix.templates.h b/deal.II/lac/include/lac/sparse_matrix.templates.h index d7a3648b93..b732c9dc7a 100644 --- a/deal.II/lac/include/lac/sparse_matrix.templates.h +++ b/deal.II/lac/include/lac/sparse_matrix.templates.h @@ -14,6 +14,7 @@ #define __deal2__sparse_matrix_templates_h +#include #include #include #include @@ -79,7 +80,8 @@ SparseMatrix::operator = (const SparseMatrix &m) template -SparseMatrix::SparseMatrix (const SparsityPattern &c) : +SparseMatrix::SparseMatrix (const SparsityPattern &c) + : cols(0), val(0), max_len(0) @@ -295,7 +297,7 @@ SparseMatrix::vmult (OutVector& dst, Assert(m() == dst.size(), ExcDimensionMismatch(m(),dst.size())); Assert(n() == src.size(), ExcDimensionMismatch(n(),src.size())); - Assert (&src != &dst, ExcSourceEqualsDestination()); + Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination()); const unsigned int n_rows = m(); @@ -328,7 +330,7 @@ SparseMatrix::vmult (OutVector& dst, const unsigned int) const; const mem_fun_p comp = (&SparseMatrix:: - template threaded_vmult); + template threaded_vmult); Threads::ThreadGroup<> threads; for (unsigned int i=0; i::Tvmult (OutVector& dst, Assert(n() == dst.size(), ExcDimensionMismatch(n(),dst.size())); Assert(m() == src.size(), ExcDimensionMismatch(m(),src.size())); - Assert (&src != &dst, ExcSourceEqualsDestination()); + Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination()); dst = 0; @@ -420,7 +422,7 @@ SparseMatrix::vmult_add (OutVector& dst, Assert(m() == dst.size(), ExcDimensionMismatch(m(),dst.size())); Assert(n() == src.size(), ExcDimensionMismatch(n(),src.size())); - Assert (&src != &dst, ExcSourceEqualsDestination()); + Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination()); const unsigned int n_rows = m(); const number *val_ptr = &val[cols->rowstart[0]]; @@ -448,7 +450,7 @@ SparseMatrix::Tvmult_add (OutVector& dst, Assert(n() == dst.size(), ExcDimensionMismatch(n(),dst.size())); Assert(m() == src.size(), ExcDimensionMismatch(m(),src.size())); - Assert (&src != &dst, ExcSourceEqualsDestination()); + Assert (!PointerComparison::equal(&src, &dst), ExcSourceEqualsDestination()); for (unsigned int i=0;irowstart[i]; jrowstart[i+1] ;j++)