petsc-3.10.5 2019-03-28
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

Examples

src/ksp/ksp/examples/tutorials/ex43.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

Implementations

MatTranspose_MPIAIJ in src/mat/impls/aij/mpi/mpiaij.c
MatTranspose_SeqAIJ in src/mat/impls/aij/seq/aij.c
MatTranspose_SeqAIJ_FAST in src/mat/impls/aij/seq/symtranspose.c
MatTranspose_MPIBAIJ in src/mat/impls/baij/mpi/mpibaij.c
MatTranspose_SeqBAIJ in src/mat/impls/baij/seq/baij.c
MatTranspose_MPIDense in src/mat/impls/dense/mpi/mpidense.c
MatTranspose_SeqDense in src/mat/impls/dense/seq/dense.c
MatTranspose_Elemental in src/mat/impls/elemental/matelem.cxx
MatTranspose_IS in src/mat/impls/is/matis.c
MatTranspose_Nest in src/mat/impls/nest/matnest.c
MatTranspose_MPISBAIJ in src/mat/impls/sbaij/mpi/mpisbaij.c
MatTranspose_SeqSBAIJ in src/mat/impls/sbaij/seq/sbaij.c

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages