petsc-3.7.3 2016-08-01
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 or MAT_REUSE_MATRIX

Output Parameters

B -the transpose

Notes

If you pass in &mat for B the transpose will be done in place, for example MatTranspose(mat,MAT_REUSE_MATRIX,&mat);

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/snes/examples/tutorials/ex70.c.html
src/tao/pde_constrained/examples/tutorials/parabolic.c.html
src/tao/pde_constrained/examples/tutorials/hyperbolic.c.html