* this matrix.
*/
template <class BlockMatrixType>
+ void add (const value_type factor,
+ const BlockMatrixType &matrix);
+
+
+ /**
+ * @deprecated Add
+ * <tt>matrix</tt> scaled by
+ * <tt>factor</tt> to this
+ * matrix, i.e. the matrix
+ * <tt>factor*matrix</tt> is
+ * added to <tt>this</tt>.
+ *
+ * This function is
+ * deprecated. Use <tt>add</tt>
+ * instead, since this has the
+ * same interface as the other
+ * matrix and vector classes in
+ * the library.
+ */
+ template <class BlockMatrixType>
void add_scaled (const value_type factor,
const BlockMatrixType &matrix);
-
+
/**
* Adding Matrix-vector
* multiplication. Add $M*src$ on
{
for (unsigned int r=0; r<n_block_rows(); ++r)
for (unsigned int c=0; c<n_block_cols(); ++c)
- block(r,c).add_scaled (factor, matrix.block(r,c));
+ block(r,c).add (factor, matrix.block(r,c));
}
*/
FullMatrix & operator /= (const double factor);
- /**
- * Add <tt>matrix</tt> scaled by
- * <tt>factor</tt> to this matrix,
- * i.e. the matrix <tt>factor*matrix</tt>
- * is added to <tt>this</tt>.
+ /**
+ * Weighted addition. The matrix
+ * <tt>s*B</tt> is added to <tt>this</tt>.
*
* The source matrix may be a full matrix
* over an arbitrary underlying scalar
* convertible to the data type of this
* matrix.
*/
- template <typename somenumber>
- void add_scaled (const number factor,
- const FullMatrix<somenumber> &matrix);
-
- /**
- * Weighted addition. The matrix
- * <tt>s*B</tt> is added to <tt>this</tt>.
- *
- * This function is deprecated. Use
- * <tt>add_scaled</tt> instead, since
- * this has the same interface as the
- * other matrix classes in the library.
- */
template<typename number2>
void add (const number s,
const FullMatrix<number2> &B);
+ /**
+ * @deprecated Weighted
+ * addition. The matrix
+ * <tt>s*B</tt> is added to
+ * <tt>this</tt>.
+ *
+ * This function is
+ * deprecated. Use <tt>add</tt>
+ * instead, since this has the
+ * same interface as the other
+ * matrix and vector classes in
+ * the library.
+ */
+ template <typename somenumber>
+ void add_scaled (const number factor,
+ const FullMatrix<somenumber> &matrix);
+
/**
* Add rectangular block.
*
// $Id$
// Version: $Name$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
template <typename number>
template <typename number2>
void
-FullMatrix<number>::add_scaled (const number s,
- const FullMatrix<number2> &src)
+FullMatrix<number>::add (const number s,
+ const FullMatrix<number2> &src)
{
Assert (!this->empty(), ExcEmptyMatrix());
template <typename number>
template <typename number2>
void
-FullMatrix<number>::add (const number s,
- const FullMatrix<number2> &src)
+FullMatrix<number>::add_scaled (const number s,
+ const FullMatrix<number2> &src)
{
- // this function is deprecated. forward to
- // the other one
- add_scaled (s, src);
+ // this function is
+ // deprecated. forward to the other
+ // one
+ add (s, src);
}
* this matrix.
*/
template <typename somenumber>
+ void add (const number factor,
+ const SparseMatrix<somenumber> &matrix);
+
+ /**
+ * @deprecated Add
+ * <tt>matrix</tt> scaled by
+ * <tt>factor</tt> to this
+ * matrix, i.e. the matrix
+ * <tt>factor*matrix</tt> is
+ * added to <tt>this</tt>.
+ *
+ * This function is
+ * deprecated. Use <tt>add</tt>
+ * instead, since this has the
+ * same interface as the other
+ * matrix and vector classes in
+ * the library.
+ */
+ template <typename somenumber>
void add_scaled (const number factor,
const SparseMatrix<somenumber> &matrix);
// $Id$
// Version: $Name$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
template <typename number>
template <typename somenumber>
void
-SparseMatrix<number>::add_scaled (const number factor,
- const SparseMatrix<somenumber> &matrix)
+SparseMatrix<number>::add (const number factor,
+ const SparseMatrix<somenumber> &matrix)
{
Assert (cols != 0, ExcNotInitialized());
Assert (val != 0, ExcNotInitialized());
}
+template <typename number>
+template <typename somenumber>
+void
+SparseMatrix<number>::add_scaled (const number factor,
+ const SparseMatrix<somenumber> &matrix)
+{
+ add(factor, matrix);
+}
+
+
template <typename number>
template <class OutVector, class InVector>
void
// $Id$
// Version: $Name$
//
-// Copyright (C) 2002, 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 2002, 2003, 2004, 2005, 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
* standard @p const_iterator.
*/
template <class MATRIX>
+ void add (const number factor,
+ const MATRIX &matrix);
+
+ /**
+ * @deprecated Add @p matrix
+ * scaled by @p factor to this
+ * matrix.
+ *
+ * This function is
+ * deprecated. Use <tt>add</tt>
+ * instead, since this has the
+ * same interface as the other
+ * matrix and vector classes in
+ * the library.
+ */
+ template <class MATRIX>
void add_scaled (const number factor,
const MATRIX &matrix);
template <class MATRIX>
inline
void
-SparseMatrixEZ<number>::add_scaled (const number factor,
- const MATRIX& M)
+SparseMatrixEZ<number>::add (const number factor,
+ const MATRIX& M)
{
Assert (M.m() == m(), ExcDimensionMismatch(M.m(), m()));
Assert (M.n() == n(), ExcDimensionMismatch(M.n(), n()));
}
+template<typename number>
+template <class MATRIX>
+inline
+void
+SparseMatrixEZ<number>::add_scaled (const number factor,
+ const MATRIX& M)
+{
+ add (factor, M);
+}
+
+
template<typename number>
template <class MATRIXA, class MATRIXB>
inline void
// $Id$
// Version: $Name$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
template void FullMatrix<TYPEMAT>::fill<TYPEMAT2> (
const FullMatrix<TYPEMAT2>&, unsigned, unsigned, unsigned, unsigned);
template void FullMatrix<TYPEMAT>::add<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
+template void FullMatrix<TYPEMAT>::add_scaled<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
template void FullMatrix<TYPEMAT>::add<TYPEMAT2> (
const FullMatrix<TYPEMAT2>&, double, unsigned, unsigned, unsigned, unsigned);
-template void FullMatrix<TYPEMAT>::add_scaled<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
template void FullMatrix<TYPEMAT>::Tadd<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
template void FullMatrix<TYPEMAT>::Tadd<TYPEMAT2> (
const FullMatrix<TYPEMAT2>&, double, unsigned, unsigned, unsigned, unsigned);
// $Id$
// Version: $Name$
//
-// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 by the deal.II authors
+// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
template void FullMatrix<TYPEMAT>::fill<TYPEMAT2> (
const FullMatrix<TYPEMAT2>&, unsigned, unsigned, unsigned, unsigned);
template void FullMatrix<TYPEMAT>::add<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
+template void FullMatrix<TYPEMAT>::add_scaled<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
template void FullMatrix<TYPEMAT>::add<TYPEMAT2> (
const FullMatrix<TYPEMAT2>&, double, unsigned, unsigned, unsigned, unsigned);
-template void FullMatrix<TYPEMAT>::add_scaled<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
template void FullMatrix<TYPEMAT>::Tadd<TYPEMAT2> (const TYPEMAT, const FullMatrix<TYPEMAT2>&);
template void FullMatrix<TYPEMAT>::Tadd<TYPEMAT2> (
const FullMatrix<TYPEMAT2>&, double, unsigned, unsigned, unsigned, unsigned);