petsc-3.14.6 2021-03-30
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 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
MATMPIADJ MatDestroy MatPropagateSymmetryOptions
MATMPIAIJ MatDuplicateOption MatResetPreallocation
MATMPIBAIJ MatFDColoring MatReuse
MATMPIDENSE MatFactorError MatSORType
MATMPIDENSECUDA MatFactorShiftType MatSTRUMPACKSetColPerm
MATMPISBAIJ MatFactorType MatSTRUMPACKSetHSSAbsTol
MATMPISELL MatGetLocalSize MatSTRUMPACKSetHSSLeafSize
MATSBAIJ MatGetOwnershipRange MatSTRUMPACKSetHSSMaxRank
MATSCALAPACK MatGetOwnershipRanges MatSTRUMPACKSetHSSMinSepSize
MATSELL MatGetOwnershipRangesColumn MatSTRUMPACKSetHSSRelTol
MATSEQAIJ MatGetSize MatSTRUMPACKSetReordering
MATSEQAIJCUSPARSE MatHasCongruentLayouts MatSetFromOptions
MATSEQAIJVIENNACL MatInfoType MatSetSizes
MATSEQBAIJ MatLoad MatSetStencil
MATSEQDENSE MatMFFDType MatSetUp
MATSEQDENSECUDA MatMkl_PardisoSetCntl MatSetValue
MATSEQSBAIJ MatMult MatSetValues
MATSOLVERCHOLMOD MatMultAdd MatSetValuesBlockedStencil
MATSOLVERCUSPARSE MatMultConstrained MatSetValuesStencil
MATSOLVERESSL MatMultHermitianTranspose MatSolverType
MATSOLVERKLU MatMultHermitianTransposeAdd MatStencil
MATSOLVERLUSOL MatMultTranspose MatStructure
MATSOLVERMATLAB MatMultTransposeAdd MatSuperluSetILUDropTol
MATSOLVERMKL_PARDISO MatMultTransposeConstrained MatTransposeColoring
MATSOLVERMUMPS MatMumpsGetCntl MatType
MATSOLVERPASTIX MatMumpsGetIcntl MatView
MATSOLVERSPARSEELEMENTAL MatMumpsGetInfo MatXAIJSetPreallocation
MATSOLVERSSTRUMPACK MatMumpsGetInfog
Intermediate - Setting options for algorithms and data structures
MATHYPRE MatDenseSetLDA MatProductReplaceMats
MATMFFD_DS MatDiagonalScale MatProductSetAlgorithm
MATMFFD_WP MatDiagonalSet MatProductSetFill
MATNEST MatDuplicate MatProductSetFromOptions
MATSOLVERBAS MatEqual MatProductSetType
MatAXPY MatFDColoringSetValues MatProductSymbolic
MatAYPX MatFactorGetSolverType MatProductView
MatBindToCPU MatFindNonzeroRows MatPtAP
MatBlockMatSetPreallocation MatFindZeroRows MatPtAPMultEqual
MatCUSPARSEFormatOperation MatGetBlockSize MatPythonCreate
MatCUSPARSESetFormat MatGetBlockSizes MatPythonSetType
MatCUSPARSEStorageFormat MatGetColumnNorms MatRARt
MatChop MatGetDiagonal MatRARtMultEqual
MatColoringWeightType MatGetFactor MatReorderForNonzeroDiagonal
MatConvert MatGetFactorAvailable MatRestoreLocalSubMatrix
MatCopy MatGetFactorType MatRestrict
MatCreateAIJ MatGetInfo MatSTRUMPACKReordering
MatCreateAIJCUSPARSE MatGetLocalSubMatrix MatScaLAPACKGetBlockSizes
MatCreateAIJViennaCL MatGetNonzeroState MatScaLAPACKSetBlockSizes
MatCreateBAIJ MatGetOption MatScale
MatCreateBAIJMKL MatGetOwnershipIS MatScatterGetVecScatter
MatCreateBlockMat MatGetRowMax MatSeqAIJCUSPARSESetGenerateTranspose
MatCreateDense MatGetRowMaxAbs MatSeqAIJGetArray
MatCreateDenseCUDA MatGetRowMin MatSeqAIJGetArrayRead
MatCreateFFT MatGetRowMinAbs MatSeqAIJGetMaxRowNonzeros
MatCreateHermitianTranspose MatGetRowSum MatSeqAIJRestoreArray
MatCreateLRC MatGetSeqNonzeroStructure MatSeqAIJRestoreArrayRead
MatCreateMPIAIJCRL MatGetType MatSeqAIJSetPreallocation
MatCreateMPIAIJMKL MatGetVariableBlockSizes MatSeqAIJSetType
MatCreateMPIAIJPERM MatGetVecType MatSeqBAIJGetArray
MatCreateMPIAIJSELL MatHYPRESetPreallocation MatSeqBAIJRestoreArray
MatCreateMPIAIJWithArrays MatHermitianTranspose MatSeqBAIJSetPreallocation
MatCreateMPIAdj MatHermitianTransposeGetMat MatSeqDenseSetPreallocation
MatCreateMPIBAIJWithArrays MatISSetPreallocation MatSeqSBAIJGetArray
MatCreateMPISBAIJWithArrays MatInfo MatSeqSBAIJRestoreArray
MatCreateNormal MatInterpolate MatSeqSBAIJSetPreallocation
MatCreateNormalHermitian MatInterpolateAdd MatSeqSELLRestoreArray
MatCreateSBAIJ MatIsHermitian MatSeqSELLSetPreallocation
MatCreateSELL MatIsHermitianTranspose MatSetBlockSize
MatCreateScaLAPACK MatIsLinear MatSetBlockSizes
MatCreateScatter MatIsStructurallySymmetric MatSetFactorType
MatCreateSeqAIJ MatIsSymmetric MatSetLocalToGlobalMapping
MatCreateSeqAIJCRL MatIsTranspose MatSetOption
MatCreateSeqAIJCUSPARSE MatLRCGetMats MatSetRandom
MatCreateSeqAIJFromTriple MatMPIAIJGetSeqAIJ MatSetType
MatCreateSeqAIJMKL MatMPIAIJSetPreallocation MatSetValuesBlocked
MatCreateSeqAIJPERM MatMPIAdjSetPreallocation MatSetValuesBlockedLocal
MatCreateSeqAIJSELL MatMPIAdjToSeq MatSetValuesLocal
MatCreateSeqAIJViennaCL MatMPIBAIJSetPreallocation MatSetValuesRowLocal
MatCreateSeqAIJWithArrays MatMPIDenseSetPreallocation MatSetVariableBlockSizes
MatCreateSeqBAIJ MatMPISBAIJSetPreallocation MatSetVecType
MatCreateSeqBAIJMKL MatMPISELLSetPreallocation MatShift
MatCreateSeqCUFFT MatMatMatMult MatSolveTypeGet
MatCreateSeqDense MatMatMult MatSolveTypeRegister
MatCreateSeqDenseCUDA MatMatMultEqual MatStashSetInitialSize
MatCreateSeqSBAIJ MatMatTransposeMult MatTranspose
MatCreateSeqSELL MatMatTransposeMultEqual MatTransposeColoringCreate
MatCreateTranspose MatMkl_CPardisoSetCntl MatTransposeColoringDestroy
MatDenseGetArray MatMultAddEqual MatTransposeGetMat
MatDenseGetArrayRead MatMultEqual MatTransposeMatMult
MatDenseGetArrayWrite MatMultTransposeAddEqual MatTransposeMatMultEqual
MatDenseGetColumn MatMultTransposeEqual MatUpdateMPIAIJWithArrays
MatDenseGetColumnVec MatNorm MatViewFromOptions
MatDenseGetColumnVecRead MatPreallocateFinalize MatZeroEntries
MatDenseGetColumnVecWrite MatPreallocateInitialize MatZeroRows
MatDenseGetLDA MatPreallocateLocation MatZeroRowsColumns
MatDenseGetLocalMatrix MatPreallocateSet MatZeroRowsColumnsIS
MatDenseGetSubMatrix MatPreallocateSetLocal MatZeroRowsColumnsLocal
MatDenseRestoreArray MatPreallocateSetLocalBlock MatZeroRowsColumnsLocalIS
MatDenseRestoreArrayRead MatPreallocateSetLocalRemoveDups MatZeroRowsColumnsStencil
MatDenseRestoreArrayWrite MatPreallocateSymmetricSetBlock MatZeroRowsIS
MatDenseRestoreColumn MatPreallocateSymmetricSetLocalBlock MatZeroRowsLocal
MatDenseRestoreColumnVec MatProductClear MatZeroRowsLocalIS
MatDenseRestoreColumnVecRead MatProductCreate MatZeroRowsStencil
MatDenseRestoreColumnVecWrite MatProductCreateWithMat VecScatterFFTWToPetsc
MatDenseRestoreSubMatrix MatProductNumeric VecScatterPetscToFFTW
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 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 MatRegisterRootName
MatDenseCUDAResetArray MatILUFactorSymbolic MatResidual
MatDenseCUDARestoreArray MatISGetMPIXAIJ MatRestoreColumnIJ
MatDenseCUDARestoreArrayRead MatIncreaseOverlap MatRestoreRowIJ
MatDenseCUDARestoreArrayWrite MatIncreaseOverlapSplit MatSOR
MatDensePlaceArray MatInitializePackage MatSeqAIJSetPreallocationCSR
MatDenseReplaceArray MatIsShell MatSetBlockSizesFromMats
MatDenseResetArray MatLUFactor MatSetOperation
MatDiagonalScaleLocal MatLUFactorNumeric MatSetUnfactored
MatFactorClearError MatLUFactorSymbolic MatSolve
MatFactorGetUseOrdering MatMFFD MatSolveAdd
MatFactorInfo MatMFFDFinalizePackage MatSolveTranspose
MatFactorInfoInitialize MatMFFDInitializePackage MatSolveTransposeAdd
MatFactorSetSchurIS MatMFFDRegister MatSolves
MatFinalizePackage MatMFFDRegisterAll MatSubMatrixVirtualUpdate
MatFindOffBlockDiagonalEntries MatMPIAIJGetLocalMat
MatFindZeroDiagonals MatMPIAIJGetLocalMatCondensed
No deprecated routines

Table of Contents