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/ts/tutorials/ex5.c
src/ts/tutorials/ex36.c
src/ts/tutorials/ex44.c
src/ts/tutorials/ex16fwd.c
src/ts/tutorials/ex40.c
src/ts/tutorials/ex20td.c
src/ts/tutorials/ex21.c
src/ts/tutorials/ex36A.c
src/ts/tutorials/ex20opt_ic.c
src/ts/tutorials/ex43.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