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

Table of Contents