DMPlex (Unstructured Meshes)
DMPlex manages unstructured meshes using a flexible topology representation. It supports finite element methods, finite volume methods, and general mesh-based computations.
Overview
DMPlex provides:
- General unstructured mesh topology (simplices, tensor products, polyhedra)
- Point-based topological representation (vertices, edges, faces, cells)
- Mesh partitioning and distribution
- Overlap and ghost cell management
- Section-based field layout
- Support for FEM assembly via PetscDS and PetscFE
- Mesh refinement and adaptation
Basic Usage Pattern
using PETSc, MPI
MPI.Init()
petsclib = PETSc.getlib()
PETSc.initialize(petsclib)
# Create a simple 2D quadrilateral mesh
dm = LibPETSc.DMPlexCreateBoxMesh(
petsclib,
MPI.COMM_WORLD,
2, # dimension
LibPETSc.PETSC_FALSE, # simplex (false = tensor/quad)
[5, 5], # faces per dimension
[0.0, 0.0], # lower bounds
[1.0, 1.0], # upper bounds
[LibPETSc.DM_BOUNDARY_NONE, LibPETSc.DM_BOUNDARY_NONE], # boundary types
LibPETSc.PETSC_TRUE, # interpolate
0, # localizationHeight
LibPETSc.PETSC_FALSE # sparseLocalize
)
# Distribute mesh across processes (for serial, this is a no-op)
dmParallel = LibPETSc.PetscDM(C_NULL, petsclib)
LibPETSc.DMPlexDistribute(petsclib, dm, 0, C_NULL, dmParallel)
if dmParallel.ptr != C_NULL
LibPETSc.DMDestroy(petsclib, dm)
dm = dmParallel
end
# Set up
LibPETSc.DMSetFromOptions(petsclib, dm)
LibPETSc.DMSetUp(petsclib, dm)
# Create section to define field layout
section = Ref{LibPETSc.PetscSection}()
LibPETSc.DMGetLocalSection(petsclib, dm, section)
# Create vectors and matrices
x = LibPETSc.DMCreateGlobalVector(petsclib, dm)
# Cleanup
LibPETSc.VecDestroy(petsclib, x)
LibPETSc.DMDestroy(petsclib, dm)
PETSc.finalize(petsclib)
MPI.Finalize()DMPlex Functions
PETSc.LibPETSc.DMPlexBuildCoordinatesFromCellList — Method
DMPlexBuildCoordinatesFromCellList(petsclib::PetscLibType,dm::PetscDM, spaceDim::PetscInt, vertexCoords::Vector{PetscReal})Build DM coordinates from a list of coordinates for each owned vertex (common mesh generator output)
Collective
Input Parameters:
dm- TheDMspaceDim- The spatial dimension used for coordinatesvertexCoords- An array of numVertices*spaceDim numbers, the coordinates of each vertex
Level: advanced
-seealso: , DM, DMPLEX, DMPlexBuildCoordinatesFromCellListParallel(), DMPlexCreateFromCellListPetsc(), DMPlexBuildFromCellList()
External Links
- PETSc Manual:
DMPlex/DMPlexBuildCoordinatesFromCellList
PETSc.LibPETSc.DMPlexBuildCoordinatesFromCellListParallel — Method
DMPlexBuildCoordinatesFromCellListParallel(petsclib::PetscLibType,dm::PetscDM, spaceDim::PetscInt, sfVert::PetscSF, vertexCoords::Vector{PetscReal})Build DM coordinates from a list of coordinates for each owned vertex (common mesh generator output)
Collective; No Fortran Support
Input Parameters:
dm- TheDMspaceDim- The spatial dimension used for coordinatessfVert-PetscSFdescribing complete vertex ownershipvertexCoords- An array of numVertices*spaceDim numbers, the coordinates of each vertex
Level: advanced
-seealso: , DM, DMPLEX, DMPlexBuildCoordinatesFromCellList(), DMPlexCreateFromCellListParallelPetsc(), DMPlexBuildFromCellListParallel()
External Links
- PETSc Manual:
DMPlex/DMPlexBuildCoordinatesFromCellListParallel
PETSc.LibPETSc.DMPlexBuildFromCellList — Method
DMPlexBuildFromCellList(petsclib::PetscLibType,dm::PetscDM, numCells::PetscInt, numVertices::PetscInt, numCorners::PetscInt, cells::Vector{PetscInt})Build DMPLEX topology from a list of vertices for each cell (common mesh generator output)
Collective; No Fortran Support
Input Parameters:
dm- TheDMnumCells- The number of cells owned by this processnumVertices- The number of vertices owned by this process, orPETSC_DETERMINEnumCorners- The number of vertices for each cellcells- An array ofnumCellsxnumCornersnumbers, the global vertex numbers for each cell
Level: advanced
-seealso: , DM, DMPLEX, DMPlexBuildFromCellListParallel(), DMPlexBuildCoordinatesFromCellList(), DMPlexCreateFromCellListPetsc()
External Links
- PETSc Manual:
DMPlex/DMPlexBuildFromCellList
PETSc.LibPETSc.DMPlexBuildFromCellListParallel — Method
verticesAdjSaved::Vector{PetscInt} = DMPlexBuildFromCellListParallel(petsclib::PetscLibType,dm::PetscDM, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, numCorners::PetscInt, cells::Vector{PetscInt}, vertexSF::PetscSF)Build a distributed DMPLEX topology from a list of vertices for each cell (common mesh generator output) where all cells have the same celltype
Collective; No Fortran Support
Input Parameters:
dm- TheDMnumCells- The number of cells owned by this processnumVertices- The number of vertices to be owned by this process, orPETSC_DECIDENVertices- The global number of vertices, orPETSC_DETERMINEnumCorners- The number of vertices for each cellcells- An array of numCells imes numCorners numbers, the global vertex numbers for each cell
Output Parameters:
vertexSF- (Optional)PetscSFdescribing complete vertex ownershipverticesAdjSaved- (Optional) vertex adjacency array
Level: advanced
-seealso: , DM, DMPLEX, DMPlexBuildFromCellList(), DMPlexCreateFromCellListParallelPetsc(), DMPlexBuildCoordinatesFromCellListParallel(), PetscSF
External Links
- PETSc Manual:
DMPlex/DMPlexBuildFromCellListParallel
PETSc.LibPETSc.DMPlexBuildFromCellSectionParallel — Method
verticesAdjSaved::Vector{PetscInt} = DMPlexBuildFromCellSectionParallel(petsclib::PetscLibType,dm::PetscDM, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, cellSection::PetscSection, cells::Vector{PetscInt}, vertexSF::PetscSF)Build distributed DMPLEX topology from a list of vertices for each cell (common mesh generator output) allowing multiple celltypes
Collective; No Fortran Support
Input Parameters:
dm- TheDMnumCells- The number of cells owned by this processnumVertices- The number of vertices to be owned by this process, orPETSC_DECIDENVertices- The global number of vertices, orPETSC_DETERMINEcellSection- ThePetscSectiongiving the number of vertices for each cell (layout of cells)cells- An array of the global vertex numbers for each cell
Output Parameters:
vertexSF- (Optional)PetscSFdescribing complete vertex ownershipverticesAdjSaved- (Optional) vertex adjacency array
Level: advanced
-seealso: , DM, DMPLEX, DMPlexBuildFromCellListParallel(), DMPlexCreateFromCellSectionParallel(), DMPlexBuildCoordinatesFromCellListParallel(), PetscSF
External Links
- PETSc Manual:
DMPlex/DMPlexBuildFromCellSectionParallel
PETSc.LibPETSc.DMPlexCheck — Method
DMPlexCheck(petsclib::PetscLibType,dm::PetscDM)Perform various checks of DMPLEX sanity
Input Parameter:
dm- TheDMPLEXobject
Level: developer
-seealso: , DM, DMPLEX, DMCreate(), DMSetFromOptions()
External Links
- PETSc Manual:
DMPlex/DMPlexCheck
PETSc.LibPETSc.DMPlexCheckCellShape — Method
DMPlexCheckCellShape(petsclib::PetscLibType,dm::PetscDM, output::PetscBool, condLimit::PetscReal)Checks the Jacobian of the mapping from reference to real cells and computes some minimal statistics.
Collective
Input Parameters:
dm- TheDMPLEXobjectoutput- If true, statistics will be displayed onstdoutcondLimit- Display all cells above this condition number, orPETSC_DETERMINEfor no cell output
Level: developer
-seealso: , DM, DMPLEX, DMSetFromOptions(), DMPlexComputeOrthogonalQuality()
External Links
- PETSc Manual:
DMPlex/DMPlexCheckCellShape
PETSc.LibPETSc.DMPlexCheckFaces — Method
DMPlexCheckFaces(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt)Check that the faces of each cell give a vertex order this is consistent with what we expect from the cell type
Collective
Input Parameters:
dm- TheDMPLEXobjectcellHeight- Normally 0
Level: developer
-seealso: , DM, DMPLEX, DMCreate(), DMPlexGetVTKCellHeight(), DMSetFromOptions()
External Links
- PETSc Manual:
DMPlex/DMPlexCheckFaces
PETSc.LibPETSc.DMPlexCheckGeometry — Method
DMPlexCheckGeometry(petsclib::PetscLibType,dm::PetscDM)Check the geometry of mesh cells
Input Parameter:
dm- TheDMPLEXobject
Level: developer
-seealso: , DM, DMPLEX, DMCreate(), DMSetFromOptions()
External Links
- PETSc Manual:
DMPlex/DMPlexCheckGeometry
PETSc.LibPETSc.DMPlexCheckInterfaceCones — Method
DMPlexCheckInterfaceCones(petsclib::PetscLibType,dm::PetscDM)Check that points on inter
Input Parameter:
dm- TheDMPLEXobject
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCone(), DMPlexGetConeSize(), DMGetPointSF(), DMGetCoordinates(), DMSetFromOptions()
External Links
- PETSc Manual:
DMPlex/DMPlexCheckInterfaceCones
PETSc.LibPETSc.DMPlexCheckOrphanVertices — Method
DMPlexCheckOrphanVertices(petsclib::PetscLibType,dm::PetscDM)Check that no vertices are disconnected from the mesh, unless the mesh only consists of disconnected vertices.
Collective
Input Parameter:
dm- TheDMPLEXobject
Level: developer
-seealso: , DM, DMPLEX, DMPlexCheck(), DMSetFromOptions()
External Links
- PETSc Manual:
DMPlex/DMPlexCheckOrphanVertices
PETSc.LibPETSc.DMPlexCheckPointSF — Method
DMPlexCheckPointSF(petsclib::PetscLibType,dm::PetscDM, pointSF::PetscSF, allowExtraRoots::PetscBool)Check that several necessary conditions are met for the point PetscSF of this plex.
Collective
Input Parameters:
dm- TheDMPLEXobjectpointSF- ThePetscSF, orNULLforPointSFattached toDMallowExtraRoots- Flag to allow extra points not present in theDM
Level: developer
-seealso: , DM, DMPLEX, DMGetPointSF(), DMSetFromOptions()
External Links
- PETSc Manual:
DMPlex/DMPlexCheckPointSF
PETSc.LibPETSc.DMPlexCheckSkeleton — Method
DMPlexCheckSkeleton(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt)Check that each cell has the correct number of vertices
Input Parameters:
dm- TheDMPLEXobjectcellHeight- Normally 0
Level: developer
-seealso: , DM, DMPLEX, DMCreate(), DMSetFromOptions()
External Links
- PETSc Manual:
DMPlex/DMPlexCheckSkeleton
PETSc.LibPETSc.DMPlexCheckSymmetry — Method
DMPlexCheckSymmetry(petsclib::PetscLibType,dm::PetscDM)Check that the adjacency information in the mesh is symmetric.
Input Parameter:
dm- TheDMPLEXobject
Level: developer
-seealso: , DM, DMPLEX, DMCreate(), DMSetFromOptions()
External Links
- PETSc Manual:
DMPlex/DMPlexCheckSymmetry
PETSc.LibPETSc.DMPlexComputeBdJacobianSingle — Method
DMPlexComputeBdJacobianSingle(petsclib::PetscLibType,dm::PetscDM, wf::PetscWeakForm, label::DMLabel, numValues::PetscInt, values::Vector{PetscInt}, fieldI::PetscInt, locX::PetscVec, locX_t::PetscVec, t::PetscReal, X_tShift::PetscReal, Jac::PetscMat, JacP::PetscMat)Compute the local boundary Jacobian
Not collective
Input Parameters:
dm- The outputDMwf- ThePetscWeakFormholding forms on this boundarylabel- TheDMLabelindicating what faces should be integrated overnumValues- The number of label valuesvalues- The array of label valuesfieldI- The test field for these integralslocX- The local solutionlocX_t- The time derivative of the local solution, orNULLfor time-independent problemst- The timeX_tShift- The multiplier for dF/dxdot
Output Parameters:
Jac- The local JacobianJacP- The local Jacobian preconditioner
Level: developer
-seealso: DMPlexComputeBdJacobianSingleByLabel(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey
External Links
- PETSc Manual:
DMPlex/DMPlexComputeBdJacobianSingle
PETSc.LibPETSc.DMPlexComputeBdJacobianSingleByLabel — Method
DMPlexComputeBdJacobianSingleByLabel(petsclib::PetscLibType,dm::PetscDM, wf::PetscWeakForm, label::DMLabel, numValues::PetscInt, values::Vector{PetscInt}, fieldI::PetscInt, facetIS::IS, locX::PetscVec, locX_t::PetscVec, t::PetscReal, coordField::DMField, X_tShift::PetscReal, Jac::PetscMat, JacP::PetscMat)Compute the local boundary Jacobian for terms matching the input label
Not collective
Input Parameters:
dm- The outputDMwf- ThePetscWeakFormholding forms on this boundarylabel- TheDMLabelindicating what faces should be integrated overnumValues- The number of label valuesvalues- The array of label valuesfieldI- The test field for these integralsfacetIS- TheISgiving the set of possible faces to integrate over (intersected with the label)locX- The local solutionlocX_t- The time derivative of the local solution, orNULLfor time-independent problemst- The timecoordField- TheDMFieldobject with coordinates for these facesX_tShift- The multiplier for dF/dxdot
Output Parameters:
Jac- The local JacobianJacP- The local Jacobian preconditioner
Level: developer
-seealso: DMPlexComputeBdJacobianSingle(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey
External Links
- PETSc Manual:
DMPlex/DMPlexComputeBdJacobianSingleByLabel
PETSc.LibPETSc.DMPlexComputeBdResidualSingle — Method
DMPlexComputeBdResidualSingle(petsclib::PetscLibType,dm::PetscDM, wf::PetscWeakForm, key::PetscFormKey, locX::PetscVec, locX_t::PetscVec, t::PetscReal, locF::PetscVec)Compute the local boundary residual
Not collective
Input Parameters:
dm- The outputDMwf- ThePetscWeakFormholding forms on this boundarykey- ThePetscFormKeyindicating what should be integratedlocX- The local solutionlocX_t- The time derivative of the local solution, orNULLfor time-independent problemst- The time
Output Parameter:
locF- The local residual
Level: developer
-seealso: DMPlexComputeBdResidualSingleByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey
External Links
- PETSc Manual:
DMPlex/DMPlexComputeBdResidualSingle
PETSc.LibPETSc.DMPlexComputeBdResidualSingleByKey — Method
DMPlexComputeBdResidualSingleByKey(petsclib::PetscLibType,dm::PetscDM, wf::PetscWeakForm, key::PetscFormKey, facetIS::IS, locX::PetscVec, locX_t::PetscVec, t::PetscReal, coordField::DMField, locF::PetscVec)Compute the local boundary residual for terms matching the input key
Not collective
Input Parameters:
dm- The outputDMwf- ThePetscWeakFormholding forms on this boundarykey- ThePetscFormKeyindicating what should be integratedfacetIS- TheISgiving a set of faces to integrate overlocX- The local solutionlocX_t- The time derivative of the local solution, orNULLfor time-independent problemst- The timecoordField- TheDMFieldobject with coordinates for these faces
Output Parameter:
locF- The local residual
Level: developer
-seealso: DMPlexComputeBdResidualSingle(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey
External Links
- PETSc Manual:
DMPlex/DMPlexComputeBdResidualSingleByKey
PETSc.LibPETSc.DMPlexComputeCellGeometryAffineFEM — Method
v0::Vector{PetscReal},J::Vector{PetscReal},invJ::Vector{PetscReal},detJ::PetscReal = DMPlexComputeCellGeometryAffineFEM(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt)Assuming an affine map, compute the Jacobian, inverse Jacobian, and Jacobian determinant for a given cell
Collective
Input Parameters:
dm- theDMPLEXcell- the cell
Output Parameters:
v0- the translation part of this affine transform, meaning the translation to the origin (not the first vertex of the reference cell)J- the Jacobian of the transform from the reference elementinvJ- the inverse of the JacobiandetJ- the Jacobian determinant
Level: advanced
-seealso: DMPLEX, DMPlexComputeCellGeometryFEM(), DMGetCoordinateSection(), DMGetCoordinates()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeCellGeometryAffineFEM
PETSc.LibPETSc.DMPlexComputeCellGeometryFEM — Method
v::Vector{PetscReal},J::Vector{PetscReal},invJ::Vector{PetscReal},detJ::Vector{PetscReal} = DMPlexComputeCellGeometryFEM(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, quad::PetscQuadrature)Compute the Jacobian, inverse Jacobian, and Jacobian determinant at each quadrature point in the given cell
Collective
Input Parameters:
dm- theDMPLEXcell- the cellquad- the quadrature containing the points in the reference element where the geometry will be evaluated. IfquadisNULL, geometry will be
evaluated at the first vertex of the reference element
Output Parameters:
v- the image of the transformed quadrature points, otherwise the image of the first vertex in the closure of the reference element. This is a
one-dimensional array of size cdim * Nq where cdim is the dimension of the DM coordinate space and Nq is the number of quadrature points
J- the Jacobian of the transform from the reference element at each quadrature point. This is a one-dimensional array of size Nq * cdim * cdim containing
each Jacobian in column-major order.
invJ- the inverse of the Jacobian at each quadrature point. This is a one-dimensional array of size Nq * cdim * cdim containing
each inverse Jacobian in column-major order.
detJ- the Jacobian determinant at each quadrature point. This is a one-dimensional array of size Nq.
Level: advanced
-seealso: DMPLEX, DMGetCoordinateSection(), DMGetCoordinates()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeCellGeometryFEM
PETSc.LibPETSc.DMPlexComputeCellGeometryFVM — Method
vol::PetscReal,centroid::Vector{PetscReal},normal::Vector{PetscReal} = DMPlexComputeCellGeometryFVM(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt)Compute the volume for a given cell
Collective
Input Parameters:
dm- theDMPLEXcell- the cell
Output Parameters:
vol- the cell volumecentroid- the cell centroidnormal- the cell normal, if appropriate
Level: advanced
-seealso: DMPLEX, DMGetCoordinateSection(), DMGetCoordinates()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeCellGeometryFVM
PETSc.LibPETSc.DMPlexComputeCellTypes — Method
DMPlexComputeCellTypes(petsclib::PetscLibType,dm::PetscDM)Infer the polytope type of every cell using its dimension and cone size.
Collective
Input Parameter:
dm- TheDMPLEX
Level: developer
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSymmetrize(), DMPlexStratify(), DMGetLabel(), DMCreateLabel()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeCellTypes
PETSc.LibPETSc.DMPlexComputeCellwiseIntegralFEM — Method
DMPlexComputeCellwiseIntegralFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid)Form the vector of cellwise integrals F from the global input X using pointwise functions specified by the user
Input Parameters:
dm- The meshX- Global input vectoruser- The user context
Output Parameter:
F- Cellwise integrals for each field
Level: developer
-seealso: , DM, DMPLEX, DMPlexSNESComputeResidualFEM()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeCellwiseIntegralFEM
PETSc.LibPETSc.DMPlexComputeClementInterpolant — Method
DMPlexComputeClementInterpolant(petsclib::PetscLibType,dm::PetscDM, locX::PetscVec, locC::PetscVec)This function computes the L2 projection of the cellwise values of a function u onto P1
Collective
Input Parameters:
dm- TheDMlocX- The coefficient vector u_h
Output Parameter:
locC- AVecwhich holds the Clement interpolant of the function
Level: developer
-seealso: , DM, DMPLEX, DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeClementInterpolant
PETSc.LibPETSc.DMPlexComputeGeometryFVM — Method
DMPlexComputeGeometryFVM(petsclib::PetscLibType,dm::PetscDM, cellgeom::PetscVec, facegeom::PetscVec)Computes the cell and face geometry for a finite volume method
Input Parameter:
dm- TheDMPLEX
Output Parameters:
cellgeom- AVecofPetscFVCellGeomdatafacegeom- AVecofPetscFVFaceGeomdata
Level: developer
-seealso: DMPLEX, PetscFVFaceGeom, PetscFVCellGeom
External Links
- PETSc Manual:
DMPlex/DMPlexComputeGeometryFVM
PETSc.LibPETSc.DMPlexComputeGradientClementInterpolant — Method
DMPlexComputeGradientClementInterpolant(petsclib::PetscLibType,dm::PetscDM, locX::PetscVec, locC::PetscVec)This function computes the L2 projection of the cellwise gradient of a function u onto P1
Collective
Input Parameters:
dm- TheDMlocX- The coefficient vector u_h
Output Parameter:
locC- AVecwhich holds the Clement interpolant of the gradient
Level: developer
-seealso: , DM, DMPLEX, DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeGradientClementInterpolant
PETSc.LibPETSc.DMPlexComputeGradientFVM — Method
DMPlexComputeGradientFVM(petsclib::PetscLibType,dm::PetscDM, fvm::PetscFV, faceGeometry::PetscVec, cellGeometry::PetscVec, dmGrad::PetscDM)Compute geometric factors for gradient reconstruction, which are stored in the geometry data, and compute layout for gradient data
Collective
Input Parameters:
dm- TheDMPLEXfvm- ThePetscFVcellGeometry- The face geometry fromDMPlexComputeCellGeometryFVM()
Input/Output Parameter:
faceGeometry- The face geometry fromDMPlexComputeFaceGeometryFVM(); on output
the geometric factors for gradient calculation are inserted
Output Parameter:
dmGrad- TheDMdescribing the layout of gradient data
Level: developer
-seealso: DMPLEX, DMPlexGetFaceGeometryFVM(), DMPlexGetCellGeometryFVM()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeGradientFVM
PETSc.LibPETSc.DMPlexComputeInjectorFEM — Method
DMPlexComputeInjectorFEM(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, sc::VecScatter, user::Cvoid)Compute a mapping from coarse unknowns to fine unknowns
Input Parameters:
dmc- The coarse meshdmf- The fine meshuser- The user context
Output Parameter:
sc- The mapping
Level: developer
-seealso: , DM, DMPLEX, DMPlexComputeInterpolatorNested()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeInjectorFEM
PETSc.LibPETSc.DMPlexComputeInjectorReferenceTree — Method
DMPlexComputeInjectorReferenceTree(petsclib::PetscLibType,refTree::PetscDM, inj::PetscMat)External Links
- PETSc Manual:
DMPlex/DMPlexComputeInjectorReferenceTree
PETSc.LibPETSc.DMPlexComputeIntegralFEM — Method
integral::PetscScalar = DMPlexComputeIntegralFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, user::Cvoid)Form the integral over the domain from the global input X using pointwise functions specified by the user
Input Parameters:
dm- The meshX- Global input vectoruser- The user context
Output Parameter:
integral- Integral for each field
Level: developer
-seealso: , DM, DMPLEX, DMPlexSNESComputeResidualFEM()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeIntegralFEM
PETSc.LibPETSc.DMPlexComputeInterpolatorGeneral — Method
DMPlexComputeInterpolatorGeneral(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, In::PetscMat, user::Cvoid)Form the local portion of the interpolation matrix from the coarse DM to a non
Input Parameters:
dmf- The fine meshdmc- The coarse meshuser- The user context
Output Parameter:
In- The interpolation matrix
Level: developer
-seealso: , DM, DMPLEX, DMPlexComputeInterpolatorNested()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeInterpolatorGeneral
PETSc.LibPETSc.DMPlexComputeInterpolatorNested — Method
DMPlexComputeInterpolatorNested(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, isRefined::PetscBool, In::PetscMat, user::Cvoid)Form the local portion of the interpolation matrix from the coarse DM to a uniformly refined DM.
Input Parameters:
dmc- The coarse meshdmf- The fine meshisRefined- Flag indicating regular refinement, rather than the same topologyuser- The user context
Output Parameter:
In- The interpolation matrix
Level: developer
-seealso: , DM, DMPLEX, DMPlexComputeInterpolatorGeneral()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeInterpolatorNested
PETSc.LibPETSc.DMPlexComputeJacobianActionByKey — Method
DMPlexComputeJacobianActionByKey(petsclib::PetscLibType,dm::PetscDM, key::PetscFormKey, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, locY::PetscVec, locF::PetscVec, user::Cvoid)Compute the local Jacobian for terms matching the input key
Collective
Input Parameters:
dm- The outputDMkey- ThePetscFormKeyindicating what should be integratedcellIS- TheISgive a set of cells to integrate overt- The timeX_tShift- The multiplier for the Jacobian with respect to X_tlocX- The local solutionlocX_t- The time derivative of the local solution, orNULLfor time-independent problemslocY- The local vector acted on by Juser- An optional user context, passed to the pointwise functions
Output Parameter:
locF- The local residual F = J(X) Y
Level: developer
-seealso: DMPlexComputeResidualByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey
External Links
- PETSc Manual:
DMPlex/DMPlexComputeJacobianActionByKey
PETSc.LibPETSc.DMPlexComputeJacobianByKey — Method
DMPlexComputeJacobianByKey(petsclib::PetscLibType,dm::PetscDM, key::PetscFormKey, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid)Compute the local Jacobian for terms matching the input key
Collective
Input Parameters:
dm- The outputDMkey- ThePetscFormKeyindicating what should be integratedcellIS- TheISgive a set of cells to integrate overt- The timeX_tShift- The multiplier for the Jacobian with respect to X_tlocX- The local solutionlocX_t- The time derivative of the local solution, orNULLfor time-independent problemsuser- An optional user context, passed to the pointwise functions
Output Parameters:
Jac- The local JacobianJacP- The local Jacobian preconditioner
Level: developer
-seealso: DMPlexComputeResidualByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey
External Links
- PETSc Manual:
DMPlex/DMPlexComputeJacobianByKey
PETSc.LibPETSc.DMPlexComputeJacobianByKeyGeneral — Method
DMPlexComputeJacobianByKeyGeneral(petsclib::PetscLibType,dmr::PetscDM, dmc::PetscDM, key::PetscFormKey, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid)External Links
- PETSc Manual:
DMPlex/DMPlexComputeJacobianByKeyGeneral
PETSc.LibPETSc.DMPlexComputeJacobianHybridByKey — Method
DMPlexComputeJacobianHybridByKey(petsclib::PetscLibType,dm::PetscDM, key::Vector{PetscFormKey}, cellIS::IS, t::PetscReal, X_tShift::PetscReal, locX::PetscVec, locX_t::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid)Compute the local Jacobian over hybrid cells for terms matching the input key
Collective
Input Parameters:
dm- The outputDMkey- ThePetscFormKeyarray (left cell, right cell, cohesive cell) indicating what should be integratedcellIS- TheISgive a set of cells to integrate overt- The timeX_tShift- The multiplier for the Jacobian with respect to X_tlocX- The local solutionlocX_t- The time derivative of the local solution, orNULLfor time-independent problemsuser- An optional user context, passed to the pointwise functions
Output Parameters:
Jac- The local JacobianJacP- The local Jacobian preconditioner
Level: developer
-seealso: DMPlexComputeResidualByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), PetscFormKey
External Links
- PETSc Manual:
DMPlex/DMPlexComputeJacobianHybridByKey
PETSc.LibPETSc.DMPlexComputeL2FluxDiffVec — Method
DMPlexComputeL2FluxDiffVec(petsclib::PetscLibType,u::PetscVec, f::PetscInt, mu::PetscVec, mf::PetscInt, eFlux::PetscVec)This function computes the integral of the difference between the gradient of field fin u and field mf in mu
Collective
Input Parameters:
u- The globalVeccontaining the primal solutionf- The field number for the potentialmu- The globalVeccontaining the mixed solutionmf- The field number for the flux
Output Parameter:
eFlux- A globalVecwhich holds
Level: advanced
-seealso: , DM, DMPLEX, DMPlexComputeL2FluxDiffVecLocal(), DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeL2FluxDiffVec
PETSc.LibPETSc.DMPlexComputeL2FluxDiffVecLocal — Method
DMPlexComputeL2FluxDiffVecLocal(petsclib::PetscLibType,lu::PetscVec, f::PetscInt, lmu::PetscVec, mf::PetscInt, eFlux::PetscVec)This function computes the integral of the difference between the gradient of field fin u and field mf in mu
Collective
Input Parameters:
lu- The localVeccontaining the primal solutionf- The field number for the potentiallmu- The localVeccontaining the mixed solutionmf- The field number for the flux
Output Parameter:
eFlux- A globalVecwhich holds
Level: advanced
-seealso: , DM, DMPLEX, DMPlexComputeL2FluxDiffVec(), DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeL2FluxDiffVecLocal
PETSc.LibPETSc.DMPlexComputeMassMatrixGeneral — Method
DMPlexComputeMassMatrixGeneral(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, mass::PetscMat, user::Cvoid)Form the local portion of the mass matrix from the coarse DM to a non
Input Parameters:
dmf- The fine meshdmc- The coarse meshuser- The user context
Output Parameter:
mass- The mass matrix
Level: developer
-seealso: , DM, DMPLEX, DMPlexComputeMassMatrixNested(), DMPlexComputeInterpolatorNested(), DMPlexComputeInterpolatorGeneral()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeMassMatrixGeneral
PETSc.LibPETSc.DMPlexComputeMassMatrixNested — Method
DMPlexComputeMassMatrixNested(petsclib::PetscLibType,dmc::PetscDM, dmf::PetscDM, mass::PetscMat, user::Cvoid)External Links
- PETSc Manual:
DMPlex/DMPlexComputeMassMatrixNested
PETSc.LibPETSc.DMPlexComputeMoments — Method
moments::Vector{PetscReal} = DMPlexComputeMoments(petsclib::PetscLibType,dm::PetscDM, u::PetscVec)Compute the first three moments for a field
Noncollective
Input Parameters:
dm- theDMPLEXu- the field
Output Parameter:
moments- the field moments
Level: intermediate
-seealso: DM, DMPLEX, DMSwarmComputeMoments()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeMoments
PETSc.LibPETSc.DMPlexComputeOrthogonalQuality — Method
DMPlexComputeOrthogonalQuality(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, atol::PetscReal, OrthQual::PetscVec, OrthQualLabel::DMLabel)Compute cell orthogonal quality below given tolerance.
Collective
Input Parameters:
dm- TheDMPLEXobjectfv- OptionalPetscFVobject for pre-computed cell/face centroid informationatol- [0, 1] Absolute tolerance for tagging cells.
Output Parameters:
OrthQual-Veccontaining orthogonal quality per cellOrthQualLabel-DMLabeltagging cells below atol withDM_ADAPT_REFINE
Options Database Keys:
-dm_plex_orthogonal_quality_label_view- view OrthQualLabel if label is requested. Currently onlyPETSCVIEWERASCIIis supported.-dm_plex_orthogonal_quality_vec_view- view OrthQual vector.
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexCheckCellShape(), DMCreateLabel(), PetscFV, DMLabel, Vec
External Links
- PETSc Manual:
DMPlex/DMPlexComputeOrthogonalQuality
PETSc.LibPETSc.DMPlexComputeProjection2Dto1D — Method
R::Vector{PetscReal} = DMPlexComputeProjection2Dto1D(petsclib::PetscLibType,coords::Vector{PetscScalar})Rewrite coordinates to be the 1D projection of the 2D coordinates
Not Collective
Input/Output Parameter:
coords- The coordinates of a segment, on output the new y-coordinate, and 0 for x, an array of size 4, last two entries are unchanged
Output Parameter:
R- The rotation which accomplishes the projection, array of size 4
Level: developer
-seealso: DMPLEX, DMPlexComputeProjection3Dto1D(), DMPlexComputeProjection3Dto2D()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeProjection2Dto1D
PETSc.LibPETSc.DMPlexComputeProjection3Dto1D — Method
R::Vector{PetscReal} = DMPlexComputeProjection3Dto1D(petsclib::PetscLibType,coords::Vector{PetscScalar})Rewrite coordinates to be the 1D projection of the 3D coordinates
Not Collective
Input/Output Parameter:
coords- The coordinates of a segment; on output, the new y-coordinate, and 0 for x and z, an array of size 6, the other entries are unchanged
Output Parameter:
R- The rotation which accomplishes the projection, an array of size 9
Level: developer
-seealso: DMPLEX, DMPlexComputeProjection2Dto1D(), DMPlexComputeProjection3Dto2D()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeProjection3Dto1D
PETSc.LibPETSc.DMPlexComputeProjection3Dto2D — Method
R::Vector{PetscReal} = DMPlexComputeProjection3Dto2D(petsclib::PetscLibType,coordSize::PetscInt, coords::Vector{PetscScalar})Rewrite coordinates of 3 or more coplanar 3D points to a common 2D basis for the plane. The normal is defined by positive orientation of the first 3 points.
Not Collective
Input Parameter:
coordSize- Length of coordinate array (3x number of points); must be at least 9 (3 points)
Input/Output Parameter:
coords- The interlaced coordinates of each coplanar 3D point; on output the first
2*coordSize/3 entries contain interlaced 2D points, with the rest undefined
Output Parameter:
R- 3x3 row-major rotation matrix whose columns are the tangent basis [t1, t2, n]. Multiplying by R^T transforms from original frame to tangent frame.
Level: developer
-seealso: DMPLEX, DMPlexComputeProjection2Dto1D(), DMPlexComputeProjection3Dto1D()
External Links
- PETSc Manual:
DMPlex/DMPlexComputeProjection3Dto2D
PETSc.LibPETSc.DMPlexComputeResidualByKey — Method
DMPlexComputeResidualByKey(petsclib::PetscLibType,dm::PetscDM, key::PetscFormKey, cellIS::IS, time::PetscReal, locX::PetscVec, locX_t::PetscVec, t::PetscReal, locF::PetscVec, user::Cvoid)Compute the local residual for terms matching the input key
Collective
Input Parameters:
dm- The outputDMkey- ThePetscFormKeyindicating what should be integratedcellIS- TheISgiving a set of cells to integrate overtime- The time, orPETSC_MIN_REALto include implicit terms in a time-independent problemslocX- The local solutionlocX_t- The time derivative of the local solution, orNULLfor time-independent problemst- The timeuser- An optional user context, passed to the pointwise functions
Output Parameter:
locF- The local residual
Level: developer
-seealso: DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey
External Links
- PETSc Manual:
DMPlex/DMPlexComputeResidualByKey
PETSc.LibPETSc.DMPlexComputeResidualHybridByKey — Method
DMPlexComputeResidualHybridByKey(petsclib::PetscLibType,dm::PetscDM, key::Vector{PetscFormKey}, cellIS::IS, time::PetscReal, locX::PetscVec, locX_t::PetscVec, t::PetscReal, locF::PetscVec, user::Cvoid)Compute the local residual over hybrid cells for terms matching the input key
Collective
Input Parameters:
dm- The outputDMkey- ThePetscFormKeyarray (left cell, right cell, cohesive cell) indicating what should be integratedcellIS- TheISgive a set of cells to integrate overtime- The time, orPETSC_MIN_REALto include implicit terms in a time-independent problemslocX- The local solutionlocX_t- The time derivative of the local solution, orNULLfor time-independent problemst- The timeuser- An optional user context, passed to the pointwise functions
Output Parameter:
locF- The local residual
Level: developer
-seealso: DMPlexComputeResidualByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey
External Links
- PETSc Manual:
DMPlex/DMPlexComputeResidualHybridByKey
PETSc.LibPETSc.DMPlexConstructCohesiveCells — Method
DMPlexConstructCohesiveCells(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, splitLabel::DMLabel, dmSplit::PetscDM)Construct cohesive cells which split the face along an internal interface
Collective
Input Parameters:
dm- The originalDMlabel- TheDMLabelspecifying the boundary faces (this could be auto-generated)
Output Parameters:
splitLabel- TheDMLabelcontaining the split points, orNULLif no output is desireddmSplit- The newDM
Level: developer
-seealso: , DM, DMPLEX, DMCreate(), DMPlexLabelCohesiveComplete()
External Links
- PETSc Manual:
DMPlex/DMPlexConstructCohesiveCells
PETSc.LibPETSc.DMPlexConstructGhostCells — Method
numGhostCells::PetscInt = DMPlexConstructGhostCells(petsclib::PetscLibType,dm::PetscDM, labelName::String, dmGhosted::PetscDM)Construct ghost cells which connect to every boundary face
Collective
Input Parameters:
dm- The originalDMlabelName- The label specifying the boundary faces, or "Face Sets" if this isNULL
Output Parameters:
numGhostCells- The number of ghost cells added to theDMdmGhosted- The newDM
Level: developer
-seealso: , DM, DMPLEX, DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexConstructGhostCells
PETSc.LibPETSc.DMPlexCoordinatesLoad — Method
DMPlexCoordinatesLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF)Loads coordinates into a DMPLEX
Collective
Input Parameters:
dm- TheDMinto which the coordinates are loadedviewer- ThePetscViewerfor the saved coordinatesglobalToLocalPointSF- ThePetscSFreturned byDMPlexTopologyLoad()when loading dm from viewer
Level: advanced
-seealso: , DM, DMPLEX, DMLoad(), DMPlexTopologyLoad(), DMPlexLabelsLoad(), DMView(), PetscViewerHDF5Open(), PetscViewerPushFormat(), PetscSF, PetscViewer
External Links
- PETSc Manual:
DMPlex/DMPlexCoordinatesLoad
PETSc.LibPETSc.DMPlexCoordinatesToReference — Method
refCoords::Vector{PetscReal} = DMPlexCoordinatesToReference(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, numPoints::PetscInt, realCoords::Vector{PetscReal})Pull coordinates back from the mesh to the reference element using a single element map.
Not Collective
Input Parameters:
dm- The mesh, with coordinate maps defined either by aPetscDSfor the coordinateDM(seeDMGetCoordinateDM()) or
implicitly by the coordinates of the corner vertices of the cell: as an affine map for simplicial elements, or as a multilinear map for tensor-product elements
cell- the cell whose map is used.numPoints- the number of points to locaterealCoords- (numPoints x coordinate dimension) array of coordinates (seeDMGetCoordinateDim())
Output Parameter:
refCoords- (numPointsxdimension) array of reference coordinates (seeDMGetDimension())
Level: intermediate
-seealso: DMPLEX, DMPlexReferenceToCoordinates()
External Links
- PETSc Manual:
DMPlex/DMPlexCoordinatesToReference
PETSc.LibPETSc.DMPlexCoordinatesView — Method
DMPlexCoordinatesView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer)Saves DMPLEX coordinates into a file
Collective
Input Parameters:
dm- TheDMwhose coordinates are to be savedviewer- ThePetscViewerfor saving
Level: advanced
-seealso: , DM, DMPLEX, DMView(), DMPlexTopologyView(), DMPlexLabelsView(), DMPlexCoordinatesLoad(), PetscViewer
External Links
- PETSc Manual:
DMPlex/DMPlexCoordinatesView
PETSc.LibPETSc.DMPlexCopyCoordinates — Method
DMPlexCopyCoordinates(petsclib::PetscLibType,dmA::PetscDM, dmB::PetscDM)Copy coordinates from one mesh to another with the same vertices
Collective
Input Parameter:
dmA- TheDMPLEXobject with initial coordinates
Output Parameter:
dmB- TheDMPLEXobject with copied coordinates
Level: intermediate
-seealso: DMPLEX, DMCopyLabels(), DMGetCoordinates(), DMGetCoordinatesLocal(), DMGetCoordinateDM(), DMGetCoordinateSection()
External Links
- PETSc Manual:
DMPlex/DMPlexCopyCoordinates
PETSc.LibPETSc.DMPlexCreate — Method
mesh::PetscDM = DMPlexCreate(petsclib::PetscLibType,comm::MPI_Comm)Creates a DMPLEX object, which encapsulates an unstructured mesh, or CW complex, which can be expressed using a Hasse Diagram.
Collective
Input Parameter:
comm- The communicator for theDMPLEXobject
Output Parameter:
mesh- TheDMPLEXobject
Level: beginner
-seealso: , DM, DMPLEX, DMType, DMCreate(), DMSetType()
External Links
- PETSc Manual:
DMPlex/DMPlexCreate
PETSc.LibPETSc.DMPlexCreateBallMesh — Method
dm::PetscDM = DMPlexCreateBallMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, R::PetscReal)Creates a simplex mesh on the d
Collective
Input Parameters:
comm- The communicator for theDMobjectdim- The dimensionR- The radius
Output Parameter:
dm- TheDMobject
Options Database Key:
bd_dm_refine- This will refine the surface mesh preserving the sphere geometry
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreateSphereMesh(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateBallMesh
PETSc.LibPETSc.DMPlexCreateBasisRotation — Method
DMPlexCreateBasisRotation(petsclib::PetscLibType,dm::PetscDM, alpha::PetscReal, beta::PetscReal, gamma::PetscReal)Create an internal transformation from the global basis, used to specify boundary conditions and global solutions, to a local basis, appropriate for discretization integrals and assembly.
Input Parameters:
dm- TheDMalpha- The first Euler angle, and in 2D the only onebeta- The second Euler anglegamma- The third Euler angle
Level: developer
-seealso: , DM, DMPLEX, DMPlexGlobalToLocalBasis(), DMPlexLocalToGlobalBasis()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateBasisRotation
PETSc.LibPETSc.DMPlexCreateBoxMesh — Method
dm::PetscDM = DMPlexCreateBoxMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, periodicity::Vector{DMBoundaryType}, interpolate::PetscBool, locizationHeight::PetscInt, sparseLocalize::PetscBool)Creates a mesh on the tensor product of unit intervals (box) using simplices or tensor cells (hexahedra).
Collective
Input Parameters:
comm- The communicator for theDMobjectdim- The spatial dimensionsimplex-PETSC_TRUEfor simplices,PETSC_FALSEfor tensor cellsfaces- Number of faces per dimension, orNULLfor (1,) in 1D and (2, 2) in 2D and (1, 1, 1) in 3Dlower- The lower left corner, orNULLfor (0, 0, 0)upper- The upper right corner, orNULLfor (1, 1, 1)periodicity- The boundary type for the X,Y,Z direction, orNULLforDM_BOUNDARY_NONEinterpolate- Flag to create intermediate mesh pieces (edges, faces)localizationHeight- Flag to localize edges and faces in addition to cells; only significant for periodic meshessparseLocalize- Flag to localize coordinates only for cells near the periodic boundary; only significant for periodic meshes
Output Parameter:
dm- TheDMobject
Level: beginner
-seealso: , DM, DMPLEX, DMSetFromOptions(), DMPlexCreateFromFile(), DMPlexCreateHexCylinderMesh(), DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateBoxMesh
PETSc.LibPETSc.DMPlexCreateBoxSurfaceMesh — Method
dm::PetscDM = DMPlexCreateBoxSurfaceMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, interpolate::PetscBool)Creates a mesh on the surface of the tensor product of unit intervals (box) using tensor cells (hexahedra).
Collective
Input Parameters:
comm- The communicator for theDMobjectdim- The spatial dimension of the box, so the resulting mesh is has dimensiondim-1faces- Number of faces per dimension, orNULLfor (1,) in 1D and (2, 2) in 2D and (1, 1, 1) in 3Dlower- The lower left corner, orNULLfor (0, 0, 0)upper- The upper right corner, orNULLfor (1, 1, 1)interpolate- Flag to create intermediate mesh pieces (edges, faces)
Output Parameter:
dm- TheDMobject
Level: beginner
-seealso: , DM, DMPLEX, DMSetFromOptions(), DMPlexCreateBoxMesh(), DMPlexCreateFromFile(), DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateBoxSurfaceMesh
PETSc.LibPETSc.DMPlexCreateCGNS — Method
dm::PetscDM = DMPlexCreateCGNS(petsclib::PetscLibType,comm::MPI_Comm, cgid::PetscInt, interpolate::PetscBool)Create a DMPLEX mesh from a CGNS file ID.
Collective
Input Parameters:
comm- The MPI communicatorcgid- The CG id associated with a file and obtained using cg_openinterpolate- Create faces and edges in the mesh
Output Parameter:
dm- TheDMobject representing the mesh
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexCreateExodus()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateCGNS
PETSc.LibPETSc.DMPlexCreateCGNSFromFile — Method
dm::PetscDM = DMPlexCreateCGNSFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool)Create a DMPLEX mesh from a CGNS file.
Collective
Input Parameters:
comm- The MPI communicatorfilename- The name of the CGNS fileinterpolate- Create faces and edges in the mesh
Output Parameter:
dm- TheDMobject representing the mesh
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexCreateCGNS(), DMPlexCreateExodus()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateCGNSFromFile
PETSc.LibPETSc.DMPlexCreateCellNumbering — Method
globalCellNumbers::IS = DMPlexCreateCellNumbering(petsclib::PetscLibType,dm::PetscDM, includeAll::PetscBool)Get a global cell numbering for all cells on this process
Input Parameters:
dm- TheDMPLEXobjectincludeAll- Whether to include all cells, or just the simplex and box cells
Output Parameter:
globalCellNumbers- Global cell numbers for all cells on this process
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCellNumbering(), DMPlexGetVertexNumbering()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateCellNumbering
PETSc.LibPETSc.DMPlexCreateClosureIndex — Method
DMPlexCreateClosureIndex(petsclib::PetscLibType,dm::PetscDM, section::PetscSection)Calculate an index for the given PetscSection for the closure operation on the DM
Not Collective
Input Parameters:
dm- TheDMsection- The section describing the layout in the local vector, or NULL to use the default section
Level: intermediate
-seealso: , DM, DMPLEX, PetscSection, DMPlexVecGetClosure(), DMPlexVecRestoreClosure(), DMPlexVecSetClosure(), DMPlexMatSetClosure()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateClosureIndex
PETSc.LibPETSc.DMPlexCreateCoarsePointIS — Method
fpointIS::IS = DMPlexCreateCoarsePointIS(petsclib::PetscLibType,dm::PetscDM)Creates an IS covering the coarse DM chart with the fine points as data
Collective
Input Parameter:
dm- The coarseDM
Output Parameter:
fpointIS- TheISof all the fine points which exist in the original coarse mesh
Level: developer
-seealso: , DM, DMPLEX, IS, DMRefine(), DMPlexSetRefinementUniform(), DMPlexGetSubpointIS()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateCoarsePointIS
PETSc.LibPETSc.DMPlexCreateCohesiveSubmesh — Method
subdm::PetscDM = DMPlexCreateCohesiveSubmesh(petsclib::PetscLibType,dm::PetscDM, hasLagrange::PetscBool, label::String, value::PetscInt)Extract from a mesh with cohesive cells the hypersurface defined by one face of the cells. Optionally, a label can be given to restrict the cells.
Input Parameters:
dm- The original meshhasLagrange- The mesh has Lagrange unknowns in the cohesive cellslabel- A label name, orNULLvalue- A label value
Output Parameter:
subdm- The surface mesh
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetSubpointMap(), DMPlexCreateSubmesh()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateCohesiveSubmesh
PETSc.LibPETSc.DMPlexCreateCoordinateSpace — Method
DMPlexCreateCoordinateSpace(petsclib::PetscLibType,dm::PetscDM, degree::PetscInt, locized::PetscBool, project::PetscBool)Creates a finite element space for the coordinates
Collective
Input Parameters:
dm- TheDMPLEXdegree- The degree of the finite element orPETSC_DECIDElocalized- Flag to create a localized (DG) coordinate spaceproject- Flag to project current coordinates into the space
Level: advanced
-seealso: , DM, DMPLEX, PetscPointFn, PetscFECreateLagrange(), DMGetCoordinateDM(), DMPlexSetCoordinateMap()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateCoordinateSpace
PETSc.LibPETSc.DMPlexCreateDefaultReferenceTree — Method
ref::PetscDM = DMPlexCreateDefaultReferenceTree(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, simplex::PetscBool)create a reference tree for isotropic hierarchical mesh refinement.
Collective
Input Parameters:
comm- the MPI communicatordim- the spatial dimensionsimplex- Flag for simplex, otherwise use a tensor-product cell
Output Parameter:
ref- the reference treeDMPLEXobject
Level: intermediate
-seealso: DMPlexSetReferenceTree(), DMPlexGetReferenceTree()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateDefaultReferenceTree
PETSc.LibPETSc.DMPlexCreateDoublet — Method
newdm::PetscDM = DMPlexCreateDoublet(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, interpolate::PetscBool, refinementLimit::PetscReal)Creates a mesh of two cells of the specified type, optionally with later refinement.
Collective
Input Parameters:
comm- The communicator for theDMobjectdim- The spatial dimensionsimplex- Flag for simplicial cells, otherwise they are tensor product cellsinterpolate- Flag to create intermediate mesh pieces (edges, faces)refinementLimit- A nonzero number indicates the largest admissible volume for a refined cell
Output Parameter:
newdm- TheDMobject
Level: beginner
-seealso: , DM, DMPLEX, DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateDoublet
PETSc.LibPETSc.DMPlexCreateEdgeNumbering — Method
globalEdgeNumbers::IS = DMPlexCreateEdgeNumbering(petsclib::PetscLibType,dm::PetscDM)Create a global numbering for edges.
Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
globalEdgeNumbers- Global numbers for all edges on this process
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCellNumbering(), DMPlexGetVertexNumbering(), DMPlexCreatePointNumbering()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateEdgeNumbering
PETSc.LibPETSc.DMPlexCreateEphemeral — Method
dm::PetscDM = DMPlexCreateEphemeral(petsclib::PetscLibType,tr::DMPlexTransform, prefix::String)This takes a DMPlexTransform and a base DMPlex and produces an ephemeral DM, meaning one that is created on the fly in response to queries.
Input Parameters:
tr- TheDMPlexTransformprefix- An options prefix, or NULL
Output Parameter:
dm- TheDM
Level: beginner
-seealso: DMPlexCreateFromFile, DMPlexCreateFromDAG(), DMPlexCreateFromCellListPetsc(), DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateEphemeral
PETSc.LibPETSc.DMPlexCreateExodus — Method
dm::PetscDM = DMPlexCreateExodus(petsclib::PetscLibType,comm::MPI_Comm, exoid::PetscExodusIIInt, interpolate::PetscBool)Create a DMPLEX mesh from an ExodusII file ID.
Collective
Input Parameters:
comm- The MPI communicatorexoid- The ExodusII id associated with a exodus file and obtained using ex_openinterpolate- Create faces and edges in the mesh
Output Parameter:
dm- TheDMobject representing the mesh
Level: beginner
-seealso: , DM, PETSCVIEWEREXODUSII, DMPLEX, DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateExodus
PETSc.LibPETSc.DMPlexCreateExodusFromFile — Method
dm::PetscDM = DMPlexCreateExodusFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool)Create a DMPLEX mesh from an ExodusII file.
Collective
Input Parameters:
comm- The MPI communicatorfilename- The name of the ExodusII fileinterpolate- Create faces and edges in the mesh
Output Parameter:
dm- TheDMobject representing the mesh
Level: beginner
-seealso: , DM, PETSCVIEWEREXODUSII, DMPLEX, DMCreate(), DMPlexCreateExodus()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateExodusFromFile
PETSc.LibPETSc.DMPlexCreateFluent — Method
dm::PetscDM = DMPlexCreateFluent(petsclib::PetscLibType,comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool)Create a DMPLEX mesh from a Fluent mesh file http://aerojet.engr.ucdavis.edu/fluenthelp/html/ug/node1490.htm.
Collective
Input Parameters:
comm- The MPI communicatorviewer- ThePetscViewerassociated with a Fluent mesh fileinterpolate- Create faces and edges in the mesh
Output Parameter:
dm- TheDMobject representing the mesh
Level: beginner
-seealso: , DM, DMPLEX, DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateFluent
PETSc.LibPETSc.DMPlexCreateFluentFromFile — Method
dm::PetscDM = DMPlexCreateFluentFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool)Create a DMPLEX mesh from a Fluent mesh file
Collective
Input Parameters:
comm- The MPI communicatorfilename- Name of the Fluent mesh fileinterpolate- Create faces and edges in the mesh
Output Parameter:
dm- TheDMobject representing the mesh
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreateFromFile(), DMPlexCreateFluent(), DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateFluentFromFile
PETSc.LibPETSc.DMPlexCreateFromCellListParallelPetsc — Method
vertexSF::PetscSF,verticesAdj::Vector{PetscInt},dm::PetscDM = DMPlexCreateFromCellListParallelPetsc(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, numCorners::PetscInt, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal})Create distributed DMPLEX from a list of vertices for each cell (common mesh generator output) where all cells have the same celltype
Collective
Input Parameters:
comm- The communicatordim- The topological dimension of the meshnumCells- The number of cells owned by this processnumVertices- The number of vertices owned by this process, orPETSC_DECIDENVertices- The global number of vertices, orPETSC_DECIDEnumCorners- The number of vertices for each cellinterpolate- Flag indicating that intermediate mesh entities (faces, edges) should be created automaticallycells- An array of numCells*numCorners numbers, the global vertex numbers for each cellspaceDim- The spatial dimension used for coordinatesvertexCoords- An array of numVertices*spaceDim numbers, the coordinates of each vertex
Output Parameters:
dm- TheDMvertexSF- (Optional)PetscSFdescribing complete vertex ownershipverticesAdj- (Optional) vertex adjacency array
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexCreateFromCellListPetsc(), DMPlexBuildFromCellListParallel(), DMPlexBuildCoordinatesFromCellListParallel(), DMPlexCreateFromDAG(), DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateFromCellListParallelPetsc
PETSc.LibPETSc.DMPlexCreateFromCellListPetsc — Method
dm::PetscDM = DMPlexCreateFromCellListPetsc(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, numCorners::PetscInt, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal})Create DMPLEX from a list of vertices for each cell (common mesh generator output), but only process 0 takes in the input
Collective
Input Parameters:
comm- The communicatordim- The topological dimension of the meshnumCells- The number of cells, only on process 0numVertices- The number of vertices owned by this process, orPETSC_DECIDE, only on process 0numCorners- The number of vertices for each cell, only on process 0interpolate- Flag indicating that intermediate mesh entities (faces, edges) should be created automaticallycells- An array of numCells imes numCorners numbers, the vertices for each cell, only on process 0spaceDim- The spatial dimension used for coordinatesvertexCoords- An array of numVertices imes spaceDim numbers, the coordinates of each vertex, only on process 0
Output Parameter:
dm- TheDM, which only has points on process 0
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexCreateFromCellListParallelPetsc(), DMPlexBuildFromCellList(), DMPlexBuildCoordinatesFromCellList(), DMPlexCreateFromDAG(), DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateFromCellListPetsc
PETSc.LibPETSc.DMPlexCreateFromCellSectionParallel — Method
vertexSF::PetscSF,verticesAdj::Vector{PetscInt},dm::PetscDM = DMPlexCreateFromCellSectionParallel(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, cellSection::PetscSection, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal})Create distributed DMPLEX from a list of vertices for each cell (common mesh generator output) and supports multiple celltypes
Collective
Input Parameters:
comm- The communicatordim- The topological dimension of the meshnumCells- The number of cells owned by this processnumVertices- The number of vertices owned by this process, orPETSC_DECIDENVertices- The global number of vertices, orPETSC_DECIDEcellSection- ThePetscSectiongiving the number of vertices for each cell (layout of cells)interpolate- Flag indicating that intermediate mesh entities (faces, edges) should be created automaticallycells- An array of the global vertex numbers for each cellspaceDim- The spatial dimension used for coordinatesvertexCoords- An array of numVertices*spaceDim numbers, the coordinates of each vertex
Output Parameters:
dm- TheDMvertexSF- (Optional)PetscSFdescribing complete vertex ownershipverticesAdj- (Optional) vertex adjacency array
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexCreateFromCellListPetsc(), DMPlexBuildFromCellListParallel(), DMPlexBuildCoordinatesFromCellListParallel(), DMPlexCreateFromDAG(), DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateFromCellSectionParallel
PETSc.LibPETSc.DMPlexCreateFromDAG — Method
DMPlexCreateFromDAG(petsclib::PetscLibType,dm::PetscDM, depth::PetscInt, numPoints::Vector{PetscInt}, coneSize::Vector{PetscInt}, cones::Vector{PetscInt}, coneOrientations::Vector{PetscInt}, vertexCoords::Vector{PetscScalar})This takes as input the adjacency
Input Parameters:
dm- The emptyDMobject, usually fromDMCreate()andDMSetDimension()depth- The depth of the DAGnumPoints- Array of size depth + 1 containing the number of points at eachdepthconeSize- The cone size of each pointcones- The concatenation of the cone points for each point, the cone list must be oriented correctly for each pointconeOrientations- The orientation of each cone pointvertexCoords- An array of numPoints[0] imes spacedim numbers representing the coordinates of each vertex, withspacedimthe value set viaDMSetCoordinateDim()
Output Parameter:
dm- TheDM
Level: advanced
-seealso: , DM, DMPLEX, DMPlexCreateFromCellListPetsc(), DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateFromDAG
PETSc.LibPETSc.DMPlexCreateFromFile — Method
dm::PetscDM = DMPlexCreateFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, plexname::String, interpolate::PetscBool)This takes a filename and produces a DM
Collective
Input Parameters:
comm- The communicatorfilename- A file nameplexname- The object name of the resultingDM, also used for intra-datafile lookup by some formatsinterpolate- Flag to create intermediate mesh pieces (edges, faces)
Output Parameter:
dm- TheDM
Options Database Key:
-dm_plex_create_from_hdf5_xdmf- use thePETSC_VIEWER_HDF5_XDMFformat for reading HDF5
Use -dm_plex_create_ prefix to pass options to the internal PetscViewer, e.g. -dm_plex_create_viewer_hdf5_collective
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreateFromDAG(), DMPlexCreateFromCellListPetsc(), DMPlexCreate(), PetscObjectSetName(), DMView(), DMLoad()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateFromFile
PETSc.LibPETSc.DMPlexCreateGeomFromFile — Method
dm::PetscDM = DMPlexCreateGeomFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, islite::PetscBool)Create a DMPLEX mesh from an EGADS, IGES, or STEP file.
Collective
Input Parameters:
comm- The MPI communicatorfilename- The name of the EGADS, IGES, or STEP fileislite- Flag for EGADSlite support
Output Parameter:
dm- TheDMobject representing the mesh
Level: beginner
-seealso: , DM, DMPLEX, DMCreate(), DMPlexCreateEGADS(), DMPlexCreateEGADSliteFromFile()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateGeomFromFile
PETSc.LibPETSc.DMPlexCreateGlobalToNaturalSF — Method
sfNatural::PetscSF = DMPlexCreateGlobalToNaturalSF(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, sfMigration::PetscSF)Creates the PetscSF for mapping Global Vec to the Natural Vec
Input Parameters:
dm- The redistributedDMsection- The localPetscSectiondescribing theVecbefore the mesh was distributed, orNULLif not availablesfMigration- ThePetscSFused to distribute the mesh, orNULLif it cannot be computed
Output Parameter:
sfNatural-PetscSFfor mapping theVecin PETSc ordering to the canonical ordering
Level: intermediate
-seealso: , DM, DMPLEX, PetscSF, PetscSection, DMPlexDistribute(), DMPlexDistributeField()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateGlobalToNaturalSF
PETSc.LibPETSc.DMPlexCreateGmsh — Method
dm::PetscDM = DMPlexCreateGmsh(petsclib::PetscLibType,comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool)Create a DMPLEX mesh from a Gmsh file viewer
Collective
Input Parameters:
comm- The MPI communicatorviewer- ThePetscViewerassociated with a Gmsh fileinterpolate- Create faces and edges in the mesh
Output Parameter:
dm- TheDMobject representing the mesh
Options Database Keys:
-dm_plex_gmsh_hybrid- Force triangular prisms to use tensor order-dm_plex_gmsh_periodic- Read Gmsh periodic section and construct a periodic Plex-dm_plex_gmsh_highorder- Generate high-order coordinates-dm_plex_gmsh_project- Project high-order coordinates to a different space, use the prefix dmplexgmshproject to define the space-dm_plex_gmsh_use_generic- Generate generic labels, i.e. Cell Sets, Face Sets, etc.-dm_plex_gmsh_use_regions- Generate labels with region names-dm_plex_gmsh_mark_vertices- Add vertices to generated labels-dm_plex_gmsh_mark_vertices_strict- Add vertices included in a region to generated labels-dm_plex_gmsh_multiple_tags- Allow multiple tags for default labels-dm_plex_gmsh_spacedim <d>- Embedding space dimension, if different from topological dimension
Level: beginner
-seealso: , DM, DMPLEX, DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateGmsh
PETSc.LibPETSc.DMPlexCreateGmshFromFile — Method
dm::PetscDM = DMPlexCreateGmshFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool)Create a DMPLEX mesh from a Gmsh file
Input Parameters:
comm- The MPI communicatorfilename- Name of the Gmsh fileinterpolate- Create faces and edges in the mesh
Output Parameter:
dm- TheDMobject representing the mesh
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreateFromFile(), DMPlexCreateGmsh(), DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateGmshFromFile
PETSc.LibPETSc.DMPlexCreateHexCylinderMesh — Method
dm::PetscDM = DMPlexCreateHexCylinderMesh(petsclib::PetscLibType,comm::MPI_Comm, periodicZ::DMBoundaryType, Nr::PetscInt)Creates a mesh on the tensor product of the unit interval with the circle (cylinder) using hexahedra.
Collective
Input Parameters:
comm- The communicator for theDMobjectperiodicZ- The boundary type for the Z directionNr- The number of refinements to carry out
Output Parameter:
dm- TheDMobject
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreateBoxMesh(), DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateHexCylinderMesh
PETSc.LibPETSc.DMPlexCreateHybridMesh — Method
hybridLabel::DMLabel,splitLabel::DMLabel,dmInterface::PetscDM,dmHybrid::PetscDM = DMPlexCreateHybridMesh(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, bdlabel::DMLabel, bdvalue::PetscInt)Create a mesh with hybrid cells along an internal interface
Collective
Input Parameters:
dm- The originalDMlabel- The label specifying the interface verticesbdlabel- The optional label specifying the interface boundary verticesbdvalue- Value of optional label specifying the interface boundary vertices
Output Parameters:
hybridLabel- The label fully marking the interface, orNULLif no output is desiredsplitLabel- The label containing the split points, orNULLif no output is desireddmInterface- The new interfaceDM, orNULLdmHybrid- The newDMwith cohesive cells
Level: developer
-seealso: , DM, DMPLEX, DMPlexConstructCohesiveCells(), DMPlexLabelCohesiveComplete(), DMPlexGetSubpointMap(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateHybridMesh
PETSc.LibPETSc.DMPlexCreateHypercubicMesh — Method
dm::PetscDM = DMPlexCreateHypercubicMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, edges::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, overlap::PetscInt)Creates a periodic mesh on the tensor product of unit intervals using only vertices and edges.
Collective
Input Parameters:
comm- The communicator for theDMobjectdim- The spatial dimensionedges- Number of edges per dimension, orNULLfor (1,) in 1D and (2, 2) in 2D and (1, 1, 1) in 3Dlower- The lower left corner, orNULLfor (0, 0, 0)upper- The upper right corner, orNULLfor (1, 1, 1)overlap- The number of vertices in each direction to include in the overlap (default is 1)
Output Parameter:
dm- The DM object
Level: beginner
-seealso: DMSetFromOptions(), DMPlexCreateFromFile(), DMPlexCreateHexCylinderMesh(), DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateHypercubicMesh
PETSc.LibPETSc.DMPlexCreateLabelField — Method
val::PetscVec = DMPlexCreateLabelField(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)Create a field whose value is the label value for that point
Input Parameters:
dm- TheDMPLEXlabel- TheDMLabel
Output Parameter:
val- The label value field
Options Database Key:
-dm_label_view- Adds the label value field into theDMoutput from-dm_viewusing the same viewer
Level: intermediate
-seealso: , DM, DMPLEX, DMView()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateLabelField
PETSc.LibPETSc.DMPlexCreateNaturalVector — Method
nv::PetscVec = DMPlexCreateNaturalVector(petsclib::PetscLibType,dm::PetscDM)Provide a Vec capable of holding the natural ordering and distribution.
Collective
Input Parameter:
dm- The distributedDMPLEX
Output Parameter:
nv- The naturalVec
Level: intermediate
-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalBegin()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateNaturalVector
PETSc.LibPETSc.DMPlexCreateNeighborCSR — Method
numVertices::PetscInt,offsets::PetscInt,adjacency::PetscInt = DMPlexCreateNeighborCSR(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt)Create a mesh graph (cell
Collective
Input Parameters:
dm- TheDMPLEXcellHeight- The height of mesh points to treat as cells (default should be 0)
Output Parameters:
numVertices- The number of local vertices in the graph, or cells in the mesh.offsets- The offset to the adjacency list for each celladjacency- The adjacency list for all cells
Level: advanced
-seealso: , DM, DMPLEX, DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateNeighborCSR
PETSc.LibPETSc.DMPlexCreateOverlapLabel — Method
ovLabel::DMLabel = DMPlexCreateOverlapLabel(petsclib::PetscLibType,dm::PetscDM, levels::PetscInt, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS)Compute a label indicating what overlap points should be sent to new processes
Collective
Input Parameters:
dm- TheDMlevels- Number of overlap levelsrootSection- The number of leaves for a given root pointrootrank- The rank of each edge into the root pointleafSection- The number of processes sharing a given leaf pointleafrank- The rank of each process sharing a leaf point
Output Parameter:
ovLabel-DMLabelcontaining remote overlap contributions as point/rank pairings
Level: developer
-seealso: DMPLEX, DMPlexCreateOverlapLabelFromLabels(), DMPlexGetAdjacency(), DMPlexDistributeOwnership(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateOverlapLabel
PETSc.LibPETSc.DMPlexCreateOverlapLabelFromLabels — Method
ovLabel::DMLabel = DMPlexCreateOverlapLabelFromLabels(petsclib::PetscLibType,dm::PetscDM, numLabels::PetscInt, label::Vector{DMLabel}, value::Vector{PetscInt}, numExLabels::PetscInt, exLabel::Vector{DMLabel}, exValue::Vector{PetscInt}, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS)Compute a label indicating what overlap points should be sent to new processes
Collective
Input Parameters:
dm- TheDMnumLabels- The number of labels to draw candidate points fromlabel- An array of labels containing candidate pointsvalue- An array of label values marking the candidate pointsnumExLabels- The number of labels to use for exclusionexLabel- An array of labels indicating points to be excluded, orNULLexValue- An array of label values to be excluded, orNULLrootSection- The number of leaves for a given root pointrootrank- The rank of each edge into the root pointleafSection- The number of processes sharing a given leaf pointleafrank- The rank of each process sharing a leaf point
Output Parameter:
ovLabel-DMLabelcontaining remote overlap contributions as point/rank pairings
Level: developer
-seealso: DMPLEX, DMPlexCreateOverlapLabel(), DMPlexGetAdjacency(), DMPlexDistributeOwnership(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateOverlapLabelFromLabels
PETSc.LibPETSc.DMPlexCreateOverlapMigrationSF — Method
migrationSF::PetscSF = DMPlexCreateOverlapMigrationSF(petsclib::PetscLibType,dm::PetscDM, overlapSF::PetscSF)Create a PetscSF describing the new mesh distribution to make the overlap described by the input PetscSF
Collective
Input Parameters:
dm- TheDMoverlapSF- ThePetscSFmapping ghost points in overlap to owner points on other processes
Output Parameter:
migrationSF- APetscSFthat maps original points in old locations to points in new locations
Level: developer
-seealso: DMPLEX, DMPlexCreateOverlapLabel(), DMPlexDistributeOverlap(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateOverlapMigrationSF
PETSc.LibPETSc.DMPlexCreatePLYFromFile — Method
dm::PetscDM = DMPlexCreatePLYFromFile(petsclib::PetscLibType,comm::MPI_Comm, filename::String, interpolate::PetscBool)Create a DMPLEX mesh from a PLY https://en.wikipedia.org/wiki/PLY_(file_format) file.
Input Parameters:
comm- The MPI communicatorfilename- Name of the .ply fileinterpolate- Create faces and edges in the mesh
Output Parameter:
dm- TheDMPLEXobject representing the mesh
Level: beginner
-seealso: DMPlexCreateFromFile(), DMPlexCreateGmsh(), DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreatePLYFromFile
PETSc.LibPETSc.DMPlexCreatePartitionerGraph — Method
numVertices::PetscInt,offsets::PetscInt,adjacency::PetscInt,globalNumbering::IS = DMPlexCreatePartitionerGraph(petsclib::PetscLibType,dm::PetscDM, height::PetscInt)Create a CSR graph of point connections for the partitioner
Collective
Input Parameters:
dm- The meshDMheight- Height of the strata from which to construct the graph
Output Parameters:
numVertices- Number of vertices in the graphoffsets- Point offsets in the graphadjacency- Point connectivity in the graphglobalNumbering- A map from the local cell numbering to the global numbering used in "adjacency". Negative indicates that the cell is a duplicate from another process.
Options Database Key:
-dm_plex_csr_alg <mat,graph,overlap>- Choose the algorithm for computing the CSR graph
Level: developer
-seealso: , DM, DMPLEX, PetscPartitionerGetType(), PetscPartitionerCreate(), DMSetAdjacency()
External Links
- PETSc Manual:
DMPlex/DMPlexCreatePartitionerGraph
PETSc.LibPETSc.DMPlexCreatePointNumbering — Method
globalPointNumbers::IS = DMPlexCreatePointNumbering(petsclib::PetscLibType,dm::PetscDM)Create a global numbering for all points.
Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
globalPointNumbers- Global numbers for all points on this process
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCellNumbering()
External Links
- PETSc Manual:
DMPlex/DMPlexCreatePointNumbering
PETSc.LibPETSc.DMPlexCreatePointSF — Method
pointSF::PetscSF = DMPlexCreatePointSF(petsclib::PetscLibType,dm::PetscDM, migrationSF::PetscSF, ownership::PetscBool)Build a point PetscSF from an PetscSF describing a point migration
Input Parameters:
dm- The sourceDMPLEXobjectmigrationSF- The star forest that describes the parallel point remappingownership- Flag causing a vote to determine point ownership
Output Parameter:
pointSF- The star forest describing the point overlap in the remappedDM
Level: developer
-seealso: DMPLEX, PetscSF, DM, DMPlexDistribute(), DMPlexDistributeOverlap()
External Links
- PETSc Manual:
DMPlex/DMPlexCreatePointSF
PETSc.LibPETSc.DMPlexCreateProcessSF — Method
processRanks::IS,sfProcess::PetscSF = DMPlexCreateProcessSF(petsclib::PetscLibType,dm::PetscDM, sfPoint::PetscSF)Create an PetscSF which just has process connectivity
Collective
Input Parameters:
dm- TheDMsfPoint- ThePetscSFwhich encodes point connectivity
Output Parameters:
processRanks- A list of process neighbors, orNULLsfProcess- AnPetscSFencoding the process connectivity, orNULL
Level: developer
-seealso: , DM, DMPLEX, PetscSF, PetscSFCreate(), DMPlexCreateTwoSidedProcessSF()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateProcessSF
PETSc.LibPETSc.DMPlexCreateRankField — Method
ranks::PetscVec = DMPlexCreateRankField(petsclib::PetscLibType,dm::PetscDM)Create a cell field whose value is the rank of the owner
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
ranks- The rank field
Options Database Key:
-dm_partition_view- Adds the rank field into theDMoutput from-dm_viewusing the same viewer
Level: intermediate
-seealso: , DM, DMPLEX, DMView()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateRankField
PETSc.LibPETSc.DMPlexCreateReferenceCell — Method
refdm::PetscDM = DMPlexCreateReferenceCell(petsclib::PetscLibType,comm::MPI_Comm, ct::DMPolytopeType)Create a DMPLEX with the appropriate FEM reference cell
Collective
Input Parameters:
comm- The communicatorct- The cell type of the reference cell
Output Parameter:
refdm- The reference cell
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexCreateBoxMesh()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateReferenceCell
PETSc.LibPETSc.DMPlexCreateRigidBodies — Method
sp::MatNullSpace = DMPlexCreateRigidBodies(petsclib::PetscLibType,dm::PetscDM, nb::PetscInt, label::DMLabel, nids::Vector{PetscInt}, ids::Vector{PetscInt})For the default global section, create rigid body modes by function space interpolation
Collective
Input Parameters:
dm- theDMnb- The number of bodieslabel- TheDMLabelmarking each domainnids- The number of ids per bodyids- An array of the label ids in sequence for each domain
Output Parameter:
sp- the null space
Level: advanced
-seealso: , DM, DMPLEX, MatNullSpaceCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateRigidBodies
PETSc.LibPETSc.DMPlexCreateRigidBody — Method
sp::MatNullSpace = DMPlexCreateRigidBody(petsclib::PetscLibType,dm::PetscDM, field::PetscInt)For the default global section, create rigid body modes by function space interpolation
Collective
Input Parameters:
dm- theDMfield- The field number for the rigid body space, or 0 for the default
Output Parameter:
sp- the null space
Level: advanced
-seealso: , DM, DMPLEX, MatNullSpaceCreate(), PCGAMG
External Links
- PETSc Manual:
DMPlex/DMPlexCreateRigidBody
PETSc.LibPETSc.DMPlexCreateSection — Method
section::PetscSection = DMPlexCreateSection(petsclib::PetscLibType,dm::PetscDM, label::Vector{DMLabel}, numComp::Vector{PetscInt}, numDof::Vector{PetscInt}, numBC::PetscInt, bcField::Vector{PetscInt}, bcComps::Vector{IS}, bcPoints::Vector{IS}, perm::IS)Create a PetscSection based upon the dof layout specification provided.
Not Collective
Input Parameters:
dm- TheDMPLEXobjectlabel- An array ofDMLabelof lengthnumFieldsindicating the mesh support of each field, orNULLfor the whole meshnumComp- An array of sizenumFieldsthat holds the number of components for each fieldnumDof- An array of size numFields ime (dim+1) which holds the number of dof for each field on a mesh piece of dimension dnumBC- The number of boundary conditionsbcField- An array of sizenumBCgiving the field number for each boundary conditionbcComps- [Optional] An array of sizenumBCofISholding the field components to which each boundary condition appliesbcPoints- An array of sizenumBCofISholding theDMPLEXpoints to which each boundary condition appliesperm- Optional permutation of the chart, orNULL
Output Parameter:
section- ThePetscSectionobject
Level: developer
-seealso: , DM, DMPLEX, DMPlexCreate(), PetscSectionCreate(), PetscSectionSetPermutation()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateSection
PETSc.LibPETSc.DMPlexCreateSphereMesh — Method
dm::PetscDM = DMPlexCreateSphereMesh(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, R::PetscReal)Creates a mesh on the d
Collective
Input Parameters:
comm- The communicator for theDMobjectdim- The dimensionsimplex- Use simplices, or tensor product cellsR- The radius
Output Parameter:
dm- TheDMobject
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreateBallMesh(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateSphereMesh
PETSc.LibPETSc.DMPlexCreateSubmesh — Method
subdm::PetscDM = DMPlexCreateSubmesh(petsclib::PetscLibType,dm::PetscDM, vertexLabel::DMLabel, value::PetscInt, markedFaces::PetscBool)Extract a hypersurface from the mesh using vertices defined by a label
Input Parameters:
dm- The original meshvertexLabel- TheDMLabelmarking points contained in the surfacevalue- The label value to usemarkedFaces-PETSC_TRUEif surface faces are marked in addition to vertices,PETSC_FALSEif only vertices are marked
Output Parameter:
subdm- The surface mesh
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetSubpointMap(), DMGetLabel(), DMLabelSetValue()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateSubmesh
PETSc.LibPETSc.DMPlexCreateTPSMesh — Method
dm::PetscDM = DMPlexCreateTPSMesh(petsclib::PetscLibType,comm::MPI_Comm, tpstype::DMPlexTPSType, extent::Vector{PetscInt}, periodic::Vector{DMBoundaryType}, tps_distribute::PetscBool, refinements::PetscInt, layers::PetscInt, thickness::PetscReal)Create a distributed, interpolated mesh of a triply
Collective
Input Parameters:
comm- The communicator for theDMobjecttpstype- Type of triply-periodic surfaceextent- Array of length 3 containing number of periods in each directionperiodic- array of length 3 with periodicity, orNULLfor non-periodictps_distribute- Distribute 2D manifold mesh prior to refinement and extrusion (more scalable)refinements- Number of factor-of-2 refinements of 2D manifold meshlayers- Number of cell layers extruded in normal directionthickness- Thickness in normal direction
Output Parameter:
dm- TheDMobject
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreateSphereMesh(), DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateTPSMesh
PETSc.LibPETSc.DMPlexCreateTwoSidedProcessSF — Method
processRanks::IS,sfProcess::PetscSF = DMPlexCreateTwoSidedProcessSF(petsclib::PetscLibType,dm::PetscDM, sfPoint::PetscSF, rootRankSection::PetscSection, rootRanks::IS, leafRankSection::PetscSection, leafRanks::IS)Create an PetscSF which just has process connectivity
Collective
Input Parameters:
dm- TheDMsfPoint- ThePetscSFwhich encodes point connectivityrootRankSection- to be documentedrootRanks- to be documentedleafRankSection- to be documentedleafRanks- to be documented
Output Parameters:
processRanks- A list of process neighbors, orNULLsfProcess- AnPetscSFencoding the two-sided process connectivity, orNULL
Level: developer
-seealso: DMPLEX, PetscSFCreate(), DMPlexCreateProcessSF()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateTwoSidedProcessSF
PETSc.LibPETSc.DMPlexCreateWedgeBoxMesh — Method
dm::PetscDM = DMPlexCreateWedgeBoxMesh(petsclib::PetscLibType,comm::MPI_Comm, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, periodicity::Vector{DMBoundaryType}, orderHeight::PetscBool, interpolate::PetscBool)Creates a 3
Collective
Input Parameters:
comm- The communicator for theDMobjectfaces- Number of faces per dimension, orNULLfor (1, 1, 1)lower- The lower left corner, orNULLfor (0, 0, 0)upper- The upper right corner, orNULLfor (1, 1, 1)periodicity- The boundary type for the X,Y,Z direction, orNULLforDM_BOUNDARY_NONEorderHeight- IfPETSC_TRUE, orders the extruded cells in the height first. Otherwise, orders the cell on the layers firstinterpolate- Flag to create intermediate mesh pieces (edges, faces)
Output Parameter:
dm- TheDMobject
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreateHexCylinderMesh(), DMPlexCreateWedgeCylinderMesh(), DMExtrude(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateWedgeBoxMesh
PETSc.LibPETSc.DMPlexCreateWedgeCylinderMesh — Method
dm::PetscDM = DMPlexCreateWedgeCylinderMesh(petsclib::PetscLibType,comm::MPI_Comm, n::PetscInt, interpolate::PetscBool)Creates a mesh on the tensor product of the unit interval with the circle (cylinder) using wedges.
Collective
Input Parameters:
comm- The communicator for theDMobjectn- The number of wedges around the origininterpolate- Create edges and faces
Output Parameter:
dm- TheDMobject
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreateHexCylinderMesh(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexCreateWedgeCylinderMesh
PETSc.LibPETSc.DMPlexDistribute — Method
DMPlexDistribute(petsclib::PetscLibType,dm::PetscDM, overlap::PetscInt, sf::PetscSF, dmParallel::PetscDM)Distributes the mesh and any associated sections.
Collective
Input Parameters:
dm- The originalDMPLEXobjectoverlap- The overlap of partitions, 0 is the default
Output Parameters:
sf- ThePetscSFused for point distribution, orNULLif not neededdmParallel- The distributedDMPLEXobject
Level: intermediate
-seealso: DMPLEX, DM, DMPlexCreate(), DMSetAdjacency(), DMPlexGetOverlap()
External Links
- PETSc Manual:
DMPlex/DMPlexDistribute
PETSc.LibPETSc.DMPlexDistributeField — Method
DMPlexDistributeField(petsclib::PetscLibType,dm::PetscDM, pointSF::PetscSF, originalSection::PetscSection, originalVec::PetscVec, newSection::PetscSection, newVec::PetscVec)Distribute field data to match a given PetscSF, usually the PetscSF from mesh distribution
Collective
Input Parameters:
dm- TheDMPLEXobjectpointSF- ThePetscSFdescribing the communication patternoriginalSection- ThePetscSectionfor existing data layoutoriginalVec- The existing data in a local vector
Output Parameters:
newSection- ThePetscSFdescribing the new data layoutnewVec- The new data in a local vector
Level: developer
-seealso: DMPLEX, DMPlexDistribute(), DMPlexDistributeFieldIS(), DMPlexDistributeData()
External Links
- PETSc Manual:
DMPlex/DMPlexDistributeField
PETSc.LibPETSc.DMPlexDistributeFieldIS — Method
DMPlexDistributeFieldIS(petsclib::PetscLibType,dm::PetscDM, pointSF::PetscSF, originalSection::PetscSection, originalIS::IS, newSection::PetscSection, newIS::IS)Distribute field data to match a given PetscSF, usually the PetscSF from mesh distribution
Collective
Input Parameters:
dm- TheDMPLEXobjectpointSF- ThePetscSFdescribing the communication patternoriginalSection- ThePetscSectionfor existing data layoutoriginalIS- The existing data
Output Parameters:
newSection- ThePetscSFdescribing the new data layoutnewIS- The new data
Level: developer
-seealso: DMPLEX, DMPlexDistribute(), DMPlexDistributeField(), DMPlexDistributeData()
External Links
- PETSc Manual:
DMPlex/DMPlexDistributeFieldIS
PETSc.LibPETSc.DMPlexDistributeGetDefault — Method
dist::PetscBool = DMPlexDistributeGetDefault(petsclib::PetscLibType,dm::PetscDM)Get flag indicating whether the DM should be distributed by default
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
dist- Flag for distribution
Level: intermediate
-seealso: DMPLEX, DM, DMPlexDistributeSetDefault(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexDistributeGetDefault
PETSc.LibPETSc.DMPlexDistributeOverlap — Method
DMPlexDistributeOverlap(petsclib::PetscLibType,dm::PetscDM, overlap::PetscInt, sf::PetscSF, dmOverlap::PetscDM)Add partition overlap to a distributed non
Collective
Input Parameters:
dm- The non-overlapping distributedDMPLEXobjectoverlap- The overlap of partitions (the same on all ranks)
Output Parameters:
sf- ThePetscSFused for point distribution, or passNULLif not neededdmOverlap- The overlapping distributedDMPLEXobject
Options Database Keys:
-dm_plex_overlap_labels <name1,name2,...>- List of overlap label names-dm_plex_overlap_values <int1,int2,...>- List of overlap label values-dm_plex_overlap_exclude_label <name>- Label used to exclude points from overlap-dm_plex_overlap_exclude_value <int>- Label value used to exclude points from overlap
Level: advanced
-seealso: DMPLEX, PetscSF, DM, DMPlexCreate(), DMSetAdjacency(), DMPlexDistribute(), DMPlexCreateOverlapLabel(), DMPlexGetOverlap()
External Links
- PETSc Manual:
DMPlex/DMPlexDistributeOverlap
PETSc.LibPETSc.DMPlexDistributeOwnership — Method
DMPlexDistributeOwnership(petsclib::PetscLibType,dm::PetscDM, rootSection::PetscSection, rootrank::IS, leafSection::PetscSection, leafrank::IS)Compute owner information for shared points. This basically gets two
Collective
Input Parameter:
dm- TheDM
Output Parameters:
rootSection- The number of leaves for a given root pointrootrank- The rank of each edge into the root pointleafSection- The number of processes sharing a given leaf pointleafrank- The rank of each process sharing a leaf point
Level: developer
-seealso: DMPLEX, DMPlexCreateOverlapLabel(), DMPlexDistribute(), DMPlexDistributeOverlap()
External Links
- PETSc Manual:
DMPlex/DMPlexDistributeOwnership
PETSc.LibPETSc.DMPlexDistributeSetDefault — Method
DMPlexDistributeSetDefault(petsclib::PetscLibType,dm::PetscDM, dist::PetscBool)Set flag indicating whether the DM should be distributed by default
Logically Collective
Input Parameters:
dm- TheDMdist- Flag for distribution
Level: intermediate
-seealso: DMPLEX, DMPlexDistributeGetDefault(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexDistributeSetDefault
PETSc.LibPETSc.DMPlexDistributionGetName — Method
DMPlexDistributionGetName(petsclib::PetscLibType,dm::PetscDM, name::String)Retrieve the name of the specific parallel distribution
Input Parameter:
dm- TheDM
Output Parameter:
name- The name of the specific parallel distribution
Level: developer
-seealso: DMPLEX, DMPlexDistributionSetName(), DMPlexTopologyView(), DMPlexTopologyLoad()
External Links
- PETSc Manual:
DMPlex/DMPlexDistributionGetName
PETSc.LibPETSc.DMPlexDistributionSetName — Method
DMPlexDistributionSetName(petsclib::PetscLibType,dm::PetscDM, name::String)Set the name of the specific parallel distribution
Input Parameters:
dm- TheDMname- The name of the specific parallel distribution
Level: developer
-seealso: DMPLEX, DMPlexDistributionGetName(), DMPlexTopologyView(), DMPlexTopologyLoad()
External Links
- PETSc Manual:
DMPlex/DMPlexDistributionSetName
PETSc.LibPETSc.DMPlexEqual — Method
equal::PetscBool = DMPlexEqual(petsclib::PetscLibType,dmA::PetscDM, dmB::PetscDM)Determine if two DM have the same topology
Not Collective
Input Parameters:
dmA- ADMPLEXobjectdmB- ADMPLEXobject
Output Parameter:
equal-PETSC_TRUEif the topologies are identical
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetCone()
External Links
- PETSc Manual:
DMPlex/DMPlexEqual
PETSc.LibPETSc.DMPlexExtrude — Method
DMPlexExtrude(petsclib::PetscLibType,dm::PetscDM, layers::PetscInt, thickness::PetscReal, tensor::PetscBool, symmetric::PetscBool, periodic::PetscBool, normal::Vector{PetscReal}, thicknesses::Vector{PetscReal}, activeLabel::DMLabel, edm::PetscDM)Extrude a volumetric mesh from the input surface mesh
Input Parameters:
dm- The surface meshlayers- The number of extruded layersthickness- The total thickness of the extruded layers, orPETSC_DETERMINEtensor- Flag to create tensor produt cellssymmetric- Flag to extrude symmetrically about the surfaceperiodic- Flag to extrude periodicallynormal- Surface normal vector, orNULLthicknesses- Thickness of each layer, orNULLactiveLabel-DMLabelto extrude from, orNULLto extrude entire mesh
Output Parameter:
edm- The volumetric mesh
Options Database Keys:
-dm_plex_transform_extrude_thickness <t>- The total thickness of extruded layers-dm_plex_transform_extrude_use_tensor <bool>- Use tensor cells when extruding-dm_plex_transform_extrude_symmetric <bool>- Extrude layers symmetrically about the surface-dm_plex_transform_extrude_periodic <bool>- Extrude layers periodically-dm_plex_transform_extrude_normal <n0,...,nd>- Specify the extrusion direction-dm_plex_transform_extrude_thicknesses <t0,...,tl>- Specify thickness of each layer
Level: intermediate
-seealso: , DM, DMPLEX, DMExtrude(), DMPlexTransform, DMPlexTransformExtrudeSetThickness(), DMPlexTransformExtrudeSetTensor()
External Links
- PETSc Manual:
DMPlex/DMPlexExtrude
PETSc.LibPETSc.DMPlexFilter — Method
DMPlexFilter(petsclib::PetscLibType,dm::PetscDM, cellLabel::DMLabel, value::PetscInt, ignoreLabelHalo::PetscBool, sanitizeSubmesh::PetscBool, ownershipTransferSF::PetscSF, subdm::PetscDM)Extract a subset of mesh cells defined by a label as a separate mesh
Input Parameters:
dm- The original meshcellLabel- TheDMLabelmarking cells contained in the new meshvalue- The label value to useignoreLabelHalo- The flag indicating if labeled points that are in the halo are ignoredsanitizeSubmesh- The flag indicating if a subpoint is forced to be owned by a rank that owns a subcell that contains that point in its closure
Output Parameters:
ownershipTransferSF- ThePetscSFrepresenting the ownership transfers between parent local meshes due to submeshing.subdm- The new mesh
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetSubpointMap(), DMGetLabel(), DMLabelSetValue(), DMPlexCreateSubmesh()
External Links
- PETSc Manual:
DMPlex/DMPlexFilter
PETSc.LibPETSc.DMPlexFindVertices — Method
DMPlexFindVertices(petsclib::PetscLibType,dm::PetscDM, coordinates::PetscVec, eps::PetscReal, points::IS)Try to find DAG points based on their coordinates.
Not Collective (provided DMGetCoordinatesLocalSetUp() has been already called)
Input Parameters:
dm- TheDMPLEXobjectcoordinates- TheVecof coordinates of the sought pointseps- The tolerance orPETSC_DEFAULT
Output Parameter:
points- TheISof found DAG points or -1
Level: intermediate
-seealso: DMPLEX, DMPlexCreate(), DMGetCoordinatesLocal()
External Links
- PETSc Manual:
DMPlex/DMPlexFindVertices
PETSc.LibPETSc.DMPlexFreeGeomObject — Method
DMPlexFreeGeomObject(petsclib::PetscLibType,dm::PetscDM, geomObj::PetscGeom)Frees PetscGeom Objects
Not collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectgeomObj- PetscGeom object
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexFreeGeomObject
PETSc.LibPETSc.DMPlexGenerate — Method
DMPlexGenerate(petsclib::PetscLibType,boundary::PetscDM, name::String, interpolate::PetscBool, mesh::PetscDM)Generates a mesh.
Not Collective
Input Parameters:
boundary- TheDMPLEXboundary objectname- The mesh generation package nameinterpolate- Flag to create intermediate mesh elements
Output Parameter:
mesh- TheDMPLEXobject
Options Database Keys:
-dm_plex_generate <name>- package to generate mesh, for example, triangle, ctetgen or tetgen-dm_generator <name>- package to generate mesh, for example, triangle, ctetgen or tetgen
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexCreate(), DMRefine()
External Links
- PETSc Manual:
DMPlex/DMPlexGenerate
PETSc.LibPETSc.DMPlexGeomDataAndGrads — Method
DMPlexGeomDataAndGrads(petsclib::PetscLibType,dm::PetscDM, fullGeomGrad::PetscBool)Exposes Control Points and Control Point Weights defining the underlying geometry allowing user manipulation of the geometry.
Collective
Input Parameters:
dm- The DM object representing the mesh with PetscContainer containing an EGADS geometry modelfullGeomGrad- PetscBool flag. Determines how the Surface Area and Volume Gradients wrt to Control Points and Control Point Weights are calculated.
PETSCFALSE :: Surface Area Gradient wrt Control Points and Control Point Weights are calculated using the change in the local FACE changes (not the entire body). Volume Gradients are not calculated. Faster computations. PETSCTRUE :: Surface Area Gradietn wrt to Control Points and Control Point Weights are calculated using the change observed in the entire solid body. Volume Gradients are calculated. Slower computation due to the need to generate a new solid body geometry for every Control Point and Control Point Weight change.
Output Parameter:
dm- The updated DM object representing the mesh with PetscContainers containing the Control Point, Control Point Weight and Gradient Data.
Level: intermediate
-seealso: DMPLEX, DMCreate(), DMPlexCreateGeom(), DMPlexModifyEGADSGeomModel()
External Links
- PETSc Manual:
DMPlex/DMPlexGeomDataAndGrads
PETSc.LibPETSc.DMPlexGetActivePoint — Method
point::PetscInt = DMPlexGetActivePoint(petsclib::PetscLibType,dm::PetscDM)Get the point on which projection is currently working
Not Collective
Input Parameter:
dm- theDM
Output Parameter:
point- The mesh point involved in the current projection
Level: developer
-seealso: , DM, DMPLEX, DMPlexSetActivePoint()
External Links
- PETSc Manual:
DMPlex/DMPlexGetActivePoint
PETSc.LibPETSc.DMPlexGetAdjacency — Method
adjSize::PetscInt,adj::Vector{PetscInt} = DMPlexGetAdjacency(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)Return all points adjacent to the given point
Input Parameters:
dm- TheDMobjectp- The point
Input/Output Parameters:
adjSize- The maximum size ofadjif it is non-NULL, orPETSC_DETERMINE;
on output the number of adjacent points
adj- EitherNULLso that the array is allocated, or an existing array with sizeadjSize;
on output contains the adjacent points
Level: advanced
-seealso: DMPLEX, DMSetAdjacency(), DMPlexDistribute(), DMCreateMatrix(), DMPlexPreallocateOperator()
External Links
- PETSc Manual:
DMPlex/DMPlexGetAdjacency
PETSc.LibPETSc.DMPlexGetAdjacencyUseAnchors — Method
useAnchors::PetscBool = DMPlexGetAdjacencyUseAnchors(petsclib::PetscLibType,dm::PetscDM)Query whether adjacency in the mesh uses the point
Input Parameter:
dm- TheDMobject
Output Parameter:
useAnchors- Flag to use the closure. If PETSC_TRUE, then constrained points are omitted from DMPlexGetAdjacency(), and their anchor points appear in their place.
Level: intermediate
-seealso: DMPLEX, DMPlexSetAdjacencyUseAnchors(), DMSetAdjacency(), DMGetAdjacency(), DMPlexDistribute(), DMPlexPreallocateOperator(), DMPlexSetAnchors()
External Links
- PETSc Manual:
DMPlex/DMPlexGetAdjacencyUseAnchors
PETSc.LibPETSc.DMPlexGetAnchors — Method
DMPlexGetAnchors(petsclib::PetscLibType,dm::PetscDM, anchorSection::PetscSection, anchorIS::IS)Get the layout of the anchor (point call DMPlexGetAnchors() directly: if there are anchors, then DMPlexGetAnchors() is called during DMGetDefaultConstraints().
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameters:
anchorSection- If notNULL, set to the section describing which points anchor the constrained points.anchorIS- If notNULL, set to the list of anchors indexed byanchorSection
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexSetAnchors(), DMGetDefaultConstraints(), DMSetDefaultConstraints(), IS, PetscSection
External Links
- PETSc Manual:
DMPlex/DMPlexGetAnchors
PETSc.LibPETSc.DMPlexGetCellCoordinates — Method
isDG::PetscBool,Nc::PetscInt,array::Vector{PetscScalar},coords::Vector{PetscScalar} = DMPlexGetCellCoordinates(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt)Get coordinates for a cell, taking into account periodicity
Not Collective
Input Parameters:
dm- TheDMPLEXcell- The cell number
Output Parameters:
isDG- Using cellwise coordinatesNc- The number of coordinatesarray- The coordinate arraycoords- The cell coordinates
Level: developer
-seealso: DMPLEX, DMPlexRestoreCellCoordinates(), DMGetCoordinatesLocal(), DMGetCellCoordinatesLocal()
External Links
- PETSc Manual:
DMPlex/DMPlexGetCellCoordinates
PETSc.LibPETSc.DMPlexGetCellFields — Method
u::Vector{PetscScalar},u_t::Vector{PetscScalar},a::Vector{PetscScalar} = DMPlexGetCellFields(petsclib::PetscLibType,dm::PetscDM, cellIS::IS, locX::PetscVec, locX_t::PetscVec, locA::PetscVec)Retrieve the field values values for a chunk of cells
Input Parameters:
dm- TheDMcellIS- The cells to includelocX- A local vector with the solution fieldslocX_t- A local vector with solution field time derivatives, orNULLlocA- A local vector with auxiliary fields, orNULL
Output Parameters:
u- The field coefficientsu_t- The fields derivative coefficientsa- The auxiliary field coefficients
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetFaceFields()
External Links
- PETSc Manual:
DMPlex/DMPlexGetCellFields
PETSc.LibPETSc.DMPlexGetCellNumbering — Method
DMPlexGetCellNumbering(petsclib::PetscLibType,dm::PetscDM, globalCellNumbers::IS)Get a global cell numbering for all cells on this process
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
globalCellNumbers- Global cell numbers for all cells on this process
Level: developer
-seealso: , DM, DMPLEX, DMPlexCreateCellNumbering(), DMPlexGetVertexNumbering()
External Links
- PETSc Manual:
DMPlex/DMPlexGetCellNumbering
PETSc.LibPETSc.DMPlexGetCellType — Method
celltype::DMPolytopeType = DMPlexGetCellType(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt)Get the polytope type of a given cell
Not Collective
Input Parameters:
dm- TheDMPLEXobjectcell- The cell
Output Parameter:
celltype- The polytope type of the cell
Level: intermediate
-seealso: , DM, DMPLEX, DMPolytopeType, DMPlexGetCellTypeLabel(), DMPlexGetDepthLabel(), DMPlexGetDepth()
External Links
- PETSc Manual:
DMPlex/DMPlexGetCellType
PETSc.LibPETSc.DMPlexGetCellTypeLabel — Method
celltypeLabel::DMLabel = DMPlexGetCellTypeLabel(petsclib::PetscLibType,dm::PetscDM)Get the DMLabel recording the polytope type of each cell
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
celltypeLabel- TheDMLabelrecording cell polytope type
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCellType(), DMPlexGetDepthLabel(), DMCreateLabel()
External Links
- PETSc Manual:
DMPlex/DMPlexGetCellTypeLabel
PETSc.LibPETSc.DMPlexGetCellTypeStratum — Method
start::PetscInt,end_::PetscInt = DMPlexGetCellTypeStratum(petsclib::PetscLibType,dm::PetscDM, ct::DMPolytopeType)Get the range of cells of a given celltype
Input Parameters:
dm- TheDMPLEXobjectct- TheDMPolytopeTypeof the cell
Output Parameters:
start- The first cell of this type, orNULLend- The upper bound on this celltype, orNULL
Level: advanced
-seealso: , DM, DMPLEX, DMPlexConstructGhostCells(), DMPlexGetDepthStratum(), DMPlexGetHeightStratum()
External Links
- PETSc Manual:
DMPlex/DMPlexGetCellTypeStratum
PETSc.LibPETSc.DMPlexGetChart — Method
pStart::PetscInt,pEnd::PetscInt = DMPlexGetChart(petsclib::PetscLibType,dm::PetscDM)Return the interval for all mesh points [pStart, pEnd)
Not Collective
Input Parameter:
dm- TheDMPLEX
Output Parameters:
pStart- The first mesh pointpEnd- The upper bound for mesh points
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexGetChart
PETSc.LibPETSc.DMPlexGetClosureIndices — Method
numIndices::PetscInt,indices::Vector{PetscInt},outOffsets::Vector{PetscInt},values::Vector{PetscScalar} = DMPlexGetClosureIndices(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, idxSection::PetscSection, point::PetscInt, useClPerm::PetscBool)Gets the global dof indices associated with the closure of the given point within the provided sections.
Not collective
Input Parameters:
dm- TheDMsection- ThePetscSectiondescribing the points (a local section)idxSection- ThePetscSectionfrom which to obtain indices (may be local or global)point- The point defining the closureuseClPerm- Use the closure point permutation if available
Output Parameters:
numIndices- The number of dof indices in the closure of point with the input sectionsindices- The dof indicesoutOffsets- Array, of length the number of fields plus 1, to write the field offsets into, orNULLvalues- The input values, which may be modified if sign flips are induced by the point symmetries, orNULL
Level: advanced
-seealso: , DM, DMPLEX, DMPlexRestoreClosureIndices(), DMPlexVecGetClosure(), DMPlexMatSetClosure(), DMGetLocalSection(), PetscSection, DMGetGlobalSection()
External Links
- PETSc Manual:
DMPlex/DMPlexGetClosureIndices
PETSc.LibPETSc.DMPlexGetCompressedClosure — Method
numPoints::PetscInt = DMPlexGetCompressedClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, point::PetscInt, ornt::PetscInt, points::PetscInt, clSec::PetscSection, clPoints::IS, clp::PetscInt)External Links
- PETSc Manual:
DMPlex/DMPlexGetCompressedClosure
PETSc.LibPETSc.DMPlexGetCone — Method
cone::Vector{PetscInt} = DMPlexGetCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)Return the points on the in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()
Output Parameter:
cone- An array of points which are on the in-edges for pointp, the length ofconeis the result ofDMPlexGetConeSize()
Level: beginner
-seealso: , DM, DMPLEX, DMPlexGetConeSize(), DMPlexSetCone(), DMPlexGetConeTuple(), DMPlexSetChart(), DMPlexRestoreCone()
External Links
- PETSc Manual:
DMPlex/DMPlexGetCone
PETSc.LibPETSc.DMPlexGetConeOrientation — Method
coneOrientation::Vector{PetscInt} = DMPlexGetConeOrientation(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)Return the orientations on the in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()
Output Parameter:
coneOrientation- An array of orientations which are on the in-edges for pointp. An orientation is an
integer giving the prescription for cone traversal. Its length is given by the result of DMPlexSetConeSize()
Level: beginner
-seealso: , DM, DMPLEX, DMPlexSetConeSize(), DMPolytopeTypeComposeOrientation(), DMPolytopeTypeComposeOrientationInv(), DMPlexCreate(), DMPlexGetCone(), DMPlexSetCone(), DMPlexSetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexGetConeOrientation
PETSc.LibPETSc.DMPlexGetConeOrientations — Method
coneOrientations::Vector{PetscInt} = DMPlexGetConeOrientations(petsclib::PetscLibType,dm::PetscDM)Return cone orientation data
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
coneOrientations- The array of cone orientations for all points
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetConeSection(), DMPlexGetConeOrientation(), PetscSection
External Links
- PETSc Manual:
DMPlex/DMPlexGetConeOrientations
PETSc.LibPETSc.DMPlexGetConeRecursive — Method
depth::PetscInt = DMPlexGetConeRecursive(petsclib::PetscLibType,dm::PetscDM, points::IS, expandedPoints::Vector{IS}, sections::Vector{PetscSection})Expand each given point into its cone points and do that recursively until we end up just with vertices (DAG points of depth 0, i.e., without cones).
Not Collective
Input Parameters:
dm- TheDMPLEXpoints- TheISof points, which must lie in the chart set withDMPlexSetChart()
Output Parameters:
depth- (optional) Size of the output arrays, equal toDMPLEXdepth, returned byDMPlexGetDepth()expandedPoints- (optional) An array of index sets with recursively expanded conessections- (optional) An array of sections which describe mappings from points to their cone points
Level: advanced
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeTuple(), DMPlexRestoreConeRecursive(), DMPlexGetConeRecursiveVertices(), DMPlexGetDepth(), PetscSection, IS
External Links
- PETSc Manual:
DMPlex/DMPlexGetConeRecursive
PETSc.LibPETSc.DMPlexGetConeRecursiveVertices — Method
DMPlexGetConeRecursiveVertices(petsclib::PetscLibType,dm::PetscDM, points::IS, expandedPoints::IS)Expand each given point into its cone points and do that recursively until we end up just with vertices.
Not Collective
Input Parameters:
dm- TheDMPLEXpoints- TheISof points, which must lie in the chart set withDMPlexSetChart()
Output Parameter:
expandedPoints- AnIScontaining the of vertices recursively expanded from input points
Level: advanced
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeTuple(), DMPlexGetConeRecursive(), DMPlexRestoreConeRecursive(), DMPlexGetDepth(), IS
External Links
- PETSc Manual:
DMPlex/DMPlexGetConeRecursiveVertices
PETSc.LibPETSc.DMPlexGetConeSection — Method
DMPlexGetConeSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection)Return a section which describes the layout of cone data
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
section- ThePetscSectionobject
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetSupportSection(), DMPlexGetCones(), DMPlexGetConeOrientations(), PetscSection
External Links
- PETSc Manual:
DMPlex/DMPlexGetConeSection
PETSc.LibPETSc.DMPlexGetConeSize — Method
size::PetscInt = DMPlexGetConeSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)Return the number of in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()
Output Parameter:
size- The cone size for pointp
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexGetConeSize
PETSc.LibPETSc.DMPlexGetConeTuple — Method
DMPlexGetConeTuple(petsclib::PetscLibType,dm::PetscDM, p::IS, pConesSection::PetscSection, pCones::IS)Return the points on the in
Not Collective
Input Parameters:
dm- TheDMPLEXp- TheISof points, which must lie in the chart set withDMPlexSetChart()
Output Parameters:
pConesSection-PetscSectiondescribing the layout ofpConespCones- AnIScontaining the points which are on the in-edges for the point setp
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeRecursive(), DMPlexSetChart(), PetscSection, IS
External Links
- PETSc Manual:
DMPlex/DMPlexGetConeTuple
PETSc.LibPETSc.DMPlexGetCones — Method
cones::Vector{PetscInt} = DMPlexGetCones(petsclib::PetscLibType,dm::PetscDM)Return cone data
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
cones- The cone for each point
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetConeSection()
External Links
- PETSc Manual:
DMPlex/DMPlexGetCones
PETSc.LibPETSc.DMPlexGetCoordinateMap — Method
DMPlexGetCoordinateMap(petsclib::PetscLibType,dm::PetscDM, coordFunc::PetscPoCintFn)Returns the function used to map coordinates of newly generated mesh points
Not Collective
Input Parameter:
dm- theDMPLEX
Output Parameter:
coordFunc- the mapping function
Level: developer
-seealso: DMPLEX, DMGetCoordinates(), DMPlexSetCoordinateMap(), PetscPointFn
External Links
- PETSc Manual:
DMPlex/DMPlexGetCoordinateMap
PETSc.LibPETSc.DMPlexGetDataFVM — Method
DMPlexGetDataFVM(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, cellgeom::PetscVec, facegeom::PetscVec, gradDM::PetscDM)Retrieve precomputed cell geometry
Collective
Input Parameters:
dm- TheDMfv- ThePetscFV
Output Parameters:
cellgeom- The cell geometryfacegeom- The face geometrygradDM- The gradient matrices
Level: developer
-seealso: DMPLEX, DMPlexComputeGeometryFVM()
External Links
- PETSc Manual:
DMPlex/DMPlexGetDataFVM
PETSc.LibPETSc.DMPlexGetDepth — Method
depth::PetscInt = DMPlexGetDepth(petsclib::PetscLibType,dm::PetscDM)Get the depth of the DAG representing this mesh
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
depth- The number of strata (breadth first levels) in the DAG
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetDepthLabel(), DMPlexGetDepthStratum(), DMPlexGetPointDepth(), DMPlexSymmetrize()
External Links
- PETSc Manual:
DMPlex/DMPlexGetDepth
PETSc.LibPETSc.DMPlexGetDepthLabel — Method
DMPlexGetDepthLabel(petsclib::PetscLibType,dm::PetscDM, depthLabel::DMLabel)Get the DMLabel recording the depth of each point
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
depthLabel- TheDMLabelrecording point depth
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetDepth(), DMPlexGetHeightStratum(), DMPlexGetDepthStratum(), DMPlexGetPointDepth(),
External Links
- PETSc Manual:
DMPlex/DMPlexGetDepthLabel
PETSc.LibPETSc.DMPlexGetDepthStratum — Method
start::PetscInt,end_::PetscInt = DMPlexGetDepthStratum(petsclib::PetscLibType,dm::PetscDM, depth::PetscInt)Get the bounds [start, end) for all points at a certain depth.
Not Collective
Input Parameters:
dm- TheDMPLEXobjectdepth- The requested depth
Output Parameters:
start- The first point at thisdepthend- One beyond the last point at thisdepth
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetHeightStratum(), DMPlexGetCellTypeStratum(), DMPlexGetDepth(), DMPlexGetDepthLabel(), DMPlexGetPointDepth(), DMPlexSymmetrize(), DMPlexInterpolate()
External Links
- PETSc Manual:
DMPlex/DMPlexGetDepthStratum
PETSc.LibPETSc.DMPlexGetDepthStratumGlobalSize — Method
gsize::PetscInt = DMPlexGetDepthStratumGlobalSize(petsclib::PetscLibType,dm::PetscDM, depth::PetscInt)Get the global size for a given depth stratum
Input Parameters:
dm- TheDMPLEXobjectdepth- The depth for the given point stratum
Output Parameter:
gsize- The global number of points in the stratum
Level: advanced
-seealso: , DM, DMPLEX, DMPlexGetCellNumbering(), DMPlexGetVertexNumbering(), DMPlexGetDepthStratum(), DMPlexGetHeightStratum()
External Links
- PETSc Manual:
DMPlex/DMPlexGetDepthStratumGlobalSize
PETSc.LibPETSc.DMPlexGetFaceFields — Method
Nface::PetscInt,uL::Vector{PetscScalar},uR::Vector{PetscScalar} = DMPlexGetFaceFields(petsclib::PetscLibType,dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, locX::PetscVec, locX_t::PetscVec, faceGeometry::PetscVec, cellGeometry::PetscVec, locGrad::PetscVec)Retrieve the field values values for a chunk of faces
Input Parameters:
dm- TheDMfStart- The first face to includefEnd- The first face to excludelocX- A local vector with the solution fieldslocX_t- A local vector with solution field time derivatives, orNULLfaceGeometry- A local vector with face geometrycellGeometry- A local vector with cell geometrylocGrad- A local vector with field gradients, orNULL
Output Parameters:
Nface- The number of faces with field valuesuL- The field values at the left side of the faceuR- The field values at the right side of the face
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCellFields()
External Links
- PETSc Manual:
DMPlex/DMPlexGetFaceFields
PETSc.LibPETSc.DMPlexGetFaceGeometry — Method
Nface::PetscInt,vol::Vector{PetscReal} = DMPlexGetFaceGeometry(petsclib::PetscLibType,dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, faceGeometry::PetscVec, cellGeometry::PetscVec, fgeom::Vector{PetscFVFaceGeom})Retrieve the geometric values for a chunk of faces
Input Parameters:
dm- TheDMfStart- The first face to includefEnd- The first face to excludefaceGeometry- A local vector with face geometrycellGeometry- A local vector with cell geometry
Output Parameters:
Nface- The number of faces with field valuesfgeom- The face centroid and normalsvol- The cell volumes
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCellFields()
External Links
- PETSc Manual:
DMPlex/DMPlexGetFaceGeometry
PETSc.LibPETSc.DMPlexGetFullJoin — Method
numCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexGetFullJoin(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt})Get an array for the join of the set of points
Not Collective
Input Parameters:
dm- TheDMPLEXobjectnumPoints- The number of input points for the joinpoints- The input points, its length isnumPoints
Output Parameters:
numCoveredPoints- The number of points in the joincoveredPoints- The points in the join, its length isnumCoveredPoints
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetJoin(), DMPlexRestoreJoin(), DMPlexGetMeet()
External Links
- PETSc Manual:
DMPlex/DMPlexGetFullJoin
PETSc.LibPETSc.DMPlexGetFullMeet — Method
numCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexGetFullMeet(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt})Get an array for the meet of the set of points
Not Collective
Input Parameters:
dm- TheDMPLEXobjectnumPoints- The number of input points for the meetpoints- The input points, of lengthnumPoints
Output Parameters:
numCoveredPoints- The number of points in the meetcoveredPoints- The points in the meet, of lengthnumCoveredPoints
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetMeet(), DMPlexRestoreMeet(), DMPlexGetJoin()
External Links
- PETSc Manual:
DMPlex/DMPlexGetFullMeet
PETSc.LibPETSc.DMPlexGetGatherDM — Method
DMPlexGetGatherDM(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, gatherMesh::PetscDM)Get a copy of the DMPLEX that gathers all points on the root process of the original's communicator.
Collective
Input Parameter:
dm- the originalDMPLEXobject
Output Parameters:
sf- thePetscSFused for point distribution (optional)gatherMesh- the gatheredDMobject, orNULL
Level: intermediate
-seealso: DMPLEX, DM, PetscSF, DMPlexDistribute(), DMPlexGetRedundantDM()
External Links
- PETSc Manual:
DMPlex/DMPlexGetGatherDM
PETSc.LibPETSc.DMPlexGetGeomBodyMassProperties — Method
volume::PetscScalar,surfArea::PetscScalar,centerOfGravity::PetscScalar,COGsize::PetscInt,inertiaMatrixCOG::PetscScalar,IMCOGsize::PetscInt = DMPlexGetGeomBodyMassProperties(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom)Returns the Volume, Surface Area, Center of Gravity, and Inertia about the Body's Center of Gravity
Not collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom BODY object
Output Parameters:
volume- Volume of the CAD Body attached to the DM PlexsurfArea- Surface Area of the CAD Body attached to the DM PlexcenterOfGravity- Array with the Center of Gravity coordinates of the CAD Body attached to the DM Plex [x, y, z]COGszie- Size of centerOfGravity[] ArrayinertiaMatrixCOG- Array containing the Inertia about the Body's Center of Gravity [Ixx, Ixy, Ixz, Iyx, Iyy, Iyz, Izx, Izy, Izz]IMCOGsize- Size of inertiaMatrixCOG[] Array
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomBodyMassProperties
PETSc.LibPETSc.DMPlexGetGeomCntrlPntAndWeightData — Method
cpCoordDataLength::PetscInt,cpCoordData::PetscScalar,maxNumEquiv::PetscInt,wDataLength::PetscInt,wData::PetscScalar = DMPlexGetGeomCntrlPntAndWeightData(petsclib::PetscLibType,dm::PetscDM, cpHashTable::PetscHMapI, cpEquiv::PetscMat, wHashTable::PetscHMapI)Gets Control Point and Associated Weight Data for the Geometry attached to the DMPlex
Not collective
Input Parameter:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry object
Output Parameters:
cpHashTable- Hash Table containing the relationship between FACE ID and Control Point IDs.cpCoordDataLength- Length of cpCoordData Array.cpCoordData- Array holding the Geometry Control Point Coordinate Data.maxNumEquiv- Maximum Number of Equivalent Control Points (Control Points with the same coordinates but different IDs).cpEquiv- Matrix with a size(Number of Control Points, Number or Control Points) which stores a value of 1.0 in locations where Control Points with different IDS (row or column) have the same coordinateswHashTable- Hash Table containing the relationship between FACE ID and Control Point Weight.wDataLength- Length of wData Array.wData- Array holding the Weight for an associated Geometry Control Point.
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomCntrlPntAndWeightData
PETSc.LibPETSc.DMPlexGetGeomCntrlPntMaps — Method
numCntrlPnts::PetscInt,cntrlPntFaceMap::PetscInt,cntrlPntWeightFaceMap::PetscInt,cntrlPntEdgeMap::PetscInt,cntrlPntWeightEdgeMap::PetscInt,cntrlPntVertexMap::PetscInt,cntrlPntWeightVertexMap::PetscInt = DMPlexGetGeomCntrlPntMaps(petsclib::PetscLibType,dm::PetscDM)Gets arrays which maps Control Point IDs to their associated Geometry FACE, EDGE, and VERTEX.
Not collective
Input Parameter:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry object
Output Parameters:
numCntrlPnts- Number of Control Points defining the Geometry attached to the DMPlexcntrlPntFaceMap- Array containing the FACE ID for the Control Point. Array index corresponds to Control Point ID.cntrlPntWeightFaceMap- Array containing the FACE ID for the Control Point Weight. Array index corresponds to Control Point ID.cntrlPntEdgeMap- Array containing the EDGE ID for the Control Point. Array index corresponds to Control Point ID.cntrlPntWeightEdgeMap- Array containing the EDGE ID for the Control Point Weight. Array index corresponds to Control Point ID.cntrlPntVertexMap- Array containing the VERTEX ID for the Control Point. Array index corresponds to Control Point ID.cntrlPntWeightVertexMap- Array containing the VERTEX ID for the Control Point Weight. Array index corresponds to Control Point ID.
-seealso: DMPlexGeomDataAndGrads
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomCntrlPntMaps
PETSc.LibPETSc.DMPlexGetGeomFaceNumOfControlPoints — Method
numCntrlPnts::PetscInt = DMPlexGetGeomFaceNumOfControlPoints(petsclib::PetscLibType,dm::PetscDM, face::PetscGeom)Returns the total number of Control Points (and associated Weights) defining a FACE of a Geometry
Not collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectface- PetscGeom FACE object
Output Parameter:
numCntrlPnts- Number of Control Points (and Weights) defining the FACE
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomFaceNumOfControlPoints
PETSc.LibPETSc.DMPlexGetGeomGradData — Method
cpArraySize::PetscInt,gradSACP::PetscScalar,gradVolCP::PetscScalar,wArraySize::PetscInt,gradSAW::PetscScalar,gradVolW::PetscScalar = DMPlexGetGeomGradData(petsclib::PetscLibType,dm::PetscDM, cpSurfGradHashTable::PetscHMapI, cpSurfGrad::PetscMat)Gets Point, Surface and Volume Gradients with respect to changes in Control Points and their associated Weights for the Geometry attached to the DMPlex .
Not collective
Input Parameter:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry object
Output Parameters:
cpSurfGradHashTable- Hash Table Relating the Control Point ID to the the Row in the cpSurfGrad MatrixcpSurfGrad- Matrix containing the Surface Gradient with respect to the Control Point Data. Data is ranged where the Row corresponds to Control Point ID and the Columns are associated with the Geometric FACE.cpArraySize- The size of arrays gradSACP and gradVolCP and is equal to 3 * total number of Control Points in the GeometrygradSACP- Array containing the Surface Area Gradient with respect to Control Point Data. Data is arranged by Control Point ID * 3 where 3 is for the coordinate dimension.gradVolCP- Array containing the Volume Gradient with respect to Control Point Data. Data is arranged by Control Point ID * 3 where 3 is for the coordinate dimension.wArraySize- The size of arrayws gradSAW and gradVolW and is equal to the total number of Control Points in the Geometry.gradSAW- Array containing the Surface Area Gradient with respect to Control Point Weight. Data is arranged by Control Point ID.gradVolW- Array containing the Volume Gradient with respect to Control Point Weight. Data is arranged by Control Point ID.
-seealso: DMPlexGeomDataAndGrads
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomGradData
PETSc.LibPETSc.DMPlexGetGeomID — Method
id::PetscInt = DMPlexGetGeomID(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, topoObj::PetscGeom)Returns ID number of the entity in the geometric (CAD) model
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom body object containing the lower level entity the ID number is being requested.topoObj- PetscGeom SHELL, FACE, LOOP, EDGE, or NODE object for which ID number is being requested.
Output Parameter:
id- ID number of the entity
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomID
PETSc.LibPETSc.DMPlexGetGeomModelBodies — Method
numBodies::PetscInt = DMPlexGetGeomModelBodies(petsclib::PetscLibType,dm::PetscDM, bodies::PetscGeom)Returns an array of PetscGeom BODY objects attached to the referenced geometric model entity as well as the number of BODYs.
Collective
Input Parameter:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry object
Output Parameters:
bodies- Array of PetscGeom BODY objects referenced by the geometric model.numBodies- Number of BODYs referenced by the geometric model. Also the size of **bodies array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelBodies
PETSc.LibPETSc.DMPlexGetGeomModelBodyEdges — Method
numEdges::PetscInt = DMPlexGetGeomModelBodyEdges(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, edges::PetscGeom)Returns an array of PetscGeom EDGE objects attached to the referenced BODY geometric entity as well as the number of EDGEs.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom body object of interest.
Output Parameters:
edges- Array of PetscGeom EDGE objects referenced by the PetscGeom BODY objectnumEdges- Number of EDGEs referenced by the PetscGeom BODY object. Also the size of **edges array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelBodyEdges
PETSc.LibPETSc.DMPlexGetGeomModelBodyFaces — Method
numFaces::PetscInt = DMPlexGetGeomModelBodyFaces(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, faces::PetscGeom)Returns an array of PetscGeom FACE objects attached to the referenced BODY geometric entity as well as the number of FACEs.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom BODY object containing the FACE objects of interest.
Output Parameters:
faces- Array of PetscGeom FACE objects referenced by the PetscGeom BODY objectnumFaces- Number of FACEs referenced by the PetscGeom BODY object. Also the size of **faces array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelBodyFaces
PETSc.LibPETSc.DMPlexGetGeomModelBodyLoops — Method
numLoops::PetscInt = DMPlexGetGeomModelBodyLoops(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, loops::PetscGeom)Returns an array of PetscGeom Loop objects attached to the referenced BODY geometric entity as well as the number of LOOPs.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom BODY object containing the LOOP objects of interest.
Output Parameters:
loops- Array of PetscGeom FACE objects referenced by the PetscGeom SHELL objectnumLoops- Number of LOOPs referenced by the PetscGeom BODY object. Also the size of **loops array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelBodyLoops
PETSc.LibPETSc.DMPlexGetGeomModelBodyNodes — Method
numNodes::PetscInt = DMPlexGetGeomModelBodyNodes(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, nodes::PetscGeom)Returns an array of PetscGeom NODE objects attached to the referenced BODY geometric entity as well as the number of NODES.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom body object of interest.
Output Parameters:
nodes- Array of PetscGeom NODE objects referenced by the PetscGeom BODY objectnumNodes- Number of NODEs referenced by the PetscGeom BODY object. Also the size of **nodes array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelBodyNodes
PETSc.LibPETSc.DMPlexGetGeomModelBodyShells — Method
numShells::PetscInt = DMPlexGetGeomModelBodyShells(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, shells::PetscGeom)Returns an array of PetscGeom SHELL objects attached to the referenced BODY geometric entity as well as the number of SHELLs.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom BODY object containing the SHELL objects of interest.
Output Parameters:
shells- Array of PetscGeom SHELL objects referenced by the PetscGeom BODY objectnumShells- Number of SHELLs referenced by the PetscGeom BODY object. Also the size of **shells array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelBodyShells
PETSc.LibPETSc.DMPlexGetGeomModelEdgeNodes — Method
numNodes::PetscInt = DMPlexGetGeomModelEdgeNodes(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, edge::PetscGeom, nodes::PetscGeom)Returns an array of PetscGeom NODE objects attached to the referenced EDGE geometric entity as well as the number of NODES.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom body object containing the EDGE object of interest.edge- PetscGeom EDGE object with NODEs of interest.
Output Parameters:
nodes- Array of PetscGeom NODE objects referenced by the PetscGeom EDGE objectnumNodes- Number of Nodes referenced by the PetscGeom EDGE object. Also the size of **nodes array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelEdgeNodes
PETSc.LibPETSc.DMPlexGetGeomModelFaceEdges — Method
numEdges::PetscInt = DMPlexGetGeomModelFaceEdges(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, face::PetscGeom, edges::PetscGeom)Returns an array of PetscGeom EDGE objects attached to the referenced FACE geometric entity as well as the number of EDGEs.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom Body object containing the EDGE objects of interest.face- PetscGeom FACE object with EDGEs of interest.
Output Parameters:
edges- Array of PetscGeom EDGE objects referenced by the PetscGeom FACE objectnumEdges- Number of EDGEs referenced by the PetscGeom FACE object. Also the size of **edges array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelFaceEdges
PETSc.LibPETSc.DMPlexGetGeomModelFaceLoops — Method
numLoops::PetscInt = DMPlexGetGeomModelFaceLoops(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, face::PetscGeom, loops::PetscGeom)Returns an array of PetscGeom LOOP objects attached to the referenced FACE geometric entity as well as the number of LOOPs.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom BODY object containing the LOOP objects of interest.face- PetscGeom FACE object with LOOPs of interest.
Output Parameters:
loops- Array of PetscGeom LOOP objects referenced by the PetscGeom FACE objectnumLoops- Number of LOOPs referenced by the PetscGeom FACE object. Also the size of **loops array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelFaceLoops
PETSc.LibPETSc.DMPlexGetGeomModelShellFaces — Method
numFaces::PetscInt = DMPlexGetGeomModelShellFaces(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, shell::PetscGeom, faces::PetscGeom)Returns an array of PetscGeom FACE objects attached to the referenced SHELL geometric entity as well as the number of FACEs.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom BODY object containing the FACE objects of interest.shell- PetscGeom SHELL object with FACEs of interest.
Output Parameters:
faces- Array of PetscGeom FACE objects referenced by the PetscGeom SHELL objectnumFaces- Number of FACEs referenced by the PetscGeom SHELL object. Also the size of **faces array.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelShellFaces
PETSc.LibPETSc.DMPlexGetGeomModelTUV — Method
DMPlexGetGeomModelTUV(petsclib::PetscLibType,dm::PetscDM)Gets the [t] (EDGES) and [u, v] (FACES) geometry parameters of DM points that are associated geometry relationships. Requires a DM with a EGADS model attached.
Collective
Input Parameter:
dm- The DM object representing the mesh with PetscContainer containing an EGADS geometry model
Level: intermediate
-seealso: DMPLEX, DMCreate(), DMPlexCreateGeom(), DMPlexGeomDataAndGrads()
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomModelTUV
PETSc.LibPETSc.DMPlexGetGeomObject — Method
DMPlexGetGeomObject(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, geomType::PetscInt, geomID::PetscInt, geomObj::PetscGeom)Returns Geometry Object using the objects ID in the geometric (CAD) model
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectbody- PetscGeom body object containing the lower level entity the referenced by the ID.geomType- Keyword SHELL, FACE, LOOP, EDGE, or NODE of the geometry type for which ID number is being requested.geomID- ID number of the geometry entity being requested.
Output Parameter:
geomObj- Geometry Object referenced by the ID number requested.
Level: intermediate
-seealso:
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeomObject
PETSc.LibPETSc.DMPlexGetGeometryFVM — Method
minRadius::PetscReal = DMPlexGetGeometryFVM(petsclib::PetscLibType,dm::PetscDM, facegeom::PetscVec, cellgeom::PetscVec)Return precomputed geometric data
Collective
Input Parameter:
dm- TheDM
Output Parameters:
facegeom- The values precomputed from face geometrycellgeom- The values precomputed from cell geometryminRadius- The minimum radius over the mesh of an inscribed sphere in a cell, orNULLif not needed
Level: developer
-seealso: , DM, DMPLEX, DMTSSetRHSFunctionLocal()
External Links
- PETSc Manual:
DMPlex/DMPlexGetGeometryFVM
PETSc.LibPETSc.DMPlexGetGlobalToNaturalSF — Method
DMPlexGetGlobalToNaturalSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF)External Links
- PETSc Manual:
DMPlex/DMPlexGetGlobalToNaturalSF
PETSc.LibPETSc.DMPlexGetGradientDM — Method
DMPlexGetGradientDM(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, dmGrad::PetscDM)Return gradient data layout
Collective
Input Parameters:
dm- TheDMfv- ThePetscFV
Output Parameter:
dmGrad- The layout for gradient values
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetGeometryFVM()
External Links
- PETSc Manual:
DMPlex/DMPlexGetGradientDM
PETSc.LibPETSc.DMPlexGetHeightStratum — Method
start::PetscInt,end_::PetscInt = DMPlexGetHeightStratum(petsclib::PetscLibType,dm::PetscDM, height::PetscInt)Get the bounds [start, end) for all points at a certain height.
Not Collective
Input Parameters:
dm- TheDMPLEXobjectheight- The requested height
Output Parameters:
start- The first point at thisheightend- One beyond the last point at thisheight
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetDepthStratum(), DMPlexGetCellTypeStratum(), DMPlexGetDepth(), DMPlexGetPointHeight()
External Links
- PETSc Manual:
DMPlex/DMPlexGetHeightStratum
PETSc.LibPETSc.DMPlexGetInterpolatePreferTensor — Method
preferTensor::PetscBool = DMPlexGetInterpolatePreferTensor(petsclib::PetscLibType,dm::PetscDM)Get the flag to prefer tensor order when interpolating a cell
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
preferTensor- Flag to prefer tensor order
Level: intermediate
-seealso: DMPlexSetInterpolatePreferTensor(), DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolatedCollective()
External Links
- PETSc Manual:
DMPlex/DMPlexGetInterpolatePreferTensor
PETSc.LibPETSc.DMPlexGetIsoperiodicFaceSF — Method
num_face_sfs::PetscInt = DMPlexGetIsoperiodicFaceSF(petsclib::PetscLibType,dm::PetscDM, face_sfs::PetscSF)Obtain periodicity for a mesh
Logically Collective
Input Parameter:
dm- TheDMPLEXfor which to obtain periodic relation
Output Parameters:
num_face_sfs- Number ofPetscSFs in the arrayface_sfs- Array ofPetscSFin which roots are (owned) donor faces and leaves are faces that must be matched to a (possibly remote) donor face.
Level: advanced
-seealso: , DMPLEX, DMGetGlobalSection(), DMPlexSetIsoperiodicFaceSF()
External Links
- PETSc Manual:
DMPlex/DMPlexGetIsoperiodicFaceSF
PETSc.LibPETSc.DMPlexGetJoin — Method
numCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexGetJoin(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt})Get an array for the join of the set of points
Not Collective
Input Parameters:
dm- TheDMPLEXobjectnumPoints- The number of input points for the joinpoints- The input points
Output Parameters:
numCoveredPoints- The number of points in the joincoveredPoints- The points in the join
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexRestoreJoin(), DMPlexGetMeet()
External Links
- PETSc Manual:
DMPlex/DMPlexGetJoin
PETSc.LibPETSc.DMPlexGetLocalOffsets — Method
num_cells::PetscInt,cell_size::PetscInt,num_comp::PetscInt,l_size::PetscInt,offsets::Vector{PetscInt} = DMPlexGetLocalOffsets(petsclib::PetscLibType,dm::PetscDM, domain_label::DMLabel, label_value::PetscInt, height::PetscInt, dm_field::PetscInt)Allocate and populate array of local offsets for each cell closure.
Not collective
Input Parameters:
dm- TheDMPLEXobjectdomain_label- label forDMPLEXdomain, or NULL for whole domainlabel_value- Stratum valueheight- Height of target cells inDMPLEXtopologydm_field- Index ofDMPLEXfield
Output Parameters:
num_cells- Number of local cellscell_size- Size of each cell, given by cellsize * numcomp = num_dofnum_comp- Number of components per dofl_size- Size of local vectoroffsets- Allocated offsets array for cells
Level: developer
-seealso: , DMPlexGetLocalOffsetsSupport(), DM, DMPLEX, DMLabel, DMPlexGetClosureIndices(), DMPlexSetClosurePermutationTensor(), DMPlexGetCeedRestriction()
External Links
- PETSc Manual:
DMPlex/DMPlexGetLocalOffsets
PETSc.LibPETSc.DMPlexGetLocalOffsetsSupport — Method
num_faces::PetscInt,num_comp::PetscInt,l_size::PetscInt,offsetsNeg::PetscInt,offsetsPos::PetscInt = DMPlexGetLocalOffsetsSupport(petsclib::PetscLibType,dm::PetscDM, domain_label::DMLabel, label_value::PetscInt)Allocate and populate arrays of local offsets for each face support.
Not collective
Input Parameters:
dm- TheDMPLEXobjectdomain_label- label forDMPLEXdomain, or NULL for whole domainlabel_value- Stratum value
Output Parameters:
num_faces- Number of local, non-boundary facesnum_comp- Number of components per dofl_size- Size of local vectoroffsetsNeg- Allocated offsets array for cells on the inward normal side of each faceoffsetsPos- Allocated offsets array for cells on the outward normal side of each face
Level: developer
-seealso: , DMPlexGetLocalOffsets(), DM, DMPLEX, DMLabel, DMPlexGetClosureIndices(), DMPlexSetClosurePermutationTensor(), DMPlexGetCeedRestriction()
External Links
- PETSc Manual:
DMPlex/DMPlexGetLocalOffsetsSupport
PETSc.LibPETSc.DMPlexGetMaxProjectionHeight — Method
height::PetscInt = DMPlexGetMaxProjectionHeight(petsclib::PetscLibType,dm::PetscDM)Get the maximum height (w.r.t. DAG) of mesh points used to evaluate dual bases in DMPlexProjectXXXLocal() functions.
Input Parameter:
dm- theDMPLEXobject
Output Parameter:
height- the maximum projection height
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexSetMaxProjectionHeight(), DMProjectFunctionLocal(), DMProjectFunctionLabelLocal()
External Links
- PETSc Manual:
DMPlex/DMPlexGetMaxProjectionHeight
PETSc.LibPETSc.DMPlexGetMaxSizes — Method
maxConeSize::PetscInt,maxSupportSize::PetscInt = DMPlexGetMaxSizes(petsclib::PetscLibType,dm::PetscDM)Return the maximum number of in
Not Collective
Input Parameter:
dm- TheDMPLEX
Output Parameters:
maxConeSize- The maximum number of in-edgesmaxSupportSize- The maximum number of out-edges
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexGetMaxSizes
PETSc.LibPETSc.DMPlexGetMeet — Method
numCoveringPoints::PetscInt,coveringPoints::Vector{PetscInt} = DMPlexGetMeet(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt})Get an array for the meet of the set of points
Not Collective
Input Parameters:
dm- TheDMPLEXobjectnumPoints- The number of input points for the meetpoints- The input points, of lengthnumPoints
Output Parameters:
numCoveringPoints- The number of points in the meetcoveringPoints- The points in the meet, of lengthnumCoveringPoints
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexRestoreMeet(), DMPlexGetJoin()
External Links
- PETSc Manual:
DMPlex/DMPlexGetMeet
PETSc.LibPETSc.DMPlexGetMigrationSF — Method
DMPlexGetMigrationSF(petsclib::PetscLibType,dm::PetscDM, migrationSF::PetscSF)Gets the PetscSF for migrating from a parent DM into this DM
Note Collective
Input Parameter:
dm- TheDM
Output Parameter:
migrationSF- ThePetscSF
Level: intermediate
-seealso: , DM, DMPLEX, PetscSF, DMPlexDistribute(), DMPlexDistributeField(), DMPlexCreateMigrationSF(), DMPlexSetMigrationSF
External Links
- PETSc Manual:
DMPlex/DMPlexGetMigrationSF
PETSc.LibPETSc.DMPlexGetMinRadius — Method
minradius::PetscReal = DMPlexGetMinRadius(petsclib::PetscLibType,dm::PetscDM)Returns the minimum distance from any cell centroid to a face
Not Collective
Input Parameter:
dm- theDMPLEX
Output Parameter:
minradius- the minimum cell radius
Level: developer
-seealso: DMPLEX, DMGetCoordinates()
External Links
- PETSc Manual:
DMPlex/DMPlexGetMinRadius
PETSc.LibPETSc.DMPlexGetNumFaceVertices — Method
numFaceVertices::PetscInt = DMPlexGetNumFaceVertices(petsclib::PetscLibType,dm::PetscDM, cellDim::PetscInt, numCorners::PetscInt)Returns the number of vertices on a face
Not Collective
Input Parameters:
dm- TheDMPLEXcellDim- The cell dimensionnumCorners- The number of vertices on a cell
Output Parameter:
numFaceVertices- The number of vertices on a face
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCone()
External Links
- PETSc Manual:
DMPlex/DMPlexGetNumFaceVertices
PETSc.LibPETSc.DMPlexGetOrdering — Method
DMPlexGetOrdering(petsclib::PetscLibType,dm::PetscDM, otype::MatOrderingType, label::DMLabel, perm::IS)Calculate a reordering of the mesh
Collective
Input Parameters:
dm- TheDMPLEXobjectotype- type of reordering, seeMatOrderingTypelabel- [Optional] Label used to segregate ordering into sets, orNULL
Output Parameter:
perm- The point permutation as anIS,perm[old point number] = new point number
Level: intermediate
-seealso: DMPLEX, DMPlexPermute(), MatOrderingType, MatGetOrdering()
External Links
- PETSc Manual:
DMPlex/DMPlexGetOrdering
PETSc.LibPETSc.DMPlexGetOrdering1D — Method
DMPlexGetOrdering1D(petsclib::PetscLibType,dm::PetscDM, perm::IS)Reorder the vertices so that the mesh is in a line
Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
perm- The point permutation as anIS,perm[old point number] = new point number
Level: intermediate
-seealso: DMPLEX, DMPlexGetOrdering(), DMPlexPermute(), MatGetOrdering()
External Links
- PETSc Manual:
DMPlex/DMPlexGetOrdering1D
PETSc.LibPETSc.DMPlexGetOrientedCone — Method
cone::Vector{PetscInt},ornt::Vector{PetscInt} = DMPlexGetOrientedCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)Return the points and orientations on the in
Not collective
Input Parameters:
dm- The DMPlexp- The point, which must lie in the chart set with DMPlexSetChart()
Output Parameters:
cone- An array of points which are on the in-edges for pointpornt- An array of orientations which are on the in-edges for pointp. An orientation is an
integer giving the prescription for cone traversal.
Level: beginner
-seealso: , DM, DMPLEX, DMPlexRestoreOrientedCone(), DMPlexGetConeSize(), DMPlexGetCone(), DMPlexGetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexGetOrientedCone
PETSc.LibPETSc.DMPlexGetOrientedFace — Method
faceVertices::Vector{PetscInt},posOriented::PetscBool = DMPlexGetOrientedFace(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, faceSize::PetscInt, face::Vector{PetscInt}, numCorners::PetscInt, indices::Vector{PetscInt}, origVertices::Vector{PetscInt})Given a cell and a face, as a set of vertices, return the oriented face, as a set of vertices, in faceVertices. The orientation is such that the face normal points out of the cell
Not Collective
Input Parameters:
dm- The original meshcell- The cell mesh pointfaceSize- The number of vertices on the faceface- The face verticesnumCorners- The number of vertices on the cellindices- Local numbering of face vertices in cell coneorigVertices- Original face vertices
Output Parameters:
faceVertices- The face vertices properly orientedposOriented-PETSC_TRUEif the face was oriented with outward normal
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCone()
External Links
- PETSc Manual:
DMPlex/DMPlexGetOrientedFace
PETSc.LibPETSc.DMPlexGetOverlap — Method
overlap::PetscInt = DMPlexGetOverlap(petsclib::PetscLibType,dm::PetscDM)Get the width of the cell overlap
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
overlap- the width of the cell overlap
Level: intermediate
-seealso: DMPLEX, DMPlexSetOverlap(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexGetOverlap
PETSc.LibPETSc.DMPlexGetPartitionBalance — Method
flg::PetscBool = DMPlexGetPartitionBalance(petsclib::PetscLibType,dm::PetscDM)Does distribution of the DM attempt to balance the shared point partition?
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
flg- Balance the partition?
Level: intermediate
-seealso: DMPLEX, DMPlexDistribute(), DMPlexSetPartitionBalance()
External Links
- PETSc Manual:
DMPlex/DMPlexGetPartitionBalance
PETSc.LibPETSc.DMPlexGetPartitioner — Method
DMPlexGetPartitioner(petsclib::PetscLibType,dm::PetscDM, part::PetscPartitioner)Get the mesh partitioner
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
part- ThePetscPartitioner
Level: developer
-seealso: , DM, DMPLEX, PetscPartitioner, PetscSection, DMPlexDistribute(), DMPlexSetPartitioner(), PetscPartitionerDMPlexPartition(), PetscPartitionerCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexGetPartitioner
PETSc.LibPETSc.DMPlexGetPointDepth — Method
depth::PetscInt = DMPlexGetPointDepth(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)Get the depth of a given point
Not Collective
Input Parameters:
dm- TheDMPLEXobjectpoint- The point
Output Parameter:
depth- The depth of thepoint
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetCellType(), DMPlexGetDepthLabel(), DMPlexGetDepth(), DMPlexGetPointHeight()
External Links
- PETSc Manual:
DMPlex/DMPlexGetPointDepth
PETSc.LibPETSc.DMPlexGetPointGlobal — Method
start::PetscInt,end_::PetscInt = DMPlexGetPointGlobal(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)get location of point data in global Vec
Not Collective
Input Parameters:
dm-DMdefining the topological spacepoint- topological point
Output Parameters:
start- start of point data; returns -(globalStart+1) if point is not ownedend- end of point data; returns -(globalEnd+1) if point is not owned
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetPointGlobalField(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointGlobalRead(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()
External Links
- PETSc Manual:
DMPlex/DMPlexGetPointGlobal
PETSc.LibPETSc.DMPlexGetPointGlobalField — Method
start::PetscInt,end_::PetscInt = DMPlexGetPointGlobalField(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt)get location of point field data in global Vec
Not Collective
Input Parameters:
dm-DMdefining the topological spacepoint- topological pointfield- the field number
Output Parameters:
start- start of point data; returns -(globalStart+1) if point is not ownedend- end of point data; returns -(globalEnd+1) if point is not owned
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetPointGlobal(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointGlobalRead(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()
External Links
- PETSc Manual:
DMPlex/DMPlexGetPointGlobalField
PETSc.LibPETSc.DMPlexGetPointHeight — Method
height::PetscInt = DMPlexGetPointHeight(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)Get the height of a given point
Not Collective
Input Parameters:
dm- TheDMPLEXobjectpoint- The point
Output Parameter:
height- The height of thepoint
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetCellType(), DMPlexGetDepthLabel(), DMPlexGetDepth(), DMPlexGetPointDepth()
External Links
- PETSc Manual:
DMPlex/DMPlexGetPointHeight
PETSc.LibPETSc.DMPlexGetPointLocal — Method
start::PetscInt,end_::PetscInt = DMPlexGetPointLocal(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)get location of point data in local Vec
Not Collective
Input Parameters:
dm-DMdefining the topological spacepoint- topological point
Output Parameters:
start- start of point dataend- end of point data
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetPointLocalField(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointLocalRead(), DMPlexPointLocalRef()
External Links
- PETSc Manual:
DMPlex/DMPlexGetPointLocal
PETSc.LibPETSc.DMPlexGetPointLocalField — Method
start::PetscInt,end_::PetscInt = DMPlexGetPointLocalField(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt)get location of point field data in local Vec
Not Collective
Input Parameters:
dm-DMdefining the topological spacepoint- topological pointfield- the field number
Output Parameters:
start- start of point dataend- end of point data
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetPointLocal(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointLocalRead(), DMPlexPointLocalRef()
External Links
- PETSc Manual:
DMPlex/DMPlexGetPointLocalField
PETSc.LibPETSc.DMPlexGetRedundantDM — Method
DMPlexGetRedundantDM(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, redundantMesh::PetscDM)Get a copy of the DMPLEX that is completely copied on each process.
Collective
Input Parameter:
dm- the originalDMPLEXobject
Output Parameters:
sf- thePetscSFused for point distribution (optional)redundantMesh- the redundantDMobject, orNULL
Level: intermediate
-seealso: DMPLEX, DMPlexDistribute(), DMPlexGetGatherDM()
External Links
- PETSc Manual:
DMPlex/DMPlexGetRedundantDM
PETSc.LibPETSc.DMPlexGetReferenceTree — Method
DMPlexGetReferenceTree(petsclib::PetscLibType,dm::PetscDM, ref::PetscDM)get the reference tree for hierarchically non
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
ref- The reference treeDMPLEXobject
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexSetReferenceTree(), DMPlexCreateDefaultReferenceTree()
External Links
- PETSc Manual:
DMPlex/DMPlexGetReferenceTree
PETSc.LibPETSc.DMPlexGetRefinementLimit — Method
refinementLimit::PetscReal = DMPlexGetRefinementLimit(petsclib::PetscLibType,dm::PetscDM)Retrieve the maximum cell volume for refinement
Input Parameter:
dm- TheDM
Output Parameter:
refinementLimit- The maximum cell volume in the refined mesh
Level: developer
-seealso: , DM, DMPLEX, DMRefine(), DMPlexSetRefinementLimit(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform()
External Links
- PETSc Manual:
DMPlex/DMPlexGetRefinementLimit
PETSc.LibPETSc.DMPlexGetRefinementUniform — Method
refinementUniform::PetscBool = DMPlexGetRefinementUniform(petsclib::PetscLibType,dm::PetscDM)Retrieve the flag for uniform refinement
Input Parameter:
dm- TheDM
Output Parameter:
refinementUniform- The flag for uniform refinement
Level: developer
-seealso: , DM, DMPLEX, DMRefine(), DMPlexSetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()
External Links
- PETSc Manual:
DMPlex/DMPlexGetRefinementUniform
PETSc.LibPETSc.DMPlexGetRegularRefinement — Method
regular::PetscBool = DMPlexGetRegularRefinement(petsclib::PetscLibType,dm::PetscDM)Get the flag indicating that this mesh was obtained by regular refinement from its coarse mesh
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
regular- The flag
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexSetRegularRefinement()
External Links
- PETSc Manual:
DMPlex/DMPlexGetRegularRefinement
PETSc.LibPETSc.DMPlexGetSaveTransform — Method
save::PetscBool = DMPlexGetSaveTransform(petsclib::PetscLibType,dm::PetscDM)External Links
- PETSc Manual:
DMPlex/DMPlexGetSaveTransform
PETSc.LibPETSc.DMPlexGetScale — Method
scale::PetscReal = DMPlexGetScale(petsclib::PetscLibType,dm::PetscDM, unit::PetscUnit)Get the scale for the specified fundamental unit
Not Collective
Input Parameters:
dm- theDMunit- The SI unit
Output Parameter:
scale- The value used to scale all quantities with this unit
Level: advanced
-seealso: , DM, DMPLEX, DMPlexSetScale(), PetscUnit
External Links
- PETSc Manual:
DMPlex/DMPlexGetScale
PETSc.LibPETSc.DMPlexGetSimplexOrBoxCells — Method
cStart::PetscInt,cEnd::PetscInt = DMPlexGetSimplexOrBoxCells(petsclib::PetscLibType,dm::PetscDM, height::PetscInt)Get the range of cells which are neither prisms nor ghost FV cells
Input Parameters:
dm- TheDMPLEXobjectheight- The cell height in the Plex, 0 is the default
Output Parameters:
cStart- The first "normal" cell, passNULLif not neededcEnd- The upper bound on "normal" cells, passNULLif not needed
Level: developer
-seealso: , DM, DMPLEX, DMPlexConstructGhostCells(), DMPlexGetCellTypeStratum()
External Links
- PETSc Manual:
DMPlex/DMPlexGetSimplexOrBoxCells
PETSc.LibPETSc.DMPlexGetSubdomainSection — Method
DMPlexGetSubdomainSection(petsclib::PetscLibType,dm::PetscDM, subsection::PetscSection)Returns the section associated with the subdomain
Not Collective
Input Parameter:
dm- TheDMPLEX
Output Parameter:
subsection- The subdomain section
Level: developer
-seealso: , DM, DMPLEX, PetscSection
External Links
- PETSc Manual:
DMPlex/DMPlexGetSubdomainSection
PETSc.LibPETSc.DMPlexGetSubpointIS — Method
DMPlexGetSubpointIS(petsclib::PetscLibType,dm::PetscDM, subpointIS::IS)Returns an IS covering the entire subdm chart with the original points as data
Input Parameter:
dm- The submeshDM
Output Parameter:
subpointIS- TheISof all the points from the original mesh in this submesh, orNULLif this is not a submesh
Level: developer
-seealso: , DM, DMPLEX, DMPlexCreateSubmesh(), DMPlexGetSubpointMap()
External Links
- PETSc Manual:
DMPlex/DMPlexGetSubpointIS
PETSc.LibPETSc.DMPlexGetSubpointMap — Method
DMPlexGetSubpointMap(petsclib::PetscLibType,dm::PetscDM, subpointMap::DMLabel)Returns a DMLabel with point dimension as values
Input Parameter:
dm- The submeshDM
Output Parameter:
subpointMap- TheDMLabelof all the points from the original mesh in this submesh, orNULLif this is not a submesh
Level: developer
-seealso: , DM, DMPLEX, DMPlexCreateSubmesh(), DMPlexGetSubpointIS()
External Links
- PETSc Manual:
DMPlex/DMPlexGetSubpointMap
PETSc.LibPETSc.DMPlexGetSupport — Method
support::Vector{PetscInt} = DMPlexGetSupport(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)Return the points on the out
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()
Output Parameter:
support- An array of points which are on the out-edges for pointp, its length is that obtained fromDMPlexGetSupportSize()
Level: beginner
-seealso: , DM, DMPLEX, DMPlexGetSupportSize(), DMPlexSetSupport(), DMPlexGetCone(), DMPlexSetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexGetSupport
PETSc.LibPETSc.DMPlexGetSupportSection — Method
DMPlexGetSupportSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection)Return a section which describes the layout of support data
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
section- ThePetscSectionobject
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetConeSection(), PetscSection
External Links
- PETSc Manual:
DMPlex/DMPlexGetSupportSection
PETSc.LibPETSc.DMPlexGetSupportSize — Method
size::PetscInt = DMPlexGetSupportSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)Return the number of out
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()
Output Parameter:
size- The support size for pointp
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart(), DMPlexGetConeSize()
External Links
- PETSc Manual:
DMPlex/DMPlexGetSupportSize
PETSc.LibPETSc.DMPlexGetTransform — Method
DMPlexGetTransform(petsclib::PetscLibType,dm::PetscDM, tr::DMPlexTransform)External Links
- PETSc Manual:
DMPlex/DMPlexGetTransform
PETSc.LibPETSc.DMPlexGetTransformType — Method
type::DMPlexTransformType = DMPlexGetTransformType(petsclib::PetscLibType,dm::PetscDM)Retrieve the transform type for uniform refinement
Input Parameter:
dm- TheDM
Output Parameter:
type- The transform type for uniform refinement
Level: developer
-seealso: , DM, DMPLEX, DMPlexTransformType, DMRefine(), DMPlexSetTransformType(), DMPlexGetRefinementUniform()
External Links
- PETSc Manual:
DMPlex/DMPlexGetTransformType
PETSc.LibPETSc.DMPlexGetTransitiveClosure — Method
numPoints::PetscInt,points::Vector{PetscInt} = DMPlexGetTransitiveClosure(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, useCone::PetscBool)Return the points on the transitive closure of the in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The mesh pointuseCone-PETSC_TRUEfor the closure, otherwise return the star
Input/Output Parameter:
points- The points and point orientations, interleaved as pairs [p0, o0, p1, o1, ...];
if *points is NULL on input, internal storage will be returned, use DMPlexRestoreTransitiveClosure(), otherwise the provided array is used to hold the values
Output Parameter:
numPoints- The number of points in the closure, sopointsis of size 2*numPoints
Level: beginner
-seealso: , DM, DMPLEX, DMPlexRestoreTransitiveClosure(), DMPlexCreate(), DMPlexSetCone(), DMPlexSetChart(), DMPlexGetCone()
External Links
- PETSc Manual:
DMPlex/DMPlexGetTransitiveClosure
PETSc.LibPETSc.DMPlexGetTree — Method
parents::Vector{PetscInt},childIDs::Vector{PetscInt},children::Vector{PetscInt} = DMPlexGetTree(petsclib::PetscLibType,dm::PetscDM, parentSection::PetscSection, childSection::PetscSection)get the tree that describes the hierarchy of non Collective
Input Parameter:
dm- theDMPLEXobject
Output Parameters:
parentSection- a section describing the tree: a point has a parent if it has 1 dof in the section; the section
offset indexes the parent and childID list
parents- a list of the point parentschildIDs- identifies the relationship of the child point to the parent point; if there is a reference tree, then
the child corresponds to the point in the reference tree with index childID
childSection- the inverse of the parent sectionchildren- a list of the point children
Level: intermediate
-seealso: , DM, DMPLEX,DMPlexSetTree(), DMPlexSetReferenceTree(), DMPlexSetAnchors(), DMPlexGetTreeParent(), DMPlexGetTreeChildren()
External Links
- PETSc Manual:
DMPlex/DMPlexGetTree
PETSc.LibPETSc.DMPlexGetTreeChildren — Method
numChildren::PetscInt,children::Vector{PetscInt} = DMPlexGetTreeChildren(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)get the children of a point in the tree describing the point hierarchy (not the DAG)
Input Parameters:
dm- theDMPLEXobjectpoint- the query point
Output Parameters:
numChildren- if notNULL, set to the number of childrenchildren- if notNULL, set to a list children, or set toNULLif the point has no children
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexSetTree(), DMPlexGetTree(), DMPlexGetTreeParent()
External Links
- PETSc Manual:
DMPlex/DMPlexGetTreeChildren
PETSc.LibPETSc.DMPlexGetTreeParent — Method
parent::PetscInt,childID::PetscInt = DMPlexGetTreeParent(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)get the parent of a point in the tree describing the point hierarchy (not the DAG)
Input Parameters:
dm- theDMPLEXobjectpoint- the query point
Output Parameters:
parent- if notNULL, set to the parent of the point, or the point itself if the point does not have a parentchildID- if notNULL, set to the child ID of the point with respect to its parent, or 0 if the point
does not have a parent
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexSetTree(), DMPlexGetTree(), DMPlexGetTreeChildren()
External Links
- PETSc Manual:
DMPlex/DMPlexGetTreeParent
PETSc.LibPETSc.DMPlexGetUseMatClosurePermutation — Method
useClPerm::PetscBool = DMPlexGetUseMatClosurePermutation(petsclib::PetscLibType,dm::PetscDM)Get flag for using a closure permutation for matrix insertion
Not collective
Input Parameter:
dm- TheDM
Output Parameter:
useClPerm- The flag
Level: intermediate
-seealso: DMPlexSetUseMatClosurePermutation()
External Links
- PETSc Manual:
DMPlex/DMPlexGetUseMatClosurePermutation
PETSc.LibPETSc.DMPlexGetVTKCellHeight — Method
cellHeight::PetscInt = DMPlexGetVTKCellHeight(petsclib::PetscLibType,dm::PetscDM)Returns the height in the DAG used to determine which points are cells (normally 0)
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
cellHeight- The height of a cell
Level: developer
-seealso: , DM, DMPLEX, DMPlexSetVTKCellHeight()
External Links
- PETSc Manual:
DMPlex/DMPlexGetVTKCellHeight
PETSc.LibPETSc.DMPlexGetVertexNumbering — Method
DMPlexGetVertexNumbering(petsclib::PetscLibType,dm::PetscDM, globalVertexNumbers::IS)Get a global vertex numbering for all vertices on this process
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
globalVertexNumbers- Global vertex numbers for all vertices on this process
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetCellNumbering()
External Links
- PETSc Manual:
DMPlex/DMPlexGetVertexNumbering
PETSc.LibPETSc.DMPlexGlobalToLocalBasis — Method
DMPlexGlobalToLocalBasis(petsclib::PetscLibType,dm::PetscDM, lv::PetscVec)Transform the values in the given local vector from the global basis to the local basis
Input Parameters:
dm- TheDMlv- A local vector with values in the global basis
Output Parameter:
lv- A local vector with values in the local basis
Level: developer
-seealso: , DM, DMPLEX, DMPlexLocalToGlobalBasis(), DMGetLocalSection(), DMPlexCreateBasisRotation()
External Links
- PETSc Manual:
DMPlex/DMPlexGlobalToLocalBasis
PETSc.LibPETSc.DMPlexGlobalToNaturalBegin — Method
DMPlexGlobalToNaturalBegin(petsclib::PetscLibType,dm::PetscDM, gv::PetscVec, nv::PetscVec)Rearranges a global Vec in the natural order.
Collective
Input Parameters:
dm- The distributedDMPLEXgv- The globalVec
Output Parameter:
nv-Vecin the canonical ordering distributed over all processors associated withgv
Level: intermediate
-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalEnd()
External Links
- PETSc Manual:
DMPlex/DMPlexGlobalToNaturalBegin
PETSc.LibPETSc.DMPlexGlobalToNaturalEnd — Method
DMPlexGlobalToNaturalEnd(petsclib::PetscLibType,dm::PetscDM, gv::PetscVec, nv::PetscVec)Rearranges a global Vec in the natural order.
Collective
Input Parameters:
dm- The distributedDMPLEXgv- The globalVec
Output Parameter:
nv- The naturalVec
Level: intermediate
-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalBegin()
External Links
- PETSc Manual:
DMPlex/DMPlexGlobalToNaturalEnd
PETSc.LibPETSc.DMPlexGlobalVectorLoad — Method
DMPlexGlobalVectorLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec)Loads on
Collective
Input Parameters:
dm- TheDMthat represents the topologyviewer- ThePetscViewerthat represents the on-disk vector datasectiondm- TheDMthat contains the global section on which vec is defined, can beNULLsf- ThePetscSFthat migrates the on-disk vector data into vecvec- The global vector to set values of
Level: advanced
-seealso: , DM, DMPLEX, DMPlexTopologyLoad(), DMPlexSectionLoad(), DMPlexLocalVectorLoad(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(), PetscSF, PetscViewer
External Links
- PETSc Manual:
DMPlex/DMPlexGlobalVectorLoad
PETSc.LibPETSc.DMPlexGlobalVectorView — Method
DMPlexGlobalVectorView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec)Saves a global vector
Collective
Input Parameters:
dm- TheDMthat represents the topologyviewer- ThePetscViewerto save data withsectiondm- TheDMthat contains the global section on which vec is defined, can beNULLvec- The global vector to be saved
Level: advanced
-seealso: , DM, DMPLEX, DMPlexTopologyView(), DMPlexSectionView(), DMPlexLocalVectorView(), DMPlexGlobalVectorLoad(), DMPlexLocalVectorLoad()
External Links
- PETSc Manual:
DMPlex/DMPlexGlobalVectorView
PETSc.LibPETSc.DMPlexInflateToGeomModel — Method
DMPlexInflateToGeomModel(petsclib::PetscLibType,dm::PetscDM, useTUV::PetscBool)Wrapper function allowing two methods for inflating refined meshes to the underlying geometric domain.
Collective
Input Parameters:
dm- The DMPlex object with an attached PetscContainer storing a CAD Geometry objectuseTUV- PetscBool indicating if the user would like to inflate the DMPlex to the underlying geometry
using (t) for nodes on EDGEs and (u, v) for nodes on FACEs or using the nodes (x, y, z) coordinates and shortest distance routine. If useTUV = PETSCTRUE, use the (t) or (u, v) parameters to inflate the DMPlex to the CAD geometry. If useTUV = PETSCFALSE, use the nodes (x, y, z) coordinates and the shortest disctance routine.
-seealso: DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()
External Links
- PETSc Manual:
DMPlex/DMPlexInflateToGeomModel
PETSc.LibPETSc.DMPlexInflateToGeomModelUseTUV — Method
DMPlexInflateToGeomModelUseTUV(petsclib::PetscLibType,dm::PetscDM)Inflates the DM to the associated underlying geometry using the [t] {EDGES) and [u, v] (FACES} associated parameters. Requires a DM with an EGADS model attached and a previous call to DMPlexGetGeomModelTUV().
Collective
Input Parameter:
dm- The DM object representing the mesh with PetscContainer containing an EGADS geometry model
Level: intermediate
-seealso: DMPLEX, DMCreate(), DMPlexCreateGeom(), DMPlexGeomDataAndGrads(), DMPlexGetGeomModelTUV()
External Links
- PETSc Manual:
DMPlex/DMPlexInflateToGeomModelUseTUV
PETSc.LibPETSc.DMPlexInflateToGeomModelUseXYZ — Method
DMPlexInflateToGeomModelUseXYZ(petsclib::PetscLibType,dm::PetscDM)Snaps the vertex coordinates of a DMPLEX object representing the mesh to its geometry if some vertices depart from the model. This usually happens with non
Collective
Input Parameter:
dm- The uninflatedDMobject representing the mesh
Level: intermediate
-seealso: , DM, DMPLEX, DMCreate(), DMPlexCreateEGADS()
External Links
- PETSc Manual:
DMPlex/DMPlexInflateToGeomModelUseXYZ
PETSc.LibPETSc.DMPlexInsertBoundaryValues — Method
DMPlexInsertBoundaryValues(petsclib::PetscLibType,dm::PetscDM, insertEssential::PetscBool, locX::PetscVec, time::PetscReal, faceGeomFVM::PetscVec, cellGeomFVM::PetscVec, gradFVM::PetscVec)Puts coefficients which represent boundary values into the local solution vector
Not Collective
Input Parameters:
dm- TheDMinsertEssential- Should I insert essential (e.g. Dirichlet) or inessential (e.g. Neumann) boundary conditionstime- The timefaceGeomFVM- Face geometry data for FV discretizationscellGeomFVM- Cell geometry data for FV discretizationsgradFVM- Gradient reconstruction data for FV discretizations
Output Parameter:
locX- Solution updated with boundary values
Level: intermediate
-seealso: , DM, DMPLEX, DMProjectFunctionLabelLocal(), DMAddBoundary()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertBoundaryValues
PETSc.LibPETSc.DMPlexInsertBoundaryValuesEssential — Method
DMPlexInsertBoundaryValuesEssential(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec)Insert boundary values into a local vector using a function of the coordinates
Input Parameters:
dm- TheDM, with aPetscDSthat matches the problem being constrainedtime- The timefield- The field to constrainNc- The number of constrained field components, or 0 for all componentscomps- An array of constrained component numbers, orNULLfor all componentslabel- TheDMLabeldefining constrained pointsnumids- The number ofDMLabelids for constrained pointsids- An array of ids for constrained pointsfunc- A pointwise function giving boundary valuesctx- An optional user context for bcFunc
Output Parameter:
locX- A local vector to receives the boundary values
Level: developer
-seealso: , DM, DMPLEX, DMLabel, DMPlexInsertBoundaryValuesEssentialField(), DMPlexInsertBoundaryValuesEssentialBdField(), DMAddBoundary()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertBoundaryValuesEssential
PETSc.LibPETSc.DMPlexInsertBoundaryValuesEssentialBdField — Method
DMPlexInsertBoundaryValuesEssentialBdField(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locU::PetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec)Insert boundary values into a local vector using a function of the coordinates and boundary field data
Collective
Input Parameters:
dm- TheDM, with aPetscDSthat matches the problem being constrainedtime- The timelocU- A local vector with the input solution valuesfield- The field to constrainNc- The number of constrained field components, or 0 for all componentscomps- An array of constrained component numbers, orNULLfor all componentslabel- TheDMLabeldefining constrained pointsnumids- The number ofDMLabelids for constrained pointsids- An array of ids for constrained pointsfunc- A pointwise function giving boundary values, the calling sequence is given inDMProjectBdFieldLabelLocal()ctx- An optional user context forfunc
Output Parameter:
locX- A local vector to receive the boundary values
Level: developer
-seealso: , DM, DMPLEX, DMProjectBdFieldLabelLocal(), DMPlexInsertBoundaryValuesEssential(), DMPlexInsertBoundaryValuesEssentialField(), DMAddBoundary()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertBoundaryValuesEssentialBdField
PETSc.LibPETSc.DMPlexInsertBoundaryValuesEssentialField — Method
DMPlexInsertBoundaryValuesEssentialField(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locU::PetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec)Insert boundary values into a local vector using a function of the coordinates and field data
Input Parameters:
dm- TheDM, with aPetscDSthat matches the problem being constrainedtime- The timelocU- A local vector with the input solution valuesfield- The field to constrainNc- The number of constrained field components, or 0 for all componentscomps- An array of constrained component numbers, orNULLfor all componentslabel- TheDMLabeldefining constrained pointsnumids- The number ofDMLabelids for constrained pointsids- An array of ids for constrained pointsfunc- A pointwise function giving boundary valuesctx- An optional user context for bcFunc
Output Parameter:
locX- A local vector to receives the boundary values
Level: developer
-seealso: , DM, DMPLEX, DMPlexInsertBoundaryValuesEssential(), DMPlexInsertBoundaryValuesEssentialBdField(), DMAddBoundary()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertBoundaryValuesEssentialField
PETSc.LibPETSc.DMPlexInsertBoundaryValuesFVM — Method
DMPlexInsertBoundaryValuesFVM(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, locX::PetscVec, time::PetscReal, locGradient::PetscVec)External Links
- PETSc Manual:
DMPlex/DMPlexInsertBoundaryValuesFVM
PETSc.LibPETSc.DMPlexInsertBoundaryValuesRiemann — Method
DMPlexInsertBoundaryValuesRiemann(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, faceGeometry::PetscVec, cellGeometry::PetscVec, Grad::PetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Cvoid, locX::PetscVec)Insert boundary values into a local vector
Input Parameters:
dm- TheDM, with aPetscDSthat matches the problem being constrainedtime- The timefaceGeometry- A vector with the FVM face geometry informationcellGeometry- A vector with the FVM cell geometry informationGrad- A vector with the FVM cell gradient informationfield- The field to constrainNc- The number of constrained field components, or 0 for all componentscomps- An array of constrained component numbers, orNULLfor all componentslabel- TheDMLabeldefining constrained pointsnumids- The number ofDMLabelids for constrained pointsids- An array of ids for constrained pointsfunc- A pointwise function giving boundary valuesctx- An optional user context for bcFunc
Output Parameter:
locX- A local vector to receives the boundary values
Level: developer
-seealso: , DM, DMPLEX, DMPlexInsertBoundaryValuesEssential(), DMPlexInsertBoundaryValuesEssentialField(), DMAddBoundary()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertBoundaryValuesRiemann
PETSc.LibPETSc.DMPlexInsertBounds — Method
DMPlexInsertBounds(petsclib::PetscLibType,dm::PetscDM, lower::PetscBool, time::PetscReal, locB::PetscVec)Puts coefficients which represent solution bounds into the local bounds vector
Not Collective
Input Parameters:
dm- TheDMlower- IfPETSC_TRUEuseDM_BC_LOWER_BOUNDconditions, otherwise useDM_BC_UPPER_BOUNDtime- The time
Output Parameter:
locB- Bounds vector updated with new bounds
Level: intermediate
-seealso: , DM, DMPLEX, DMProjectFunctionLabelLocal(), PetscDSAddBoundary()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertBounds
PETSc.LibPETSc.DMPlexInsertCone — Method
DMPlexInsertCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, conePos::PetscInt, conePoint::PetscInt)Insert a point into the in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()conePos- The local index in the cone where the point should be putconePoint- The mesh point to insert
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertCone
PETSc.LibPETSc.DMPlexInsertConeOrientation — Method
DMPlexInsertConeOrientation(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, conePos::PetscInt, coneOrientation::PetscInt)Insert a point orientation for the in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()conePos- The local index in the cone where the point should be putconeOrientation- The point orientation to insert
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertConeOrientation
PETSc.LibPETSc.DMPlexInsertSupport — Method
DMPlexInsertSupport(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, supportPos::PetscInt, supportPoint::PetscInt)Insert a point into the out
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()supportPos- The local index in the cone where the point should be putsupportPoint- The mesh point to insert
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertSupport
PETSc.LibPETSc.DMPlexInsertTimeDerivativeBoundaryValues — Method
DMPlexInsertTimeDerivativeBoundaryValues(petsclib::PetscLibType,dm::PetscDM, insertEssential::PetscBool, locX_t::PetscVec, time::PetscReal, faceGeomFVM::PetscVec, cellGeomFVM::PetscVec, gradFVM::PetscVec)Puts coefficients which represent boundary values of the time derivative into the local solution vector
Input Parameters:
dm- TheDMinsertEssential- Should I insert essential (e.g. Dirichlet) or inessential (e.g. Neumann) boundary conditionstime- The timefaceGeomFVM- Face geometry data for FV discretizationscellGeomFVM- Cell geometry data for FV discretizationsgradFVM- Gradient reconstruction data for FV discretizations
Output Parameter:
locX_t- Solution updated with boundary values
Level: developer
-seealso: , DM, DMPLEX, DMProjectFunctionLabelLocal()
External Links
- PETSc Manual:
DMPlex/DMPlexInsertTimeDerivativeBoundaryValues
PETSc.LibPETSc.DMPlexInterpolate — Method
DMPlexInterpolate(petsclib::PetscLibType,dm::PetscDM, dmInt::PetscDM)Take in a cell
Collective
Input Parameter:
dm- TheDMPLEXobject with only cells and vertices
Output Parameter:
dmInt- The completeDMPLEXobject
Level: intermediate
-seealso: DMPLEX, DMPlexUninterpolate(), DMPlexCreateFromCellListPetsc(), DMPlexCopyCoordinates()
External Links
- PETSc Manual:
DMPlex/DMPlexInterpolate
PETSc.LibPETSc.DMPlexInterpolatePointSF — Method
DMPlexInterpolatePointSF(petsclib::PetscLibType,dm::PetscDM, pointSF::PetscSF)Insert interpolated points in the overlap into the PointSF in parallel, following local interpolation
Collective
Input Parameters:
dm- The interpolatedDMPLEXpointSF- The initialPetscSFwithout interpolated points
Level: developer
-seealso: DMPLEX, DMPlexInterpolate(), DMPlexUninterpolate()
External Links
- PETSc Manual:
DMPlex/DMPlexInterpolatePointSF
PETSc.LibPETSc.DMPlexInvertCell — Method
DMPlexInvertCell(petsclib::PetscLibType,cellType::DMPolytopeType, cone::Vector{PetscInt})Flips cell orientations since DMPLEX stores some of them internally with outward normals.
Input Parameters:
cellType- The cell typecone- The incoming cone
Output Parameter:
cone- The inverted cone (in-place)
Level: developer
-seealso: , DM, DMPLEX, DMPolytopeType, DMPlexGenerate()
External Links
- PETSc Manual:
DMPlex/DMPlexInvertCell
PETSc.LibPETSc.DMPlexIsDistributed — Method
distributed::PetscBool = DMPlexIsDistributed(petsclib::PetscLibType,dm::PetscDM)Find out whether this DM is distributed, i.e. more than one rank owns some points.
Collective
Input Parameter:
dm- TheDMobject
Output Parameter:
distributed- Flag whether theDMis distributed
Level: intermediate
-seealso: DMPLEX, DMPlexDistribute(), DMPlexGetOverlap(), DMPlexIsInterpolated()
External Links
- PETSc Manual:
DMPlex/DMPlexIsDistributed
PETSc.LibPETSc.DMPlexIsInterpolated — Method
DMPlexIsInterpolated(petsclib::PetscLibType,dm::PetscDM, interpolated::DMPlexInterpolatedFlag)Find out to what extent the DMPLEX is topologically interpolated.
Not Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
interpolated- Flag whether theDMis interpolated
Level: intermediate
-seealso: DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolatedCollective()
External Links
- PETSc Manual:
DMPlex/DMPlexIsInterpolated
PETSc.LibPETSc.DMPlexIsInterpolatedCollective — Method
DMPlexIsInterpolatedCollective(petsclib::PetscLibType,dm::PetscDM, interpolated::DMPlexInterpolatedFlag)Find out to what extent the DMPLEX is topologically interpolated (in collective manner).
Collective
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
interpolated- Flag whether theDMis interpolated
Level: intermediate
-seealso: DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolated()
External Links
- PETSc Manual:
DMPlex/DMPlexIsInterpolatedCollective
PETSc.LibPETSc.DMPlexIsSimplex — Method
simplex::PetscBool = DMPlexIsSimplex(petsclib::PetscLibType,dm::PetscDM)Is the first cell in this mesh a simplex?
Input Parameter:
dm- TheDMPLEXobject
Output Parameter:
simplex- Flag checking for a simplex
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetSimplexOrBoxCells(), DMPlexGetCellType(), DMPlexGetHeightStratum(), DMPolytopeTypeGetNumVertices()
External Links
- PETSc Manual:
DMPlex/DMPlexIsSimplex
PETSc.LibPETSc.DMPlexLabelAddCells — Method
DMPlexLabelAddCells(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)Starting with a label marking points on a surface, we add a cell for each point
Input Parameters:
dm- TheDMlabel- ADMLabelmarking the surface points
Output Parameter:
label- ADMLabelincorporating cells
Level: developer
-seealso: , DM, DMPLEX, DMPlexLabelAddFaceCells(), DMPlexLabelComplete(), DMPlexLabelCohesiveComplete()
External Links
- PETSc Manual:
DMPlex/DMPlexLabelAddCells
PETSc.LibPETSc.DMPlexLabelAddFaceCells — Method
DMPlexLabelAddFaceCells(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)Starting with a label marking faces on a surface, we add a cell for each face
Input Parameters:
dm- TheDMlabel- ADMLabelmarking the surface points
Output Parameter:
label- ADMLabelincorporating cells
Level: developer
-seealso: , DM, DMPLEX, DMPlexLabelAddCells(), DMPlexLabelComplete(), DMPlexLabelCohesiveComplete()
External Links
- PETSc Manual:
DMPlex/DMPlexLabelAddFaceCells
PETSc.LibPETSc.DMPlexLabelClearCells — Method
DMPlexLabelClearCells(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)Remove cells from a label
Input Parameters:
dm- TheDMlabel- ADMLabelmarking surface points and their adjacent cells
Output Parameter:
label- ADMLabelwithout cells
Level: developer
-seealso: , DM, DMPLEX, DMPlexLabelComplete(), DMPlexLabelCohesiveComplete(), DMPlexLabelAddCells()
External Links
- PETSc Manual:
DMPlex/DMPlexLabelClearCells
PETSc.LibPETSc.DMPlexLabelCohesiveComplete — Method
DMPlexLabelCohesiveComplete(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, blabel::DMLabel, bvalue::PetscInt, flip::PetscBool, split::PetscBool, subdm::PetscDM)Starting with a label marking points on an internal surface, we add all other mesh pieces to complete the surface
Input Parameters:
dm- TheDMlabel- ADMLabelmarking the surfaceblabel- ADMLabelmarking the vertices on the boundary which will not be duplicated, orNULLto find them automaticallybvalue- Value ofDMLabelmarking the vertices on the boundaryflip- Flag to flip the submesh normal and replace points on the other sidesplit- Split faces impinging on the surface, rather than clamping the surface boundarysubdm- TheDMassociated with the label, orNULL
Output Parameter:
label- ADMLabelmarking all surface points
Level: developer
-seealso: , DM, DMPLEX, DMPlexConstructCohesiveCells(), DMPlexLabelComplete()
External Links
- PETSc Manual:
DMPlex/DMPlexLabelCohesiveComplete
PETSc.LibPETSc.DMPlexLabelComplete — Method
DMPlexLabelComplete(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)Starting with a label marking points on a surface, we add the transitive closure to the surface
Input Parameters:
dm- TheDMlabel- ADMLabelmarking the surface points
Output Parameter:
label- ADMLabelmarking all surface points in the transitive closure
Level: developer
-seealso: , DM, DMPLEX, DMPlexLabelCohesiveComplete()
External Links
- PETSc Manual:
DMPlex/DMPlexLabelComplete
PETSc.LibPETSc.DMPlexLabelsLoad — Method
DMPlexLabelsLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF)Loads labels into a DMPLEX
Collective
Input Parameters:
dm- TheDMinto which the labels are loadedviewer- ThePetscViewerfor the saved labelsglobalToLocalPointSF- ThePetscSFreturned byDMPlexTopologyLoad()when loadingdmfrom viewer
Level: advanced
-seealso: , DM, DMPLEX, DMLoad(), DMPlexTopologyLoad(), DMPlexCoordinatesLoad(), DMView(), PetscViewerHDF5Open(), PetscViewerPushFormat(), PetscSF, PetscViewer
External Links
- PETSc Manual:
DMPlex/DMPlexLabelsLoad
PETSc.LibPETSc.DMPlexLabelsView — Method
DMPlexLabelsView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer)Saves DMPLEX labels into a file
Collective
Input Parameters:
dm- TheDMwhose labels are to be savedviewer- ThePetscViewerfor saving
Level: advanced
-seealso: , DM, DMPLEX, DMView(), DMPlexTopologyView(), DMPlexCoordinatesView(), DMPlexLabelsLoad(), PetscViewer
External Links
- PETSc Manual:
DMPlex/DMPlexLabelsView
PETSc.LibPETSc.DMPlexLandauAccess — Method
DMPlexLandauAccess(petsclib::PetscLibType,pack::PetscDM, X::PetscVec, func::external, user_ctx::Cvoid)Access to the distribution function with user callback
Collective
Input Parameters:
pack- theDMCOMPOSITEfunc- call back functionuser_ctx- user context
Input/Output Parameter:
X- Vector to data to
Level: advanced
-seealso: DMPlexLandauCreateVelocitySpace()
External Links
- PETSc Manual:
Ts/DMPlexLandauAccess
PETSc.LibPETSc.DMPlexLandauAddMaxwellians — Method
DMPlexLandauAddMaxwellians(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, time::PetscReal, temps::Vector{PetscReal}, ns::Vector{PetscReal}, grid::PetscInt, b_id::PetscInt, n_batch::PetscInt, actx::Cvoid)Add a Maxwellian distribution to a state
Collective
Input Parameters:
dm- The mesh (local)time- Current timetemps- Temperatures of each species (global)ns- Number density of each species (global)grid- index into current grid - just used for offset intotempandnsb_id- batch indexn_batch- number of batchesactx- Landau context
Output Parameter:
X- The state (local to this grid)
Level: beginner
-seealso: DMPlexLandauCreateVelocitySpace()
External Links
- PETSc Manual:
Ts/DMPlexLandauAddMaxwellians
PETSc.LibPETSc.DMPlexLandauCreateMassMatrix — Method
Amat::PetscMat = DMPlexLandauCreateMassMatrix(petsclib::PetscLibType,pack::PetscDM)Create mass matrix for Landau in Plex space (not field major order of Jacobian)
puts mass matrix into ctx->M
Collective
Input Parameter:
pack- theDMobject. Puts matrix in Landau context M field
Output Parameter:
Amat- The mass matrix (optional), mass matrix is added to theDMcontext
Level: beginner
-seealso: DMPlexLandauCreateVelocitySpace()
External Links
- PETSc Manual:
Ts/DMPlexLandauCreateMassMatrix
PETSc.LibPETSc.DMPlexLandauCreateVelocitySpace — Method
X::PetscVec,J::PetscMat,pack::PetscDM = DMPlexLandauCreateVelocitySpace(petsclib::PetscLibType,comm::MPI_Comm, dim::PetscInt, prefix::String)Create a DMPLEX velocity space mesh
Collective
Input Parameters:
comm- The MPI communicatordim- velocity space dimension (2 for axisymmetric, 3 for full 3X + 3V solver)prefix- prefix for options (not tested)
Output Parameters:
pack- TheDMobject representing the meshX- A vector (user destroys)J- Optional matrix (object destroys)
Level: beginner
-seealso: DMPlexCreate(), DMPlexLandauDestroyVelocitySpace()
External Links
- PETSc Manual:
Ts/DMPlexLandauCreateVelocitySpace
PETSc.LibPETSc.DMPlexLandauDestroyVelocitySpace — Method
DMPlexLandauDestroyVelocitySpace(petsclib::PetscLibType,dm::PetscDM)Destroy a DMPLEX velocity space mesh
Collective
Input/Output Parameters:
dm- theDMto destroy
Level: beginner
-seealso: DMPlexLandauCreateVelocitySpace()
External Links
- PETSc Manual:
Ts/DMPlexLandauDestroyVelocitySpace
PETSc.LibPETSc.DMPlexLandauIFunction — Method
DMPlexLandauIFunction(petsclib::PetscLibType,ts::TS, time_dummy::PetscReal, X::PetscVec, X_t::PetscVec, F::PetscVec, actx::Cvoid)TS residual calculation, confusingly this computes the Jacobian w/o mass
Collective
Input Parameters:
ts- The time stepping contexttime_dummy- current time (not used)X- Current stateX_t- Time derivative of current stateactx- Landau context
Output Parameter:
F- The residual
Level: beginner
-seealso: DMPlexLandauCreateVelocitySpace(), DMPlexLandauIJacobian()
External Links
- PETSc Manual:
Ts/DMPlexLandauIFunction
PETSc.LibPETSc.DMPlexLandauIJacobian — Method
DMPlexLandauIJacobian(petsclib::PetscLibType,ts::TS, time_dummy::PetscReal, X::PetscVec, U_tdummy::PetscVec, shift::PetscReal, Amat::PetscMat, Pmat::PetscMat, actx::Cvoid)TS Jacobian construction, confusingly this adds mass
Collective
Input Parameters:
ts- The time stepping contexttime_dummy- current time (not used)X- Current stateU_tdummy- Time derivative of current state (not used)shift- shift for du/dt termactx- Landau context
Output Parameters:
Amat- JacobianPmat- same as Amat
Level: beginner
-seealso: DMPlexLandauCreateVelocitySpace(), DMPlexLandauIFunction()
External Links
- PETSc Manual:
Ts/DMPlexLandauIJacobian
PETSc.LibPETSc.DMPlexLandauPrintNorms — Method
DMPlexLandauPrintNorms(petsclib::PetscLibType,X::PetscVec, stepi::PetscInt)collects moments and prints them
Collective
Input Parameters:
X- the statestepi- current step to print
Level: beginner
-seealso: DMPlexLandauCreateVelocitySpace()
External Links
- PETSc Manual:
Ts/DMPlexLandauPrintNorms
PETSc.LibPETSc.DMPlexLocalToGlobalBasis — Method
DMPlexLocalToGlobalBasis(petsclib::PetscLibType,dm::PetscDM, lv::PetscVec)Transform the values in the given local vector from the local basis to the global basis
Input Parameters:
dm- TheDMlv- A local vector with values in the local basis
Output Parameter:
lv- A local vector with values in the global basis
Level: developer
-seealso: , DM, DMPLEX, DMPlexGlobalToLocalBasis(), DMGetLocalSection(), DMPlexCreateBasisRotation()
External Links
- PETSc Manual:
DMPlex/DMPlexLocalToGlobalBasis
PETSc.LibPETSc.DMPlexLocalVectorLoad — Method
DMPlexLocalVectorLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec)Loads on
Collective
Input Parameters:
dm- TheDMthat represents the topologyviewer- ThePetscViewerthat represents the on-disk vector datasectiondm- TheDMthat contains the local section on which vec is defined, can beNULLsf- ThePetscSFthat migrates the on-disk vector data into vecvec- The local vector to set values of
Level: advanced
-seealso: , DM, DMPLEX, DMPlexTopologyLoad(), DMPlexSectionLoad(), DMPlexGlobalVectorLoad(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(), PetscSF, PetscViewer
External Links
- PETSc Manual:
DMPlex/DMPlexLocalVectorLoad
PETSc.LibPETSc.DMPlexLocalVectorView — Method
DMPlexLocalVectorView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec)Saves a local vector
Collective
Input Parameters:
dm- TheDMthat represents the topologyviewer- ThePetscViewerto save data withsectiondm- TheDMthat contains the local section on whichvecis defined, can beNULLvec- The local vector to be saved
Level: advanced
-seealso: , DM, DMPLEX, DMPlexTopologyView(), DMPlexSectionView(), DMPlexGlobalVectorView(), DMPlexGlobalVectorLoad(), DMPlexLocalVectorLoad()
External Links
- PETSc Manual:
DMPlex/DMPlexLocalVectorView
PETSc.LibPETSc.DMPlexMarkBoundaryFaces — Method
DMPlexMarkBoundaryFaces(petsclib::PetscLibType,dm::PetscDM, val::PetscInt, label::DMLabel)Mark all faces on the boundary
Collective
Input Parameters:
dm- The originalDMval- The marker value, orPETSC_DETERMINEto use some value in the closure (or 1 if none are found)
Output Parameter:
label- TheDMLabelmarking boundary faces with the given value
Level: developer
-seealso: , DM, DMPLEX, DMLabelCreate(), DMCreateLabel()
External Links
- PETSc Manual:
DMPlex/DMPlexMarkBoundaryFaces
PETSc.LibPETSc.DMPlexMatGetClosureIndicesRefined — Method
DMPlexMatGetClosureIndicesRefined(petsclib::PetscLibType,dmf::PetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::PetscDM, csection::PetscSection, globalCSection::PetscSection, point::PetscInt, cindices::Vector{PetscInt}, findices::Vector{PetscInt})External Links
- PETSc Manual:
DMPlex/DMPlexMatGetClosureIndicesRefined
PETSc.LibPETSc.DMPlexMatSetClosure — Method
DMPlexMatSetClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, globalSection::PetscSection, A::PetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode)Set an array of the values on the closure of 'point'
Not collective
Input Parameters:
dm- TheDMsection- The section describing the layout inv, orNULLto use the default sectionglobalSection- The section describing the layout inv, orNULLto use the default global sectionA- The matrixpoint- The point in theDMvalues- The array of valuesmode- The insert mode, whereINSERT_ALL_VALUESandADD_ALL_VALUESalso overwrite boundary conditions
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexMatSetClosureGeneral(), DMPlexVecGetClosure(), DMPlexVecSetClosure()
External Links
- PETSc Manual:
DMPlex/DMPlexMatSetClosure
PETSc.LibPETSc.DMPlexMatSetClosureGeneral — Method
DMPlexMatSetClosureGeneral(petsclib::PetscLibType,dmRow::PetscDM, sectionRow::PetscSection, globalSectionRow::PetscSection, useRowPerm::PetscBool, dmCol::PetscDM, sectionCol::PetscSection, globalSectionCol::PetscSection, useColPerm::PetscBool, A::PetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode)Set an array of the values on the closure of 'point' using a different row and column section
Not collective
Input Parameters:
dmRow- TheDMfor the row fieldssectionRow- The section describing the layout, orNULLto use the default section indmRowuseRowPerm- The flag to use the closure permutation of thedmRowif availableglobalSectionRow- The section describing the layout, orNULLto use the default global section indmRowdmCol- TheDMfor the column fieldssectionCol- The section describing the layout, orNULLto use the default section indmColuseColPerm- The flag to use the closure permutation of thedmColif availableglobalSectionCol- The section describing the layout, orNULLto use the default global section indmColA- The matrixpoint- The point in theDMvalues- The array of valuesmode- The insert mode, whereINSERT_ALL_VALUESandADD_ALL_VALUESalso overwrite boundary conditions
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexMatSetClosure(), DMPlexVecGetClosure(), DMPlexVecSetClosure()
External Links
- PETSc Manual:
DMPlex/DMPlexMatSetClosureGeneral
PETSc.LibPETSc.DMPlexMatSetClosureRefined — Method
DMPlexMatSetClosureRefined(petsclib::PetscLibType,dmf::PetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::PetscDM, csection::PetscSection, globalCSection::PetscSection, A::PetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode)External Links
- PETSc Manual:
DMPlex/DMPlexMatSetClosureRefined
PETSc.LibPETSc.DMPlexMetricAverage — Method
DMPlexMetricAverage(petsclib::PetscLibType,dm::PetscDM, numMetrics::PetscInt, weights::Vector{PetscReal}, metrics::Vector{PetscVec}, metricAvg::PetscVec)Compute the average of a list of metrics
Input Parameters:
dm- TheDMnumMetrics- The number of metrics to be averagedweights- Weights for the averagemetrics- The metrics to be averaged
Output Parameter:
metricAvg- The averaged metric
Level: beginner
-seealso: DMPLEX, DMPlexMetricAverage2(), DMPlexMetricAverage3(), DMPlexMetricIntersection()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricAverage
PETSc.LibPETSc.DMPlexMetricAverage2 — Method
DMPlexMetricAverage2(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricAvg::PetscVec)Compute the unweighted average of two metrics
Input Parameters:
dm- TheDMmetric1- The first metric to be averagedmetric2- The second metric to be averaged
Output Parameter:
metricAvg- The averaged metric
Level: beginner
-seealso: DMPLEX, DMPlexMetricAverage(), DMPlexMetricAverage3()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricAverage2
PETSc.LibPETSc.DMPlexMetricAverage3 — Method
DMPlexMetricAverage3(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricAvg::PetscVec)Compute the unweighted average of three metrics
Input Parameters:
dm- TheDMmetric1- The first metric to be averagedmetric2- The second metric to be averagedmetric3- The third metric to be averaged
Output Parameter:
metricAvg- The averaged metric
Level: beginner
-seealso: DMPLEX, DMPlexMetricAverage(), DMPlexMetricAverage2()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricAverage3
PETSc.LibPETSc.DMPlexMetricCreate — Method
metric::PetscVec = DMPlexMetricCreate(petsclib::PetscLibType,dm::PetscDM, f::PetscInt)Create a Riemannian metric field
Input Parameters:
dm- TheDMf- The field number to use
Output Parameter:
metric- The metric
Options Database Key:
-dm_adaptor <pragmatic/mmg/parmmg>- specify dm adaptor to use
Options Database Keys for Mmg and ParMmg:
-dm_plex_metric_gradation_factor- Maximum ratio by which edge lengths may grow during gradation-dm_plex_metric_num_iterations- Number of parallel mesh adaptation iterations for ParMmg-dm_plex_metric_no_insert- Should node insertion/deletion be turned off?-dm_plex_metric_no_swap- Should facet swapping be turned off?-dm_plex_metric_no_move- Should node movement be turned off?-dm_plex_metric_verbosity- Choose a verbosity level from -1 (silent) to 10 (maximum).
Options Database Keys for Riemannian metrics:
-dm_plex_metric_isotropic- Is the metric isotropic?-dm_plex_metric_uniform- Is the metric uniform?-dm_plex_metric_restrict_anisotropy_first- Should anisotropy be restricted before normalization?-dm_plex_metric_h_min- Minimum tolerated metric magnitude-dm_plex_metric_h_max- Maximum tolerated metric magnitude-dm_plex_metric_a_max- Maximum tolerated anisotropy-dm_plex_metric_p- L-p normalization order-dm_plex_metric_target_complexity- Target metric complexity
Level: beginner
-seealso: DMPLEX, DMPlexMetricCreateUniform(), DMPlexMetricCreateIsotropic()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricCreate
PETSc.LibPETSc.DMPlexMetricCreateIsotropic — Method
metric::PetscVec = DMPlexMetricCreateIsotropic(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, indicator::PetscVec)Construct an isotropic metric from an error indicator
Input Parameters:
dm- TheDMf- The field number to useindicator- The error indicator
Output Parameter:
metric- The isotropic metric
Level: beginner
-seealso: DMPLEX, DMPlexMetricCreate(), DMPlexMetricCreateUniform()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricCreateIsotropic
PETSc.LibPETSc.DMPlexMetricCreateUniform — Method
metric::PetscVec = DMPlexMetricCreateUniform(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, alpha::PetscReal)Construct a uniform isotropic metric
Input Parameters:
dm- TheDMf- The field number to usealpha- Scaling parameter for the diagonal
Output Parameter:
metric- The uniform metric
Level: beginner
-seealso: DMPLEX, DMPlexMetricCreate(), DMPlexMetricCreateIsotropic()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricCreateUniform
PETSc.LibPETSc.DMPlexMetricDeterminantCreate — Method
determinant::PetscVec,dmDet::PetscDM = DMPlexMetricDeterminantCreate(petsclib::PetscLibType,dm::PetscDM, f::PetscInt)Create the determinant field for a Riemannian metric
Input Parameters:
dm- TheDMof the metric fieldf- The field number to use
Output Parameters:
determinant- The determinant fielddmDet- The correspondingDM
Level: beginner
-seealso: DMPLEX, DMPlexMetricCreateUniform(), DMPlexMetricCreateIsotropic(), DMPlexMetricCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricDeterminantCreate
PETSc.LibPETSc.DMPlexMetricEnforceSPD — Method
DMPlexMetricEnforceSPD(petsclib::PetscLibType,dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec)Enforce symmetric positive
Input Parameters:
dm- TheDMmetricIn- The metricrestrictSizes- Should maximum/minimum metric magnitudes be enforced?restrictAnisotropy- Should maximum anisotropy be enforced?
Output Parameters:
metricOut- The metricdeterminant- Its determinant
Options Database Keys:
-dm_plex_metric_isotropic- Is the metric isotropic?-dm_plex_metric_uniform- Is the metric uniform?-dm_plex_metric_h_min- Minimum tolerated metric magnitude-dm_plex_metric_h_max- Maximum tolerated metric magnitude-dm_plex_metric_a_max- Maximum tolerated anisotropy
Level: beginner
-seealso: DMPLEX, DMPlexMetricNormalize(), DMPlexMetricIntersection()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricEnforceSPD
PETSc.LibPETSc.DMPlexMetricGetGradationFactor — Method
beta::PetscReal = DMPlexMetricGetGradationFactor(petsclib::PetscLibType,dm::PetscDM)Get the metric gradation factor
Input Parameters:
dm- TheDM
Output Parameters:
beta- The metric gradation factor
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetGradationFactor(), DMPlexMetricGetHausdorffNumber()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricGetGradationFactor
PETSc.LibPETSc.DMPlexMetricGetHausdorffNumber — Method
hausd::PetscReal = DMPlexMetricGetHausdorffNumber(petsclib::PetscLibType,dm::PetscDM)Get the metric Hausdorff number
Input Parameters:
dm- TheDM
Output Parameters:
hausd- The metric Hausdorff number
Level: beginner
-seealso: DMPLEX, DMPlexMetricGetGradationFactor(), DMPlexMetricSetHausdorffNumber()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricGetHausdorffNumber
PETSc.LibPETSc.DMPlexMetricGetMaximumAnisotropy — Method
a_max::PetscReal = DMPlexMetricGetMaximumAnisotropy(petsclib::PetscLibType,dm::PetscDM)Get the maximum tolerated metric anisotropy
Input Parameters:
dm- TheDM
Output Parameters:
a_max- The maximum tolerated metric anisotropy
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetMaximumAnisotropy(), DMPlexMetricGetMaximumMagnitude()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricGetMaximumAnisotropy
PETSc.LibPETSc.DMPlexMetricGetMaximumMagnitude — Method
h_max::PetscReal = DMPlexMetricGetMaximumMagnitude(petsclib::PetscLibType,dm::PetscDM)Get the maximum tolerated metric magnitude
Input Parameters:
dm- TheDM
Output Parameters:
h_max- The maximum tolerated metric magnitude
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetMaximumMagnitude(), DMPlexMetricGetMinimumMagnitude()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricGetMaximumMagnitude
PETSc.LibPETSc.DMPlexMetricGetMinimumMagnitude — Method
h_min::PetscReal = DMPlexMetricGetMinimumMagnitude(petsclib::PetscLibType,dm::PetscDM)Get the minimum tolerated metric magnitude
Input Parameters:
dm- TheDM
Output Parameters:
h_min- The minimum tolerated metric magnitude
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetMinimumMagnitude(), DMPlexMetricGetMaximumMagnitude()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricGetMinimumMagnitude
PETSc.LibPETSc.DMPlexMetricGetNormalizationOrder — Method
p::PetscReal = DMPlexMetricGetNormalizationOrder(petsclib::PetscLibType,dm::PetscDM)Get the order p for L
Input Parameters:
dm- TheDM
Output Parameters:
p- The normalization order
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetNormalizationOrder(), DMPlexMetricGetTargetComplexity()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricGetNormalizationOrder
PETSc.LibPETSc.DMPlexMetricGetNumIterations — Method
numIter::PetscInt = DMPlexMetricGetNumIterations(petsclib::PetscLibType,dm::PetscDM)Get the number of parallel adaptation iterations
Input Parameters:
dm- TheDM
Output Parameters:
numIter- the number of parallel adaptation iterations
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetNumIterations(), DMPlexMetricGetVerbosity()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricGetNumIterations
PETSc.LibPETSc.DMPlexMetricGetTargetComplexity — Method
targetComplexity::PetscReal = DMPlexMetricGetTargetComplexity(petsclib::PetscLibType,dm::PetscDM)Get the target metric complexity
Input Parameters:
dm- TheDM
Output Parameters:
targetComplexity- The target metric complexity
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetTargetComplexity(), DMPlexMetricGetNormalizationOrder()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricGetTargetComplexity
PETSc.LibPETSc.DMPlexMetricGetVerbosity — Method
verbosity::PetscInt = DMPlexMetricGetVerbosity(petsclib::PetscLibType,dm::PetscDM)Get the verbosity of the mesh adaptation package
Input Parameters:
dm- TheDM
Output Parameters:
verbosity- The verbosity, where -1 is silent and 10 is maximum
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetVerbosity(), DMPlexMetricGetNumIterations()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricGetVerbosity
PETSc.LibPETSc.DMPlexMetricIntersection — Method
DMPlexMetricIntersection(petsclib::PetscLibType,dm::PetscDM, numMetrics::PetscInt, metrics::Vector{PetscVec}, metricInt::PetscVec)Compute the intersection of a list of metrics
Input Parameters:
dm- TheDMnumMetrics- The number of metrics to be intersectedmetrics- The metrics to be intersected
Output Parameter:
metricInt- The intersected metric
Level: beginner
-seealso: DMPLEX, DMPlexMetricIntersection2(), DMPlexMetricIntersection3(), DMPlexMetricAverage()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricIntersection
PETSc.LibPETSc.DMPlexMetricIntersection2 — Method
DMPlexMetricIntersection2(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricInt::PetscVec)Compute the intersection of two metrics
Input Parameters:
dm- TheDMmetric1- The first metric to be intersectedmetric2- The second metric to be intersected
Output Parameter:
metricInt- The intersected metric
Level: beginner
-seealso: DMPLEX, DMPlexMetricIntersection(), DMPlexMetricIntersection3()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricIntersection2
PETSc.LibPETSc.DMPlexMetricIntersection3 — Method
DMPlexMetricIntersection3(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricInt::PetscVec)Compute the intersection of three metrics
Input Parameters:
dm- TheDMmetric1- The first metric to be intersectedmetric2- The second metric to be intersectedmetric3- The third metric to be intersected
Output Parameter:
metricInt- The intersected metric
Level: beginner
-seealso: DMPLEX, DMPlexMetricIntersection(), DMPlexMetricIntersection2()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricIntersection3
PETSc.LibPETSc.DMPlexMetricIsIsotropic — Method
isotropic::PetscBool = DMPlexMetricIsIsotropic(petsclib::PetscLibType,dm::PetscDM)Is a metric isotropic?
Input Parameters:
dm- TheDM
Output Parameters:
isotropic- Is the metric isotropic?
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetIsotropic(), DMPlexMetricIsUniform(), DMPlexMetricRestrictAnisotropyFirst()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricIsIsotropic
PETSc.LibPETSc.DMPlexMetricIsUniform — Method
uniform::PetscBool = DMPlexMetricIsUniform(petsclib::PetscLibType,dm::PetscDM)Is a metric uniform?
Input Parameters:
dm- TheDM
Output Parameters:
uniform- Is the metric uniform?
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetUniform(), DMPlexMetricIsIsotropic(), DMPlexMetricRestrictAnisotropyFirst()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricIsUniform
PETSc.LibPETSc.DMPlexMetricNoInsertion — Method
noInsert::PetscBool = DMPlexMetricNoInsertion(petsclib::PetscLibType,dm::PetscDM)Are node insertion and deletion turned off?
Input Parameters:
dm- TheDM
Output Parameters:
noInsert- Are node insertion and deletion turned off?
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetNoInsertion(), DMPlexMetricNoSwapping(), DMPlexMetricNoMovement(), DMPlexMetricNoSurf()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricNoInsertion
PETSc.LibPETSc.DMPlexMetricNoMovement — Method
noMove::PetscBool = DMPlexMetricNoMovement(petsclib::PetscLibType,dm::PetscDM)Is node movement turned off?
Input Parameters:
dm- TheDM
Output Parameters:
noMove- Is node movement turned off?
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetNoMovement(), DMPlexMetricNoInsertion(), DMPlexMetricNoSwapping(), DMPlexMetricNoSurf()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricNoMovement
PETSc.LibPETSc.DMPlexMetricNoSurf — Method
noSurf::PetscBool = DMPlexMetricNoSurf(petsclib::PetscLibType,dm::PetscDM)Is surface modification turned off?
Input Parameters:
dm- TheDM
Output Parameters:
noSurf- Is surface modification turned off?
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetNoSurf(), DMPlexMetricNoMovement(), DMPlexMetricNoInsertion(), DMPlexMetricNoSwapping()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricNoSurf
PETSc.LibPETSc.DMPlexMetricNoSwapping — Method
noSwap::PetscBool = DMPlexMetricNoSwapping(petsclib::PetscLibType,dm::PetscDM)Is facet swapping turned off?
Input Parameters:
dm- TheDM
Output Parameters:
noSwap- Is facet swapping turned off?
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetNoSwapping(), DMPlexMetricNoInsertion(), DMPlexMetricNoMovement(), DMPlexMetricNoSurf()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricNoSwapping
PETSc.LibPETSc.DMPlexMetricNormalize — Method
DMPlexMetricNormalize(petsclib::PetscLibType,dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec)Apply L
Input Parameters:
dm- TheDMmetricIn- The unnormalized metricrestrictSizes- Should maximum/minimum metric magnitudes be enforced?restrictAnisotropy- Should maximum metric anisotropy be enforced?
Output Parameters:
metricOut- The normalized metricdeterminant- computed determinant
Options Database Keys:
-dm_plex_metric_isotropic- Is the metric isotropic?-dm_plex_metric_uniform- Is the metric uniform?-dm_plex_metric_restrict_anisotropy_first- Should anisotropy be restricted before normalization?-dm_plex_metric_h_min- Minimum tolerated metric magnitude-dm_plex_metric_h_max- Maximum tolerated metric magnitude-dm_plex_metric_a_max- Maximum tolerated anisotropy-dm_plex_metric_p- L-p normalization order-dm_plex_metric_target_complexity- Target metric complexity
Level: beginner
-seealso: DMPLEX, DMPlexMetricEnforceSPD(), DMPlexMetricIntersection()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricNormalize
PETSc.LibPETSc.DMPlexMetricRestrictAnisotropyFirst — Method
restrictAnisotropyFirst::PetscBool = DMPlexMetricRestrictAnisotropyFirst(petsclib::PetscLibType,dm::PetscDM)Is anisotropy restricted before normalization or after?
Input Parameters:
dm- TheDM
Output Parameters:
restrictAnisotropyFirst- Is anisotropy be normalized first?
Level: beginner
-seealso: DMPLEX, DMPlexMetricIsIsotropic(), DMPlexMetricSetRestrictAnisotropyFirst()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricRestrictAnisotropyFirst
PETSc.LibPETSc.DMPlexMetricSetFromOptions — Method
DMPlexMetricSetFromOptions(petsclib::PetscLibType,dm::PetscDM)External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetFromOptions
PETSc.LibPETSc.DMPlexMetricSetGradationFactor — Method
DMPlexMetricSetGradationFactor(petsclib::PetscLibType,dm::PetscDM, beta::PetscReal)Set the metric gradation factor
Input Parameters:
dm- TheDMbeta- The metric gradation factor
Level: beginner
-seealso: DMPLEX, DMPlexMetricGetGradationFactor(), DMPlexMetricSetHausdorffNumber()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetGradationFactor
PETSc.LibPETSc.DMPlexMetricSetHausdorffNumber — Method
DMPlexMetricSetHausdorffNumber(petsclib::PetscLibType,dm::PetscDM, hausd::PetscReal)Set the metric Hausdorff number
Input Parameters:
dm- TheDMhausd- The metric Hausdorff number
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetGradationFactor(), DMPlexMetricGetHausdorffNumber()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetHausdorffNumber
PETSc.LibPETSc.DMPlexMetricSetIsotropic — Method
DMPlexMetricSetIsotropic(petsclib::PetscLibType,dm::PetscDM, isotropic::PetscBool)Record whether a metric is isotropic
Input Parameters:
dm- TheDMisotropic- Is the metric isotropic?
Level: beginner
-seealso: DMPLEX, DMPlexMetricIsIsotropic(), DMPlexMetricSetUniform(), DMPlexMetricSetRestrictAnisotropyFirst()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetIsotropic
PETSc.LibPETSc.DMPlexMetricSetMaximumAnisotropy — Method
DMPlexMetricSetMaximumAnisotropy(petsclib::PetscLibType,dm::PetscDM, a_max::PetscReal)Set the maximum tolerated metric anisotropy
Input Parameters:
dm- TheDMa_max- The maximum tolerated metric anisotropy
Level: beginner
-seealso: DMPLEX, DMPlexMetricGetMaximumAnisotropy(), DMPlexMetricSetMaximumMagnitude()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetMaximumAnisotropy
PETSc.LibPETSc.DMPlexMetricSetMaximumMagnitude — Method
DMPlexMetricSetMaximumMagnitude(petsclib::PetscLibType,dm::PetscDM, h_max::PetscReal)Set the maximum tolerated metric magnitude
Input Parameters:
dm- TheDMh_max- The maximum tolerated metric magnitude
Level: beginner
-seealso: DMPLEX, DMPlexMetricGetMaximumMagnitude(), DMPlexMetricSetMinimumMagnitude()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetMaximumMagnitude
PETSc.LibPETSc.DMPlexMetricSetMinimumMagnitude — Method
DMPlexMetricSetMinimumMagnitude(petsclib::PetscLibType,dm::PetscDM, h_min::PetscReal)Set the minimum tolerated metric magnitude
Input Parameters:
dm- TheDMh_min- The minimum tolerated metric magnitude
Level: beginner
-seealso: DMPLEX, DMPlexMetricGetMinimumMagnitude(), DMPlexMetricSetMaximumMagnitude()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetMinimumMagnitude
PETSc.LibPETSc.DMPlexMetricSetNoInsertion — Method
DMPlexMetricSetNoInsertion(petsclib::PetscLibType,dm::PetscDM, noInsert::PetscBool)Should node insertion and deletion be turned off?
Input Parameters:
dm- TheDMnoInsert- Should node insertion and deletion be turned off?
Level: beginner
-seealso: DMPLEX, DMPlexMetricNoInsertion(), DMPlexMetricSetNoSwapping(), DMPlexMetricSetNoMovement(), DMPlexMetricSetNoSurf()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetNoInsertion
PETSc.LibPETSc.DMPlexMetricSetNoMovement — Method
DMPlexMetricSetNoMovement(petsclib::PetscLibType,dm::PetscDM, noMove::PetscBool)Should node movement be turned off?
Input Parameters:
dm- TheDMnoMove- Should node movement be turned off?
Level: beginner
-seealso: DMPLEX, DMPlexMetricNoMovement(), DMPlexMetricSetNoInsertion(), DMPlexMetricSetNoSwapping(), DMPlexMetricSetNoSurf()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetNoMovement
PETSc.LibPETSc.DMPlexMetricSetNoSurf — Method
DMPlexMetricSetNoSurf(petsclib::PetscLibType,dm::PetscDM, noSurf::PetscBool)Should surface modification be turned off?
Input Parameters:
dm- TheDMnoSurf- Should surface modification be turned off?
Level: beginner
-seealso: DMPLEX, DMPlexMetricNoSurf(), DMPlexMetricSetNoMovement(), DMPlexMetricSetNoInsertion(), DMPlexMetricSetNoSwapping()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetNoSurf
PETSc.LibPETSc.DMPlexMetricSetNoSwapping — Method
DMPlexMetricSetNoSwapping(petsclib::PetscLibType,dm::PetscDM, noSwap::PetscBool)Should facet swapping be turned off?
Input Parameters:
dm- TheDMnoSwap- Should facet swapping be turned off?
Level: beginner
-seealso: DMPLEX, DMPlexMetricNoSwapping(), DMPlexMetricSetNoInsertion(), DMPlexMetricSetNoMovement(), DMPlexMetricSetNoSurf()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetNoSwapping
PETSc.LibPETSc.DMPlexMetricSetNormalizationOrder — Method
DMPlexMetricSetNormalizationOrder(petsclib::PetscLibType,dm::PetscDM, p::PetscReal)Set the order p for L
Input Parameters:
dm- TheDMp- The normalization order
Level: beginner
-seealso: DMPLEX, DMPlexMetricGetNormalizationOrder(), DMPlexMetricSetTargetComplexity()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetNormalizationOrder
PETSc.LibPETSc.DMPlexMetricSetNumIterations — Method
DMPlexMetricSetNumIterations(petsclib::PetscLibType,dm::PetscDM, numIter::PetscInt)Set the number of parallel adaptation iterations
Input Parameters:
dm- TheDMnumIter- the number of parallel adaptation iterations
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetVerbosity(), DMPlexMetricGetNumIterations()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetNumIterations
PETSc.LibPETSc.DMPlexMetricSetRestrictAnisotropyFirst — Method
DMPlexMetricSetRestrictAnisotropyFirst(petsclib::PetscLibType,dm::PetscDM, restrictAnisotropyFirst::PetscBool)Record whether anisotropy should be restricted before normalization
Input Parameters:
dm- TheDMrestrictAnisotropyFirst- Should anisotropy be normalized first?
Level: beginner
-seealso: DMPLEX, DMPlexMetricSetIsotropic(), DMPlexMetricRestrictAnisotropyFirst()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetRestrictAnisotropyFirst
PETSc.LibPETSc.DMPlexMetricSetTargetComplexity — Method
DMPlexMetricSetTargetComplexity(petsclib::PetscLibType,dm::PetscDM, targetComplexity::PetscReal)Set the target metric complexity
Input Parameters:
dm- TheDMtargetComplexity- The target metric complexity
Level: beginner
-seealso: DMPLEX, DMPlexMetricGetTargetComplexity(), DMPlexMetricSetNormalizationOrder()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetTargetComplexity
PETSc.LibPETSc.DMPlexMetricSetUniform — Method
DMPlexMetricSetUniform(petsclib::PetscLibType,dm::PetscDM, uniform::PetscBool)Record whether a metric is uniform
Input Parameters:
dm- TheDMuniform- Is the metric uniform?
Level: beginner
-seealso: DMPLEX, DMPlexMetricIsUniform(), DMPlexMetricSetIsotropic(), DMPlexMetricSetRestrictAnisotropyFirst()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetUniform
PETSc.LibPETSc.DMPlexMetricSetVerbosity — Method
DMPlexMetricSetVerbosity(petsclib::PetscLibType,dm::PetscDM, verbosity::PetscInt)Set the verbosity of the mesh adaptation package
Input Parameters:
dm- TheDMverbosity- The verbosity, where -1 is silent and 10 is maximum
Level: beginner
-seealso: DMPLEX, DMPlexMetricGetVerbosity(), DMPlexMetricSetNumIterations()
External Links
- PETSc Manual:
DMPlex/DMPlexMetricSetVerbosity
PETSc.LibPETSc.DMPlexMigrate — Method
DMPlexMigrate(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, targetDM::PetscDM)Migrates internal DM data over the supplied star forest
Collective
Input Parameters:
dm- The sourceDMPLEXobjectsf- The star forest communication context describing the migration pattern
Output Parameter:
targetDM- The targetDMPLEXobject
Level: intermediate
-seealso: DMPLEX, PetscSF, DM, DMPlexDistribute(), DMPlexDistributeOverlap()
External Links
- PETSc Manual:
DMPlex/DMPlexMigrate
PETSc.LibPETSc.DMPlexMigrateGlobalToNaturalSF — Method
DMPlexMigrateGlobalToNaturalSF(petsclib::PetscLibType,dmOld::PetscDM, dmNew::PetscDM, sfNaturalOld::PetscSF, sfMigration::PetscSF, sfNaturalNew::PetscSF)Migrates the input sfNatural based on sfMigration
Input Parameters:
dmOld- The originalDMdmNew- TheDMto be migrated tosfNaturalOld- The sfNatural for thedmOldsfMigration- ThePetscSFused to distribute the mesh, orNULLif it cannot be computed
Output Parameter:
sfNaturalNew-PetscSFfor mapping theVecin PETSc ordering to the canonical ordering
Level: intermediate
-seealso: , DM, DMPLEX, PetscSF, PetscSection, DMPlexDistribute(), DMPlexDistributeField()
External Links
- PETSc Manual:
DMPlex/DMPlexMigrateGlobalToNaturalSF
PETSc.LibPETSc.DMPlexModifyGeomModel — Method
DMPlexModifyGeomModel(petsclib::PetscLibType,dm::PetscDM, comm::MPI_Comm, newCP::Vector{PetscScalar}, newW::Vector{PetscScalar}, autoInflate::PetscBool, saveGeom::PetscBool, stpName::String)Generates a new EGADS geometry model based in user provided Control Points and Control Points Weights. Optionally, the function will inflate the DM to the new geometry and save the new geometry to a file.
Collective
Input Parameters:
dm- The DM object representing the mesh with PetscContainer containing an EGADS geometry modelcomm- MPI_Comm objectnewCP- C Array of [x, y, z] New/Updated Control Point Coordinates defining the geometry (See DMPlexGeomDataAndGrads() for format)newW- C Array of New/Updated Control Point Weights associated with the Control Points defining the new geometry (See DMPlexGemGrads() for format)autoInflate- PetscBool Flag denoting if the user would like to inflate the DM points to the new geometry.saveGeom- PetscBool Flag denoting if the user would iike to save the new geometry to a file.stpName- Char Array indicating the name of the file to save the new geometry to. Extension must be included and will denote type of file written.
*.stp or *.step = STEP File *.igs or *.iges = IGES File *.egads = EGADS File *.brep = BRep File (OpenCASCADE File)
Output Parameter:
dm- The updated DM object representing the mesh with PetscContainers containing the updated/modified geometry
Level: intermediate
-seealso: DMPLEX, DMCreate(), DMPlexCreateGeom(), DMPlexGeomDataAndGrads()
External Links
- PETSc Manual:
DMPlex/DMPlexModifyGeomModel
PETSc.LibPETSc.DMPlexMonitorThroughput — Method
DMPlexMonitorThroughput(petsclib::PetscLibType,dm::PetscDM, dummy::Cvoid)Report the cell throughput of FE integration
Input Parameters:
dm- TheDMdummy- unused argument
Options Database Key:
-dm_plex_monitor_throughput- Activate the monitor
Level: developer
-seealso: , DM, DMPLEX, DMSetFromOptions(), DMPlexCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexMonitorThroughput
PETSc.LibPETSc.DMPlexNaturalToGlobalBegin — Method
DMPlexNaturalToGlobalBegin(petsclib::PetscLibType,dm::PetscDM, nv::PetscVec, gv::PetscVec)Rearranges a Vec in the natural order to the Global order.
Collective
Input Parameters:
dm- The distributedDMPLEXnv- The naturalVec
Output Parameter:
gv- The globalVec
Level: intermediate
-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexGlobalToNaturalEnd()
External Links
- PETSc Manual:
DMPlex/DMPlexNaturalToGlobalBegin
PETSc.LibPETSc.DMPlexNaturalToGlobalEnd — Method
DMPlexNaturalToGlobalEnd(petsclib::PetscLibType,dm::PetscDM, nv::PetscVec, gv::PetscVec)Rearranges a Vec in the natural order to the Global order.
Collective
Input Parameters:
dm- The distributedDMPLEXnv- The naturalVec
Output Parameter:
gv- The globalVec
Level: intermediate
-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalBegin()
External Links
- PETSc Manual:
DMPlex/DMPlexNaturalToGlobalEnd
PETSc.LibPETSc.DMPlexOrient — Method
DMPlexOrient(petsclib::PetscLibType,dm::PetscDM)Give a consistent orientation to the input mesh
Input Parameter:
dm- TheDM
-seealso: , DM, DMPLEX, DMCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexOrient
PETSc.LibPETSc.DMPlexOrientLabel — Method
DMPlexOrientLabel(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)External Links
- PETSc Manual:
DMPlex/DMPlexOrientLabel
PETSc.LibPETSc.DMPlexOrientPoint — Method
DMPlexOrientPoint(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, o::PetscInt)Act with the given orientation on the cone points of this mesh point, and update its use in the mesh.
Not Collective
Input Parameters:
dm- TheDMp- The mesh pointo- The orientation
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexOrient(), DMPlexGetCone(), DMPlexGetConeOrientation(), DMPlexInterpolate(), DMPlexGetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexOrientPoint
PETSc.LibPETSc.DMPlexPartitionLabelAdjacency — Method
DMPlexPartitionLabelAdjacency(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)Add one level of adjacent points to the partition label
Input Parameters:
dm- TheDMlabel-DMLabelassigning ranks to remote roots
Level: developer
-seealso: , DM, DMPLEX, DMLabel, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexPartitionLabelAdjacency
PETSc.LibPETSc.DMPlexPartitionLabelClosure — Method
DMPlexPartitionLabelClosure(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)Add the closure of all points to the partition label
Input Parameters:
dm- TheDMlabel-DMLabelassigning ranks to remote roots
Level: developer
-seealso: , DM, DMPLEX, DMLabel, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexPartitionLabelClosure
PETSc.LibPETSc.DMPlexPartitionLabelCreateSF — Method
sf::PetscSF = DMPlexPartitionLabelCreateSF(petsclib::PetscLibType,dm::PetscDM, label::DMLabel, sortRanks::PetscBool)Create a star forest from a label that assigns ranks to points
Input Parameters:
dm- TheDMlabel-DMLabelassigning ranks to remote rootssortRanks- Whether or not to sort thePetscSFleaves by rank
Output Parameter:
sf- The star forest communication context encapsulating the defined mapping
Level: developer
-seealso: , DM, DMPLEX, DMLabel, PetscSF, DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexPartitionLabelCreateSF
PETSc.LibPETSc.DMPlexPartitionLabelInvert — Method
DMPlexPartitionLabelInvert(petsclib::PetscLibType,dm::PetscDM, rootLabel::DMLabel, processSF::PetscSF, leafLabel::DMLabel)Create a partition label of remote roots from a local root label
Input Parameters:
dm- TheDMrootLabel-DMLabelassigning ranks to local rootsprocessSF- A star forest mapping into the local index on each remote rank
Output Parameter:
leafLabel-DMLabelassigning ranks to remote roots
Level: developer
-seealso: , DM, DMPLEX, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexPartitionLabelInvert
PETSc.LibPETSc.DMPlexPartitionLabelPropagate — Method
DMPlexPartitionLabelPropagate(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)Propagate points in a partition label over the point PetscSF
Input Parameters:
dm- TheDMlabel-DMLabelassigning ranks to remote roots
Level: developer
-seealso: , DM, DMPLEX, DMLabel, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexPartitionLabelPropagate
PETSc.LibPETSc.DMPlexPermute — Method
DMPlexPermute(petsclib::PetscLibType,dm::PetscDM, perm::IS, pdm::PetscDM)Reorder the mesh according to the input permutation
Collective
Input Parameters:
dm- TheDMPLEXobjectperm- The point permutation,perm[old point number] = new point number
Output Parameter:
pdm- The permutedDM
Level: intermediate
-seealso: DMPLEX, MatPermute()
External Links
- PETSc Manual:
DMPlex/DMPlexPermute
PETSc.LibPETSc.DMPlexPointGlobalFieldRead — Method
DMPlexPointGlobalFieldRead(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid)return read access to a field on a point in global array
Not Collective
Input Parameters:
dm-DMdefining topological spacepoint- topological pointfield- field numberarray- array to index into
Output Parameter:
ptr- address of read reference to point data, type generic so user can place in structure; returns NULL if global point is not owned
Level: intermediate
-seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRead(), DMPlexPointGlobalRef()
External Links
- PETSc Manual:
DMPlex/DMPlexPointGlobalFieldRead
PETSc.LibPETSc.DMPlexPointGlobalFieldRef — Method
DMPlexPointGlobalFieldRef(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid)return read/write access to a field on a point in global array
Not Collective
Input Parameters:
dm-DMdefining topological spacepoint- topological pointfield- field numberarray- array to index into
Output Parameter:
ptr- address of reference to point data, type generic so user can place in structure; returns NULL if global point is not owned
Level: intermediate
-seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRef(), DMPlexPointGlobalRead()
External Links
- PETSc Manual:
DMPlex/DMPlexPointGlobalFieldRef
PETSc.LibPETSc.DMPlexPointGlobalRead — Method
DMPlexPointGlobalRead(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid)return read access to a point in global array
Not Collective
Input Parameters:
dm-DMdefining topological spacepoint- topological pointarray- array to index into
Output Parameter:
ptr- address of read reference to point data, type generic so user can place in structure; returns NULL if global point is not owned
Level: intermediate
-seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRead(), DMPlexPointGlobalRef()
External Links
- PETSc Manual:
DMPlex/DMPlexPointGlobalRead
PETSc.LibPETSc.DMPlexPointGlobalRef — Method
DMPlexPointGlobalRef(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid)return read/write access to a point in global array
Not Collective
Input Parameters:
dm-DMdefining topological spacepoint- topological pointarray- array to index into
Output Parameter:
ptr- address of reference to point data, type generic so user can place in structure; returns NULL if global point is not owned
Level: intermediate
-seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRef(), DMPlexPointGlobalRead()
External Links
- PETSc Manual:
DMPlex/DMPlexPointGlobalRef
PETSc.LibPETSc.DMPlexPointLocalFieldRead — Method
DMPlexPointLocalFieldRead(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid)return read access to a field on a point in local array
Not Collective
Input Parameters:
dm-DMdefining topological spacepoint- topological pointfield- field numberarray- array to index into
Output Parameter:
ptr- address of read reference to point data, type generic so user can place in structure
Level: intermediate
-seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()
External Links
- PETSc Manual:
DMPlex/DMPlexPointLocalFieldRead
PETSc.LibPETSc.DMPlexPointLocalFieldRef — Method
DMPlexPointLocalFieldRef(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, field::PetscInt, array::PetscScalar, ptr::Cvoid)return read/write access to a field on a point in local array
Not Collective
Input Parameters:
dm-DMdefining topological spacepoint- topological pointfield- field numberarray- array to index into
Output Parameter:
ptr- address of reference to point data, type generic so user can place in structure
Level: intermediate
-seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()
External Links
- PETSc Manual:
DMPlex/DMPlexPointLocalFieldRef
PETSc.LibPETSc.DMPlexPointLocalRead — Method
DMPlexPointLocalRead(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid)return read access to a point in local array
Not Collective
Input Parameters:
dm-DMdefining topological spacepoint- topological pointarray- array to index into
Output Parameter:
ptr- address of read reference to point data, type generic so user can place in structure
Level: intermediate
-seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointLocal(), DMPlexPointGlobalRead()
External Links
- PETSc Manual:
DMPlex/DMPlexPointLocalRead
PETSc.LibPETSc.DMPlexPointLocalRef — Method
DMPlexPointLocalRef(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, array::PetscScalar, ptr::Cvoid)return read/write access to a point in local array
Not Collective
Input Parameters:
dm-DMdefining topological spacepoint- topological pointarray- array to index into
Output Parameter:
ptr- address of reference to point data, type generic so user can place in structure
Level: intermediate
-seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()
External Links
- PETSc Manual:
DMPlex/DMPlexPointLocalRef
PETSc.LibPETSc.DMPlexPreallocateOperator — Method
DMPlexPreallocateOperator(petsclib::PetscLibType,dm::PetscDM, bs::PetscInt, dnz::Vector{PetscInt}, onz::Vector{PetscInt}, dnzu::Vector{PetscInt}, onzu::Vector{PetscInt}, A::PetscMat, fillMatrix::PetscBool)Calculate the matrix nonzero pattern based upon the information in the DM, the PetscDS it contains, and the default PetscSection.
Collective
Input Parameters:
dm- TheDMPLEXbs- The matrix blocksizednz- An array to hold the number of nonzeros in the diagonal blockonz- An array to hold the number of nonzeros in the off-diagonal blockdnzu- An array to hold the number of nonzeros in the upper triangle of the diagonal blockonzu- An array to hold the number of nonzeros in the upper triangle of the off-diagonal blockfillMatrix- IfPETSC_TRUE, fill the matrix with zeros
Output Parameter:
A- The preallocated matrix
Level: advanced
-seealso: , DM, DMPLEX, DMCreateMatrix()
External Links
- PETSc Manual:
DMPlex/DMPlexPreallocateOperator
PETSc.LibPETSc.DMPlexRebalanceSharedPoints — Method
success::PetscBool = DMPlexRebalanceSharedPoints(petsclib::PetscLibType,dm::PetscDM, entityDepth::PetscInt, useInitialGuess::PetscBool, parallel::PetscBool)Redistribute points in the plex that are shared in order to achieve better balancing. This routine updates the PointSF of the DM inplace.
Input Parameters:
dm- TheDMPLEXobject.entityDepth- depth of the entity to balance (0 -> balance vertices).useInitialGuess- whether to use the current distribution as initial guess (only used by ParMETIS).parallel- whether to use ParMETIS and do the partition in parallel or whether to gather the graph onto a single process and use METIS.
Output Parameter:
success- whether the graph partitioning was successful or not, optional. Unsuccessful simply means no change to the partitioning
Options Database Keys:
-dm_plex_rebalance_shared_points_parmetis- Use ParMetis instead of Metis for the partitioner-dm_plex_rebalance_shared_points_use_initial_guess- Use current partition to bootstrap ParMetis partition-dm_plex_rebalance_shared_points_use_mat_partitioning- Use the MatPartitioning object to perform the partition, the prefix for those operations is -dmplexrebalancesharedpoints_-dm_plex_rebalance_shared_points_monitor- Monitor the shared points rebalance process
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexRebalanceSharedPoints
PETSc.LibPETSc.DMPlexReconstructGradientsFVM — Method
DMPlexReconstructGradientsFVM(petsclib::PetscLibType,dm::PetscDM, locX::PetscVec, grad::PetscVec)reconstruct the gradient of a vector using a finite volume method.
Input Parameters:
dm- the meshlocX- the local representation of the vector
Output Parameter:
grad- the global representation of the gradient
Level: developer
-seealso: , DM, Vec, DMPlexGetGradientDM()
External Links
- PETSc Manual:
DMPlex/DMPlexReconstructGradientsFVM
PETSc.LibPETSc.DMPlexReferenceToCoordinates — Method
realCoords::Vector{PetscReal} = DMPlexReferenceToCoordinates(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, numPoints::PetscInt, refCoords::Vector{PetscReal})Map references coordinates to coordinates in the mesh for a single element map.
Not Collective
Input Parameters:
dm- The mesh, with coordinate maps defined either by a PetscDS for the coordinateDM(seeDMGetCoordinateDM()) or
implicitly by the coordinates of the corner vertices of the cell: as an affine map for simplicial elements, or as a multilinear map for tensor-product elements
cell- the cell whose map is used.numPoints- the number of points to locaterefCoords- (numPoints x dimension) array of reference coordinates (seeDMGetDimension())
Output Parameter:
realCoords- (numPoints x coordinate dimension) array of coordinates (seeDMGetCoordinateDim())
Level: intermediate
-seealso: DMPLEX, DMPlexCoordinatesToReference()
External Links
- PETSc Manual:
DMPlex/DMPlexReferenceToCoordinates
PETSc.LibPETSc.DMPlexReferenceTreeGetChildSymmetry — Method
childOrientB::PetscInt,childB::PetscInt = DMPlexReferenceTreeGetChildSymmetry(petsclib::PetscLibType,dm::PetscDM, parent::PetscInt, parentOrientA::PetscInt, childOrientA::PetscInt, childA::PetscInt, parentOrientB::PetscInt)Given a reference tree, transform a childid and orientation from one parent frame to another
Input Parameters:
dm- the reference treeDMPLEXobjectparent- the parent pointparentOrientA- the reference orientation for describing the parentchildOrientA- the reference orientation for describing the childchildA- the reference childID for describing the childparentOrientB- the new orientation for describing the parent
Output Parameters:
childOrientB- if notNULL, set to the new orientation for describing the childchildB- if notNULL, the new childID for describing the child
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetReferenceTree(), DMPlexSetReferenceTree(), DMPlexSetTree()
External Links
- PETSc Manual:
DMPlex/DMPlexReferenceTreeGetChildSymmetry
PETSc.LibPETSc.DMPlexRefineRegularGetAffineFaceTransforms — Method
Nf::PetscInt,v0::Vector{PetscReal},J::Vector{PetscReal},invJ::Vector{PetscReal},detJ::Vector{PetscReal} = DMPlexRefineRegularGetAffineFaceTransforms(petsclib::PetscLibType,tr::DMPlexTransform, ct::DMPolytopeType)Gets the affine map from the reference face cell to each face in the given cell
Input Parameters:
tr- TheDMPlexTransformobjectct- The cell type
Output Parameters:
Nf- The number of faces for this cell typev0- The translation of the first vertex for each faceJ- The Jacobian for each face (map from original cell to subcell)invJ- The inverse Jacobian for each facedetJ- The determinant of the Jacobian for each face
Level: developer
-seealso: DMPLEX, DM, DMPlexTransform, DMPolytopeType, DMPlexCellRefinerGetAffineTransforms()
External Links
- PETSc Manual:
DMPlex/DMPlexRefineRegularGetAffineFaceTransforms
PETSc.LibPETSc.DMPlexRefineRegularGetAffineTransforms — Method
Nc::PetscInt,v0::Vector{PetscReal},J::Vector{PetscReal},invJ::Vector{PetscReal} = DMPlexRefineRegularGetAffineTransforms(petsclib::PetscLibType,tr::DMPlexTransform, ct::DMPolytopeType)Gets the affine map from the reference cell to each subcell
Input Parameters:
tr- TheDMPlexTransformobjectct- The cell type
Output Parameters:
Nc- The number of subcells produced from this cell typev0- The translation of the first vertex for each subcell, an array of length dim * Nc. PassNULLto ignore.J- The Jacobian for each subcell (map from reference cell to subcell), an array of length dim^2 * Nc. PassNULLto ignore.invJ- The inverse Jacobian for each subcell, an array of length dim^2 * Nc. PassNULLto ignore.
Level: developer
-seealso: DMPLEX, DM, DMPlexTransform, DMPolytopeType, DMPlexRefineRegularGetAffineFaceTransforms(), DMPLEXREFINEREGULAR
External Links
- PETSc Manual:
DMPlex/DMPlexRefineRegularGetAffineTransforms
PETSc.LibPETSc.DMPlexRemapGeometry — Method
DMPlexRemapGeometry(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, func::external)This function maps the original DM coordinates to new coordinates.
Not Collective
Input Parameters:
dm- TheDMtime- The timefunc- The function transforming current coordinates to new coordinates
Calling sequence of func:
dim- The spatial dimensionNf- The number of input fields (here 1)NfAux- The number of input auxiliary fieldsuOff- The offset of the coordinates in u[] (here 0)uOff_x- The offset of the coordinates in u_x[] (here 0)u- The coordinate values at this point in spaceu_t- The coordinate time derivative at this point in space (hereNULL)u_x- The coordinate derivatives at this point in spaceaOff- The offset of each auxiliary field in u[]aOff_x- The offset of each auxiliary field in u_x[]a- The auxiliary field values at this point in spacea_t- The auxiliary field time derivative at this point in space (orNULL)a_x- The auxiliary field derivatives at this point in spacet- The current timex- The coordinates of this point (here not used)numConstants- The number of constantsconstants- The value of each constantf- The new coordinates at this point in space
Level: intermediate
-seealso: DMPLEX, DMGetCoordinates(), DMGetCoordinatesLocal(), DMGetCoordinateDM(), DMProjectFieldLocal(), DMProjectFieldLabelLocal()
External Links
- PETSc Manual:
DMPlex/DMPlexRemapGeometry
PETSc.LibPETSc.DMPlexRemapMigrationSF — Method
DMPlexRemapMigrationSF(petsclib::PetscLibType,sfOverlap::PetscSF, sfMigration::PetscSF, sfMigrationNew::PetscSF)Rewrite the distribution SF to account for overlap
Collective
Input Parameters:
sfOverlap- ThePetscSFobject just for the overlapsfMigration- The original distributionPetscSFobject
Output Parameters:
sfMigrationNew- A rewrittenPetscSFobject that incorporates the overlap
Level: developer
-seealso: DMPLEX, DM, DMPlexDistribute(), DMPlexDistributeOverlap(), DMPlexGetOverlap()
External Links
- PETSc Manual:
DMPlex/DMPlexRemapMigrationSF
PETSc.LibPETSc.DMPlexReorderCell — Method
DMPlexReorderCell(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, cone::Vector{PetscInt})Flips cell orientations since DMPLEX stores some of them internally with outward normals.
Input Parameters:
dm- TheDMPLEXobjectcell- The cellcone- The incoming cone
Output Parameter:
cone- The reordered cone (in-place)
Level: developer
-seealso: , DM, DMPLEX, DMPolytopeType, DMPlexGenerate()
External Links
- PETSc Manual:
DMPlex/DMPlexReorderCell
PETSc.LibPETSc.DMPlexReorderCohesiveSupports — Method
DMPlexReorderCohesiveSupports(petsclib::PetscLibType,dm::PetscDM)Ensure that face supports for cohesive end caps are ordered
Not Collective
Input Parameter:
dm- TheDMcontaining cohesive cells
Level: developer
-seealso: DMPlexConstructCohesiveCells(), DMPlexCreateCohesiveSubmesh()
External Links
- PETSc Manual:
DMPlex/DMPlexReorderCohesiveSupports
PETSc.LibPETSc.DMPlexReorderGetDefault — Method
DMPlexReorderGetDefault(petsclib::PetscLibType,dm::PetscDM, reorder::DMReorderDefaultFlag)Get flag indicating whether the DM should be reordered by default
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
reorder- Flag for reordering
Level: intermediate
-seealso: DMPlexReorderSetDefault()
External Links
- PETSc Manual:
DMPlex/DMPlexReorderGetDefault
PETSc.LibPETSc.DMPlexReorderSetDefault — Method
DMPlexReorderSetDefault(petsclib::PetscLibType,dm::PetscDM, reorder::DMReorderDefaultFlag)Set flag indicating whether the DM should be reordered by default
Logically Collective
Input Parameters:
dm- TheDMreorder- Flag for reordering
Level: intermediate
-seealso: DMPlexReorderGetDefault()
External Links
- PETSc Manual:
DMPlex/DMPlexReorderSetDefault
PETSc.LibPETSc.DMPlexRestoreCellCoordinates — Method
isDG::PetscBool,Nc::PetscInt,array::Vector{PetscScalar},coords::Vector{PetscScalar} = DMPlexRestoreCellCoordinates(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt)Get coordinates for a cell, taking into account periodicity
Not Collective
Input Parameters:
dm- TheDMPLEXcell- The cell number
Output Parameters:
isDG- Using cellwise coordinatesNc- The number of coordinatesarray- The coordinate arraycoords- The cell coordinates
Level: developer
-seealso: DMPLEX, DMPlexGetCellCoordinates(), DMGetCoordinatesLocal(), DMGetCellCoordinatesLocal()
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreCellCoordinates
PETSc.LibPETSc.DMPlexRestoreCellFields — Method
u::Vector{PetscScalar},u_t::Vector{PetscScalar},a::Vector{PetscScalar} = DMPlexRestoreCellFields(petsclib::PetscLibType,dm::PetscDM, cellIS::IS, locX::PetscVec, locX_t::PetscVec, locA::PetscVec)Restore the field values values for a chunk of cells
Input Parameters:
dm- TheDMcellIS- The cells to includelocX- A local vector with the solution fieldslocX_t- A local vector with solution field time derivatives, orNULLlocA- A local vector with auxiliary fields, orNULL
Output Parameters:
u- The field coefficientsu_t- The fields derivative coefficientsa- The auxiliary field coefficients
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetFaceFields()
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreCellFields
PETSc.LibPETSc.DMPlexRestoreClosureIndices — Method
numIndices::PetscInt,indices::Vector{PetscInt},outOffsets::Vector{PetscInt},values::Vector{PetscScalar} = DMPlexRestoreClosureIndices(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, idxSection::PetscSection, point::PetscInt, useClPerm::PetscBool)Restores the global dof indices associated with the closure of the given point within the provided sections.
Not collective
Input Parameters:
dm- TheDMsection- ThePetscSectiondescribing the points (a local section)idxSection- ThePetscSectionfrom which to obtain indices (may be local or global)point- The point defining the closureuseClPerm- Use the closure point permutation if available
Output Parameters:
numIndices- The number of dof indices in the closure of point with the input sectionsindices- The dof indicesoutOffsets- Array to write the field offsets into, orNULLvalues- The input values, which may be modified if sign flips are induced by the point symmetries, orNULL
Level: advanced
-seealso: , DM, DMPLEX, DMPlexGetClosureIndices(), DMPlexVecGetClosure(), DMPlexMatSetClosure(), DMGetLocalSection(), DMGetGlobalSection()
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreClosureIndices
PETSc.LibPETSc.DMPlexRestoreCompressedClosure — Method
numPoints::PetscInt = DMPlexRestoreCompressedClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, point::PetscInt, points::PetscInt, clSec::PetscSection, clPoints::IS, clp::PetscInt)External Links
- PETSc Manual:
DMPlex/DMPlexRestoreCompressedClosure
PETSc.LibPETSc.DMPlexRestoreConeRecursive — Method
depth::PetscInt = DMPlexRestoreConeRecursive(petsclib::PetscLibType,dm::PetscDM, points::IS, expandedPoints::Vector{IS}, sections::Vector{PetscSection})Deallocates arrays created by DMPlexGetConeRecursive()
Not Collective
Input Parameters:
dm- TheDMPLEXpoints- TheISof points, which must lie in the chart set withDMPlexSetChart()
Output Parameters:
depth- (optional) Size of the output arrays, equal toDMPLEXdepth, returned byDMPlexGetDepth()expandedPoints- (optional) An array of recursively expanded conessections- (optional) An array of sections which describe mappings from points to their cone points
Level: advanced
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeTuple(), DMPlexGetConeRecursive(), DMPlexGetConeRecursiveVertices(), DMPlexGetDepth(), IS, PetscSection
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreConeRecursive
PETSc.LibPETSc.DMPlexRestoreFaceFields — Method
Nface::PetscInt,uL::Vector{PetscScalar},uR::Vector{PetscScalar} = DMPlexRestoreFaceFields(petsclib::PetscLibType,dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, locX::PetscVec, locX_t::PetscVec, faceGeometry::PetscVec, cellGeometry::PetscVec, locGrad::PetscVec)Restore the field values values for a chunk of faces
Input Parameters:
dm- TheDMfStart- The first face to includefEnd- The first face to excludelocX- A local vector with the solution fieldslocX_t- A local vector with solution field time derivatives, orNULLfaceGeometry- A local vector with face geometrycellGeometry- A local vector with cell geometrylocGrad- A local vector with field gradients, orNULL
Output Parameters:
Nface- The number of faces with field valuesuL- The field values at the left side of the faceuR- The field values at the right side of the face
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetFaceFields()
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreFaceFields
PETSc.LibPETSc.DMPlexRestoreFaceGeometry — Method
Nface::PetscInt,vol::Vector{PetscReal} = DMPlexRestoreFaceGeometry(petsclib::PetscLibType,dm::PetscDM, fStart::PetscInt, fEnd::PetscInt, faceGeometry::PetscVec, cellGeometry::PetscVec, fgeom::Vector{PetscFVFaceGeom})Restore the field values values for a chunk of faces
Input Parameters:
dm- TheDMfStart- The first face to includefEnd- The first face to excludefaceGeometry- A local vector with face geometrycellGeometry- A local vector with cell geometry
Output Parameters:
Nface- The number of faces with field valuesfgeom- The face centroid and normalsvol- The cell volumes
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetFaceFields()
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreFaceGeometry
PETSc.LibPETSc.DMPlexRestoreGeomBodyMassProperties — Method
volume::PetscScalar,surfArea::PetscScalar,COGsize::PetscInt,IMCOGsize::PetscInt = DMPlexRestoreGeomBodyMassProperties(petsclib::PetscLibType,dm::PetscDM, body::PetscGeom, centerOfGravity::PetscScalar, inertiaMatrixCOG::PetscScalar)External Links
- PETSc Manual:
DMPlex/DMPlexRestoreGeomBodyMassProperties
PETSc.LibPETSc.DMPlexRestoreGeomCntrlPntAndWeightData — Method
cpCoordDataLength::PetscInt,maxNumEquiv::PetscInt,wDataLength::PetscInt = DMPlexRestoreGeomCntrlPntAndWeightData(petsclib::PetscLibType,dm::PetscDM, cpHashTable::PetscHMapI, cpCoordData::PetscScalar, cpEquiv::PetscMat, wHashTable::PetscHMapI, wData::PetscScalar)External Links
- PETSc Manual:
DMPlex/DMPlexRestoreGeomCntrlPntAndWeightData
PETSc.LibPETSc.DMPlexRestoreGeomGradData — Method
cpArraySize::PetscInt,wArraySize::PetscInt = DMPlexRestoreGeomGradData(petsclib::PetscLibType,dm::PetscDM, cpSurfGradHashTable::PetscHMapI, cpSurfGrad::PetscMat, gradSACP::PetscScalar, gradVolCP::PetscScalar, gradSAW::PetscScalar, gradVolW::PetscScalar)External Links
- PETSc Manual:
DMPlex/DMPlexRestoreGeomGradData
PETSc.LibPETSc.DMPlexRestoreJoin — Method
numCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexRestoreJoin(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt})Restore an array for the join of the set of points obtained with DMPlexGetJoin()
Not Collective
Input Parameters:
dm- TheDMPLEXobjectnumPoints- The number of input points for the joinpoints- The input points
Output Parameters:
numCoveredPoints- The number of points in the joincoveredPoints- The points in the join
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetJoin(), DMPlexGetFullJoin(), DMPlexGetMeet()
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreJoin
PETSc.LibPETSc.DMPlexRestoreMeet — Method
numCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexRestoreMeet(petsclib::PetscLibType,dm::PetscDM, numPoints::PetscInt, points::Vector{PetscInt})Restore an array for the meet of the set of points obtained with DMPlexGetMeet()
Not Collective
Input Parameters:
dm- TheDMPLEXobjectnumPoints- The number of input points for the meetpoints- The input points
Output Parameters:
numCoveredPoints- The number of points in the meetcoveredPoints- The points in the meet
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetMeet(), DMPlexGetFullMeet(), DMPlexGetJoin()
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreMeet
PETSc.LibPETSc.DMPlexRestoreOrientedCone — Method
DMPlexRestoreOrientedCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, cone::Vector{PetscInt}, ornt::Vector{PetscInt})Restore the points and orientations on the in
Not Collective
Input Parameters:
dm- The DMPlexp- The point, which must lie in the chart set withDMPlexSetChart()cone- An array of points which are on the in-edges for point pornt- An array of orientations which are on the in-edges for pointp. An orientation is an
integer giving the prescription for cone traversal.
Level: beginner
-seealso: , DM, DMPLEX, DMPlexGetOrientedCone(), DMPlexGetConeSize(), DMPlexGetCone(), DMPlexGetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreOrientedCone
PETSc.LibPETSc.DMPlexRestoreTransitiveClosure — Method
DMPlexRestoreTransitiveClosure(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, useCone::PetscBool, numPoints::PetscInt, points::Vector{PetscInt})Restore the array of points on the transitive closure of the in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The mesh pointuseCone-PETSC_TRUEfor the closure, otherwise return the starnumPoints- The number of points in the closure, so points[] is of size 2*numPointspoints- The points and point orientations, interleaved as pairs [p0, o0, p1, o1, ...]
Level: beginner
-seealso: , DM, DMPLEX, DMPlexGetTransitiveClosure(), DMPlexCreate(), DMPlexSetCone(), DMPlexSetChart(), DMPlexGetCone()
External Links
- PETSc Manual:
DMPlex/DMPlexRestoreTransitiveClosure
PETSc.LibPETSc.DMPlexSNESComputeBoundaryFEM — Method
DMPlexSNESComputeBoundaryFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, user::Cvoid)Form the boundary values for the local input X
Input Parameters:
dm- The meshuser- The user context
Output Parameter:
X- Local solution
Level: developer
-seealso: , DM, DMPLEX, DMPlexComputeJacobianAction()
External Links
- PETSc Manual:
Snes/DMPlexSNESComputeBoundaryFEM
PETSc.LibPETSc.DMPlexSNESComputeJacobianFEM — Method
DMPlexSNESComputeJacobianFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, Jac::PetscMat, JacP::PetscMat, user::Cvoid)Form the local portion of the Jacobian matrix Jac at the local solution X using pointwise functions specified by the user.
Input Parameters:
dm- TheDMX- Local input vectoruser- The user context
Output Parameters:
Jac- Jacobian matrixJacP- approximate Jacobian from which the preconditioner will be built, oftenJac
Level: developer
External Links
- PETSc Manual:
Snes/DMPlexSNESComputeJacobianFEM
PETSc.LibPETSc.DMPlexSNESComputeObjectiveFEM — Method
obj::PetscReal = DMPlexSNESComputeObjectiveFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, user::Cvoid)Sums the local objectives from the local input X using pointwise functions specified by the user
Input Parameters:
dm- The meshX- Local solutionuser- The user context
Output Parameter:
obj- Local objective value
Level: developer
-seealso: DM, DMPlexSNESComputeResidualFEM()
External Links
- PETSc Manual:
Snes/DMPlexSNESComputeObjectiveFEM
PETSc.LibPETSc.DMPlexSNESComputeResidualCEED — Method
DMPlexSNESComputeResidualCEED(petsclib::PetscLibType,dm::PetscDM, locX::PetscVec, locF::PetscVec, user::Cvoid)External Links
- PETSc Manual:
Snes/DMPlexSNESComputeResidualCEED
PETSc.LibPETSc.DMPlexSNESComputeResidualDS — Method
DMPlexSNESComputeResidualDS(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid)Sums the local residual into vector F from the local input X using all pointwise functions with unique keys in the PetscDS
Input Parameters:
dm- The meshX- Local solutionuser- The user context
Output Parameter:
F- Local output vector
Level: developer
-seealso: , DM, DMPLEX, DMPlexComputeJacobianAction()
External Links
- PETSc Manual:
Snes/DMPlexSNESComputeResidualDS
PETSc.LibPETSc.DMPlexSNESComputeResidualFEM — Method
DMPlexSNESComputeResidualFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, F::PetscVec, user::Cvoid)Sums the local residual into vector F from the local input X using pointwise functions specified by the user
Input Parameters:
dm- The meshX- Local solutionuser- The user context
Output Parameter:
F- Local output vector
Level: developer
-seealso: , DM, DMPLEX, DMSNESComputeJacobianAction()
External Links
- PETSc Manual:
Snes/DMPlexSNESComputeResidualFEM
PETSc.LibPETSc.DMPlexSectionLoad — Method
DMPlexSectionLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, globalToLocalPointSF::PetscSF, globalDofSF::PetscSF, locDofSF::PetscSF)Loads section into a DMPLEX
Collective
Input Parameters:
dm- TheDMthat represents the topologyviewer- ThePetscViewerthat represents the on-disk section (sectionA)sectiondm- TheDMinto which the on-disk section (sectionA) is migrated, can beNULLglobalToLocalPointSF- ThePetscSFreturned byDMPlexTopologyLoad() when loading dm from viewer
Output Parameters:
globalDofSF- ThePetscSFthat migrates any on-diskVecdata associated with sectionA into a globalVecassociated with thesectiondm's global section (NULLif not needed)localDofSF- ThePetscSFthat migrates any on-diskVecdata associated with sectionA into a localVecassociated with thesectiondm's local section (NULLif not needed)
Level: advanced
-seealso: , DM, DMPLEX, DMLoad(), DMPlexTopologyLoad(), DMPlexCoordinatesLoad(), DMPlexLabelsLoad(), DMPlexGlobalVectorLoad(), DMPlexLocalVectorLoad(), PetscSectionLoad(), DMPlexSectionView(), PetscSF, PetscViewer
External Links
- PETSc Manual:
DMPlex/DMPlexSectionLoad
PETSc.LibPETSc.DMPlexSectionView — Method
DMPlexSectionView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM)Saves a section associated with a DMPLEX
Collective
Input Parameters:
dm- TheDMthat contains the topology on which the section to be saved is definedviewer- ThePetscViewerfor savingsectiondm- TheDMthat contains the section to be saved, can beNULL
Level: advanced
-seealso: , DM, DMPLEX, DMView(), DMPlexTopologyView(), DMPlexCoordinatesView(), DMPlexLabelsView(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(), PetscSectionView(), DMPlexSectionLoad(), PetscViewer
External Links
- PETSc Manual:
DMPlex/DMPlexSectionView
PETSc.LibPETSc.DMPlexSetActivePoint — Method
DMPlexSetActivePoint(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)Set the point on which projection is currently working
Not Collective
Input Parameters:
dm- theDMpoint- The mesh point involved in the current projection
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetActivePoint()
External Links
- PETSc Manual:
DMPlex/DMPlexSetActivePoint
PETSc.LibPETSc.DMPlexSetAdjacencyUseAnchors — Method
DMPlexSetAdjacencyUseAnchors(petsclib::PetscLibType,dm::PetscDM, useAnchors::PetscBool)Define adjacency in the mesh using the point
Input Parameters:
dm- TheDMobjectuseAnchors- Flag to use the constraints. If PETSC_TRUE, then constrained points are omitted from DMPlexGetAdjacency(), and their anchor points appear in their place.
Level: intermediate
-seealso: DMPLEX, DMGetAdjacency(), DMSetAdjacency(), DMPlexDistribute(), DMPlexPreallocateOperator(), DMPlexSetAnchors()
External Links
- PETSc Manual:
DMPlex/DMPlexSetAdjacencyUseAnchors
PETSc.LibPETSc.DMPlexSetAdjacencyUser — Method
DMPlexSetAdjacencyUser(petsclib::PetscLibType,dm::PetscDM, user::external, ctx::Cvoid)Define adjacency in the mesh using a user
Input Parameters:
dm- The DM objectuser- The user callback, may beNULL(to clear the callback)ctx- context for callback evaluation, may beNULL
Level: advanced
-seealso: DMPLEX, DMSetAdjacency(), DMPlexDistribute(), DMPlexPreallocateOperator(), DMPlexGetAdjacency(), DMPlexGetAdjacencyUser()
External Links
- PETSc Manual:
DMPlex/DMPlexSetAdjacencyUser
PETSc.LibPETSc.DMPlexSetAnchors — Method
DMPlexSetAnchors(petsclib::PetscLibType,dm::PetscDM, anchorSection::PetscSection, anchorIS::IS)Set the layout of the local anchor (point
Collective
Input Parameters:
dm- TheDMPLEXobjectanchorSection- The section that describes the mapping from constrained points to the anchor points listed in anchorIS.
Must have a local communicator (PETSC_COMM_SELF or derivative).
anchorIS- The list of all anchor points. Must have a local communicator (PETSC_COMM_SELFor derivative).
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetAnchors(), DMGetDefaultConstraints(), DMSetDefaultConstraints()
External Links
- PETSc Manual:
DMPlex/DMPlexSetAnchors
PETSc.LibPETSc.DMPlexSetCellType — Method
DMPlexSetCellType(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, celltype::DMPolytopeType)Set the polytope type of a given cell
Not Collective
Input Parameters:
dm- TheDMPLEXobjectcell- The cellcelltype- The polytope type of the cell
Level: advanced
-seealso: , DM, DMPLEX, DMPlexGetCellTypeLabel(), DMPlexGetDepthLabel(), DMPlexGetDepth(), DMPlexComputeCellTypes(), DMCreateLabel()
External Links
- PETSc Manual:
DMPlex/DMPlexSetCellType
PETSc.LibPETSc.DMPlexSetChart — Method
DMPlexSetChart(petsclib::PetscLibType,dm::PetscDM, pStart::PetscInt, pEnd::PetscInt)Set the interval for all mesh points [pStart, pEnd)
Not Collective
Input Parameters:
dm- TheDMPLEXpStart- The first mesh pointpEnd- The upper bound for mesh points
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexSetChart
PETSc.LibPETSc.DMPlexSetClosurePermutationTensor — Method
DMPlexSetClosurePermutationTensor(petsclib::PetscLibType,dm::PetscDM, point::PetscInt, section::PetscSection)Create a permutation from the default (BFS) point ordering in the closure, to a lexicographic ordering over the tensor product cell (i.e., line, quad, hex, etc.), and set this permutation in the section provided (or the section of the DM).
Input Parameters:
dm- TheDMpoint- Either a cell (highest dim point) or an edge (dim 1 point), orPETSC_DETERMINEsection- ThePetscSectionto reorder, orNULLfor the default section
Example: A typical interpolated single-quad mesh might order points as -seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionSetClosurePermutation(), DMSetGlobalSection()
External Links
- PETSc Manual:
DMPlex/DMPlexSetClosurePermutationTensor
PETSc.LibPETSc.DMPlexSetCone — Method
DMPlexSetCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, cone::Vector{PetscInt})Set the points on the in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()cone- An array of points which are on the in-edges for pointp, its length must have been previously provided withDMPlexSetConeSize()
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp(), DMPlexSetSupport(), DMPlexSetSupportSize()
External Links
- PETSc Manual:
DMPlex/DMPlexSetCone
PETSc.LibPETSc.DMPlexSetConeOrientation — Method
DMPlexSetConeOrientation(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, coneOrientation::Vector{PetscInt})Set the orientations on the in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()coneOrientation- An array of orientations. Its length is given by the result ofDMPlexSetConeSize()
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetConeOrientation(), DMPlexSetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()
External Links
- PETSc Manual:
DMPlex/DMPlexSetConeOrientation
PETSc.LibPETSc.DMPlexSetConeSize — Method
DMPlexSetConeSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, size::PetscInt)Set the number of in
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()size- The cone size for pointp
Level: beginner
-seealso: , DM, DMPLEX, DMPlexSetCone(), DMPlexCreate(), DMPlexGetConeSize(), DMPlexSetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexSetConeSize
PETSc.LibPETSc.DMPlexSetCoordinateMap — Method
DMPlexSetCoordinateMap(petsclib::PetscLibType,dm::PetscDM, coordFunc::PetscPoCintFn)Sets the function used to map coordinates of newly generated mesh points
Logically Collective
Input Parameters:
dm- theDMPLEXcoordFunc- the mapping function
Level: developer
-seealso: DMPLEX, DMSetCoordinates(), DMPlexGetCoordinateMap(), PetscPointFn
External Links
- PETSc Manual:
DMPlex/DMPlexSetCoordinateMap
PETSc.LibPETSc.DMPlexSetGlobalToNaturalSF — Method
DMPlexSetGlobalToNaturalSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF)External Links
- PETSc Manual:
DMPlex/DMPlexSetGlobalToNaturalSF
PETSc.LibPETSc.DMPlexSetInterpolatePreferTensor — Method
DMPlexSetInterpolatePreferTensor(petsclib::PetscLibType,dm::PetscDM, preferTensor::PetscBool)Set the flag to prefer tensor order when interpolating a cell
Logically Collective
Input Parameters:
dm- TheDMPLEXobjectpreferTensor- Flag to prefer tensor order
Level: intermediate
-seealso: DMPlexGetInterpolatePreferTensor(), DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolatedCollective()
External Links
- PETSc Manual:
DMPlex/DMPlexSetInterpolatePreferTensor
PETSc.LibPETSc.DMPlexSetIsoperiodicFaceSF — Method
DMPlexSetIsoperiodicFaceSF(petsclib::PetscLibType,dm::PetscDM, num_face_sfs::PetscInt, face_sfs::PetscSF)Express periodicity from an existing mesh
Logically Collective
Input Parameters:
dm- TheDMPLEXon which to set periodicitynum_face_sfs- Number ofPetscSFs inface_sfsface_sfs- Array ofPetscSFin which roots are (owned) donor faces and leaves are faces that must be matched to a (possibly remote) donor face.
Level: advanced
-seealso: , DMPLEX, DMGetGlobalSection(), DMPlexGetIsoperiodicFaceSF()
External Links
- PETSc Manual:
DMPlex/DMPlexSetIsoperiodicFaceSF
PETSc.LibPETSc.DMPlexSetIsoperiodicFaceTransform — Method
DMPlexSetIsoperiodicFaceTransform(petsclib::PetscLibType,dm::PetscDM, n::PetscInt, t::Vector{PetscScalar})set geometric transform from donor to periodic points
Logically Collective
Input Parameters:
dm-DMPLEXthat has been configured withDMPlexSetIsoperiodicFaceSF()n- Number of transforms in arrayt- Array of 4x4 affine transformation basis.
Level: advanced
-seealso: , DMPLEX, DMGetGlobalSection(), DMPlexSetIsoperiodicFaceSF()
External Links
- PETSc Manual:
DMPlex/DMPlexSetIsoperiodicFaceTransform
PETSc.LibPETSc.DMPlexSetMaxProjectionHeight — Method
DMPlexSetMaxProjectionHeight(petsclib::PetscLibType,dm::PetscDM, height::PetscInt)In DMPlexProjectXXXLocal() functions, the projected values of a basis function's dofs are computed by associating the basis function with one of the mesh points in its transitively-closed support, and evaluating the dual space basis of that point.
Input Parameters:
dm- theDMPLEXobjectheight- the maximum projection height >= 0
Level: advanced
-seealso: , DM, DMPLEX, DMPlexGetMaxProjectionHeight(), DMProjectFunctionLocal(), DMProjectFunctionLabelLocal()
External Links
- PETSc Manual:
DMPlex/DMPlexSetMaxProjectionHeight
PETSc.LibPETSc.DMPlexSetMigrationSF — Method
DMPlexSetMigrationSF(petsclib::PetscLibType,dm::PetscDM, migrationSF::PetscSF)Sets the PetscSF for migrating from a parent DM into this DM
Logically Collective
Input Parameters:
dm- TheDMmigrationSF- ThePetscSF
Level: intermediate
-seealso: , DM, DMPLEX, PetscSF, DMPlexDistribute(), DMPlexDistributeField(), DMPlexCreateMigrationSF(), DMPlexGetMigrationSF()
External Links
- PETSc Manual:
DMPlex/DMPlexSetMigrationSF
PETSc.LibPETSc.DMPlexSetMinRadius — Method
DMPlexSetMinRadius(petsclib::PetscLibType,dm::PetscDM, minradius::PetscReal)Sets the minimum distance from the cell centroid to a face
Logically Collective
Input Parameters:
dm- theDMPLEXminradius- the minimum cell radius
Level: developer
-seealso: DMPLEX, DMSetCoordinates()
External Links
- PETSc Manual:
DMPlex/DMPlexSetMinRadius
PETSc.LibPETSc.DMPlexSetOptionsPrefix — Method
DMPlexSetOptionsPrefix(petsclib::PetscLibType,dm::PetscDM, prefix::String)Sets the prefix used for searching for all DM options in the database.
Logically Collective
Input Parameters:
dm- theDMcontextprefix- the prefix to prepend to all option names
Level: advanced
-seealso: , DM, DMPLEX, SNESSetFromOptions()
External Links
- PETSc Manual:
DMPlex/DMPlexSetOptionsPrefix
PETSc.LibPETSc.DMPlexSetOverlap — Method
DMPlexSetOverlap(petsclib::PetscLibType,dm::PetscDM, dmSrc::PetscDM, overlap::PetscInt)Set the width of the cell overlap
Logically Collective
Input Parameters:
dm- TheDMdmSrc- TheDMthat produced this one, orNULLoverlap- the width of the cell overlap
Level: intermediate
-seealso: DMPLEX, DMPlexGetOverlap(), DMPlexDistribute()
External Links
- PETSc Manual:
DMPlex/DMPlexSetOverlap
PETSc.LibPETSc.DMPlexSetPartitionBalance — Method
DMPlexSetPartitionBalance(petsclib::PetscLibType,dm::PetscDM, flg::PetscBool)Should distribution of the DM attempt to balance the shared point partition?
Input Parameters:
dm- TheDMPLEXobjectflg- Balance the partition?
Level: intermediate
-seealso: DMPLEX, DMPlexDistribute(), DMPlexGetPartitionBalance()
External Links
- PETSc Manual:
DMPlex/DMPlexSetPartitionBalance
PETSc.LibPETSc.DMPlexSetPartitioner — Method
DMPlexSetPartitioner(petsclib::PetscLibType,dm::PetscDM, part::PetscPartitioner)Set the mesh partitioner
logically Collective
Input Parameters:
dm- TheDMpart- The partitioner
Level: developer
-seealso: , DM, DMPLEX, PetscPartitioner,DMPlexDistribute(), DMPlexGetPartitioner(), PetscPartitionerCreate()
External Links
- PETSc Manual:
DMPlex/DMPlexSetPartitioner
PETSc.LibPETSc.DMPlexSetReferenceTree — Method
DMPlexSetReferenceTree(petsclib::PetscLibType,dm::PetscDM, ref::PetscDM)set the reference tree for hierarchically non
Not Collective
Input Parameters:
dm- TheDMPLEXobjectref- The reference treeDMPLEXobject
Level: intermediate
-seealso: , DM, DMPLEX,DMPlexGetReferenceTree(), DMPlexCreateDefaultReferenceTree()
External Links
- PETSc Manual:
DMPlex/DMPlexSetReferenceTree
PETSc.LibPETSc.DMPlexSetRefinementFunction — Method
DMPlexSetRefinementFunction(petsclib::PetscLibType,dm::PetscDM, refinementFunc::external)Set the function giving the maximum cell volume for refinement
Input Parameters:
dm- TheDMrefinementFunc- Function giving the maximum cell volume in the refined mesh
Calling Sequence of refinementFunc:
coords- Coordinates of the current point, usually a cell centroidlimit- The maximum cell volume for a cell containing this point
Level: developer
-seealso: , DM, DMPLEX, DMRefine(), DMPlexGetRefinementFunction(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()
External Links
- PETSc Manual:
DMPlex/DMPlexSetRefinementFunction
PETSc.LibPETSc.DMPlexSetRefinementLimit — Method
DMPlexSetRefinementLimit(petsclib::PetscLibType,dm::PetscDM, refinementLimit::PetscReal)Set the maximum cell volume for refinement
Input Parameters:
dm- TheDMrefinementLimit- The maximum cell volume in the refined mesh
Level: developer
-seealso: , DM, DMPLEX, DMRefine(), DMPlexGetRefinementLimit(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform()
External Links
- PETSc Manual:
DMPlex/DMPlexSetRefinementLimit
PETSc.LibPETSc.DMPlexSetRefinementUniform — Method
DMPlexSetRefinementUniform(petsclib::PetscLibType,dm::PetscDM, refinementUniform::PetscBool)Set the flag for uniform refinement
Input Parameters:
dm- TheDMrefinementUniform- The flag for uniform refinement
Level: developer
-seealso: , DM, DMPLEX, DMRefine(), DMPlexGetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()
External Links
- PETSc Manual:
DMPlex/DMPlexSetRefinementUniform
PETSc.LibPETSc.DMPlexSetRegularRefinement — Method
DMPlexSetRegularRefinement(petsclib::PetscLibType,dm::PetscDM, regular::PetscBool)Set the flag indicating that this mesh was obtained by regular refinement from its coarse mesh
Input Parameters:
dm- TheDMPLEXobjectregular- The flag
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetRegularRefinement()
External Links
- PETSc Manual:
DMPlex/DMPlexSetRegularRefinement
PETSc.LibPETSc.DMPlexSetSNESLocalFEM — Method
DMPlexSetSNESLocalFEM(petsclib::PetscLibType,dm::PetscDM, use_obj::PetscBool, ctx::Cvoid)Use DMPLEX's internal FEM routines to compute SNES boundary values, objective, residual, and Jacobian.
Input Parameters:
dm- TheDMobjectuse_obj- Use the objective function callbackctx- The user context that will be passed to pointwise evaluation routines
Level: developer
-seealso: ,DMPLEX, SNES, PetscDSAddBoundary(), PetscDSSetObjective(), PetscDSSetResidual(), PetscDSSetJacobian()
External Links
- PETSc Manual:
Snes/DMPlexSetSNESLocalFEM
PETSc.LibPETSc.DMPlexSetSNESVariableBounds — Method
DMPlexSetSNESVariableBounds(petsclib::PetscLibType,dm::PetscDM, snes::PetscSNES)Compute upper and lower bounds for the solution using pointsie functions from the PetscDS
Collective
Input Parameters:
dm- TheDMobjectsnes- theSNESobject
Level: intermediate
-seealso: SNESVISetVariableBounds(), SNESVI, , DM
External Links
- PETSc Manual:
Snes/DMPlexSetSNESVariableBounds
PETSc.LibPETSc.DMPlexSetSaveTransform — Method
DMPlexSetSaveTransform(petsclib::PetscLibType,dm::PetscDM, save::PetscBool)External Links
- PETSc Manual:
DMPlex/DMPlexSetSaveTransform
PETSc.LibPETSc.DMPlexSetScale — Method
DMPlexSetScale(petsclib::PetscLibType,dm::PetscDM, unit::PetscUnit, scale::PetscReal)Set the scale for the specified fundamental unit
Not Collective
Input Parameters:
dm- theDMunit- The SI unitscale- The value used to scale all quantities with this unit
Level: advanced
-seealso: , DM, DMPLEX, DMPlexGetScale(), PetscUnit
External Links
- PETSc Manual:
DMPlex/DMPlexSetScale
PETSc.LibPETSc.DMPlexSetSubpointMap — Method
DMPlexSetSubpointMap(petsclib::PetscLibType,dm::PetscDM, subpointMap::DMLabel)Sets the DMLabel with point dimension as values
Input Parameters:
dm- The submeshDMsubpointMap- TheDMLabelof all the points from the original mesh in this submesh
Level: developer
-seealso: , DM, DMPLEX, DMPlexCreateSubmesh(), DMPlexGetSubpointIS()
External Links
- PETSc Manual:
DMPlex/DMPlexSetSubpointMap
PETSc.LibPETSc.DMPlexSetSupport — Method
DMPlexSetSupport(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, support::Vector{PetscInt})Set the points on the out
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()support- An array of points which are on the out-edges for pointp, its length is that obtained fromDMPlexGetSupportSize()
Level: beginner
-seealso: , DM, DMPLEX, DMPlexSetCone(), DMPlexSetConeSize(), DMPlexCreate(), DMPlexGetSupport(), DMPlexSetChart(), DMPlexSetSupportSize(), DMSetUp()
External Links
- PETSc Manual:
DMPlex/DMPlexSetSupport
PETSc.LibPETSc.DMPlexSetSupportSize — Method
DMPlexSetSupportSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, size::PetscInt)Set the number of out
Not Collective
Input Parameters:
dm- TheDMPLEXp- The point, which must lie in the chart set withDMPlexSetChart()size- The support size for pointp
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetSupportSize(), DMPlexSetChart()
External Links
- PETSc Manual:
DMPlex/DMPlexSetSupportSize
PETSc.LibPETSc.DMPlexSetTransform — Method
DMPlexSetTransform(petsclib::PetscLibType,dm::PetscDM, tr::DMPlexTransform)External Links
- PETSc Manual:
DMPlex/DMPlexSetTransform
PETSc.LibPETSc.DMPlexSetTransformType — Method
DMPlexSetTransformType(petsclib::PetscLibType,dm::PetscDM, type::DMPlexTransformType)Set the transform type for uniform refinement
Input Parameters:
dm- TheDMtype- The transform type for uniform refinement
Level: developer
-seealso: , DM, DMPLEX, DMPlexTransformType, DMRefine(), DMPlexGetTransformType(), DMPlexSetRefinementUniform()
External Links
- PETSc Manual:
DMPlex/DMPlexSetTransformType
PETSc.LibPETSc.DMPlexSetTree — Method
DMPlexSetTree(petsclib::PetscLibType,dm::PetscDM, parentSection::PetscSection, parents::Vector{PetscInt}, childIDs::Vector{PetscInt})set the tree that describes the hierarchy of non the point-to-point constraints determined by the tree: a point is constrained to the points in the closure of its tree root.
Collective
Input Parameters:
dm- theDMPLEXobjectparentSection- a section describing the tree: a point has a parent if it has 1 dof in the section; the section
offset indexes the parent and childID list; the reference count of parentSection is incremented
parents- a list of the point parents; copied, can be destroyedchildIDs- identifies the relationship of the child point to the parent point; if there is a reference tree, then
the child corresponds to the point in the reference tree with index childIDs; copied, can be destroyed
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexGetTree(), DMPlexSetReferenceTree(), DMPlexSetAnchors(), DMPlexGetTreeParent(), DMPlexGetTreeChildren()
External Links
- PETSc Manual:
DMPlex/DMPlexSetTree
PETSc.LibPETSc.DMPlexSetUseMatClosurePermutation — Method
DMPlexSetUseMatClosurePermutation(petsclib::PetscLibType,dm::PetscDM, useClPerm::PetscBool)Set flag for using a closure permutation for matrix insertion
Not collective
Input Parameters:
dm- TheDMuseClPerm- The flag
Level: intermediate
-seealso: DMPlexGetUseMatClosurePermutation()
External Links
- PETSc Manual:
DMPlex/DMPlexSetUseMatClosurePermutation
PETSc.LibPETSc.DMPlexSetVTKCellHeight — Method
DMPlexSetVTKCellHeight(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt)Sets the height in the DAG used to determine which points are cells (normally 0)
Input Parameters:
dm- TheDMPLEXobjectcellHeight- The height of a cell
Level: developer
-seealso: , DM, DMPLEX, DMPlexGetVTKCellHeight()
External Links
- PETSc Manual:
DMPlex/DMPlexSetVTKCellHeight
PETSc.LibPETSc.DMPlexShearGeometry — Method
DMPlexShearGeometry(petsclib::PetscLibType,dm::PetscDM, direction::DMDirection, multipliers::Vector{PetscReal})This shears the domain, meaning adds a multiple of the shear coordinate to all other coordinates.
Not Collective
Input Parameters:
dm- TheDMPLEXdirection- The shear coordinate direction, e.g.DM_Xis the x-axismultipliers- The multiplier m for each direction which is not the shear direction
Level: intermediate
-seealso: DMPLEX, DMPlexRemapGeometry(), DMDirection, DM_X, DM_Y, DM_Z
External Links
- PETSc Manual:
DMPlex/DMPlexShearGeometry
PETSc.LibPETSc.DMPlexStratify — Method
DMPlexStratify(petsclib::PetscLibType,dm::PetscDM)Computes the strata for all points in the DMPLEX
Collective
Input Parameter:
dm- TheDMPLEX
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSymmetrize(), DMPlexComputeCellTypes()
External Links
- PETSc Manual:
DMPlex/DMPlexStratify
PETSc.LibPETSc.DMPlexStratifyMigrationSF — Method
DMPlexStratifyMigrationSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, migrationSF::PetscSF)Rearrange the leaves of a migration sf for stratification.
Input Parameters:
dm- The DMsf- A star forest with non-ordered leaves, usually defining a DM point migration
Output Parameter:
migrationSF- A star forest with added leaf indirection that ensures the resulting DM is stratified
Level: developer
-seealso: DMPLEX, DMPlexPartitionLabelCreateSF(), DMPlexDistribute(), DMPlexDistributeOverlap()
External Links
- PETSc Manual:
DMPlex/DMPlexStratifyMigrationSF
PETSc.LibPETSc.DMPlexSymmetrize — Method
DMPlexSymmetrize(petsclib::PetscLibType,dm::PetscDM)Create support (out
Not Collective
Input Parameter:
dm- TheDMPLEX
Level: beginner
-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetChart(), DMPlexSetConeSize(), DMPlexSetCone()
External Links
- PETSc Manual:
DMPlex/DMPlexSymmetrize
PETSc.LibPETSc.DMPlexTSComputeBoundary — Method
DMPlexTSComputeBoundary(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, locX_t::PetscVec, user::Cvoid)Insert the essential boundary values into the local input locX and/or its time derivative locX_t using pointwise functions specified by the user
Input Parameters:
dm- The meshtime- The timelocX- Local solutionlocX_t- Local solution time derivative, orNULLuser- The user context
Level: developer
-seealso: , DMPLEX, TS, DMPlexComputeJacobianActionFEM()
External Links
- PETSc Manual:
Ts/DMPlexTSComputeBoundary
PETSc.LibPETSc.DMPlexTSComputeIFunctionFEM — Method
DMPlexTSComputeIFunctionFEM(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, locX_t::PetscVec, locF::PetscVec, user::Cvoid)Form the local residual locF from the local input locX using pointwise functions specified by the user
Input Parameters:
dm- The meshtime- The timelocX- Local solutionlocX_t- Local solution time derivative, orNULLuser- The user context
Output Parameter:
locF- Local output vector
Level: developer
-seealso: , DMPLEX, TS, DMPlexTSComputeRHSFunctionFEM()
External Links
- PETSc Manual:
Ts/DMPlexTSComputeIFunctionFEM
PETSc.LibPETSc.DMPlexTSComputeIJacobianFEM — Method
DMPlexTSComputeIJacobianFEM(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, locX_t::PetscVec, X_tShift::PetscReal, Jac::PetscMat, JacP::PetscMat, user::Cvoid)Form the Jacobian Jac from the local input locX using pointwise functions specified by the user
Input Parameters:
dm- The meshtime- The timelocX- Local solutionlocX_t- Local solution time derivative, orNULLX_tShift- The multiplicative parameter for dF/du_tuser- The user context
Output Parameters:
Jac- the JacobianJacP- an additional approximation for the Jacobian to be used to compute the preconditioner (often isJac)
Level: developer
-seealso: , TS, DM, DMPlexTSComputeIFunctionFEM(), DMPlexTSComputeRHSFunctionFEM()
External Links
- PETSc Manual:
Ts/DMPlexTSComputeIJacobianFEM
PETSc.LibPETSc.DMPlexTSComputeRHSFunctionFEM — Method
DMPlexTSComputeRHSFunctionFEM(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, locG::PetscVec, user::Cvoid)Form the local residual locG from the local input locX using pointwise functions specified by the user
Input Parameters:
dm- The meshtime- The timelocX- Local solutionuser- The user context
Output Parameter:
locG- Local output vector
Level: developer
-seealso: , TS, DM, DMPlexTSComputeIFunctionFEM(), DMPlexTSComputeIJacobianFEM()
External Links
- PETSc Manual:
Ts/DMPlexTSComputeRHSFunctionFEM
PETSc.LibPETSc.DMPlexTSComputeRHSFunctionFVM — Method
DMPlexTSComputeRHSFunctionFVM(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, F::PetscVec, user::Cvoid)Form the forcing F from the local input locX using pointwise functions specified by the user
Input Parameters:
dm- The meshtime- The timelocX- Local solutionuser- The user context
Output Parameter:
F- Global output vector
Level: developer
-seealso: , DMPLEX, TS, DMPlexComputeJacobianActionFEM()
External Links
- PETSc Manual:
Ts/DMPlexTSComputeRHSFunctionFVM
PETSc.LibPETSc.DMPlexTSComputeRHSFunctionFVMCEED — Method
DMPlexTSComputeRHSFunctionFVMCEED(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, locX::PetscVec, F::PetscVec, user::Cvoid)External Links
- PETSc Manual:
Ts/DMPlexTSComputeRHSFunctionFVMCEED
PETSc.LibPETSc.DMPlexTetgenSetOptions — Method
DMPlexTetgenSetOptions(petsclib::PetscLibType,dm::PetscDM, opts::String)Set the options used for the Tetgen mesh generator
Not Collective
Input Parameters:
dm- TheDMPLEXobjectopts- The command line options
Level: developer
-seealso: , DM, DMPLEX, DMPlexTriangleSetOptions(), DMPlexGenerate()
External Links
- PETSc Manual:
DMPlex/DMPlexTetgenSetOptions
PETSc.LibPETSc.DMPlexTopologyLoad — Method
DMPlexTopologyLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF)Loads a topology into a DMPLEX
Collective
Input Parameters:
dm- TheDMinto which the topology is loadedviewer- ThePetscViewerfor the saved topology
Output Parameter:
globalToLocalPointSF- ThePetscSFthat pushes points in [0, N) to the associated points in the loadedDMPLEX, where N is the global number of points;
NULL if unneeded
Level: advanced
-seealso: , DM, DMPLEX, DMLoad(), DMPlexCoordinatesLoad(), DMPlexLabelsLoad(), DMView(), PetscViewerHDF5Open(), PetscViewerPushFormat(), PetscViewer, PetscSF
External Links
- PETSc Manual:
DMPlex/DMPlexTopologyLoad
PETSc.LibPETSc.DMPlexTopologyView — Method
DMPlexTopologyView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer)Saves a DMPLEX topology into a file
Collective
Input Parameters:
dm- TheDMwhose topology is to be savedviewer- ThePetscViewerto save it in
Level: advanced
-seealso: , DM, DMPLEX, DMView(), DMPlexCoordinatesView(), DMPlexLabelsView(), DMPlexTopologyLoad(), PetscViewer
External Links
- PETSc Manual:
DMPlex/DMPlexTopologyView
PETSc.LibPETSc.DMPlexTransferVecTree — Method
DMPlexTransferVecTree(petsclib::PetscLibType,dmIn::PetscDM, vecIn::PetscVec, dmOut::PetscDM, vecOut::PetscVec, sfRefine::PetscSF, sfCoarsen::PetscSF, cidsRefine::PetscInt, cidsCoarsen::PetscInt, useBCs::PetscBool, time::PetscReal)transfer a vector between two meshes that differ from each other by refinement/coarsening that can be represented by a common reference tree used by both. This routine can be used for a combination of coarsening and refinement at the same time.
Collective
Input Parameters:
dmIn- TheDMPLEXmesh for the input vectordmOut- The secondDMPLEXmeshvecIn- The input vectorsfRefine- A star forest indicating points in the meshdmIn(roots in the star forest) that are parents to points in
the mesh dmOut (leaves in the star forest), i.e. where dmOut is more refined than dmIn
sfCoarsen- A star forest indicating points in the meshdmOut(roots in the star forest) that are parents to points in
the mesh dmIn (leaves in the star forest), i.e. where dmOut is more coarsened than dmIn
cidsRefine- The childIds of the points indmOut. These childIds relate back to the reference tree: childid[j] = k implies
that mesh point j of dmOut was refined from a point in dmIn just as the mesh point k in the reference tree was refined from its parent. childid[j] = -1 indicates that the point j in dmOut is exactly equivalent to its root in dmIn, so no interpolation is necessary. childid[j] = -2 indicates that this point j in dmOut is not a leaf of sfRefine.
cidsCoarsen- The childIds of the points indmIn. These childIds relate back to the reference tree: childid[j] = k implies
that mesh point j of dmIn coarsens to a point in dmOut just as the mesh point k in the reference tree coarsens to its parent. childid[j] = -2 indicates that point j in dmOut is not a leaf in sfCoarsen.
useBCs-PETSC_TRUEindicates that boundary values should be inserted intovecInbefore transfer.time- Used if boundary values are time dependent.
Output Parameter:
vecOut- Using interpolation and injection operators calculated on the reference tree, the transferred
projection of vecIn from dmIn to dmOut. Note that any field discretized with a PetscFV finite volume method that uses gradient reconstruction will use reconstructed gradients when interpolating from coarse points to fine points.
Level: developer
-seealso: , DM, DMPLEX, PetscSF, Vec, PetscFV, DMPlexSetReferenceTree(), DMPlexGetReferenceTree(), PetscFVGetComputeGradients()
External Links
- PETSc Manual:
DMPlex/DMPlexTransferVecTree
PETSc.LibPETSc.DMPlexTreeRefineCell — Method
DMPlexTreeRefineCell(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, ncdm::PetscDM)External Links
- PETSc Manual:
DMPlex/DMPlexTreeRefineCell
PETSc.LibPETSc.DMPlexTriangleSetOptions — Method
DMPlexTriangleSetOptions(petsclib::PetscLibType,dm::PetscDM, opts::String)Set the options used for the Triangle mesh generator
Not Collective
Input Parameters:
dm- TheDMPLEXobjectopts- The command line options
Level: developer
-seealso: , DM, DMPLEX, DMPlexTetgenSetOptions(), DMPlexGenerate()
External Links
- PETSc Manual:
DMPlex/DMPlexTriangleSetOptions
PETSc.LibPETSc.DMPlexUninterpolate — Method
DMPlexUninterpolate(petsclib::PetscLibType,dm::PetscDM, dmUnint::PetscDM)Take in a mesh with all intermediate faces, edges, etc. and return a cell
Collective
Input Parameter:
dm- The completeDMPLEXobject
Output Parameter:
dmUnint- TheDMPLEXobject with only cells and vertices
Level: intermediate
-seealso: DMPLEX, DMPlexInterpolate(), DMPlexCreateFromCellListPetsc(), DMPlexCopyCoordinates()
External Links
- PETSc Manual:
DMPlex/DMPlexUninterpolate
PETSc.LibPETSc.DMPlexVTKWriteAll — Method
DMPlexVTKWriteAll(petsclib::PetscLibType,odm::PetscObject, viewer::PetscViewer)Write a file containing all the fields that have been provided to the viewer
Collective
Input Parameters:
odm- TheDMPLEXspecifying the mesh, passed as aPetscObjectviewer- viewer of typePETSCVIEWERVTK
Level: developer
-seealso: , DM, PETSCVIEWEREXODUSII, DMPLEX, PETSCVIEWERVTK
External Links
- PETSc Manual:
DMPlex/DMPlexVTKWriteAll
PETSc.LibPETSc.DMPlexVecGetClosure — Method
csize::PetscInt,values::Vector{PetscScalar} = DMPlexVecGetClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, v::PetscVec, point::PetscInt)Get an array of the values on the closure of 'point'
Not collective
Input Parameters:
dm- TheDMsection- The section describing the layout inv, orNULLto use the default sectionv- The local vectorpoint- The point in theDM
Input/Output Parameters:
csize- The size of the input values array, orNULL; on output the number of values in the closurevalues- An array to use for the values, or *values =NULLto have it allocated automatically;
if the user provided NULL, it is a borrowed array and should not be freed, use DMPlexVecRestoreClosure() to return it
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexVecRestoreClosure(), DMPlexVecSetClosure(), DMPlexMatSetClosure()
External Links
- PETSc Manual:
DMPlex/DMPlexVecGetClosure
PETSc.LibPETSc.DMPlexVecGetOrientedClosure — Method
csize::PetscInt,values::Vector{PetscScalar} = DMPlexVecGetOrientedClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, useClPerm::PetscBool, v::PetscVec, point::PetscInt, ornt::PetscInt)Get an array of the values on the closure of 'point' with a given orientation, optionally applying the closure permutation.
Not collective
Input Parameters:
dm- TheDMsection- The section describing the layout inv, orNULLto use the default sectionuseClPerm- Flag for whether the provided closure permutation should be applied to the valuesv- The local vectorpoint- The point in theDMornt- The orientation of the cell, an integer giving the prescription for cone traversal. Typically, this will be 0.
Input/Output Parameters:
csize- The size of the input values array, orNULL; on output the number of values in the closurevalues- An array to use for the values, or *values =NULLto have it allocated automatically;
if the user provided NULL, it is a borrowed array and should not be freed, use DMPlexVecRestoreClosure() to return it
Level: advanced
-seealso: , DM, DMPLEX, DMPlexVecGetClosure(), DMPlexGetCellCoordinates(), DMPlexVecRestoreClosure(), DMPlexVecSetClosure()
External Links
- PETSc Manual:
DMPlex/DMPlexVecGetOrientedClosure
PETSc.LibPETSc.DMPlexVecRestoreClosure — Method
DMPlexVecRestoreClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, v::PetscVec, point::PetscInt, csize::PetscInt, values::Vector{PetscScalar})Restore the array of the values on the closure of 'point' obtained with DMPlexVecGetClosure()
Not collective
Input Parameters:
dm- TheDMsection- The section describing the layout inv, orNULLto use the default sectionv- The local vectorpoint- The point in theDMcsize- The number of values in the closure, orNULLvalues- The array of values
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexVecGetClosure(), DMPlexVecSetClosure(), DMPlexMatSetClosure()
External Links
- PETSc Manual:
DMPlex/DMPlexVecRestoreClosure
PETSc.LibPETSc.DMPlexVecSetClosure — Method
DMPlexVecSetClosure(petsclib::PetscLibType,dm::PetscDM, section::PetscSection, v::PetscVec, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode)Set an array of the values on the closure of point
Not collective
Input Parameters:
dm- TheDMsection- The section describing the layout inv, orNULLto use the default sectionv- The local vectorpoint- The point in theDMvalues- The array of valuesmode- The insert mode. One ofINSERT_ALL_VALUES,ADD_ALL_VALUES,INSERT_VALUES,ADD_VALUES,INSERT_BC_VALUES, andADD_BC_VALUES,
where INSERT_ALL_VALUES and ADD_ALL_VALUES also overwrite boundary conditions.
Level: intermediate
-seealso: , DM, DMPLEX, DMPlexVecGetClosure(), DMPlexMatSetClosure()
External Links
- PETSc Manual:
DMPlex/DMPlexVecSetClosure
PETSc.LibPETSc.DMPlexVecView1D — Method
DMPlexVecView1D(petsclib::PetscLibType,dm::PetscDM, n::PetscInt, u::Vector{PetscVec}, viewer::PetscViewer)Plot many 1D solutions on the same line graph
Collective
Input Parameters:
dm- TheDMPLEXobjectn- The number of vectorsu- The array of local vectorsviewer- ThePetscViewer
Level: advanced
-seealso: , DM, DMPLEX, VecViewFromOptions(), VecView()
External Links
- PETSc Manual:
DMPlex/DMPlexVecView1D