From: Benjamin Brands Date: Tue, 6 Feb 2018 15:41:17 +0000 (+0100) Subject: add ScaLAPACKMatrix.copy_transposed() X-Git-Tag: v9.0.0-rc1~416^2~4 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a41381fe8b9248242b10a3639ee4e0e096baf0a;p=dealii.git add ScaLAPACKMatrix.copy_transposed() --- diff --git a/include/deal.II/lac/scalapack.h b/include/deal.II/lac/scalapack.h index 9f701bfbc7..934b2fea7b 100644 --- a/include/deal.II/lac/scalapack.h +++ b/include/deal.II/lac/scalapack.h @@ -191,6 +191,14 @@ public: const std::pair &submatrix_size) const; /** + * Transposing assignment: A = BT + * + * The matrices A and B must have the same process grid + * + * Following alignment conditions have to be fulfilled: MB_A = NB_B and NB_A = MB_B + */ + void copy_transposed(const ScaLAPACKMatrix &B); + /** * Matrix-addition: * diff --git a/source/lac/scalapack.cc b/source/lac/scalapack.cc index e815bc1911..be2cd3391f 100644 --- a/source/lac/scalapack.cc +++ b/source/lac/scalapack.cc @@ -441,6 +441,10 @@ ScaLAPACKMatrix::copy_to (ScaLAPACKMatrix &dest) const template +void ScaLAPACKMatrix::copy_transposed(const ScaLAPACKMatrix &B) +{ + add(B,0,1,true); +}