petsc-3.14.6 2021-03-30
Report Typos and Errors

MatScale

Scales all elements of a matrix by a given number.

Synopsis

#include "petscmat.h" 
PetscErrorCode MatScale(Mat mat,PetscScalar a)
Logically Collective on Mat

Input Parameters

mat - the matrix to be scaled
a - the scaling value

Output Parameter

mat - the scaled matrix

See Also

MatDiagonalScale()

Level

intermediate

Location

src/mat/interface/matrix.c

Examples

src/mat/tutorials/ex8.c.html
src/ksp/ksp/tutorials/ex56.c.html
src/ksp/ksp/tutorials/ex59.c.html
src/snes/tutorials/ex70.c.html
src/ts/tutorials/ex3.c.html
src/ts/tutorials/ex50.c.html
src/tao/unconstrained/tutorials/eptorsion2.c.html
src/tao/constrained/tutorials/tomographyADMM.c.html
src/tao/pde_constrained/tutorials/elliptic.c.html
src/tao/pde_constrained/tutorials/parabolic.c.html
src/tao/pde_constrained/tutorials/hyperbolic.c.html

Implementations

MatScale_MPIAIJ in src/mat/impls/aij/mpi/mpiaij.c
MatScale_SeqAIJ in src/mat/impls/aij/seq/aij.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_SeqDenseCUDA in src/mat/impls/dense/seq/cuda/densecuda.cu
MatScale_SeqDense in src/mat/impls/dense/seq/dense.c
MatScale_Elemental in src/mat/impls/elemental/matelem.cxx
MatScale_HARA in src/mat/impls/hara/mathara.cu
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_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