On 04/04/11 19:51, Johan Hake wrote: > Hello! > > I would very much like to have something like: > > // Set the diagonal of a matrix > GenericMatrix::set_diagonal(const GenericVector& vec); > > // Scale Matrix with a diagonal matrix (represented as a Vector) > GenericMatrix::scale(const GenericVector& vec); > (maybe use operator*=) > > added to the GenericMatrix interface. > > The corresponding backend specific methods would be: > > // PETSc > MatDiagonalSet > MatDiagonalScale > > // Epetra > ReplaceDiagonalValues > RightScale > > // MTL4/uBLAS find out later... > > which should ensure the methods works in parallel too. > > Any objections or advices in respect to implement these? >
Fine with me, but could GenericMatrix::scale have a better name? It's not clear to me what it would do. Scale the diagonal, or scale the rows or the columns? Garth > Best regards, > > Johan > > _______________________________________________ > Mailing list: https://launchpad.net/~dolfin > Post to : dolfin@lists.launchpad.net > Unsubscribe : https://launchpad.net/~dolfin > More help : https://help.launchpad.net/ListHelp _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp