Skip to main content
`Ctrl`+`K`

# MatMultTransposeAdd

Computes \(v3 = v2 + A^T * v1\).

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatMultTransposeAdd(Mat mat, Vec v1, Vec v2, Vec v3)

Neighbor-wise Collective

## Input Parameters

- mat - the matrix

- v1 - the vector to be multiplied by the transpose of the matrix

- v2 - the vector to be added to the result

## Output Parameter

- v3 - the result

## Note

The vectors `v1` and `v3` cannot be the same. I.e., one cannot call `MatMultTransposeAdd`(A,v1,v2,v1).

## See Also

Matrices, `Mat`, `MatMultTranspose()`, `MatMultAdd()`, `MatMult()`

## Level

beginner

## Location

src/mat/interface/matrix.c

## Examples

src/mat/tutorials/ex2.c

## Implementations

MatMultTransposeAdd_MPIAIJ() in src/mat/impls/aij/mpi/mpiaij.c
MatMultTransposeAdd_SeqAIJ() in src/mat/impls/aij/seq/aij.c
MatMultTransposeAdd_SeqAIJMKL() in src/mat/impls/aij/seq/aijmkl/aijmkl.c
MatMultTransposeAdd_SeqAIJSELL() in src/mat/impls/aij/seq/aijsell/aijsell.c
MatMultTransposeAdd_SeqAIJKokkos() in src/mat/impls/aij/seq/kokkos/aijkok.kokkos.cxx
MatMultTransposeAdd_SeqAIJCUSPARSE() in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
MatMultTransposeAdd_SeqAIJHIPSPARSE() in src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.cxx
MatMultTransposeAdd_MPIBAIJ() in src/mat/impls/baij/mpi/mpibaij.c
MatMultTransposeAdd_SeqBAIJ() in src/mat/impls/baij/seq/baij2.c
MatMultTransposeAdd_BlockMat() in src/mat/impls/blockmat/seq/blockmat.c
MatMultTransposeAdd_MPIDense() in src/mat/impls/dense/mpi/mpidense.c
MatMultTransposeAdd_SeqDense() in src/mat/impls/dense/seq/dense.c
MatMultTransposeAdd_Elemental() in src/mat/impls/elemental/matelem.cxx
MatMultTransposeAdd_H2OPUS() in src/mat/impls/h2opus/cuda/math2opus.cu
MatMultTransposeAdd_HYPRE() in src/mat/impls/hypre/mhypre.c
MatMultTransposeAdd_IS() in src/mat/impls/is/matis.c
MatMultTransposeAdd_Nest() in src/mat/impls/nest/matnest.c
MatMultTransposeAdd_ScaLAPACK() in src/mat/impls/scalapack/matscalapack.c
MatMultTransposeAdd_Scatter() in src/mat/impls/scatter/mscatter.c
MatMultTransposeAdd_MPISELL() in src/mat/impls/sell/mpi/mpisell.c
MatMultTransposeAdd_SeqSELL() in src/mat/impls/sell/seq/sell.c
MatMultTransposeAdd_Shell() in src/mat/impls/shell/shell.c
MatMultTransposeAdd_SubMatrix() in src/mat/impls/submat/submat.c

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