petsc-3.12.5 2020-03-29
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 MatFindNonzeroRows MatPtAPNumeric
MATMFFD_DS MatFindZeroRows MatPtAPSymbolic
MATMFFD_WP MatGetBlockSize MatPythonCreate
MATNEST MatGetBlockSizes MatPythonSetType
MATSOLVERBAS MatGetColumnNorms MatRARt
MatAXPY MatGetDiagonal MatRARtNumeric
MatAYPX MatGetFactor MatRARtSymbolic
MatBlockMatSetPreallocation MatGetFactorAvailable MatReorderForNonzeroDiagonal
MatCUSPARSEFormatOperation MatGetFactorType MatRestoreLocalSubMatrix
MatCUSPARSESetFormat MatGetInfo MatRestrict
MatCUSPARSEStorageFormat MatGetLocalSubMatrix MatSTRUMPACKReordering
MatChop MatGetNonzeroState MatScale
MatColoringWeightType MatGetOption MatScatterGetVecScatter
MatConvert MatGetOwnershipIS MatSeqAIJGetArray
MatCopy MatGetRowMax MatSeqAIJGetArrayRead
MatCreateAIJ MatGetRowMaxAbs MatSeqAIJGetMaxRowNonzeros
MatCreateAIJCUSPARSE MatGetRowMin MatSeqAIJRestoreArray
MatCreateAIJViennaCL MatGetRowMinAbs MatSeqAIJRestoreArrayRead
MatCreateBAIJ MatGetRowSum MatSeqAIJSetPreallocation
MatCreateBAIJMKL MatGetSeqNonzeroStructure MatSeqAIJSetType
MatCreateBlockMat MatGetType MatSeqBAIJGetArray
MatCreateDense MatGetVariableBlockSizes MatSeqBAIJRestoreArray
MatCreateFFT MatHYPRESetPreallocation MatSeqBAIJSetPreallocation
MatCreateHermitianTranspose MatHermitianTranspose MatSeqDenseSetLDA
MatCreateLRC MatHermitianTransposeGetMat MatSeqDenseSetPreallocation
MatCreateMPIAIJCRL MatISSetPreallocation MatSeqSBAIJGetArray
MatCreateMPIAIJMKL MatInfo MatSeqSBAIJRestoreArray
MatCreateMPIAIJPERM MatInterpolate MatSeqSBAIJSetPreallocation
MatCreateMPIAIJSELL MatInterpolateAdd MatSeqSELLRestoreArray
MatCreateMPIAIJWithArrays MatIsHermitian MatSeqSELLSetPreallocation
MatCreateMPIAdj MatIsHermitianTranspose MatSetBlockSize
MatCreateMPIBAIJWithArrays MatIsLinear MatSetBlockSizes
MatCreateMPISBAIJWithArrays MatIsStructurallySymmetric MatSetFactorType
MatCreateNormal MatIsSymmetric MatSetLocalToGlobalMapping
MatCreateNormalHermitian MatIsTranspose MatSetOption
MatCreateSBAIJ MatLRCGetMats MatSetRandom
MatCreateSELL MatMPIAIJGetSeqAIJ MatSetType
MatCreateScatter MatMPIAIJSetPreallocation MatSetValuesBlocked
MatCreateSeqAIJ MatMPIAdjSetPreallocation MatSetValuesBlockedLocal
MatCreateSeqAIJCRL MatMPIAdjToSeq MatSetValuesLocal
MatCreateSeqAIJCUSPARSE MatMPIBAIJSetPreallocation MatSetValuesRowLocal
MatCreateSeqAIJFromTriple MatMPIDenseSetPreallocation MatSetVariableBlockSizes
MatCreateSeqAIJMKL MatMPISBAIJSetPreallocation MatShift
MatCreateSeqAIJPERM MatMPISELLSetPreallocation MatSolvePackageGet
MatCreateSeqAIJSELL MatMatMatMult MatSolvePackageRegister
MatCreateSeqAIJViennaCL MatMatMult MatStashSetInitialSize
MatCreateSeqAIJWithArrays MatMatMultEqual MatTranspose
MatCreateSeqBAIJ MatMatMultNumeric MatTransposeColoringCreate
MatCreateSeqBAIJMKL MatMatMultSymbolic MatTransposeColoringDestroy
MatCreateSeqCUFFT MatMatTransposeMult MatTransposeGetMat
MatCreateSeqDense MatMatTransposeMultEqual MatTransposeMatMult
MatCreateSeqSBAIJ MatMkl_CPardisoSetCntl MatTransposeMatMultEqual
MatCreateSeqSELL MatMultAddEqual MatUpdateMPIAIJWithArrays
MatCreateTranspose MatMultEqual MatZeroEntries
MatDenseGetArray MatMultTransposeAddEqual MatZeroRows
MatDenseGetArrayRead MatMultTransposeEqual MatZeroRowsColumns
MatDenseGetColumn MatNorm MatZeroRowsColumnsIS
MatDenseGetLDA MatPinToCPU MatZeroRowsColumnsLocal
MatDenseGetLocalMatrix MatPreallocateFinalize MatZeroRowsColumnsLocalIS
MatDenseRestoreArray MatPreallocateInitialize MatZeroRowsColumnsStencil
MatDenseRestoreArrayRead MatPreallocateLocation MatZeroRowsIS
MatDenseRestoreColumn MatPreallocateSet MatZeroRowsLocal
MatDiagonalScale MatPreallocateSetLocal MatZeroRowsLocalIS
MatDiagonalSet MatPreallocateSetLocalBlock MatZeroRowsStencil
MatDuplicate MatPreallocateSetLocalRemoveDups VecScatterFFTWToPetsc
MatEqual MatPreallocateSymmetricSetBlock VecScatterPetscToFFTW
MatFDColoringSetValues MatPreallocateSymmetricSetLocalBlock
MatFactorGetSolverType MatPtAP
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