MatSetUp#

Sets up the internal matrix data structures for later use.

Synopsis#

#include "petscmat.h" 
PetscErrorCode MatSetUp(Mat A)

Collective

Input Parameter#

  • A - the matrix

Notes#

If the user has not set preallocation for this matrix then an efficient algorithm will be used for the first round of setting values in the matrix.

This routine is called internally by other matrix functions when needed so rarely needs to be called by users

See Also#

Matrices, Mat, MatMult(), MatCreate(), MatDestroy(), MatXAIJSetPreallocation()

Level#

intermediate

Location#

src/mat/interface/matrix.c

Examples#

src/tao/constrained/tutorials/ex1.c
src/tao/pde_constrained/tutorials/elliptic.c
src/tao/leastsquares/tutorials/tomography.c
src/snes/tutorials/ex22.c
src/snes/tutorials/ex1.c
src/snes/tutorials/ex42.c
src/snes/tutorials/ex99.c
src/snes/tutorials/ex73f90t.F90
src/tao/tutorials/ex4.c
src/tao/constrained/tutorials/tomographyADMM.c

Implementations#

MatSetUp_HYPREStruct() in src/dm/impls/da/hypre/mhyp.c
MatSetUp_HYPRESStruct() in src/dm/impls/da/hypre/mhyp.c
MatSetUp_MPIDense() in src/mat/impls/dense/mpi/mpidense.c
MatSetUp_SeqDense() in src/mat/impls/dense/seq/dense.c
MatSetUp_Diagonal() in src/mat/impls/diagonal/diagonal.c
MatSetUp_Elemental() in src/mat/impls/elemental/matelem.cxx
MatSetUp_HYPRE() in src/mat/impls/hypre/mhypre.c
MatSetUp_IS() in src/mat/impls/is/matis.c
MatSetUp_KAIJ() in src/mat/impls/kaij/kaij.c
MatSetUp_LRC() in src/mat/impls/lrc/lrc.c
MatSetUp_MAIJ() in src/mat/impls/maij/maij.c
MatSetUp_Preallocator() in src/mat/impls/preallocator/matpreallocator.c
MatSetUp_ScaLAPACK() in src/mat/impls/scalapack/matscalapack.c
MatSetUp_MPISELL() in src/mat/impls/sell/mpi/mpisell.c
MatSetUp_SeqSELL() in src/mat/impls/sell/seq/sell.c


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