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