*/
MatrixBase &operator /= (const PetscScalar factor);
+
+ /**
+ * Add the matrix @p other scaled by the factor @p factor to the current
+ * matrix.
+ */
+ MatrixBase &add (const PetscScalar factor,
+ const MatrixBase &other);
+
+
/**
* Add the matrix @p other scaled by the factor @p factor to the current
* matrix.
+ * @deprecated Use the function with order of arguments reversed instead.
*/
MatrixBase &add (const MatrixBase &other,
- const PetscScalar factor);
+ const PetscScalar factor) DEAL_II_DEPRECATED;
/**
* Matrix-vector multiplication: let <i>dst = M*src</i> with <i>M</i>
MatrixBase &
- MatrixBase::add (const MatrixBase &other,
- const PetscScalar factor)
+ MatrixBase::add (const PetscScalar factor,
+ const MatrixBase &other)
{
const int ierr = MatAXPY (matrix, factor,
other, DIFFERENT_NONZERO_PATTERN);
}
+
+ MatrixBase &
+ MatrixBase::add (const MatrixBase &other,
+ const PetscScalar factor)
+ {
+ return add(factor, other);
+ }
+
+
void
MatrixBase::vmult (VectorBase &dst,
const VectorBase &src) const