DM Examples

DM objects are used to manage communication between the algebraic structures in PETSc (Vec and Mat) and mesh data structures in PDE-based (or other) simulations. See, for example, DMDACreate().

Beginner - Basic usage
DMADDAGetCorners DMDAInterpolationType DMMeshAssembleVectorComplete
DMADDAGetGhostCorners DMDALocalInfo DMMeshCreate
DMADDAGetMatrixNS DMDASetUniformCoordinates DMMeshCreateExodus
DMADDAMatSetValues DMDAStencilType DMMeshCreatePCICE
DMCartesianCreate DMDA_STENCIL_BOX DMMeshExodusGetInfo
DMCompositeGetNumberDM DMDA_STENCIL_STAR DMMeshGetDimension
DMCreate DMGetGlobalVector DMMeshGetLabelIds
DMCreateGlobalVector DMGetLocalVector DMMeshGetLabelSize
DMCreateLocalVector DMGetMatrix DMMeshGetMaximumDegree
DMDABoundaryType DMGlobalToLocalBegin DMMeshGetStratum
DMDACreate1d DMGlobalToLocalEnd DMMeshGetStratumSize
DMDACreate2d DMIGACreate DMMeshRestrictVector
DMDACreate3d DMIGAGetBasisData DMRestoreGlobalVector
DMDAElementType DMIGAGetLocalInfo DMRestoreLocalVector
DMDAGetBoundingBox DMIGAGetNumQuadraturePoints PetscViewerBinaryMatlabDestroy
DMDAGetCorners DMIGAGetPolynomialOrder PetscViewerBinaryMatlabOpen
DMDAGetGhostCorners DMLocalToGlobalBegin SAMappingSetSizes
DMDAGetInfo DMLocalToGlobalEnd SectionIntView
DMDAGetLocalBoundingBox DMMeshAssembleMatrix SectionRealView
DMDAGetLocalInfo DMMeshAssembleVector
Intermediate - Setting options for algorithms and data structures
BCSectionGetArray DMDASetGhostedCoordinates DMMeshGetElements
BCSectionRealCreate DMDASetInterpolationType DMMeshGetSectionInt
BCSectionRealGetArray DMDASetLocalAdicFunction DMMeshGetSectionReal
DMADDACreate DMDASetLocalAdicFunctioni DMMeshGetVertexSectionInt
DMCompositeGetLocalISs DMDASetLocalAdicFunctionib DMMeshGetVertexSectionReal
DMConvert DMDASetLocalAdicMFFunction DMMeshHasSectionInt
DMDACoor2d DMDASetLocalAdicMFFunctioni DMMeshHasSectionReal
DMDACoor3d DMDASetLocalAdicMFFunctionib DMMeshRefine
DMDAForEachPointBegin2d DMDASetLocalFunction DMMeshSetSectionInt
DMDAForEachPointEnd2d DMDASetLocalFunctioni DMMeshSetSectionReal
DMDAFormFunctionLocal DMDASetLocalFunctionib DMMeshSetupSection
DMDAFormFunctionLocalGhost DMDASetLocalJacobian DMSetApplicationContext
DMDAFormjacobianLocal DMDASetNumProcs DMSetFunction
DMDAGetAO DMDASetOwnershipRanges DMSetInitialGuess
DMDAGetCoordinateDA DMDASetRefinementFactor DMSetJacobian
DMDAGetCoordinates DMDASetSizes DMSetType
DMDAGetElementType DMDASetStencilType DMSetVecType
DMDAGetElements DMDASetStencilWidth MATHYPRESSTRUCT
DMDAGetFieldName DMDAVecGetArray MATHYPRESTRUCT
DMDAGetGhostedCoordinates DMDAVecGetArrayDOF MatCreateSeqUSFFT
DMDAGetGlobalIndices DMDAVecRestoreArray MatSetDM
DMDAGetGlobalIndicesF90 DMDAVecRestoreArrayDOF MatSetValuesTopology
DMDAGetInterpolationType DMGetAggregates PetscViewerBinaryMatlabOutputBag
DMDAGetLocalFunction DMGetApplicationContext PetscViewerBinaryMatlabOutputVec
DMDAGetLocalJacobian DMGetBlockSize PetscViewerBinaryMatlabOutputVecDA
DMDAGetNeighbors DMGetLocalToGlobalMapping SAMappingPullback
DMDAGetOwnershipRanges DMGetLocalToGlobalMappingBlock SAMappingPushforward
DMDAGetReducedDA DMGetType SectionGetArray
DMDAGetRefinementFactor DMIGAGetFieldName SectionIntDistribute
DMDALocalToLocalBegin DMIGASetFieldName SectionIntRestrictClosure
DMDALocalToLocalEnd DMIGAVecGetArray SectionIntSet
DMDANaturalToGlobalEnd DMIGAVecRestoreArray SectionIntUpdateClosure
DMDARestoreElements DMLoad SectionRealAXPY
DMDASetBoundaryType DMMeshDistribute SectionRealDistribute
DMDASetCoordinates DMMeshGenerate SectionRealNorm
DMDASetDim DMMeshGetCellSectionInt SectionRealRestrictClosure
DMDASetDof DMMeshGetCellSectionReal SectionRealSet
DMDASetElementType DMMeshGetCone SectionRealUpdateClosure
DMDASetFieldName DMMeshGetCoordinates
Advanced - Setting more advanced options and customization
DMCartesianGetMesh DMDANaturalToGlobalBegin SectionIntCreate
DMCartesianSetMesh DMDARestoreAdicArray SectionIntDestroy
DMCompositeAddArray DMDARestoreAdicMFArray SectionIntGetBundle
DMCompositeAddDM DMDARestoreArray SectionIntGetFiberDimension
DMCompositeCreate DMMeshCreateGlobalRealVector SectionIntGetFibration
DMCompositeGather DMMeshCreateGlobalScatter SectionIntGetSection
DMCompositeGetAccess DMMeshCreateMatrix SectionIntGetSize
DMCompositeGetEntries DMMeshCreateVector SectionIntRestrict
DMCompositeGetGlobalISs DMMeshGetGlobalScatter SectionIntSetBundle
DMCompositeGetISLocalToGlobalMappings DMMeshGetMesh SectionIntSetFiberDimension
DMCompositeGetLocalVectors DMMeshLoad SectionIntSetFiberDimensionField
DMCompositeRestoreAccess DMMeshSetMesh SectionIntSetSection
DMCompositeRestoreLocalVectors DMRegister SectionIntUpdate
DMCompositeScatter DMRegisterAll SectionIntZero
DMCompositeSetCoupling DMRegisterDestroy SectionRealAddSpace
DMDAComputeJacobian1 DMSetOptionsPrefix SectionRealAllocate
DMDAComputeJacobian1WithAdic DMSlicedCreate SectionRealClear
DMDACreate DMSlicedGetGlobalIndices SectionRealComplete
DMDACreatePF DMSlicedSetBlockFills SectionRealCreate
DMDAFormFunction DMSlicedSetGhosts SectionRealCreateLocalVector
DMDAFormFunction1 DMSlicedSetPreallocation SectionRealDestroy
DMDAFormFunctioni1 PCICERenumberBoundary SectionRealDuplicate
DMDAFormFunctionib1 SAMappingBin SectionRealGetBundle
DMDAGetAdicArray SAMappingBinLocal SectionRealGetFiberDimension
DMDAGetAdicMFArray SAMappingBinSplit SectionRealGetFibration
DMDAGetAdicMFArrayb SAMappingBinSplitLocal SectionRealGetSection
DMDAGetArray SAMappingMap SectionRealGetSize
DMDAGetProcessorSubset SAMappingMapLocal SectionRealRestrict
DMDAGetProcessorSubsets SAMappingMapSplit SectionRealSetBundle
DMDAGlobalToNaturalAllCreate SAMappingMapSplitLocal SectionRealSetFiberDimension
DMDAGlobalToNaturalBegin SAMappingRegister SectionRealSetFiberDimensionField
DMDAGlobalToNaturalEnd SAMappingSetUp SectionRealSetSection
DMDAMultiplyByJacobian1WithAD SectionIntAddSpace SectionRealToVec
DMDAMultiplyByJacobian1WithAdic SectionIntAllocate SectionRealUpdate
DMDAMultiplyByJacobian1WithAdifor SectionIntClear SectionRealZero
DMDANaturalAllToGlobalCreate SectionIntComplete
Developer - Interfaces intended primarily for library developers, not for typical applications programmers
ADDAHCiter DMDASetBlockFills DMRefine
ADDAHCiterStartup DMDASetGetMatrix DMRefineHierarchy
DMADDASetRefinement DMDestroy DMSetFromOptions
DMClearGlobalVectors DMGetColoring DMSetMatrixPreallocateOnly
DMCoarsen DMGetInjection DMSetUp
DMCoarsenHierarchy DMGetInterpolation DMView
DMComputeFunction DMGetInterpolationScale SAMappingFinalizePackage
DMComputeInitialGuess DMGetRefineLevel SAMappingInitializePackage
DMComputeJacobian DMHasFunction SAMappingRegisterAll
DMComputeJacobianDefault DMHasInitialGuess SAMappingRegisterDestroy
DMDACreateNaturalVector DMHasJacobian
DMDAGetScatter DMMeshSetMaxDof
No deprecated routines

Table of Contents