MatMult#

Computes the matrix-vector product, \(y = Ax\).

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatMult(Mat mat, Vec x, Vec y)

Neighbor-wise Collective

Input Parameters#

  • mat - the matrix

  • x - the vector to be multiplied

Output Parameter#

  • y - the result

Note#

The vectors x and y cannot be the same. I.e., one cannot call MatMult(A,y,y).

See Also#

Matrices, Mat, MatMultTranspose(), MatMultAdd(), MatMultTransposeAdd()

Level#

beginner

Location#

src/mat/interface/matrix.c

Examples#

src/ksp/ksp/tutorials/ex15.c
src/ksp/ksp/tutorials/ex1.c
src/ksp/ksp/tutorials/ex11.c
src/ksp/ksp/tutorials/ex12.c
src/ksp/ksp/tutorials/ex16.c
src/ksp/ksp/tutorials/ex18.c
src/ksp/ksp/tutorials/ex100.c
src/ksp/ksp/tutorials/bench_kspsolve.c
src/ksp/ksp/tutorials/ex19.c

Implementations#

MatMult_HYPREStruct() in src/dm/impls/da/hypre/mhyp.c
MatMult_HYPRESStruct() in src/dm/impls/da/hypre/mhyp.c
MatMult_SeqUSFFT() in src/dm/impls/da/usfft/matusfft.c
MatMult_AAt() in src/ksp/pc/impls/h2opus/pch2opus.c
MatMult_MAmI() in src/ksp/pc/impls/h2opus/pch2opus.c
MatMult_Hyper() in src/ksp/pc/impls/h2opus/pch2opus.c
MatMult_NS() in src/ksp/pc/impls/h2opus/pch2opus.c
MatMult_Schur() in src/ksp/pc/impls/hpddm/pchpddm.cxx
MatMult_SchurCorrection() in src/ksp/pc/impls/hpddm/pchpddm.cxx
MatMult_Harmonic() in src/ksp/pc/impls/hpddm/pchpddm.cxx
MatMult_ML() in src/ksp/pc/impls/ml/ml.c
MatMult_MPIAIJKokkos() in src/mat/impls/aij/mpi/kokkos/mpiaijkok.kokkos.cxx
MatMult_MPIAIJ() in src/mat/impls/aij/mpi/mpiaij.c
MatMult_MPIAIJCUSPARSE() in src/mat/impls/aij/mpi/mpicusparse/mpiaijcusparse.cu
MatMult_MPIAIJHIPSPARSE() in src/mat/impls/aij/mpi/mpihipsparse/mpiaijhipsparse.hip.c
MatMult_SeqAIJ() in src/mat/impls/aij/seq/aij.c
MatMult_SeqAIJMKL() in src/mat/impls/aij/seq/aijmkl/aijmkl.c
MatMult_SeqAIJPERM() in src/mat/impls/aij/seq/aijperm/aijperm.c
MatMult_SeqAIJSELL() in src/mat/impls/aij/seq/aijsell/aijsell.c
MatMult_AIJCRL() in src/mat/impls/aij/seq/crl/crl.c
MatMult_SeqAIJKokkos() in src/mat/impls/aij/seq/kokkos/aijkok.kokkos.cxx
MatMult_SeqAIJCUSPARSE() in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
MatMult_SeqAIJHIPSPARSE() in src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.c
MatMult_SeqAIJViennaCL() in src/mat/impls/aij/seq/seqviennacl/aijviennacl.cxx
MatMult_MPIBAIJ() in src/mat/impls/baij/mpi/mpibaij.c
MatMult_BlockMat() in src/mat/impls/blockmat/seq/blockmat.c
MatMult_ConstantDiagonal() in src/mat/impls/cdiagonal/cdiagonal.c
MatMult_Centering() in src/mat/impls/centering/centering.c
MatMult_Composite() in src/mat/impls/composite/mcomposite.c
MatMult_SeqCUFFT() in src/mat/impls/cufft/cufft.cu
MatMult_MPIDense() in src/mat/impls/dense/mpi/mpidense.c
MatMult_SeqDense() in src/mat/impls/dense/seq/dense.c
MatMult_Diagonal() in src/mat/impls/diagonal/diagonal.c
MatMult_Elemental() in src/mat/impls/elemental/matelem.cxx
MatMult_SeqFFTW() in src/mat/impls/fft/fftw/fftw.c
MatMult_MPIFFTW() in src/mat/impls/fft/fftw/fftw.c
MatMult_H2OPUS() in src/mat/impls/h2opus/cuda/math2opus.cu
MatMult_Htool() in src/mat/impls/htool/htool.cxx
MatMult_HYPRE() in src/mat/impls/hypre/mhypre.c
MatMult_IS() in src/mat/impls/is/matis.c
MatMult_SeqKAIJ() in src/mat/impls/kaij/kaij.c
MatMult_MPIKAIJ() in src/mat/impls/kaij/kaij.c
MatMult_LRC() in src/mat/impls/lrc/lrc.c
MatMult_MFFD() in src/mat/impls/mffd/mffd.c
MatMult_Nest() in src/mat/impls/nest/matnest.c
MatMult_Normal() in src/mat/impls/normal/normm.c
MatMult_NormalHermitian() in src/mat/impls/normal/normmh.c
MatMult_MPISBAIJ() in src/mat/impls/sbaij/mpi/mpisbaij.c
MatMult_ScaLAPACK() in src/mat/impls/scalapack/matscalapack.c
MatMult_Scatter() in src/mat/impls/scatter/mscatter.c
MatMult_MPISELLCUDA() in src/mat/impls/sell/mpi/mpicuda/mpisellcuda.cu
MatMult_MPISELL() in src/mat/impls/sell/mpi/mpisell.c
MatMult_SeqSELL() in src/mat/impls/sell/seq/sell.c
MatMult_SeqSELLCUDA() in src/mat/impls/sell/seq/seqcuda/sellcuda.cu
MatMult_Shell() in src/mat/impls/shell/shell.c
MatMult_CF() in src/mat/impls/shell/shellcnv.c
MatMult_SubMatrix() in src/mat/impls/submat/submat.c
MatMult_HT() in src/mat/impls/transpose/htransm.c
MatMult_Transpose() in src/mat/impls/transpose/transm.c


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