#define __deal2__sparse_matrix_templates_h
+#include <base/template_constraints.h>
#include <lac/sparse_matrix.h>
#include <lac/vector.h>
#include <lac/full_matrix.h>
template <typename number>
-SparseMatrix<number>::SparseMatrix (const SparsityPattern &c) :
+SparseMatrix<number>::SparseMatrix (const SparsityPattern &c)
+ :
cols(0),
val(0),
max_len(0)
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 unsigned int) const;
const mem_fun_p comp
= (&SparseMatrix<number>::
- template threaded_vmult<InVector,OutVector>);
+ template threaded_vmult<OutVector,InVector>);
Threads::ThreadGroup<> threads;
for (unsigned int i=0; i<n_threads; ++i)
threads += Threads::spawn (*this, comp) (dst, src,
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;
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]];
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;i<m();i++)
for (unsigned int j=cols->rowstart[i]; j<cols->rowstart[i+1] ;j++)