PETSc version 3.16.0
Matrices Mat: :
Examples
PETSc matrices (Mat objects) are used to store Jacobians and other sparse matrices in PDE-based (or other) simulations.
Beginner - Basic usage
MATAIJ
MATSOLVERSSTRUMPACK
MatMumpsGetInverse
MATAIJCRL
MATSOLVERSUPERLU
MatMumpsGetInverseTranspose
MATAIJCUSPARSE
MATSOLVERSUPERLU_DIST
MatMumpsGetRinfo
MATAIJMKL
MATSOLVERUMFPACK
MatMumpsGetRinfog
MATAIJPERM
Mat
MatMumpsSetCntl
MATAIJSELL
MatAssemblyBegin
MatMumpsSetIcntl
MATAIJVIENNACL
MatAssemblyEnd
MatOption
MATBAIJ
MatAssemblyType
MatOrderingType
MATBAIJMKL
MatColoring
MatPartitioning
MATDENSE
MatColoringType
MatPartitioningType
MATDENSECUDA
MatComputeBandwidth
MatProductAlgorithm
MATELEMENTAL
MatCreate
MatProductType
MATH2OPUS
MatCreateSubMatrixOption
MatPropagateSymmetryOptions
MATHTOOL
MatDestroy
MatResetPreallocation
MATMPIADJ
MatDuplicateOption
MatReuse
MATMPIAIJ
MatFDColoring
MatSORType
MATMPIAIJCUSPARSE
MatFactorError
MatSTRUMPACKSetColPerm
MATMPIBAIJ
MatFactorShiftType
MatSTRUMPACKSetHSSAbsTol
MATMPIDENSE
MatFactorType
MatSTRUMPACKSetHSSLeafSize
MATMPIDENSECUDA
MatGetLocalSize
MatSTRUMPACKSetHSSMaxRank
MATMPISBAIJ
MatGetOwnershipRange
MatSTRUMPACKSetHSSMinSepSize
MATMPISELL
MatGetOwnershipRanges
MatSTRUMPACKSetHSSRelTol
MATSBAIJ
MatGetOwnershipRangesColumn
MatSTRUMPACKSetReordering
MATSCALAPACK
MatGetSize
MatSetFromOptions
MATSELL
MatHasCongruentLayouts
MatSetPreallocationCOO
MATSEQAIJ
MatHtoolClusteringType
MatSetSizes
MATSEQAIJCUSPARSE
MatHtoolCompressorType
MatSetStencil
MATSEQAIJVIENNACL
MatInfoType
MatSetUp
MATSEQBAIJ
MatLoad
MatSetValue
MATSEQDENSE
MatMFFDType
MatSetValues
MATSEQDENSECUDA
MatMkl_PardisoSetCntl
MatSetValuesBlockedStencil
MATSEQSBAIJ
MatMult
MatSetValuesCOO
MATSOLVERCHOLMOD
MatMultAdd
MatSetValuesStencil
MATSOLVERCUSPARSE
MatMultConstrained
MatSolverType
MATSOLVERESSL
MatMultHermitianTranspose
MatStencil
MATSOLVERKLU
MatMultHermitianTransposeAdd
MatStructure
MATSOLVERLUSOL
MatMultTranspose
MatSuperluSetILUDropTol
MATSOLVERMATLAB
MatMultTransposeAdd
MatTransposeColoring
MATSOLVERMKL_PARDISO
MatMultTransposeConstrained
MatType
MATSOLVERMUMPS
MatMumpsGetCntl
MatView
MATSOLVERPASTIX
MatMumpsGetIcntl
MatXAIJSetPreallocation
MATSOLVERSPARSEELEMENTAL
MatMumpsGetInfo
MATSOLVERSPQR
MatMumpsGetInfog
Intermediate - Setting options for algorithms and data structures
MATHYPRE
MatDiagonalSet
MatPreallocateSymmetricSetLocalBlock
MATMFFD_DS
MatDuplicate
MatProductClear
MATMFFD_WP
MatEqual
MatProductCreate
MATNEST
MatFDColoringSetValues
MatProductCreateWithMat
MATSOLVERBAS
MatFactorGetSolverType
MatProductNumeric
MatAXPY
MatFindNonzeroRows
MatProductReplaceMats
MatAYPX
MatFindZeroRows
MatProductSetAlgorithm
MatBindToCPU
MatGetBlockSize
MatProductSetFill
MatBlockMatSetPreallocation
MatGetBlockSizes
MatProductSetFromOptions
MatBoundToCPU
MatGetColumnMeans
MatProductSetType
MatCUSPARSEFormatOperation
MatGetColumnMeansImaginaryPart
MatProductSymbolic
MatCUSPARSESetFormat
MatGetColumnMeansRealPart
MatProductView
MatCUSPARSEStorageFormat
MatGetColumnNorms
MatPtAP
MatChop
MatGetColumnSums
MatPtAPMultEqual
MatColoringWeightType
MatGetColumnSumsImaginaryPart
MatPythonCreate
MatConvert
MatGetColumnSumsRealPart
MatPythonSetType
MatCopy
MatGetDiagonal
MatRARt
MatCreateAIJ
MatGetFactor
MatRARtMultEqual
MatCreateAIJCUSPARSE
MatGetFactorAvailable
MatReorderForNonzeroDiagonal
MatCreateAIJViennaCL
MatGetFactorType
MatRestoreLocalSubMatrix
MatCreateBAIJ
MatGetInfo
MatRestrict
MatCreateBAIJMKL
MatGetLocalSubMatrix
MatSTRUMPACKReordering
MatCreateBlockMat
MatGetNonzeroState
MatScaLAPACKGetBlockSizes
MatCreateCentering
MatGetOption
MatScaLAPACKSetBlockSizes
MatCreateDense
MatGetOwnershipIS
MatScale
MatCreateDenseCUDA
MatGetRowMax
MatScatterGetVecScatter
MatCreateFFT
MatGetRowMaxAbs
MatSeqAIJGetArray
MatCreateH2OpusFromMat
MatGetRowMin
MatSeqAIJGetArrayRead
MatCreateHermitianTranspose
MatGetRowMinAbs
MatSeqAIJGetMaxRowNonzeros
MatCreateHtoolFromKernel
MatGetRowSum
MatSeqAIJKron
MatCreateLRC
MatGetSeqNonzeroStructure
MatSeqAIJRestoreArray
MatCreateMPIAIJCRL
MatGetType
MatSeqAIJRestoreArrayRead
MatCreateMPIAIJMKL
MatGetVariableBlockSizes
MatSeqAIJSetPreallocation
MatCreateMPIAIJPERM
MatGetVecType
MatSeqAIJSetType
MatCreateMPIAIJSELL
MatH2OpusGetIndexMap
MatSeqBAIJGetArray
MatCreateMPIAIJWithArrays
MatH2OpusOrthogonalize
MatSeqBAIJRestoreArray
MatCreateMPIAdj
MatHYPRESetPreallocation
MatSeqBAIJSetPreallocation
MatCreateMPIBAIJWithArrays
MatHermitianTranspose
MatSeqDenseSetPreallocation
MatCreateMPISBAIJWithArrays
MatHermitianTransposeGetMat
MatSeqSBAIJGetArray
MatCreateNormal
MatISSetPreallocation
MatSeqSBAIJRestoreArray
MatCreateNormalHermitian
MatInfo
MatSeqSBAIJSetPreallocation
MatCreateSBAIJ
MatInterpolate
MatSeqSELLRestoreArray
MatCreateSELL
MatInterpolateAdd
MatSeqSELLSetPreallocation
MatCreateScaLAPACK
MatIsHermitian
MatSetBlockSize
MatCreateScatter
MatIsHermitianTranspose
MatSetBlockSizes
MatCreateSeqAIJ
MatIsLinear
MatSetFactorType
MatCreateSeqAIJCRL
MatIsStructurallySymmetric
MatSetLocalToGlobalMapping
MatCreateSeqAIJCUSPARSE
MatIsSymmetric
MatSetOption
MatCreateSeqAIJFromTriple
MatIsTranspose
MatSetRandom
MatCreateSeqAIJMKL
MatLRCGetMats
MatSetType
MatCreateSeqAIJPERM
MatMPIAIJGetSeqAIJ
MatSetValuesBlocked
MatCreateSeqAIJSELL
MatMPIAIJSetPreallocation
MatSetValuesBlockedLocal
MatCreateSeqAIJViennaCL
MatMPIAdjSetPreallocation
MatSetValuesLocal
MatCreateSeqAIJWithArrays
MatMPIAdjToSeq
MatSetValuesRowLocal
MatCreateSeqBAIJ
MatMPIBAIJSetPreallocation
MatSetVariableBlockSizes
MatCreateSeqBAIJMKL
MatMPIDenseSetPreallocation
MatSetVecType
MatCreateSeqCUFFT
MatMPISBAIJSetPreallocation
MatShift
MatCreateSeqDense
MatMPISELLSetPreallocation
MatSolveTypeGet
MatCreateSeqDenseCUDA
MatMatInterpolate
MatSolverTypeRegister
MatCreateSeqSBAIJ
MatMatInterpolateAdd
MatStashSetInitialSize
MatCreateSeqSELL
MatMatMatMult
MatTranspose
MatCreateTranspose
MatMatMult
MatTransposeColoringCreate
MatDenseGetArray
MatMatMultEqual
MatTransposeColoringDestroy
MatDenseGetArrayRead
MatMatRestrict
MatTransposeGetMat
MatDenseGetArrayWrite
MatMatTransposeMult
MatTransposeMatMult
MatDenseGetColumn
MatMatTransposeMultEqual
MatTransposeMatMultEqual
MatDenseGetColumnVec
MatMkl_CPardisoSetCntl
MatUpdateMPIAIJWithArrays
MatDenseGetColumnVecRead
MatMultAddEqual
MatViewFromOptions
MatDenseGetColumnVecWrite
MatMultEqual
MatZeroEntries
MatDenseGetLDA
MatMultTransposeAddEqual
MatZeroRows
MatDenseGetLocalMatrix
MatMultTransposeEqual
MatZeroRowsColumns
MatDenseGetSubMatrix
MatNorm
MatZeroRowsColumnsIS
MatDenseRestoreArray
MatNormalGetMat
MatZeroRowsColumnsLocal
MatDenseRestoreArrayRead
MatNormalHermitianGetMat
MatZeroRowsColumnsLocalIS
MatDenseRestoreArrayWrite
MatPreallocateFinalize
MatZeroRowsColumnsStencil
MatDenseRestoreColumn
MatPreallocateInitialize
MatZeroRowsIS
MatDenseRestoreColumnVec
MatPreallocateLocation
MatZeroRowsLocal
MatDenseRestoreColumnVecRead
MatPreallocateSet
MatZeroRowsLocalIS
MatDenseRestoreColumnVecWrite
MatPreallocateSetLocal
MatZeroRowsStencil
MatDenseRestoreSubMatrix
MatPreallocateSetLocalBlock
VecScatterFFTWToPetsc
MatDenseSetLDA
MatPreallocateSetLocalRemoveDups
VecScatterPetscToFFTW
MatDiagonalScale
MatPreallocateSymmetricSetBlock
Advanced - Setting more advanced options and customization
MATBLOCKMAT
MatGetGhosts
MatMPIAIJSetUseScalableIncreaseOverlap
MATCOMPOSITE
MatGetInertia
MatMPIBAIJSetHashTableFactor
MATIS
MatGetLayouts
MatMPIBAIJSetPreallocationCSR
MATKAIJ
MatGetLocalToGlobalMapping
MatMPIBAIJSetValuesBlocked
MATMAIJ
MatGetMultiProcBlock
MatMPISBAIJSetPreallocationCSR
MATMFFD
MatGetOptionsPrefix
MatMissingDiagonal
MATPREALLOCATOR
MatGetRow
MatNestGetISs
MATSCATTER
MatGetRowUpperTriangular
MatNestGetLocalISs
MATSHELL
MatGetTrace
MatNestSetSubMats
MatAppendOptionsPrefix
MatGetValues
MatNullSpace
MatAssembled
MatGetValuesLocal
MatNullSpaceCreate
MatCompositeAddMat
MatHasOperation
MatNullSpaceCreateRigidBody
MatCompositeGetMat
MatHtoolGetHierarchicalMat
MatNullSpaceDestroy
MatCompositeGetMatStructure
MatHtoolGetPermutationSource
MatNullSpaceRemove
MatCompositeGetNumberMat
MatHtoolGetPermutationTarget
MatNullSpaceSetFunction
MatCompositeGetType
MatHtoolSetKernel
MatNullSpaceTest
MatCompositeMerge
MatHtoolUsePermutation
MatNullSpaceView
MatCompositeSetMatStructure
MatISFixLocalEmpty
MatPermute
MatCompositeSetMergeType
MatISGetLocalMat
MatPreallocatorPreallocate
MatCompositeSetScalings
MatISRestoreLocalMat
MatRealPart
MatCompositeSetType
MatISSetLocalMat
MatRegister
MatComputeOperator
MatISSetLocalMatType
MatRegisterAll
MatComputeOperatorTranspose
MatISStoreL2L
MatRestoreRow
MatConjugate
MatImaginaryPart
MatRestoreRowUpperTriangular
MatCreateComposite
MatInodeGetInodeSizes
MatRetrieveValues
MatCreateConstantDiagonal
MatInvertBlockDiagonal
MatScatterSetVecScatter
MatCreateIS
MatInvertBlockDiagonalMat
MatSeqAIJGetArrayF90
MatCreateKAIJ
MatInvertVariableBlockDiagonal
MatSeqAIJRegister
MatCreateMAIJ
MatIsHermitianKnown
MatSeqAIJRegisterAll
MatCreateMFFD
MatIsSymmetricKnown
MatSeqAIJRestoreArrayF90
MatCreateMPIAIJSumSeqAIJ
MatKAIJGetAIJ
MatSeqAIJSetColumnIndices
MatCreateMPIAIJWithSeqAIJ
MatKAIJGetS
MatSeqAIJSetTotalPreallocation
MatCreateMPIAIJWithSplitArrays
MatKAIJGetSRead
MatSeqBAIJSetColumnIndices
MatCreateMPIMatConcatenateSeqMat
MatKAIJGetScaledIdentity
MatSeqBAIJSetPreallocationCSR
MatCreateNest
MatKAIJGetT
MatSeqSBAIJSetColumnIndices
MatCreateRedundantMatrix
MatKAIJGetTRead
MatSeqSBAIJSetPreallocationCSR
MatCreateSeqBAIJWithArrays
MatKAIJRestoreS
MatSetErrorIfFailure
MatCreateSeqSBAIJWithArrays
MatKAIJRestoreSRead
MatSetLayouts
MatCreateShell
MatKAIJRestoreT
MatSetNearNullSpace
MatCreateSubMatrices
MatKAIJRestoreTRead
MatSetNullSpace
MatCreateSubMatricesMPI
MatKAIJSetAIJ
MatSetOptionsPrefix
MatCreateSubMatrix
MatKAIJSetS
MatSetTransposeNullSpace
MatCreateVecs
MatKAIJSetT
MatSetValuesBatch
MatCreateVecsFFTW
MatMAIJGetAIJ
MatSetValuesRow
MatDenseGetArrayF90
MatMAIJRedimension
MatShellGetContext
MatDenseRestoreArrayF90
MatMFFDCheckPositivity
MatShellGetOperation
MatDestroyMatrices
MatMFFDDSSetUmin
MatShellSetContext
MatDestroySeqNonzeroStructure
MatMFFDGetH
MatShellSetManageScalingShifts
MatDestroySubMatrices
MatMFFDResetHHistory
MatShellSetMatProductOperation
MatFactorCreateSchurComplement
MatMFFDSetBase
MatShellSetOperation
MatFactorFactorizeSchurComplement
MatMFFDSetCheckh
MatShellSetVecType
MatFactorGetError
MatMFFDSetFunction
MatShellTestMult
MatFactorGetErrorZeroPivot
MatMFFDSetFunctionError
MatShellTestMultTranpose
MatFactorGetSchurComplement
MatMFFDSetFunctioni
MatStashGetInfo
MatFactorInvertSchurComplement
MatMFFDSetFunctioniBase
MatStoreValues
MatFactorRestoreSchurComplement
MatMFFDSetHHistory
MatSubdomainsCreateCoalesce
MatFactorSolveSchurComplement
MatMFFDSetOptionsPrefix
MatTransColoringApplyDenToSp
MatFactorSolveSchurComplementTranspose
MatMFFDSetPeriod
MatTransColoringApplySpToDen
MatGetColumnVector
MatMFFDSetType
MatGetDiagonalBlock
MatMFFDWPSetComputeNormU
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
MATDUMMY
MatGetColumnIJ
MatMatTransposeSolve
MatBackwardSolve
MatGetColumnReductions
MatMultDiagonalBlock
MatCheckCompressedRow
MatGetCommunicationStructs
MatNestGetSize
MatCholeskyFactor
MatGetNearNullSpace
MatNestGetSubMat
MatCholeskyFactorNumeric
MatGetNullSpace
MatNestGetSubMats
MatCholeskyFactorSymbolic
MatGetOperation
MatNestSetSubMat
MatColoringPatch
MatGetOwnershipRangeColumn
MatNestSetVecType
MatCreateLocalRef
MatGetRowIJ
MatNullSpaceGetVecs
MatCreateSubMatrixVirtual
MatGetTransposeNullSpace
MatQRFactor
MatDenseCUDAGetArray
MatICCFactor
MatQRFactorNumeric
MatDenseCUDAGetArrayRead
MatICCFactorSymbolic
MatQRFactorSymbolic
MatDenseCUDAGetArrayWrite
MatILUFactor
MatRegisterRootName
MatDenseCUDAPlaceArray
MatILUFactorSymbolic
MatResidual
MatDenseCUDAReplaceArray
MatISGetMPIXAIJ
MatRestoreColumnIJ
MatDenseCUDAResetArray
MatIncreaseOverlap
MatRestoreRowIJ
MatDenseCUDARestoreArray
MatIncreaseOverlapSplit
MatSOR
MatDenseCUDARestoreArrayRead
MatInitializePackage
MatSeqAIJCUSPARSEGetArray
MatDenseCUDARestoreArrayWrite
MatIsShell
MatSeqAIJCUSPARSEGetArrayRead
MatDensePlaceArray
MatLUFactor
MatSeqAIJCUSPARSEGetArrayWrite
MatDenseReplaceArray
MatLUFactorNumeric
MatSeqAIJCUSPARSEGetIJ
MatDenseResetArray
MatLUFactorSymbolic
MatSeqAIJCUSPARSERestoreArray
MatDiagonalScaleLocal
MatMFFD
MatSeqAIJCUSPARSERestoreArrayRead
MatFactorClearError
MatMFFDFinalizePackage
MatSeqAIJCUSPARSERestoreArrayWrite
MatFactorGetCanUseOrdering
MatMFFDInitializePackage
MatSeqAIJCUSPARSERestoreIJ
MatFactorGetPreferredOrdering
MatMFFDRegister
MatSeqAIJSetPreallocationCSR
MatFactorInfo
MatMFFDRegisterAll
MatSetBlockSizesFromMats
MatFactorInfoInitialize
MatMPIAIJGetLocalMat
MatSetOperation
MatFactorSetSchurIS
MatMPIAIJGetLocalMatCondensed
MatSetUnfactored
MatFinalizePackage
MatMPIAIJGetLocalMatMerge
MatSolve
MatFindOffBlockDiagonalEntries
MatMPIAIJSetPreallocationCSR
MatSolveAdd
MatFindZeroDiagonals
MatMPIAdjCreateNonemptySubcommMat
MatSolveTranspose
MatForwardSolve
MatMPISELLGetLocalMatCondensed
MatSolveTransposeAdd
MatGalerkin
MatMatSolve
MatSolves
MatGetBrowsOfAcols
MatMatSolveTranspose
MatSubMatrixVirtualUpdate
No deprecated routines
Table of Contents