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 MATSOLVERSUPERLU MatMumpsGetInverse
MATAIJCRL MATSOLVERSUPERLU_DIST MatMumpsGetInverseTranspose
MATAIJCUSPARSE MATSOLVERUMFPACK MatMumpsGetRinfo
MATAIJMKL Mat MatMumpsGetRinfog
MATAIJPERM MatAssemblyBegin MatMumpsSetCntl
MATAIJSELL MatAssemblyEnd MatMumpsSetIcntl
MATAIJVIENNACL MatAssemblyType MatOption
MATBAIJ MatColoring MatOrderingType
MATBAIJMKL MatColoringType MatPartitioning
MATDENSE MatComputeBandwidth MatPartitioningType
MATDENSECUDA MatCreate MatProductAlgorithm
MATELEMENTAL MatCreateSubMatrixOption MatProductType
MATHTOOL MatDestroy MatPropagateSymmetryOptions
MATMPIADJ MatDuplicateOption MatResetPreallocation
MATMPIAIJ MatFDColoring MatReuse
MATMPIBAIJ MatFactorError MatSORType
MATMPIDENSE MatFactorShiftType MatSTRUMPACKSetColPerm
MATMPIDENSECUDA MatFactorType MatSTRUMPACKSetHSSAbsTol
MATMPISBAIJ MatGetLocalSize MatSTRUMPACKSetHSSLeafSize
MATMPISELL MatGetOwnershipRange MatSTRUMPACKSetHSSMaxRank
MATSBAIJ MatGetOwnershipRanges MatSTRUMPACKSetHSSMinSepSize
MATSCALAPACK MatGetOwnershipRangesColumn MatSTRUMPACKSetHSSRelTol
MATSELL MatGetSize MatSTRUMPACKSetReordering
MATSEQAIJ MatHasCongruentLayouts MatSetFromOptions
MATSEQAIJCUSPARSE MatHtoolClusteringType MatSetPreallocationCOO
MATSEQAIJVIENNACL MatHtoolCompressorType MatSetSizes
MATSEQBAIJ MatInfoType MatSetStencil
MATSEQDENSE MatLoad MatSetUp
MATSEQDENSECUDA MatMFFDType MatSetValue
MATSEQSBAIJ MatMkl_PardisoSetCntl MatSetValues
MATSOLVERCHOLMOD MatMult MatSetValuesBlockedStencil
MATSOLVERCUSPARSE MatMultAdd MatSetValuesCOO
MATSOLVERESSL MatMultConstrained MatSetValuesStencil
MATSOLVERKLU MatMultHermitianTranspose MatSolverType
MATSOLVERLUSOL MatMultHermitianTransposeAdd MatStencil
MATSOLVERMATLAB MatMultTranspose MatStructure
MATSOLVERMKL_PARDISO MatMultTransposeAdd MatSuperluSetILUDropTol
MATSOLVERMUMPS MatMultTransposeConstrained MatTransposeColoring
MATSOLVERPASTIX MatMumpsGetCntl MatType
MATSOLVERSPARSEELEMENTAL MatMumpsGetIcntl MatView
MATSOLVERSPQR MatMumpsGetInfo MatXAIJSetPreallocation
MATSOLVERSSTRUMPACK MatMumpsGetInfog
Intermediate - Setting options for algorithms and data structures
MATHYPRE MatDenseSetLDA MatProductNumeric
MATMFFD_DS MatDiagonalScale MatProductReplaceMats
MATMFFD_WP MatDiagonalSet MatProductSetAlgorithm
MATNEST MatDuplicate MatProductSetFill
MATSOLVERBAS MatEqual MatProductSetFromOptions
MatAXPY MatFDColoringSetValues MatProductSetType
MatAYPX MatFactorGetSolverType MatProductSymbolic
MatBindToCPU MatFindNonzeroRows MatProductView
MatBlockMatSetPreallocation MatFindZeroRows MatPtAP
MatCUSPARSEFormatOperation MatGetBlockSize MatPtAPMultEqual
MatCUSPARSESetFormat MatGetBlockSizes MatPythonCreate
MatCUSPARSEStorageFormat MatGetColumnNorms MatPythonSetType
MatChop MatGetDiagonal MatRARt
MatColoringWeightType MatGetFactor MatRARtMultEqual
MatConvert MatGetFactorAvailable MatReorderForNonzeroDiagonal
MatCopy MatGetFactorType MatRestoreLocalSubMatrix
MatCreateAIJ MatGetInfo MatRestrict
MatCreateAIJCUSPARSE MatGetLocalSubMatrix MatSTRUMPACKReordering
MatCreateAIJViennaCL MatGetNonzeroState MatScaLAPACKGetBlockSizes
MatCreateBAIJ MatGetOption MatScaLAPACKSetBlockSizes
MatCreateBAIJMKL MatGetOwnershipIS MatScale
MatCreateBlockMat MatGetRowMax MatScatterGetVecScatter
MatCreateCentering MatGetRowMaxAbs MatSeqAIJGetArray
MatCreateDense MatGetRowMin MatSeqAIJGetArrayRead
MatCreateDenseCUDA MatGetRowMinAbs MatSeqAIJGetMaxRowNonzeros
MatCreateFFT MatGetRowSum MatSeqAIJRestoreArray
MatCreateHermitianTranspose MatGetSeqNonzeroStructure MatSeqAIJRestoreArrayRead
MatCreateHtoolFromKernel MatGetType MatSeqAIJSetPreallocation
MatCreateLRC MatGetVariableBlockSizes MatSeqAIJSetType
MatCreateMPIAIJCRL MatGetVecType MatSeqBAIJGetArray
MatCreateMPIAIJMKL MatHYPRESetPreallocation MatSeqBAIJRestoreArray
MatCreateMPIAIJPERM MatHermitianTranspose MatSeqBAIJSetPreallocation
MatCreateMPIAIJSELL MatHermitianTransposeGetMat MatSeqDenseSetPreallocation
MatCreateMPIAIJWithArrays MatISSetPreallocation MatSeqSBAIJGetArray
MatCreateMPIAdj MatInfo MatSeqSBAIJRestoreArray
MatCreateMPIBAIJWithArrays MatInterpolate MatSeqSBAIJSetPreallocation
MatCreateMPISBAIJWithArrays MatInterpolateAdd MatSeqSELLRestoreArray
MatCreateNormal MatIsHermitian MatSeqSELLSetPreallocation
MatCreateNormalHermitian MatIsHermitianTranspose MatSetBlockSize
MatCreateSBAIJ MatIsLinear MatSetBlockSizes
MatCreateSELL MatIsStructurallySymmetric MatSetFactorType
MatCreateScaLAPACK MatIsSymmetric MatSetLocalToGlobalMapping
MatCreateScatter MatIsTranspose MatSetOption
MatCreateSeqAIJ MatLRCGetMats MatSetRandom
MatCreateSeqAIJCRL MatMPIAIJGetSeqAIJ MatSetType
MatCreateSeqAIJCUSPARSE MatMPIAIJSetPreallocation MatSetValuesBlocked
MatCreateSeqAIJFromTriple MatMPIAdjSetPreallocation MatSetValuesBlockedLocal
MatCreateSeqAIJMKL MatMPIAdjToSeq MatSetValuesLocal
MatCreateSeqAIJPERM MatMPIBAIJSetPreallocation MatSetValuesRowLocal
MatCreateSeqAIJSELL MatMPIDenseSetPreallocation MatSetVariableBlockSizes
MatCreateSeqAIJViennaCL MatMPISBAIJSetPreallocation MatSetVecType
MatCreateSeqAIJWithArrays MatMPISELLSetPreallocation MatShift
MatCreateSeqBAIJ MatMatInterpolate MatSolveTypeGet
MatCreateSeqBAIJMKL MatMatInterpolateAdd MatSolverTypeRegister
MatCreateSeqCUFFT MatMatMatMult MatStashSetInitialSize
MatCreateSeqDense MatMatMult MatTranspose
MatCreateSeqDenseCUDA MatMatMultEqual MatTransposeColoringCreate
MatCreateSeqSBAIJ MatMatRestrict MatTransposeColoringDestroy
MatCreateSeqSELL MatMatTransposeMult MatTransposeGetMat
MatCreateTranspose MatMatTransposeMultEqual MatTransposeMatMult
MatDenseGetArray MatMkl_CPardisoSetCntl MatTransposeMatMultEqual
MatDenseGetArrayRead MatMultAddEqual MatUpdateMPIAIJWithArrays
MatDenseGetArrayWrite MatMultEqual MatViewFromOptions
MatDenseGetColumn MatMultTransposeAddEqual MatZeroEntries
MatDenseGetColumnVec MatMultTransposeEqual MatZeroRows
MatDenseGetColumnVecRead MatNorm MatZeroRowsColumns
MatDenseGetColumnVecWrite MatPreallocateFinalize MatZeroRowsColumnsIS
MatDenseGetLDA MatPreallocateInitialize MatZeroRowsColumnsLocal
MatDenseGetLocalMatrix MatPreallocateLocation MatZeroRowsColumnsLocalIS
MatDenseGetSubMatrix MatPreallocateSet MatZeroRowsColumnsStencil
MatDenseRestoreArray MatPreallocateSetLocal MatZeroRowsIS
MatDenseRestoreArrayRead MatPreallocateSetLocalBlock MatZeroRowsLocal
MatDenseRestoreArrayWrite MatPreallocateSetLocalRemoveDups MatZeroRowsLocalIS
MatDenseRestoreColumn MatPreallocateSymmetricSetBlock MatZeroRowsStencil
MatDenseRestoreColumnVec MatPreallocateSymmetricSetLocalBlock VecScatterFFTWToPetsc
MatDenseRestoreColumnVecRead MatProductClear VecScatterPetscToFFTW
MatDenseRestoreColumnVecWrite MatProductCreate
MatDenseRestoreSubMatrix MatProductCreateWithMat
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 MatForwardSolve MatMPIAIJSetPreallocationCSR
MatBackwardSolve MatGalerkin MatMPIAdjCreateNonemptySubcommMat
MatCheckCompressedRow MatGetBrowsOfAcols MatMPISELLGetLocalMatCondensed
MatCholeskyFactor MatGetColumnIJ MatMatSolve
MatCholeskyFactorNumeric MatGetCommunicationStructs MatMatSolveTranspose
MatCholeskyFactorSymbolic MatGetNearNullSpace MatMatTransposeSolve
MatColoringPatch MatGetNullSpace MatMultDiagonalBlock
MatCreateLocalRef MatGetOperation MatNestGetSize
MatCreateSubMatrixVirtual MatGetOwnershipRangeColumn MatNestGetSubMat
MatDenseCUDAGetArray MatGetRowIJ MatNestGetSubMats
MatDenseCUDAGetArrayRead MatGetTransposeNullSpace MatNestSetSubMat
MatDenseCUDAGetArrayWrite MatICCFactor MatNestSetVecType
MatDenseCUDAPlaceArray MatICCFactorSymbolic MatNullSpaceGetVecs
MatDenseCUDAReplaceArray MatILUFactor MatQRFactor
MatDenseCUDAResetArray MatILUFactorSymbolic MatQRFactorNumeric
MatDenseCUDARestoreArray MatISGetMPIXAIJ MatQRFactorSymbolic
MatDenseCUDARestoreArrayRead MatIncreaseOverlap MatRegisterRootName
MatDenseCUDARestoreArrayWrite MatIncreaseOverlapSplit MatResidual
MatDensePlaceArray MatInitializePackage MatRestoreColumnIJ
MatDenseReplaceArray MatIsShell MatRestoreRowIJ
MatDenseResetArray MatLUFactor MatSOR
MatDiagonalScaleLocal MatLUFactorNumeric MatSeqAIJSetPreallocationCSR
MatFactorClearError MatLUFactorSymbolic MatSetBlockSizesFromMats
MatFactorGetCanUseOrdering MatMFFD MatSetOperation
MatFactorGetPreferredOrdering MatMFFDFinalizePackage MatSetUnfactored
MatFactorInfo MatMFFDInitializePackage MatSolve
MatFactorInfoInitialize MatMFFDRegister MatSolveAdd
MatFactorSetSchurIS MatMFFDRegisterAll MatSolveTranspose
MatFinalizePackage MatMPIAIJGetLocalMat MatSolveTransposeAdd
MatFindOffBlockDiagonalEntries MatMPIAIJGetLocalMatCondensed MatSolves
MatFindZeroDiagonals MatMPIAIJGetLocalMatMerge MatSubMatrixVirtualUpdate
No deprecated routines

Table of Contents