[Dune] [#396] please add "BCRSMatrix += Scalar" operator

Dune dune at dune-project.org
Mon May 19 19:15:06 CEST 2008


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

A new Flyspray task has been opened.  Details are below. 

User who did this - Jö Fahlke (joe) 

Attached to Project - Dune
Summary - please add "BCRSMatrix += Scalar" operator
Task Type - Bug Report
Category - ISTL
Status - New
Assigned To - 
Operating System - Unspecified / All
Severity - Low
Priority - Normal
Reported Version - SVN
Due in Version - Undecided
Due Date - Undecided
Details - The operator should add unity times the scalar to the matrix. For example adding the unit matrix to matrix A then becomes "A += 1". I currently use the follwing implementation:

  template<typename B, typename A>
  BCRSMatrix<B, A> &
  operator+=(BCRSMatrix<B, A> &M, typename B::field_type scalar)
  {
    assert(M.N() == M.M());
    for(int i = 0; i < M.N(); ++i)
      M[i][i] += scalar;
    return M;
  }

(This uses operator+=(FieldMatrix, Scalar) from http://www.dune-project.org/flyspray/index.php?do=details&task_id=395 indirectly)

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=396

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list