petsc-master 2020-05-31
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 MATSOLVERSUPERLU_DIST MatMumpsGetInverse
MATAIJCRL MATSOLVERUMFPACK MatMumpsGetInverseTranspose
MATAIJCUSPARSE Mat MatMumpsGetRinfo
MATAIJMKL MatAssemblyBegin MatMumpsGetRinfog
MATAIJPERM MatAssemblyEnd MatMumpsSetCntl
MATAIJSELL MatAssemblyType MatMumpsSetIcntl
MATAIJVIENNACL MatColoring MatOption
MATBAIJ MatColoringType MatOrderingType
MATBAIJMKL MatComputeBandwidth MatPartitioning
MATDENSE MatCreate MatPartitioningType
MATDENSECUDA MatCreateSubMatrixOption MatProductAlgorithm
MATELEMENTAL MatDestroy MatProductType
MATMPIADJ MatDuplicateOption MatPropagateSymmetryOptions
MATMPIAIJ MatFDColoring MatResetPreallocation
MATMPIBAIJ MatFactorError MatReuse
MATMPIDENSECUDA MatFactorShiftType MatSORType
MATMPISBAIJ MatFactorType MatSTRUMPACKSetColPerm
MATMPISELL MatGetLocalSize MatSTRUMPACKSetHSSAbsTol
MATSBAIJ MatGetOwnershipRange MatSTRUMPACKSetHSSLeafSize
MATSELL MatGetOwnershipRanges MatSTRUMPACKSetHSSMaxRank
MATSEQAIJ MatGetOwnershipRangesColumn MatSTRUMPACKSetHSSMinSepSize
MATSEQAIJCUSPARSE MatGetSize MatSTRUMPACKSetHSSRelTol
MATSEQAIJVIENNACL MatHasCongruentLayouts MatSTRUMPACKSetReordering
MATSEQBAIJ MatInfoType MatSetFromOptions
MATSEQDENSE MatLoad MatSetSizes
MATSEQDENSECUDA MatMFFDType MatSetStencil
MATSEQSBAIJ MatMkl_PardisoSetCntl MatSetUp
MATSOLVERCHOLMOD MatMult MatSetValue
MATSOLVERCUSPARSE MatMultAdd MatSetValues
MATSOLVERESSL MatMultConstrained MatSetValuesBlockedStencil
MATSOLVERKLU MatMultHermitianTranspose MatSetValuesStencil
MATSOLVERLUSOL MatMultHermitianTransposeAdd MatSolverType
MATSOLVERMATLAB MatMultTranspose MatStencil
MATSOLVERMKL_PARDISO MatMultTransposeAdd MatStructure
MATSOLVERMUMPS MatMultTransposeConstrained MatSuperluSetILUDropTol
MATSOLVERPASTIX MatMumpsGetCntl MatTransposeColoring
MATSOLVERSPARSEELEMENTAL MatMumpsGetIcntl MatType
MATSOLVERSSTRUMPACK MatMumpsGetInfo MatView
MATSOLVERSUPERLU MatMumpsGetInfog MatXAIJSetPreallocation
Intermediate - Setting options for algorithms and data structures
MATHYPRE MatDiagonalScale MatProductNumeric
MATMFFD_DS MatDiagonalSet MatProductReplaceMats
MATMFFD_WP MatDuplicate MatProductSetAlgorithm
MATNEST MatEqual MatProductSetFill
MATSOLVERBAS MatFDColoringSetValues MatProductSetFromOptions
MatAXPY MatFactorGetSolverType MatProductSetType
MatAYPX MatFindNonzeroRows MatProductSymbolic
MatBindToCPU MatFindZeroRows MatProductView
MatBlockMatSetPreallocation MatGetBlockSize MatPtAP
MatCUSPARSEFormatOperation MatGetBlockSizes MatPtAPMultEqual
MatCUSPARSESetFormat MatGetColumnNorms MatPythonCreate
MatCUSPARSEStorageFormat MatGetDiagonal MatPythonSetType
MatChop MatGetFactor MatRARt
MatColoringWeightType MatGetFactorAvailable MatRARtMultEqual
MatConvert MatGetFactorType MatReorderForNonzeroDiagonal
MatCopy MatGetInfo MatRestoreLocalSubMatrix
MatCreateAIJ MatGetLocalSubMatrix MatRestrict
MatCreateAIJCUSPARSE MatGetNonzeroState MatSTRUMPACKReordering
MatCreateAIJViennaCL MatGetOption MatScale
MatCreateBAIJ MatGetOwnershipIS MatScatterGetVecScatter
MatCreateBAIJMKL MatGetRowMax MatSeqAIJGetArray
MatCreateBlockMat MatGetRowMaxAbs MatSeqAIJGetArrayRead
MatCreateDense MatGetRowMin MatSeqAIJGetMaxRowNonzeros
MatCreateDenseCUDA MatGetRowMinAbs MatSeqAIJRestoreArray
MatCreateFFT MatGetRowSum MatSeqAIJRestoreArrayRead
MatCreateHermitianTranspose MatGetSeqNonzeroStructure MatSeqAIJSetPreallocation
MatCreateLRC MatGetType MatSeqAIJSetType
MatCreateMPIAIJCRL MatGetVariableBlockSizes MatSeqBAIJGetArray
MatCreateMPIAIJMKL MatGetVecType MatSeqBAIJRestoreArray
MatCreateMPIAIJPERM MatHYPRESetPreallocation MatSeqBAIJSetPreallocation
MatCreateMPIAIJSELL MatHermitianTranspose MatSeqDenseSetPreallocation
MatCreateMPIAIJWithArrays MatHermitianTransposeGetMat MatSeqSBAIJGetArray
MatCreateMPIAdj MatISSetPreallocation MatSeqSBAIJRestoreArray
MatCreateMPIBAIJWithArrays MatInfo MatSeqSBAIJSetPreallocation
MatCreateMPISBAIJWithArrays MatInterpolate MatSeqSELLRestoreArray
MatCreateNormal MatInterpolateAdd MatSeqSELLSetPreallocation
MatCreateNormalHermitian MatIsHermitian MatSetBlockSize
MatCreateSBAIJ MatIsHermitianTranspose MatSetBlockSizes
MatCreateSELL MatIsLinear MatSetFactorType
MatCreateScatter MatIsStructurallySymmetric MatSetLocalToGlobalMapping
MatCreateSeqAIJ MatIsSymmetric MatSetOption
MatCreateSeqAIJCRL MatIsTranspose MatSetRandom
MatCreateSeqAIJCUSPARSE MatLRCGetMats MatSetType
MatCreateSeqAIJFromTriple MatMPIAIJGetSeqAIJ MatSetValuesBlocked
MatCreateSeqAIJMKL MatMPIAIJSetPreallocation MatSetValuesBlockedLocal
MatCreateSeqAIJPERM MatMPIAdjSetPreallocation MatSetValuesLocal
MatCreateSeqAIJSELL MatMPIAdjToSeq MatSetValuesRowLocal
MatCreateSeqAIJViennaCL MatMPIBAIJSetPreallocation MatSetVariableBlockSizes
MatCreateSeqAIJWithArrays MatMPIDenseSetPreallocation MatSetVecType
MatCreateSeqBAIJ MatMPISBAIJSetPreallocation MatShift
MatCreateSeqBAIJMKL MatMPISELLSetPreallocation MatSolvePackageGet
MatCreateSeqCUFFT MatMatMatMult MatSolvePackageRegister
MatCreateSeqDense MatMatMult MatStashSetInitialSize
MatCreateSeqDenseCUDA MatMatMultEqual MatTranspose
MatCreateSeqSBAIJ MatMatTransposeMult MatTransposeColoringCreate
MatCreateSeqSELL MatMatTransposeMultEqual MatTransposeColoringDestroy
MatCreateTranspose MatMkl_CPardisoSetCntl MatTransposeGetMat
MatDenseGetArray MatMultAddEqual MatTransposeMatMult
MatDenseGetArrayRead MatMultEqual MatTransposeMatMultEqual
MatDenseGetArrayWrite MatMultTransposeAddEqual MatUpdateMPIAIJWithArrays
MatDenseGetColumn MatMultTransposeEqual MatViewFromOptions
MatDenseGetColumnVec MatNorm MatZeroEntries
MatDenseGetColumnVecRead MatPreallocateFinalize MatZeroRows
MatDenseGetColumnVecWrite MatPreallocateInitialize MatZeroRowsColumns
MatDenseGetLDA MatPreallocateLocation MatZeroRowsColumnsIS
MatDenseGetLocalMatrix MatPreallocateSet MatZeroRowsColumnsLocal
MatDenseRestoreArray MatPreallocateSetLocal MatZeroRowsColumnsLocalIS
MatDenseRestoreArrayRead MatPreallocateSetLocalBlock MatZeroRowsColumnsStencil
MatDenseRestoreArrayWrite MatPreallocateSetLocalRemoveDups MatZeroRowsIS
MatDenseRestoreColumn MatPreallocateSymmetricSetBlock MatZeroRowsLocal
MatDenseRestoreColumnVec MatPreallocateSymmetricSetLocalBlock MatZeroRowsLocalIS
MatDenseRestoreColumnVecRead MatProductClear MatZeroRowsStencil
MatDenseRestoreColumnVecWrite MatProductCreate VecScatterFFTWToPetsc
MatDenseSetLDA MatProductCreateWithMat VecScatterPetscToFFTW
Advanced - Setting more advanced options and customization
MATBLOCKMAT MatFactorSolveSchurComplementTranspose MatMFFDWPSetComputeNormU
MATCOMPOSITE MatGetColumnVector MatMPIAIJSetUseScalableIncreaseOverlap
MATIS MatGetDiagonalBlock MatMPIBAIJSetHashTableFactor
MATKAIJ MatGetGhosts MatMPIBAIJSetPreallocationCSR
MATMAIJ MatGetInertia MatMPIBAIJSetValuesBlocked
MATMFFD MatGetLayouts MatMPISBAIJSetPreallocationCSR
MATPREALLOCATOR MatGetLocalToGlobalMapping MatMissingDiagonal
MATSCATTER MatGetMultiProcBlock MatNestGetISs
MATSHELL MatGetOptionsPrefix MatNestGetLocalISs
MatAppendOptionsPrefix MatGetRow MatNestSetSubMats
MatAssembled MatGetRowUpperTriangular MatNullSpace
MatCompositeAddMat MatGetTrace MatNullSpaceCreate
MatCompositeGetMat MatGetValues MatNullSpaceCreateRigidBody
MatCompositeGetMatStructure MatGetValuesLocal MatNullSpaceDestroy
MatCompositeGetNumberMat MatHasOperation MatNullSpaceRemove
MatCompositeGetType MatISFixLocalEmpty MatNullSpaceSetFunction
MatCompositeMerge MatISGetLocalMat MatNullSpaceTest
MatCompositeSetMatStructure MatISRestoreLocalMat MatNullSpaceView
MatCompositeSetMergeType MatISSetLocalMat MatPermute
MatCompositeSetScalings MatISSetLocalMatType MatPreallocatorPreallocate
MatCompositeSetType MatISStoreL2L MatRealPart
MatComputeOperator MatImaginaryPart MatRegister
MatComputeOperatorTranspose MatInodeGetInodeSizes MatRegisterAll
MatConjugate MatInvertBlockDiagonal MatRestoreRow
MatCreateComposite MatInvertBlockDiagonalMat MatRestoreRowUpperTriangular
MatCreateConstantDiagonal MatInvertVariableBlockDiagonal MatRetrieveValues
MatCreateIS MatIsHermitianKnown MatScatterSetVecScatter
MatCreateKAIJ MatIsSymmetricKnown MatSeqAIJGetArrayF90
MatCreateMAIJ MatKAIJGetAIJ MatSeqAIJRegister
MatCreateMFFD MatKAIJGetS MatSeqAIJRegisterAll
MatCreateMPIAIJSumSeqAIJ MatKAIJGetSRead MatSeqAIJRestoreArrayF90
MatCreateMPIAIJWithSeqAIJ MatKAIJGetScaledIdentity 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 MatShellSetMatProductOperation
MatDestroySubMatrices MatMFFDSetCheckh MatShellSetOperation
MatFactorCreateSchurComplement MatMFFDSetFunction MatShellSetVecType
MatFactorFactorizeSchurComplement MatMFFDSetFunctionError MatShellTestMult
MatFactorGetError MatMFFDSetFunctioni MatShellTestMultTranpose
MatFactorGetErrorZeroPivot MatMFFDSetFunctioniBase MatStashGetInfo
MatFactorGetSchurComplement MatMFFDSetHHistory MatStoreValues
MatFactorInvertSchurComplement MatMFFDSetOptionsPrefix MatSubdomainsCreateCoalesce
MatFactorRestoreSchurComplement MatMFFDSetPeriod MatTransColoringApplyDenToSp
MatFactorSolveSchurComplement MatMFFDSetType MatTransColoringApplySpToDen
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
MATDUMMY MatGalerkin MatMPIAdjCreateNonemptySubcommMat
MatBackwardSolve MatGetBrowsOfAcols MatMPISELLGetLocalMatCondensed
MatCheckCompressedRow MatGetColumnIJ MatMatSolve
MatCholeskyFactor MatGetCommunicationStructs MatMatSolveTranspose
MatCholeskyFactorNumeric MatGetNearNullSpace MatMatTransposeSolve
MatCholeskyFactorSymbolic MatGetNullSpace MatMultDiagonalBlock
MatColoringPatch MatGetOperation MatNestGetSize
MatCreateLocalRef MatGetOwnershipRangeColumn MatNestGetSubMat
MatCreateSubMatrixVirtual MatGetRowIJ MatNestGetSubMats
MatDenseCUDAGetArray MatGetTransposeNullSpace MatNestSetSubMat
MatDenseCUDAGetArrayRead MatICCFactor MatNestSetVecType
MatDenseCUDAGetArrayWrite MatICCFactorSymbolic MatNullSpaceGetVecs
MatDenseCUDAPlaceArray MatILUFactor MatRegisterRootName
MatDenseCUDAReplaceArray MatILUFactorSymbolic MatResidual
MatDenseCUDAResetArray MatISGetMPIXAIJ MatRestoreColumnIJ
MatDenseCUDARestoreArray MatIncreaseOverlap MatRestoreRowIJ
MatDenseCUDARestoreArrayRead MatIncreaseOverlapSplit MatSOR
MatDenseCUDARestoreArrayWrite MatInitializePackage MatSeqAIJSetPreallocationCSR
MatDensePlaceArray MatIsShell MatSetBlockSizesFromMats
MatDenseReplaceArray MatLUFactor MatSetOperation
MatDenseResetArray MatLUFactorNumeric MatSetUnfactored
MatDiagonalScaleLocal MatLUFactorSymbolic MatSolve
MatFactorClearError MatMFFD MatSolveAdd
MatFactorInfo MatMFFDFinalizePackage MatSolveTranspose
MatFactorInfoInitialize MatMFFDInitializePackage MatSolveTransposeAdd
MatFactorSetSchurIS MatMFFDRegister MatSolves
MatFinalizePackage MatMFFDRegisterAll MatSubMatrixVirtualUpdate
MatFindOffBlockDiagonalEntries MatMPIAIJGetLocalMat PetscElementalFinalizePackage
MatFindZeroDiagonals MatMPIAIJGetLocalMatCondensed PetscElementalInitializePackage
MatForwardSolve MatMPIAIJSetPreallocationCSR
No deprecated routines

Table of Contents