petsc-master 2019-09-17
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 MatFDColoringSetValues MatPreallocateSymmetricSetLocalBlock
MATMFFD_DS MatFactorGetSolverType MatPtAP
MATMFFD_WP MatFindNonzeroRows MatPtAPNumeric
MATNEST MatFindZeroRows MatPtAPSymbolic
MATSOLVERBAS MatGetBlockSize MatPythonCreate
MatAXPY MatGetBlockSizes MatPythonSetType
MatAYPX MatGetColumnNorms MatRARt
MatBlockMatSetPreallocation MatGetDiagonal MatRARtNumeric
MatCUSPARSEFormatOperation MatGetFactor MatRARtSymbolic
MatCUSPARSESetFormat MatGetFactorAvailable MatReorderForNonzeroDiagonal
MatCUSPARSEStorageFormat MatGetFactorType MatRestoreLocalSubMatrix
MatChop MatGetInfo MatRestrict
MatColoringWeightType MatGetLocalSubMatrix MatSTRUMPACKReordering
MatConvert MatGetNonzeroState MatScale
MatCopy MatGetOption MatScatterGetVecScatter
MatCreateAIJ MatGetOwnershipIS MatSeqAIJGetArray
MatCreateAIJCUSPARSE MatGetRowMax MatSeqAIJGetMaxRowNonzeros
MatCreateAIJViennaCL MatGetRowMaxAbs MatSeqAIJRestoreArray
MatCreateBAIJ MatGetRowMin MatSeqAIJSetPreallocation
MatCreateBAIJMKL MatGetRowMinAbs MatSeqAIJSetType
MatCreateBlockMat MatGetRowSum MatSeqBAIJSetPreallocation
MatCreateDense MatGetSeqNonzeroStructure MatSeqDenseSetLDA
MatCreateFFT MatGetType MatSeqDenseSetPreallocation
MatCreateHermitianTranspose MatGetVariableBlockSizes MatSeqSBAIJGetArray
MatCreateLRC MatHYPRESetPreallocation MatSeqSBAIJRestoreArray
MatCreateMPIAIJCRL MatHermitianTranspose MatSeqSBAIJSetPreallocation
MatCreateMPIAIJMKL MatHermitianTransposeGetMat MatSeqSELLRestoreArray
MatCreateMPIAIJPERM MatISSetPreallocation MatSeqSELLSetPreallocation
MatCreateMPIAIJSELL MatInfo MatSetBlockSize
MatCreateMPIAIJWithArrays MatInterpolate MatSetBlockSizes
MatCreateMPIAdj MatInterpolateAdd MatSetFactorType
MatCreateMPIBAIJWithArrays MatIsHermitian MatSetLocalToGlobalMapping
MatCreateMPISBAIJWithArrays MatIsHermitianTranspose MatSetOption
MatCreateNormal MatIsLinear MatSetRandom
MatCreateNormalHermitian MatIsStructurallySymmetric MatSetType
MatCreateSBAIJ MatIsSymmetric MatSetValuesBlocked
MatCreateSELL MatIsTranspose MatSetValuesBlockedLocal
MatCreateScatter MatLRCGetMats MatSetValuesLocal
MatCreateSeqAIJ MatMPIAIJSetPreallocation MatSetValuesRowLocal
MatCreateSeqAIJCRL MatMPIAdjSetPreallocation MatSetVariableBlockSizes
MatCreateSeqAIJCUSPARSE MatMPIAdjToSeq MatShift
MatCreateSeqAIJFromTriple MatMPIBAIJSetPreallocation MatSolvePackageGet
MatCreateSeqAIJMKL MatMPIDenseSetPreallocation MatSolvePackageRegister
MatCreateSeqAIJPERM MatMPISBAIJSetPreallocation MatStashSetInitialSize
MatCreateSeqAIJSELL MatMPISELLSetPreallocation MatTranspose
MatCreateSeqAIJViennaCL MatMatMatMult MatTransposeColoringCreate
MatCreateSeqAIJWithArrays MatMatMult MatTransposeColoringDestroy
MatCreateSeqBAIJ MatMatMultEqual MatTransposeGetMat
MatCreateSeqBAIJMKL MatMatMultNumeric MatTransposeMatMult
MatCreateSeqCUFFT MatMatMultSymbolic MatTransposeMatMultEqual
MatCreateSeqDense MatMatTransposeMult MatUpdateMPIAIJWithArrays
MatCreateSeqSBAIJ MatMatTransposeMultEqual MatZeroEntries
MatCreateSeqSELL MatMkl_CPardisoSetCntl MatZeroRows
MatCreateTranspose MatMultAddEqual MatZeroRowsColumns
MatDenseGetArray MatMultEqual MatZeroRowsColumnsIS
MatDenseGetArrayRead MatMultTransposeAddEqual MatZeroRowsColumnsLocal
MatDenseGetColumn MatMultTransposeEqual MatZeroRowsColumnsLocalIS
MatDenseGetLDA MatNorm MatZeroRowsColumnsStencil
MatDenseGetLocalMatrix MatPreallocateFinalize MatZeroRowsIS
MatDenseRestoreArray MatPreallocateInitialize MatZeroRowsLocal
MatDenseRestoreArrayRead MatPreallocateLocation MatZeroRowsLocalIS
MatDenseRestoreColumn MatPreallocateSet MatZeroRowsStencil
MatDiagonalScale MatPreallocateSetLocal VecScatterFFTWToPetsc
MatDiagonalSet MatPreallocateSetLocalBlock VecScatterPetscToFFTW
MatDuplicate MatPreallocateSetLocalRemoveDups
MatEqual MatPreallocateSymmetricSetBlock
Advanced - Setting more advanced options and customization
MATBLOCKMAT MatFactorSolveSchurComplementTranspose MatMFFDWPSetComputeNormU
MATCOMPOSITE MatFreeIntermediateDataStructures MatMPIAIJSetUseScalableIncreaseOverlap
MATIS MatGetColumnVector MatMPIBAIJSetHashTableFactor
MATKAIJ MatGetDiagonalBlock MatMPIBAIJSetPreallocationCSR
MATMAIJ MatGetGhosts MatMPIBAIJSetValuesBlocked
MATMFFD MatGetInertia MatMPISBAIJSetPreallocationCSR
MATPREALLOCATOR MatGetLayouts MatMissingDiagonal
MATSCATTER MatGetLocalToGlobalMapping MatNestGetISs
MATSHELL MatGetMultiProcBlock MatNestGetLocalISs
MatAppendOptionsPrefix MatGetOptionsPrefix MatNestSetSubMats
MatAssembled MatGetRow MatNullSpace
MatCompositeAddMat MatGetRowUpperTriangular MatNullSpaceCreate
MatCompositeGetMat MatGetTrace MatNullSpaceCreateRigidBody
MatCompositeGetMatStructure MatGetValues MatNullSpaceDestroy
MatCompositeGetNumberMat MatHasOperation MatNullSpaceRemove
MatCompositeGetType MatISFixLocalEmpty MatNullSpaceSetFunction
MatCompositeMerge MatISGetLocalMat MatNullSpaceTest
MatCompositeSetMatStructure MatISRestoreLocalMat MatNullSpaceView
MatCompositeSetMergeType 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
MatFactorSolveSchurComplement MatMFFDSetType
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
None: Not yet cataloged
MatPinToCPU

Table of Contents