petsc-3.8.4 2018-03-24
Report Typos and Errors

MatTranspose

Computes an in-place or out-of-place transpose of a matrix.

Synopsis

#include "petscmat.h" 
PetscErrorCode MatTranspose(Mat mat,MatReuse reuse,Mat *B)
Collective on Mat

Input Parameter

mat - the matrix to transpose
reuse - either MAT_INITIAL_MATRIX, MAT_REUSE_MATRIX, or MAT_INPLACE_MATRIX

Output Parameters

B -the transpose

Notes

If you use MAT_INPLACE_MATRIX then you must pass in &mat for B

MAT_REUSE_MATRIX causes the B matrix from a previous call to this function with MAT_INITIAL_MATRIX to be used

Consider using MatCreateTranspose() instead if you only need a matrix that behaves like the transpose, but don't need the storage to be changed.

See Also

MatMultTranspose(), MatMultTransposeAdd(), MatIsTranspose(), MatReuse

Level:intermediate
Location:
src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ksp/ksp/examples/tutorials/ex10.c.html
src/ksp/ksp/examples/tutorials/ex65.c.html
src/snes/examples/tutorials/ex70.c.html
src/tao/pde_constrained/examples/tutorials/parabolic.c.html
src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html