petsc-master 2020-04-04
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 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