petsc-master 2019-11-13
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 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 MatMPIAIJSetUseScalableIncreaseOverlap
MATCOMPOSITE MatFreeIntermediateDataStructures MatMPIBAIJSetHashTableFactor
MATIS MatGetColumnVector MatMPIBAIJSetPreallocationCSR
MATKAIJ MatGetDiagonalBlock MatMPIBAIJSetValuesBlocked
MATMAIJ MatGetGhosts MatMPISBAIJSetPreallocationCSR
MATMFFD MatGetInertia MatMissingDiagonal
MATPREALLOCATOR MatGetLayouts MatNestGetISs
MATSCATTER MatGetLocalToGlobalMapping MatNestGetLocalISs
MATSHELL MatGetMultiProcBlock MatNestSetSubMats
MatAppendOptionsPrefix MatGetOptionsPrefix MatNullSpace
MatAssembled MatGetRow MatNullSpaceCreate
MatCompositeAddMat MatGetRowUpperTriangular MatNullSpaceCreateRigidBody
MatCompositeGetMat MatGetTrace MatNullSpaceDestroy
MatCompositeGetMatStructure MatGetValues MatNullSpaceRemove
MatCompositeGetNumberMat MatHasOperation MatNullSpaceSetFunction
MatCompositeGetType MatISFixLocalEmpty MatNullSpaceTest
MatCompositeMerge MatISGetLocalMat MatNullSpaceView
MatCompositeSetMatStructure MatISRestoreLocalMat MatPermute
MatCompositeSetMergeType MatISSetLocalMat MatPreallocatorPreallocate
MatCompositeSetScalings MatISSetLocalMatType MatRealPart
MatCompositeSetType MatISStoreL2L MatRegister
MatComputeOperator MatImaginaryPart MatRegisterAll
MatComputeOperatorTranspose MatInodeGetInodeSizes MatRestoreRow
MatConjugate MatInvertBlockDiagonal MatRestoreRowUpperTriangular
MatCreateComposite MatInvertBlockDiagonalMat MatRetrieveValues
MatCreateConstantDiagonal MatInvertVariableBlockDiagonal MatScatterSetVecScatter
MatCreateIS MatIsHermitianKnown MatSeqAIJGetArrayF90
MatCreateKAIJ MatIsSymmetricKnown MatSeqAIJRegister
MatCreateMAIJ MatKAIJGetAIJ MatSeqAIJRegisterAll
MatCreateMFFD MatKAIJGetS MatSeqAIJRestoreArrayF90
MatCreateMPIAIJSumSeqAIJ MatKAIJGetSRead MatSeqAIJSetColumnIndices
MatCreateMPIAIJWithSeqAIJ MatKAIJGetT MatSeqBAIJSetColumnIndices
MatCreateMPIAIJWithSplitArrays MatKAIJGetTRead MatSeqBAIJSetPreallocationCSR
MatCreateMPIMatConcatenateSeqMat MatKAIJRestoreS MatSeqSBAIJSetColumnIndices
MatCreateNest MatKAIJRestoreSRead MatSeqSBAIJSetPreallocationCSR
MatCreateRedundantMatrix MatKAIJRestoreT MatSetErrorIfFailure
MatCreateSeqBAIJWithArrays MatKAIJRestoreTRead MatSetNearNullSpace
MatCreateSeqSBAIJWithArrays MatKAIJSetAIJ MatSetNullSpace
MatCreateShell MatKAIJSetS MatSetOptionsPrefix
MatCreateSubMatrices MatKAIJSetT MatSetTransposeNullSpace
MatCreateSubMatricesMPI MatMAIJGetAIJ MatSetValuesBatch
MatCreateSubMatrix MatMAIJRedimension MatSetValuesRow
MatCreateVecs MatMFFDCheckPositivity MatShellGetContext
MatCreateVecsFFTW MatMFFDDSSetUmin MatShellGetOperation
MatDenseGetArrayF90 MatMFFDGetH MatShellSetContext
MatDenseRestoreArrayF90 MatMFFDResetHHistory MatShellSetManageScalingShifts
MatDestroyMatrices MatMFFDSetBase MatShellSetOperation
MatDestroySeqNonzeroStructure MatMFFDSetCheckh MatShellSetVecType
MatDestroySubMatrices MatMFFDSetFunction MatShellTestMult
MatFactorCreateSchurComplement MatMFFDSetFunctionError MatShellTestMultTranpose
MatFactorFactorizeSchurComplement MatMFFDSetFunctioni MatStashGetInfo
MatFactorGetError MatMFFDSetFunctioniBase MatStoreValues
MatFactorGetErrorZeroPivot MatMFFDSetHHistory MatSubdomainsCreateCoalesce
MatFactorGetSchurComplement MatMFFDSetOptionsPrefix MatTransColoringApplyDenToSp
MatFactorInvertSchurComplement MatMFFDSetPeriod MatTransColoringApplySpToDen
MatFactorRestoreSchurComplement MatMFFDSetType
MatFactorSolveSchurComplement MatMFFDWPSetComputeNormU
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