petsc-master 2020-01-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 MatPropagateSymmetryOptions
MATMPIADJ MatDuplicateOption MatResetPreallocation
MATMPIAIJ MatFDColoring MatReuse
MATMPIBAIJ MatFactorError MatSORType
MATMPISBAIJ MatFactorShiftType MatSTRUMPACKSetColPerm
MATMPISELL MatFactorType MatSTRUMPACKSetHSSAbsTol
MATSBAIJ MatGetLocalSize MatSTRUMPACKSetHSSLeafSize
MATSELL MatGetOwnershipRange MatSTRUMPACKSetHSSMaxRank
MATSEQAIJ MatGetOwnershipRanges MatSTRUMPACKSetHSSMinSepSize
MATSEQAIJCUSPARSE MatGetOwnershipRangesColumn MatSTRUMPACKSetHSSRelTol
MATSEQAIJVIENNACL MatGetSize MatSTRUMPACKSetReordering
MATSEQBAIJ MatHasCongruentLayouts MatSetFromOptions
MATSEQDENSE MatInfoType MatSetSizes
MATSEQDENSECUDA MatLoad MatSetStencil
MATSEQSBAIJ MatMFFDType MatSetUp
MATSOLVERCHOLMOD MatMkl_PardisoSetCntl MatSetValue
MATSOLVERCUSPARSE MatMult MatSetValues
MATSOLVERESSL MatMultAdd MatSetValuesBlockedStencil
MATSOLVERKLU MatMultConstrained MatSetValuesStencil
MATSOLVERLUSOL MatMultHermitianTranspose MatSolverType
MATSOLVERMATLAB MatMultHermitianTransposeAdd MatStencil
MATSOLVERMKL_PARDISO MatMultTranspose MatStructure
MATSOLVERMUMPS MatMultTransposeAdd MatSuperluSetILUDropTol
MATSOLVERPASTIX MatMultTransposeConstrained MatTransposeColoring
MATSOLVERSPARSEELEMENTAL MatMumpsGetCntl MatType
MATSOLVERSSTRUMPACK MatMumpsGetIcntl MatView
MATSOLVERSUPERLU MatMumpsGetInfo MatXAIJSetPreallocation
MATSOLVERSUPERLU_DIST MatMumpsGetInfog
Intermediate - Setting options for algorithms and data structures
MATHYPRE MatFindNonzeroRows MatPtAPSymbolic
MATMFFD_DS MatFindZeroRows MatPythonCreate
MATMFFD_WP MatGetBlockSize MatPythonSetType
MATNEST MatGetBlockSizes MatRARt
MATSOLVERBAS MatGetColumnNorms MatRARtNumeric
MatAXPY MatGetDiagonal MatRARtSymbolic
MatAYPX MatGetFactor MatReorderForNonzeroDiagonal
MatBlockMatSetPreallocation MatGetFactorAvailable MatRestoreLocalSubMatrix
MatCUSPARSEFormatOperation MatGetFactorType MatRestrict
MatCUSPARSESetFormat MatGetInfo MatSTRUMPACKReordering
MatCUSPARSEStorageFormat MatGetLocalSubMatrix MatScale
MatChop MatGetNonzeroState MatScatterGetVecScatter
MatColoringWeightType MatGetOption MatSeqAIJGetArray
MatConvert MatGetOwnershipIS MatSeqAIJGetArrayRead
MatCopy MatGetRowMax MatSeqAIJGetMaxRowNonzeros
MatCreateAIJ MatGetRowMaxAbs MatSeqAIJRestoreArray
MatCreateAIJCUSPARSE MatGetRowMin MatSeqAIJRestoreArrayRead
MatCreateAIJViennaCL MatGetRowMinAbs MatSeqAIJSetPreallocation
MatCreateBAIJ MatGetRowSum MatSeqAIJSetType
MatCreateBAIJMKL MatGetSeqNonzeroStructure MatSeqBAIJGetArray
MatCreateBlockMat MatGetType MatSeqBAIJRestoreArray
MatCreateDense MatGetVariableBlockSizes MatSeqBAIJSetPreallocation
MatCreateFFT MatHYPRESetPreallocation MatSeqDenseSetLDA
MatCreateHermitianTranspose MatHermitianTranspose MatSeqDenseSetPreallocation
MatCreateLRC MatHermitianTransposeGetMat MatSeqSBAIJGetArray
MatCreateMPIAIJCRL MatISSetPreallocation MatSeqSBAIJRestoreArray
MatCreateMPIAIJMKL MatInfo MatSeqSBAIJSetPreallocation
MatCreateMPIAIJPERM MatInterpolate MatSeqSELLRestoreArray
MatCreateMPIAIJSELL MatInterpolateAdd MatSeqSELLSetPreallocation
MatCreateMPIAIJWithArrays MatIsHermitian MatSetBlockSize
MatCreateMPIAdj MatIsHermitianTranspose MatSetBlockSizes
MatCreateMPIBAIJWithArrays MatIsLinear MatSetFactorType
MatCreateMPISBAIJWithArrays MatIsStructurallySymmetric MatSetLocalToGlobalMapping
MatCreateNormal MatIsSymmetric MatSetOption
MatCreateNormalHermitian MatIsTranspose MatSetRandom
MatCreateSBAIJ MatLRCGetMats MatSetType
MatCreateSELL MatMPIAIJSetPreallocation MatSetValuesBlocked
MatCreateScatter MatMPIAdjSetPreallocation MatSetValuesBlockedLocal
MatCreateSeqAIJ MatMPIAdjToSeq MatSetValuesLocal
MatCreateSeqAIJCRL MatMPIBAIJSetPreallocation MatSetValuesRowLocal
MatCreateSeqAIJCUSPARSE MatMPIDenseSetPreallocation MatSetVariableBlockSizes
MatCreateSeqAIJFromTriple MatMPISBAIJSetPreallocation MatShift
MatCreateSeqAIJMKL MatMPISELLSetPreallocation MatSolvePackageGet
MatCreateSeqAIJPERM MatMatMatMult MatSolvePackageRegister
MatCreateSeqAIJSELL MatMatMult MatStashSetInitialSize
MatCreateSeqAIJViennaCL MatMatMultEqual MatTranspose
MatCreateSeqAIJWithArrays MatMatMultNumeric MatTransposeColoringCreate
MatCreateSeqBAIJ MatMatMultSymbolic MatTransposeColoringDestroy
MatCreateSeqBAIJMKL MatMatTransposeMult MatTransposeGetMat
MatCreateSeqCUFFT MatMatTransposeMultEqual MatTransposeMatMult
MatCreateSeqDense MatMkl_CPardisoSetCntl MatTransposeMatMultEqual
MatCreateSeqSBAIJ MatMultAddEqual MatUpdateMPIAIJWithArrays
MatCreateSeqSELL MatMultEqual MatViewFromOptions
MatCreateTranspose MatMultTransposeAddEqual MatZeroEntries
MatDenseGetArray MatMultTransposeEqual MatZeroRows
MatDenseGetArrayRead MatNorm MatZeroRowsColumns
MatDenseGetColumn MatPinToCPU MatZeroRowsColumnsIS
MatDenseGetLDA MatPreallocateFinalize MatZeroRowsColumnsLocal
MatDenseGetLocalMatrix MatPreallocateInitialize MatZeroRowsColumnsLocalIS
MatDenseRestoreArray MatPreallocateLocation MatZeroRowsColumnsStencil
MatDenseRestoreArrayRead MatPreallocateSet MatZeroRowsIS
MatDenseRestoreColumn MatPreallocateSetLocal MatZeroRowsLocal
MatDiagonalScale MatPreallocateSetLocalBlock MatZeroRowsLocalIS
MatDiagonalSet MatPreallocateSetLocalRemoveDups MatZeroRowsStencil
MatDuplicate MatPreallocateSymmetricSetBlock VecScatterFFTWToPetsc
MatEqual MatPreallocateSymmetricSetLocalBlock VecScatterPetscToFFTW
MatFDColoringSetValues MatPtAP
MatFactorGetSolverType MatPtAPNumeric
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 MatGetValuesLocal MatNullSpaceRemove
MatCompositeGetType MatHasOperation MatNullSpaceSetFunction
MatCompositeMerge MatISFixLocalEmpty MatNullSpaceTest
MatCompositeSetMatStructure MatISGetLocalMat MatNullSpaceView
MatCompositeSetMergeType MatISRestoreLocalMat MatPermute
MatCompositeSetScalings MatISSetLocalMat MatPreallocatorPreallocate
MatCompositeSetType MatISSetLocalMatType MatRealPart
MatComputeOperator MatISStoreL2L MatRegister
MatComputeOperatorTranspose MatImaginaryPart MatRegisterAll
MatConjugate MatInodeGetInodeSizes MatRestoreRow
MatCreateComposite MatInvertBlockDiagonal MatRestoreRowUpperTriangular
MatCreateConstantDiagonal MatInvertBlockDiagonalMat MatRetrieveValues
MatCreateIS MatInvertVariableBlockDiagonal MatScatterSetVecScatter
MatCreateKAIJ MatIsHermitianKnown MatSeqAIJGetArrayF90
MatCreateMAIJ MatIsSymmetricKnown MatSeqAIJRegister
MatCreateMFFD MatKAIJGetAIJ MatSeqAIJRegisterAll
MatCreateMPIAIJSumSeqAIJ MatKAIJGetS MatSeqAIJRestoreArrayF90
MatCreateMPIAIJWithSeqAIJ MatKAIJGetSRead MatSeqAIJSetColumnIndices
MatCreateMPIAIJWithSplitArrays MatKAIJGetT MatSeqBAIJSetColumnIndices
MatCreateMPIMatConcatenateSeqMat MatKAIJGetTRead MatSeqBAIJSetPreallocationCSR
MatCreateNest MatKAIJRestoreS MatSeqSBAIJSetColumnIndices
MatCreateRedundantMatrix MatKAIJRestoreSRead MatSeqSBAIJSetPreallocationCSR
MatCreateSeqBAIJWithArrays MatKAIJRestoreT MatSetErrorIfFailure
MatCreateSeqSBAIJWithArrays MatKAIJRestoreTRead MatSetNearNullSpace
MatCreateShell MatKAIJSetAIJ MatSetNullSpace
MatCreateSubMatrices MatKAIJSetS MatSetOptionsPrefix
MatCreateSubMatricesMPI MatKAIJSetT MatSetTransposeNullSpace
MatCreateSubMatrix MatMAIJGetAIJ MatSetValuesBatch
MatCreateVecs MatMAIJRedimension MatSetValuesRow
MatCreateVecsFFTW MatMFFDCheckPositivity MatShellGetContext
MatDenseGetArrayF90 MatMFFDDSSetUmin MatShellGetOperation
MatDenseRestoreArrayF90 MatMFFDGetH MatShellSetContext
MatDestroyMatrices MatMFFDResetHHistory MatShellSetManageScalingShifts
MatDestroySeqNonzeroStructure MatMFFDSetBase MatShellSetOperation
MatDestroySubMatrices MatMFFDSetCheckh MatShellSetVecType
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

Table of Contents