petsc-3.15.0 2021-04-05
Report Typos and Errors

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

Table of Contents