petsc-3.13.6 2020-09-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 Mat MatMumpsGetRinfo
MATAIJCRL MatAssemblyBegin MatMumpsGetRinfog
MATAIJCUSPARSE MatAssemblyEnd MatMumpsSetCntl
MATAIJMKL MatAssemblyType MatMumpsSetIcntl
MATAIJPERM MatColoring MatOption
MATAIJSELL MatColoringType MatOrderingType
MATAIJVIENNACL MatComputeBandwidth MatPartitioning
MATBAIJ MatCreate MatPartitioningType
MATBAIJMKL MatCreateSubMatrixOption MatProductAlgorithm
MATDENSE MatDestroy MatProductSetFromOptions
MATELEMENTAL MatDuplicateOption MatProductType
MATMPIADJ MatFDColoring MatPropagateSymmetryOptions
MATMPIAIJ MatFactorError MatResetPreallocation
MATMPIBAIJ MatFactorShiftType MatReuse
MATMPISBAIJ MatFactorType MatSORType
MATMPISELL MatGetLocalSize MatSTRUMPACKSetColPerm
MATSBAIJ MatGetOwnershipRange MatSTRUMPACKSetHSSAbsTol
MATSELL MatGetOwnershipRanges MatSTRUMPACKSetHSSLeafSize
MATSEQAIJ MatGetOwnershipRangesColumn MatSTRUMPACKSetHSSMaxRank
MATSEQAIJCUSPARSE MatGetSize MatSTRUMPACKSetHSSMinSepSize
MATSEQAIJVIENNACL MatHasCongruentLayouts MatSTRUMPACKSetHSSRelTol
MATSEQBAIJ MatInfoType MatSTRUMPACKSetReordering
MATSEQDENSE MatLoad MatSetFromOptions
MATSEQDENSECUDA MatMFFDType MatSetSizes
MATSEQSBAIJ MatMkl_PardisoSetCntl MatSetStencil
MATSOLVERCHOLMOD MatMult MatSetUp
MATSOLVERCUSPARSE MatMultAdd MatSetValue
MATSOLVERESSL MatMultConstrained MatSetValues
MATSOLVERKLU MatMultHermitianTranspose MatSetValuesBlockedStencil
MATSOLVERLUSOL MatMultHermitianTransposeAdd MatSetValuesStencil
MATSOLVERMATLAB MatMultTranspose MatSolverType
MATSOLVERMKL_PARDISO MatMultTransposeAdd MatStencil
MATSOLVERMUMPS MatMultTransposeConstrained MatStructure
MATSOLVERPASTIX MatMumpsGetCntl MatSuperluSetILUDropTol
MATSOLVERSPARSEELEMENTAL MatMumpsGetIcntl MatTransposeColoring
MATSOLVERSSTRUMPACK MatMumpsGetInfo MatType
MATSOLVERSUPERLU MatMumpsGetInfog MatView
MATSOLVERSUPERLU_DIST MatMumpsGetInverse MatXAIJSetPreallocation
MATSOLVERUMFPACK MatMumpsGetInverseTranspose
Intermediate - Setting options for algorithms and data structures
MATHYPRE MatFindNonzeroRows MatProductSetAlgorithm
MATMFFD_DS MatFindZeroRows MatProductSetFill
MATMFFD_WP MatGetBlockSize MatProductSetType
MATNEST MatGetBlockSizes MatProductSymbolic
MATSOLVERBAS MatGetColumnNorms MatPtAP
MatAXPY MatGetDiagonal MatPtAPMultEqual
MatAYPX MatGetFactor MatPythonCreate
MatBindToCPU MatGetFactorAvailable MatPythonSetType
MatBlockMatSetPreallocation MatGetFactorType MatRARt
MatCUSPARSEFormatOperation MatGetInfo MatReorderForNonzeroDiagonal
MatCUSPARSESetFormat MatGetLocalSubMatrix MatRestoreLocalSubMatrix
MatCUSPARSEStorageFormat MatGetNonzeroState MatRestrict
MatChop MatGetOption MatSTRUMPACKReordering
MatColoringWeightType MatGetOwnershipIS MatScale
MatConvert MatGetRowMax MatScatterGetVecScatter
MatCopy MatGetRowMaxAbs MatSeqAIJGetArray
MatCreateAIJ MatGetRowMin MatSeqAIJGetArrayRead
MatCreateAIJCUSPARSE MatGetRowMinAbs MatSeqAIJGetMaxRowNonzeros
MatCreateAIJViennaCL MatGetRowSum MatSeqAIJRestoreArray
MatCreateBAIJ MatGetSeqNonzeroStructure MatSeqAIJRestoreArrayRead
MatCreateBAIJMKL MatGetType MatSeqAIJSetPreallocation
MatCreateBlockMat MatGetVariableBlockSizes MatSeqAIJSetType
MatCreateDense MatHYPRESetPreallocation MatSeqBAIJGetArray
MatCreateFFT MatHermitianTranspose MatSeqBAIJRestoreArray
MatCreateHermitianTranspose MatHermitianTransposeGetMat MatSeqBAIJSetPreallocation
MatCreateLRC MatISSetPreallocation MatSeqDenseSetLDA
MatCreateMPIAIJCRL MatInfo MatSeqDenseSetPreallocation
MatCreateMPIAIJMKL MatInterpolate MatSeqSBAIJGetArray
MatCreateMPIAIJPERM MatInterpolateAdd MatSeqSBAIJRestoreArray
MatCreateMPIAIJSELL MatIsHermitian MatSeqSBAIJSetPreallocation
MatCreateMPIAIJWithArrays MatIsHermitianTranspose MatSeqSELLRestoreArray
MatCreateMPIAdj MatIsLinear MatSeqSELLSetPreallocation
MatCreateMPIBAIJWithArrays MatIsStructurallySymmetric MatSetBlockSize
MatCreateMPISBAIJWithArrays MatIsSymmetric MatSetBlockSizes
MatCreateNormal MatIsTranspose MatSetFactorType
MatCreateNormalHermitian MatLRCGetMats MatSetLocalToGlobalMapping
MatCreateSBAIJ MatMPIAIJGetSeqAIJ MatSetOption
MatCreateSELL MatMPIAIJSetPreallocation MatSetRandom
MatCreateScatter MatMPIAdjSetPreallocation MatSetType
MatCreateSeqAIJ MatMPIAdjToSeq MatSetValuesBlocked
MatCreateSeqAIJCRL MatMPIBAIJSetPreallocation MatSetValuesBlockedLocal
MatCreateSeqAIJCUSPARSE MatMPIDenseSetPreallocation MatSetValuesLocal
MatCreateSeqAIJFromTriple MatMPISBAIJSetPreallocation MatSetValuesRowLocal
MatCreateSeqAIJMKL MatMPISELLSetPreallocation MatSetVariableBlockSizes
MatCreateSeqAIJPERM MatMatMatMult MatShift
MatCreateSeqAIJSELL MatMatMult MatSolvePackageGet
MatCreateSeqAIJViennaCL MatMatMultEqual MatSolvePackageRegister
MatCreateSeqAIJWithArrays MatMatTransposeMult MatStashSetInitialSize
MatCreateSeqBAIJ MatMatTransposeMultEqual MatTranspose
MatCreateSeqBAIJMKL MatMkl_CPardisoSetCntl MatTransposeColoringCreate
MatCreateSeqCUFFT MatMultAddEqual MatTransposeColoringDestroy
MatCreateSeqDense MatMultEqual MatTransposeGetMat
MatCreateSeqSBAIJ MatMultTransposeAddEqual MatTransposeMatMult
MatCreateSeqSELL MatMultTransposeEqual MatTransposeMatMultEqual
MatCreateTranspose MatNorm MatUpdateMPIAIJWithArrays
MatDenseGetArray MatPreallocateFinalize MatViewFromOptions
MatDenseGetArrayRead MatPreallocateInitialize MatZeroEntries
MatDenseGetColumn MatPreallocateLocation MatZeroRows
MatDenseGetLDA MatPreallocateSet MatZeroRowsColumns
MatDenseGetLocalMatrix MatPreallocateSetLocal MatZeroRowsColumnsIS
MatDenseRestoreArray MatPreallocateSetLocalBlock MatZeroRowsColumnsLocal
MatDenseRestoreArrayRead MatPreallocateSetLocalRemoveDups MatZeroRowsColumnsLocalIS
MatDenseRestoreColumn MatPreallocateSymmetricSetBlock MatZeroRowsColumnsStencil
MatDiagonalScale MatPreallocateSymmetricSetLocalBlock MatZeroRowsIS
MatDiagonalSet MatProductClear MatZeroRowsLocal
MatDuplicate MatProductCreate MatZeroRowsLocalIS
MatEqual MatProductCreateWithMat MatZeroRowsStencil
MatFDColoringSetValues MatProductNumeric VecScatterFFTWToPetsc
MatFactorGetSolverType MatProductReplaceMats VecScatterPetscToFFTW
Advanced - Setting more advanced options and customization
MATBLOCKMAT MatFactorSolveSchurComplementTranspose MatMFFDSetType
MATCOMPOSITE MatFreeIntermediateDataStructures MatMFFDWPSetComputeNormU
MATIS MatGetColumnVector MatMPIAIJSetUseScalableIncreaseOverlap
MATKAIJ MatGetDiagonalBlock MatMPIBAIJSetHashTableFactor
MATMAIJ MatGetGhosts MatMPIBAIJSetPreallocationCSR
MATMFFD MatGetInertia MatMPIBAIJSetValuesBlocked
MATPREALLOCATOR MatGetLayouts MatMPISBAIJSetPreallocationCSR
MATSCATTER MatGetLocalToGlobalMapping MatMissingDiagonal
MATSHELL MatGetMultiProcBlock MatNestGetISs
MatAppendOptionsPrefix MatGetOptionsPrefix MatNestGetLocalISs
MatAssembled MatGetRow MatNestSetSubMats
MatCompositeAddMat MatGetRowUpperTriangular MatNullSpace
MatCompositeGetMat MatGetTrace MatNullSpaceCreate
MatCompositeGetMatStructure MatGetValues MatNullSpaceCreateRigidBody
MatCompositeGetNumberMat MatGetValuesLocal 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 MatKAIJGetScaledIdentity MatSeqAIJSetColumnIndices
MatCreateMPIMatConcatenateSeqMat MatKAIJGetT MatSeqBAIJSetColumnIndices
MatCreateNest MatKAIJGetTRead MatSeqBAIJSetPreallocationCSR
MatCreateRedundantMatrix MatKAIJRestoreS MatSeqSBAIJSetColumnIndices
MatCreateSeqBAIJWithArrays MatKAIJRestoreSRead MatSeqSBAIJSetPreallocationCSR
MatCreateSeqSBAIJWithArrays MatKAIJRestoreT MatSetErrorIfFailure
MatCreateShell MatKAIJRestoreTRead MatSetNearNullSpace
MatCreateSubMatrices MatKAIJSetAIJ MatSetNullSpace
MatCreateSubMatricesMPI MatKAIJSetS MatSetOptionsPrefix
MatCreateSubMatrix MatKAIJSetT MatSetTransposeNullSpace
MatCreateVecs MatMAIJGetAIJ MatSetValuesBatch
MatCreateVecsFFTW MatMAIJRedimension MatSetValuesRow
MatDenseGetArrayF90 MatMFFDCheckPositivity MatShellGetContext
MatDenseRestoreArrayF90 MatMFFDDSSetUmin MatShellGetOperation
MatDestroyMatrices MatMFFDGetH MatShellSetContext
MatDestroySeqNonzeroStructure MatMFFDResetHHistory MatShellSetManageScalingShifts
MatDestroySubMatrices MatMFFDSetBase MatShellSetOperation
MatFactorCreateSchurComplement MatMFFDSetCheckh MatShellSetVecType
MatFactorFactorizeSchurComplement MatMFFDSetFunction MatShellTestMult
MatFactorGetError MatMFFDSetFunctionError MatShellTestMultTranpose
MatFactorGetErrorZeroPivot MatMFFDSetFunctioni MatStashGetInfo
MatFactorGetSchurComplement MatMFFDSetFunctioniBase MatStoreValues
MatFactorInvertSchurComplement MatMFFDSetHHistory MatSubdomainsCreateCoalesce
MatFactorRestoreSchurComplement MatMFFDSetOptionsPrefix MatTransColoringApplyDenToSp
MatFactorSolveSchurComplement 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
MatGetNullSpace MatMatSolve
No deprecated routines

Table of Contents