MatScale#
Scales all elements of a matrix by a given number.
Synopsis#
#include "petscmat.h"
PetscErrorCode MatScale(Mat mat, PetscScalar a)
Logically Collective
Input Parameters#
mat - the matrix to be scaled
a - the scaling value
See Also#
Level#
intermediate
Location#
Examples#
src/mat/tutorials/ex8.c
src/tao/pde_constrained/tutorials/hyperbolic.c
src/tao/constrained/tutorials/tomographyADMM.c
src/snes/tutorials/ex70.c
src/tao/pde_constrained/tutorials/elliptic.c
src/snes/tutorials/ex16.c
src/ksp/ksp/tutorials/ex56.c
src/ksp/ksp/tutorials/ex59.c
src/tao/unconstrained/tutorials/burgers_spectral.c
src/tao/pde_constrained/tutorials/parabolic.c
Implementations#
MatScale_MPIAIJ() in src/mat/impls/aij/mpi/mpiaij.c
MatScale_SeqAIJ() in src/mat/impls/aij/seq/aij.c
MatScale_SeqAIJKokkos() in src/mat/impls/aij/seq/kokkos/aijkok.kokkos.cxx
MatScale_SeqAIJCUSPARSE() in src/mat/impls/aij/seq/seqcusparse/aijcusparse.cu
MatScale_SeqAIJHIPSPARSE() in src/mat/impls/aij/seq/seqhipsparse/aijhipsparse.hip.c
MatScale_MPIBAIJ() in src/mat/impls/baij/mpi/mpibaij.c
MatScale_SeqBAIJ() in src/mat/impls/baij/seq/baij2.c
MatScale_SeqBAIJMKL() in src/mat/impls/baij/seq/baijmkl/baijmkl.c
MatScale_ConstantDiagonal() in src/mat/impls/cdiagonal/cdiagonal.c
MatScale_Composite() in src/mat/impls/composite/mcomposite.c
MatScale_MPIDense() in src/mat/impls/dense/mpi/mmdense.c
MatScale_SeqDense() in src/mat/impls/dense/seq/dense.c
MatScale_Diagonal() in src/mat/impls/diagonal/diagonal.c
MatScale_Elemental() in src/mat/impls/elemental/matelem.cxx
MatScale_H2OPUS() in src/mat/impls/h2opus/cuda/math2opus.cu
MatScale_Htool() in src/mat/impls/htool/htool.cxx
MatScale_HYPRE() in src/mat/impls/hypre/mhypre.c
MatScale_IS() in src/mat/impls/is/matis.c
MatScale_Nest() in src/mat/impls/nest/matnest.c
MatScale_Normal() in src/mat/impls/normal/normm.c
MatScale_NormalHermitian() in src/mat/impls/normal/normmh.c
MatScale_MPISBAIJ() in src/mat/impls/sbaij/mpi/mpisbaij.c
MatScale_SeqSBAIJ() in src/mat/impls/sbaij/seq/sbaij2.c
MatScale_ScaLAPACK() in src/mat/impls/scalapack/matscalapack.c
MatScale_MPISELL() in src/mat/impls/sell/mpi/mpisell.c
MatScale_SeqSELL() in src/mat/impls/sell/seq/sell.c
MatScale_Shell() in src/mat/impls/shell/shell.c
MatScale_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