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.DMPlexBuildCoordinatesFromCellListMethod
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 - The DM
  • spaceDim - The spatial dimension used for coordinates
  • vertexCoords - An array of numVertices*spaceDim numbers, the coordinates of each vertex

Level: advanced

-seealso: , DM, DMPLEX, DMPlexBuildCoordinatesFromCellListParallel(), DMPlexCreateFromCellListPetsc(), DMPlexBuildFromCellList()

External Links

source
PETSc.LibPETSc.DMPlexBuildCoordinatesFromCellListParallelMethod
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 - The DM
  • spaceDim - The spatial dimension used for coordinates
  • sfVert - PetscSF describing complete vertex ownership
  • vertexCoords - An array of numVertices*spaceDim numbers, the coordinates of each vertex

Level: advanced

-seealso: , DM, DMPLEX, DMPlexBuildCoordinatesFromCellList(), DMPlexCreateFromCellListParallelPetsc(), DMPlexBuildFromCellListParallel()

External Links

source
PETSc.LibPETSc.DMPlexBuildFromCellListMethod
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 - The DM
  • numCells - The number of cells owned by this process
  • numVertices - The number of vertices owned by this process, or PETSC_DETERMINE
  • numCorners - The number of vertices for each cell
  • cells - An array of numCells x numCorners numbers, the global vertex numbers for each cell

Level: advanced

-seealso: , DM, DMPLEX, DMPlexBuildFromCellListParallel(), DMPlexBuildCoordinatesFromCellList(), DMPlexCreateFromCellListPetsc()

External Links

source
PETSc.LibPETSc.DMPlexBuildFromCellListParallelMethod
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 - The DM
  • numCells - The number of cells owned by this process
  • numVertices - The number of vertices to be owned by this process, or PETSC_DECIDE
  • NVertices - The global number of vertices, or PETSC_DETERMINE
  • numCorners - The number of vertices for each cell
  • cells - An array of numCells imes numCorners numbers, the global vertex numbers for each cell

Output Parameters:

  • vertexSF - (Optional) PetscSF describing complete vertex ownership
  • verticesAdjSaved - (Optional) vertex adjacency array

Level: advanced

-seealso: , DM, DMPLEX, DMPlexBuildFromCellList(), DMPlexCreateFromCellListParallelPetsc(), DMPlexBuildCoordinatesFromCellListParallel(), PetscSF

External Links

source
PETSc.LibPETSc.DMPlexBuildFromCellSectionParallelMethod
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 - The DM
  • numCells - The number of cells owned by this process
  • numVertices - The number of vertices to be owned by this process, or PETSC_DECIDE
  • NVertices - The global number of vertices, or PETSC_DETERMINE
  • cellSection - The PetscSection giving 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) PetscSF describing complete vertex ownership
  • verticesAdjSaved - (Optional) vertex adjacency array

Level: advanced

-seealso: , DM, DMPLEX, DMPlexBuildFromCellListParallel(), DMPlexCreateFromCellSectionParallel(), DMPlexBuildCoordinatesFromCellListParallel(), PetscSF

External Links

source
PETSc.LibPETSc.DMPlexCheckMethod
DMPlexCheck(petsclib::PetscLibType,dm::PetscDM)

Perform various checks of DMPLEX sanity

Input Parameter:

  • dm - The DMPLEX object

Level: developer

-seealso: , DM, DMPLEX, DMCreate(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckCellShapeMethod
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 - The DMPLEX object
  • output - If true, statistics will be displayed on stdout
  • condLimit - Display all cells above this condition number, or PETSC_DETERMINE for no cell output

Level: developer

-seealso: , DM, DMPLEX, DMSetFromOptions(), DMPlexComputeOrthogonalQuality()

External Links

source
PETSc.LibPETSc.DMPlexCheckFacesMethod
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 - The DMPLEX object
  • cellHeight - Normally 0

Level: developer

-seealso: , DM, DMPLEX, DMCreate(), DMPlexGetVTKCellHeight(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckOrphanVerticesMethod
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 - The DMPLEX object

Level: developer

-seealso: , DM, DMPLEX, DMPlexCheck(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckPointSFMethod
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 - The DMPLEX object
  • pointSF - The PetscSF, or NULL for PointSF attached to DM
  • allowExtraRoots - Flag to allow extra points not present in the DM

Level: developer

-seealso: , DM, DMPLEX, DMGetPointSF(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckSkeletonMethod
DMPlexCheckSkeleton(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt)

Check that each cell has the correct number of vertices

Input Parameters:

  • dm - The DMPLEX object
  • cellHeight - Normally 0

Level: developer

-seealso: , DM, DMPLEX, DMCreate(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckSymmetryMethod
DMPlexCheckSymmetry(petsclib::PetscLibType,dm::PetscDM)

Check that the adjacency information in the mesh is symmetric.

Input Parameter:

  • dm - The DMPLEX object

Level: developer

-seealso: , DM, DMPLEX, DMCreate(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexComputeBdJacobianSingleMethod
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 output DM
  • wf - The PetscWeakForm holding forms on this boundary
  • label - The DMLabel indicating what faces should be integrated over
  • numValues - The number of label values
  • values - The array of label values
  • fieldI - The test field for these integrals
  • locX - The local solution
  • locX_t - The time derivative of the local solution, or NULL for time-independent problems
  • t - The time
  • X_tShift - The multiplier for dF/dxdot

Output Parameters:

  • Jac - The local Jacobian
  • JacP - The local Jacobian preconditioner

Level: developer

-seealso: DMPlexComputeBdJacobianSingleByLabel(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeBdJacobianSingleByLabelMethod
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 output DM
  • wf - The PetscWeakForm holding forms on this boundary
  • label - The DMLabel indicating what faces should be integrated over
  • numValues - The number of label values
  • values - The array of label values
  • fieldI - The test field for these integrals
  • facetIS - The IS giving the set of possible faces to integrate over (intersected with the label)
  • locX - The local solution
  • locX_t - The time derivative of the local solution, or NULL for time-independent problems
  • t - The time
  • coordField - The DMField object with coordinates for these faces
  • X_tShift - The multiplier for dF/dxdot

Output Parameters:

  • Jac - The local Jacobian
  • JacP - The local Jacobian preconditioner

Level: developer

-seealso: DMPlexComputeBdJacobianSingle(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeBdResidualSingleMethod
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 output DM
  • wf - The PetscWeakForm holding forms on this boundary
  • key - The PetscFormKey indicating what should be integrated
  • locX - The local solution
  • locX_t - The time derivative of the local solution, or NULL for time-independent problems
  • t - The time

Output Parameter:

  • locF - The local residual

Level: developer

-seealso: DMPlexComputeBdResidualSingleByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeBdResidualSingleByKeyMethod
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 output DM
  • wf - The PetscWeakForm holding forms on this boundary
  • key - The PetscFormKey indicating what should be integrated
  • facetIS - The IS giving a set of faces to integrate over
  • locX - The local solution
  • locX_t - The time derivative of the local solution, or NULL for time-independent problems
  • t - The time
  • coordField - The DMField object with coordinates for these faces

Output Parameter:

  • locF - The local residual

Level: developer

-seealso: DMPlexComputeBdResidualSingle(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeCellGeometryAffineFEMMethod
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 - the DMPLEX
  • cell - 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 element
  • invJ - the inverse of the Jacobian
  • detJ - the Jacobian determinant

Level: advanced

-seealso: DMPLEX, DMPlexComputeCellGeometryFEM(), DMGetCoordinateSection(), DMGetCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexComputeCellGeometryFEMMethod
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 - the DMPLEX
  • cell - the cell
  • quad - the quadrature containing the points in the reference element where the geometry will be evaluated. If quad is NULL, 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

source
PETSc.LibPETSc.DMPlexComputeCellGeometryFVMMethod
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 - the DMPLEX
  • cell - the cell

Output Parameters:

  • vol - the cell volume
  • centroid - the cell centroid
  • normal - the cell normal, if appropriate

Level: advanced

-seealso: DMPLEX, DMGetCoordinateSection(), DMGetCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexComputeCellTypesMethod
DMPlexComputeCellTypes(petsclib::PetscLibType,dm::PetscDM)

Infer the polytope type of every cell using its dimension and cone size.

Collective

Input Parameter:

  • dm - The DMPLEX

Level: developer

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSymmetrize(), DMPlexStratify(), DMGetLabel(), DMCreateLabel()

External Links

source
PETSc.LibPETSc.DMPlexComputeCellwiseIntegralFEMMethod
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 mesh
  • X - Global input vector
  • user - The user context

Output Parameter:

  • F - Cellwise integrals for each field

Level: developer

-seealso: , DM, DMPLEX, DMPlexSNESComputeResidualFEM()

External Links

source
PETSc.LibPETSc.DMPlexComputeClementInterpolantMethod
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 - The DM
  • locX - The coefficient vector u_h

Output Parameter:

  • locC - A Vec which holds the Clement interpolant of the function

Level: developer

-seealso: , DM, DMPLEX, DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeGeometryFVMMethod
DMPlexComputeGeometryFVM(petsclib::PetscLibType,dm::PetscDM, cellgeom::PetscVec, facegeom::PetscVec)

Computes the cell and face geometry for a finite volume method

Input Parameter:

  • dm - The DMPLEX

Output Parameters:

  • cellgeom - A Vec of PetscFVCellGeom data
  • facegeom - A Vec of PetscFVFaceGeom data

Level: developer

-seealso: DMPLEX, PetscFVFaceGeom, PetscFVCellGeom

External Links

source
PETSc.LibPETSc.DMPlexComputeGradientClementInterpolantMethod
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 - The DM
  • locX - The coefficient vector u_h

Output Parameter:

  • locC - A Vec which holds the Clement interpolant of the gradient

Level: developer

-seealso: , DM, DMPLEX, DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeGradientFVMMethod
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 - The DMPLEX
  • fvm - The PetscFV
  • cellGeometry - The face geometry from DMPlexComputeCellGeometryFVM()

Input/Output Parameter:

  • faceGeometry - The face geometry from DMPlexComputeFaceGeometryFVM(); on output

the geometric factors for gradient calculation are inserted

Output Parameter:

  • dmGrad - The DM describing the layout of gradient data

Level: developer

-seealso: DMPLEX, DMPlexGetFaceGeometryFVM(), DMPlexGetCellGeometryFVM()

External Links

source
PETSc.LibPETSc.DMPlexComputeInjectorFEMMethod
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 mesh
  • dmf - The fine mesh
  • user - The user context

Output Parameter:

  • sc - The mapping

Level: developer

-seealso: , DM, DMPLEX, DMPlexComputeInterpolatorNested()

External Links

source
PETSc.LibPETSc.DMPlexComputeIntegralFEMMethod
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 mesh
  • X - Global input vector
  • user - The user context

Output Parameter:

  • integral - Integral for each field

Level: developer

-seealso: , DM, DMPLEX, DMPlexSNESComputeResidualFEM()

External Links

source
PETSc.LibPETSc.DMPlexComputeInterpolatorGeneralMethod
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 mesh
  • dmc - The coarse mesh
  • user - The user context

Output Parameter:

  • In - The interpolation matrix

Level: developer

-seealso: , DM, DMPLEX, DMPlexComputeInterpolatorNested()

External Links

source
PETSc.LibPETSc.DMPlexComputeInterpolatorNestedMethod
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 mesh
  • dmf - The fine mesh
  • isRefined - Flag indicating regular refinement, rather than the same topology
  • user - The user context

Output Parameter:

  • In - The interpolation matrix

Level: developer

-seealso: , DM, DMPLEX, DMPlexComputeInterpolatorGeneral()

External Links

source
PETSc.LibPETSc.DMPlexComputeJacobianActionByKeyMethod
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 output DM
  • key - The PetscFormKey indicating what should be integrated
  • cellIS - The IS give a set of cells to integrate over
  • t - The time
  • X_tShift - The multiplier for the Jacobian with respect to X_t
  • locX - The local solution
  • locX_t - The time derivative of the local solution, or NULL for time-independent problems
  • locY - The local vector acted on by J
  • user - 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

source
PETSc.LibPETSc.DMPlexComputeJacobianByKeyMethod
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 output DM
  • key - The PetscFormKey indicating what should be integrated
  • cellIS - The IS give a set of cells to integrate over
  • t - The time
  • X_tShift - The multiplier for the Jacobian with respect to X_t
  • locX - The local solution
  • locX_t - The time derivative of the local solution, or NULL for time-independent problems
  • user - An optional user context, passed to the pointwise functions

Output Parameters:

  • Jac - The local Jacobian
  • JacP - The local Jacobian preconditioner

Level: developer

-seealso: DMPlexComputeResidualByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeJacobianHybridByKeyMethod
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 output DM
  • key - The PetscFormKey array (left cell, right cell, cohesive cell) indicating what should be integrated
  • cellIS - The IS give a set of cells to integrate over
  • t - The time
  • X_tShift - The multiplier for the Jacobian with respect to X_t
  • locX - The local solution
  • locX_t - The time derivative of the local solution, or NULL for time-independent problems
  • user - An optional user context, passed to the pointwise functions

Output Parameters:

  • Jac - The local Jacobian
  • JacP - The local Jacobian preconditioner

Level: developer

-seealso: DMPlexComputeResidualByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeL2FluxDiffVecMethod
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 global Vec containing the primal solution
  • f - The field number for the potential
  • mu - The global Vec containing the mixed solution
  • mf - The field number for the flux

Output Parameter:

  • eFlux - A global Vec which holds

Level: advanced

-seealso: , DM, DMPLEX, DMPlexComputeL2FluxDiffVecLocal(), DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeL2FluxDiffVecLocalMethod
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 local Vec containing the primal solution
  • f - The field number for the potential
  • lmu - The local Vec containing the mixed solution
  • mf - The field number for the flux

Output Parameter:

  • eFlux - A global Vec which holds

Level: advanced

-seealso: , DM, DMPLEX, DMPlexComputeL2FluxDiffVec(), DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeMassMatrixGeneralMethod
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 mesh
  • dmc - The coarse mesh
  • user - The user context

Output Parameter:

  • mass - The mass matrix

Level: developer

-seealso: , DM, DMPLEX, DMPlexComputeMassMatrixNested(), DMPlexComputeInterpolatorNested(), DMPlexComputeInterpolatorGeneral()

External Links

source
PETSc.LibPETSc.DMPlexComputeMomentsMethod
moments::Vector{PetscReal} = DMPlexComputeMoments(petsclib::PetscLibType,dm::PetscDM, u::PetscVec)

Compute the first three moments for a field

Noncollective

Input Parameters:

  • dm - the DMPLEX
  • u - the field

Output Parameter:

  • moments - the field moments

Level: intermediate

-seealso: DM, DMPLEX, DMSwarmComputeMoments()

External Links

source
PETSc.LibPETSc.DMPlexComputeOrthogonalQualityMethod
DMPlexComputeOrthogonalQuality(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, atol::PetscReal, OrthQual::PetscVec, OrthQualLabel::DMLabel)

Compute cell orthogonal quality below given tolerance.

Collective

Input Parameters:

  • dm - The DMPLEX object
  • fv - Optional PetscFV object for pre-computed cell/face centroid information
  • atol - [0, 1] Absolute tolerance for tagging cells.

Output Parameters:

  • OrthQual - Vec containing orthogonal quality per cell
  • OrthQualLabel - DMLabel tagging cells below atol with DM_ADAPT_REFINE

Options Database Keys:

  • -dm_plex_orthogonal_quality_label_view - view OrthQualLabel if label is requested. Currently only PETSCVIEWERASCII is supported.
  • -dm_plex_orthogonal_quality_vec_view - view OrthQual vector.

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexCheckCellShape(), DMCreateLabel(), PetscFV, DMLabel, Vec

External Links

source
PETSc.LibPETSc.DMPlexComputeProjection2Dto1DMethod
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

source
PETSc.LibPETSc.DMPlexComputeProjection3Dto1DMethod
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

source
PETSc.LibPETSc.DMPlexComputeProjection3Dto2DMethod
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

source
PETSc.LibPETSc.DMPlexComputeResidualByKeyMethod
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 output DM
  • key - The PetscFormKey indicating what should be integrated
  • cellIS - The IS giving a set of cells to integrate over
  • time - The time, or PETSC_MIN_REAL to include implicit terms in a time-independent problems
  • locX - The local solution
  • locX_t - The time derivative of the local solution, or NULL for time-independent problems
  • t - The time
  • user - An optional user context, passed to the pointwise functions

Output Parameter:

  • locF - The local residual

Level: developer

-seealso: DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeResidualHybridByKeyMethod
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 output DM
  • key - The PetscFormKey array (left cell, right cell, cohesive cell) indicating what should be integrated
  • cellIS - The IS give a set of cells to integrate over
  • time - The time, or PETSC_MIN_REAL to include implicit terms in a time-independent problems
  • locX - The local solution
  • locX_t - The time derivative of the local solution, or NULL for time-independent problems
  • t - The time
  • user - An optional user context, passed to the pointwise functions

Output Parameter:

  • locF - The local residual

Level: developer

-seealso: DMPlexComputeResidualByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexConstructCohesiveCellsMethod
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 original DM
  • label - The DMLabel specifying the boundary faces (this could be auto-generated)

Output Parameters:

  • splitLabel - The DMLabel containing the split points, or NULL if no output is desired
  • dmSplit - The new DM

Level: developer

-seealso: , DM, DMPLEX, DMCreate(), DMPlexLabelCohesiveComplete()

External Links

source
PETSc.LibPETSc.DMPlexConstructGhostCellsMethod
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 original DM
  • labelName - The label specifying the boundary faces, or "Face Sets" if this is NULL

Output Parameters:

  • numGhostCells - The number of ghost cells added to the DM
  • dmGhosted - The new DM

Level: developer

-seealso: , DM, DMPLEX, DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCoordinatesLoadMethod
DMPlexCoordinatesLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF)

Loads coordinates into a DMPLEX

Collective

Input Parameters:

  • dm - The DM into which the coordinates are loaded
  • viewer - The PetscViewer for the saved coordinates
  • globalToLocalPointSF - The PetscSF returned by DMPlexTopologyLoad() when loading dm from viewer

Level: advanced

-seealso: , DM, DMPLEX, DMLoad(), DMPlexTopologyLoad(), DMPlexLabelsLoad(), DMView(), PetscViewerHDF5Open(), PetscViewerPushFormat(), PetscSF, PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexCoordinatesToReferenceMethod
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 a PetscDS for the coordinate DM (see DMGetCoordinateDM()) 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 locate
  • realCoords - (numPoints x coordinate dimension) array of coordinates (see DMGetCoordinateDim())

Output Parameter:

  • refCoords - (numPoints x dimension) array of reference coordinates (see DMGetDimension())

Level: intermediate

-seealso: DMPLEX, DMPlexReferenceToCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexCoordinatesViewMethod
DMPlexCoordinatesView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer)

Saves DMPLEX coordinates into a file

Collective

Input Parameters:

  • dm - The DM whose coordinates are to be saved
  • viewer - The PetscViewer for saving

Level: advanced

-seealso: , DM, DMPLEX, DMView(), DMPlexTopologyView(), DMPlexLabelsView(), DMPlexCoordinatesLoad(), PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexCopyCoordinatesMethod
DMPlexCopyCoordinates(petsclib::PetscLibType,dmA::PetscDM, dmB::PetscDM)

Copy coordinates from one mesh to another with the same vertices

Collective

Input Parameter:

  • dmA - The DMPLEX object with initial coordinates

Output Parameter:

  • dmB - The DMPLEX object with copied coordinates

Level: intermediate

-seealso: DMPLEX, DMCopyLabels(), DMGetCoordinates(), DMGetCoordinatesLocal(), DMGetCoordinateDM(), DMGetCoordinateSection()

External Links

source
PETSc.LibPETSc.DMPlexCreateMethod
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 the DMPLEX object

Output Parameter:

  • mesh - The DMPLEX object

Level: beginner

-seealso: , DM, DMPLEX, DMType, DMCreate(), DMSetType()

External Links

source
PETSc.LibPETSc.DMPlexCreateBallMeshMethod
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 the DM object
  • dim - The dimension
  • R - The radius

Output Parameter:

  • dm - The DM object

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

source
PETSc.LibPETSc.DMPlexCreateBasisRotationMethod
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 - The DM
  • alpha - The first Euler angle, and in 2D the only one
  • beta - The second Euler angle
  • gamma - The third Euler angle

Level: developer

-seealso: , DM, DMPLEX, DMPlexGlobalToLocalBasis(), DMPlexLocalToGlobalBasis()

External Links

source
PETSc.LibPETSc.DMPlexCreateBoxMeshMethod
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 the DM object
  • dim - The spatial dimension
  • simplex - PETSC_TRUE for simplices, PETSC_FALSE for tensor cells
  • faces - Number of faces per dimension, or NULL for (1,) in 1D and (2, 2) in 2D and (1, 1, 1) in 3D
  • lower - The lower left corner, or NULL for (0, 0, 0)
  • upper - The upper right corner, or NULL for (1, 1, 1)
  • periodicity - The boundary type for the X,Y,Z direction, or NULL for DM_BOUNDARY_NONE
  • interpolate - Flag to create intermediate mesh pieces (edges, faces)
  • localizationHeight - Flag to localize edges and faces in addition to cells; only significant for periodic meshes
  • sparseLocalize - Flag to localize coordinates only for cells near the periodic boundary; only significant for periodic meshes

Output Parameter:

  • dm - The DM object

Level: beginner

-seealso: , DM, DMPLEX, DMSetFromOptions(), DMPlexCreateFromFile(), DMPlexCreateHexCylinderMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateBoxSurfaceMeshMethod
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 the DM object
  • dim - The spatial dimension of the box, so the resulting mesh is has dimension dim-1
  • faces - Number of faces per dimension, or NULL for (1,) in 1D and (2, 2) in 2D and (1, 1, 1) in 3D
  • lower - The lower left corner, or NULL for (0, 0, 0)
  • upper - The upper right corner, or NULL for (1, 1, 1)
  • interpolate - Flag to create intermediate mesh pieces (edges, faces)

Output Parameter:

  • dm - The DM object

Level: beginner

-seealso: , DM, DMPLEX, DMSetFromOptions(), DMPlexCreateBoxMesh(), DMPlexCreateFromFile(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateCGNSMethod
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 communicator
  • cgid - The CG id associated with a file and obtained using cg_open
  • interpolate - Create faces and edges in the mesh

Output Parameter:

  • dm - The DM object representing the mesh

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexCreateExodus()

External Links

source
PETSc.LibPETSc.DMPlexCreateCGNSFromFileMethod
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 communicator
  • filename - The name of the CGNS file
  • interpolate - Create faces and edges in the mesh

Output Parameter:

  • dm - The DM object representing the mesh

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexCreateCGNS(), DMPlexCreateExodus()

External Links

source
PETSc.LibPETSc.DMPlexCreateCellNumberingMethod
globalCellNumbers::IS = DMPlexCreateCellNumbering(petsclib::PetscLibType,dm::PetscDM, includeAll::PetscBool)

Get a global cell numbering for all cells on this process

Input Parameters:

  • dm - The DMPLEX object
  • includeAll - 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

source
PETSc.LibPETSc.DMPlexCreateClosureIndexMethod
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 - The DM
  • section - 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

source
PETSc.LibPETSc.DMPlexCreateCoarsePointISMethod
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 coarse DM

Output Parameter:

  • fpointIS - The IS of all the fine points which exist in the original coarse mesh

Level: developer

-seealso: , DM, DMPLEX, IS, DMRefine(), DMPlexSetRefinementUniform(), DMPlexGetSubpointIS()

External Links

source
PETSc.LibPETSc.DMPlexCreateCohesiveSubmeshMethod
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 mesh
  • hasLagrange - The mesh has Lagrange unknowns in the cohesive cells
  • label - A label name, or NULL
  • value - A label value

Output Parameter:

  • subdm - The surface mesh

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetSubpointMap(), DMPlexCreateSubmesh()

External Links

source
PETSc.LibPETSc.DMPlexCreateCoordinateSpaceMethod
DMPlexCreateCoordinateSpace(petsclib::PetscLibType,dm::PetscDM, degree::PetscInt, locized::PetscBool, project::PetscBool)

Creates a finite element space for the coordinates

Collective

Input Parameters:

  • dm - The DMPLEX
  • degree - The degree of the finite element or PETSC_DECIDE
  • localized - Flag to create a localized (DG) coordinate space
  • project - Flag to project current coordinates into the space

Level: advanced

-seealso: , DM, DMPLEX, PetscPointFn, PetscFECreateLagrange(), DMGetCoordinateDM(), DMPlexSetCoordinateMap()

External Links

source
PETSc.LibPETSc.DMPlexCreateDefaultReferenceTreeMethod
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 communicator
  • dim - the spatial dimension
  • simplex - Flag for simplex, otherwise use a tensor-product cell

Output Parameter:

  • ref - the reference tree DMPLEX object

Level: intermediate

-seealso: DMPlexSetReferenceTree(), DMPlexGetReferenceTree()

External Links

source
PETSc.LibPETSc.DMPlexCreateDoubletMethod
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 the DM object
  • dim - The spatial dimension
  • simplex - Flag for simplicial cells, otherwise they are tensor product cells
  • interpolate - Flag to create intermediate mesh pieces (edges, faces)
  • refinementLimit - A nonzero number indicates the largest admissible volume for a refined cell

Output Parameter:

  • newdm - The DM object

Level: beginner

-seealso: , DM, DMPLEX, DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateEdgeNumberingMethod
globalEdgeNumbers::IS = DMPlexCreateEdgeNumbering(petsclib::PetscLibType,dm::PetscDM)

Create a global numbering for edges.

Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • globalEdgeNumbers - Global numbers for all edges on this process

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetCellNumbering(), DMPlexGetVertexNumbering(), DMPlexCreatePointNumbering()

External Links

source
PETSc.LibPETSc.DMPlexCreateEphemeralMethod
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 - The DMPlexTransform
  • prefix - An options prefix, or NULL

Output Parameter:

  • dm - The DM

Level: beginner

-seealso: DMPlexCreateFromFile, DMPlexCreateFromDAG(), DMPlexCreateFromCellListPetsc(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateExodusMethod
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 communicator
  • exoid - The ExodusII id associated with a exodus file and obtained using ex_open
  • interpolate - Create faces and edges in the mesh

Output Parameter:

  • dm - The DM object representing the mesh

Level: beginner

-seealso: , DM, PETSCVIEWEREXODUSII, DMPLEX, DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateExodusFromFileMethod
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 communicator
  • filename - The name of the ExodusII file
  • interpolate - Create faces and edges in the mesh

Output Parameter:

  • dm - The DM object representing the mesh

Level: beginner

-seealso: , DM, PETSCVIEWEREXODUSII, DMPLEX, DMCreate(), DMPlexCreateExodus()

External Links

source
PETSc.LibPETSc.DMPlexCreateFluentMethod
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 communicator
  • viewer - The PetscViewer associated with a Fluent mesh file
  • interpolate - Create faces and edges in the mesh

Output Parameter:

  • dm - The DM object representing the mesh

Level: beginner

-seealso: , DM, DMPLEX, DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFluentFromFileMethod
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 communicator
  • filename - Name of the Fluent mesh file
  • interpolate - Create faces and edges in the mesh

Output Parameter:

  • dm - The DM object representing the mesh

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreateFromFile(), DMPlexCreateFluent(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromCellListParallelPetscMethod
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 communicator
  • dim - The topological dimension of the mesh
  • numCells - The number of cells owned by this process
  • numVertices - The number of vertices owned by this process, or PETSC_DECIDE
  • NVertices - The global number of vertices, or PETSC_DECIDE
  • numCorners - The number of vertices for each cell
  • interpolate - Flag indicating that intermediate mesh entities (faces, edges) should be created automatically
  • cells - An array of numCells*numCorners numbers, the global vertex numbers for each cell
  • spaceDim - The spatial dimension used for coordinates
  • vertexCoords - An array of numVertices*spaceDim numbers, the coordinates of each vertex

Output Parameters:

  • dm - The DM
  • vertexSF - (Optional) PetscSF describing complete vertex ownership
  • verticesAdj - (Optional) vertex adjacency array

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexCreateFromCellListPetsc(), DMPlexBuildFromCellListParallel(), DMPlexBuildCoordinatesFromCellListParallel(), DMPlexCreateFromDAG(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromCellListPetscMethod
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 communicator
  • dim - The topological dimension of the mesh
  • numCells - The number of cells, only on process 0
  • numVertices - The number of vertices owned by this process, or PETSC_DECIDE, only on process 0
  • numCorners - The number of vertices for each cell, only on process 0
  • interpolate - Flag indicating that intermediate mesh entities (faces, edges) should be created automatically
  • cells - An array of numCells imes numCorners numbers, the vertices for each cell, only on process 0
  • spaceDim - The spatial dimension used for coordinates
  • vertexCoords - An array of numVertices imes spaceDim numbers, the coordinates of each vertex, only on process 0

Output Parameter:

  • dm - The DM, which only has points on process 0

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexCreateFromCellListParallelPetsc(), DMPlexBuildFromCellList(), DMPlexBuildCoordinatesFromCellList(), DMPlexCreateFromDAG(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromCellSectionParallelMethod
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 communicator
  • dim - The topological dimension of the mesh
  • numCells - The number of cells owned by this process
  • numVertices - The number of vertices owned by this process, or PETSC_DECIDE
  • NVertices - The global number of vertices, or PETSC_DECIDE
  • cellSection - The PetscSection giving the number of vertices for each cell (layout of cells)
  • interpolate - Flag indicating that intermediate mesh entities (faces, edges) should be created automatically
  • cells - An array of the global vertex numbers for each cell
  • spaceDim - The spatial dimension used for coordinates
  • vertexCoords - An array of numVertices*spaceDim numbers, the coordinates of each vertex

Output Parameters:

  • dm - The DM
  • vertexSF - (Optional) PetscSF describing complete vertex ownership
  • verticesAdj - (Optional) vertex adjacency array

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexCreateFromCellListPetsc(), DMPlexBuildFromCellListParallel(), DMPlexBuildCoordinatesFromCellListParallel(), DMPlexCreateFromDAG(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromDAGMethod
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 empty DM object, usually from DMCreate() and DMSetDimension()
  • depth - The depth of the DAG
  • numPoints - Array of size depth + 1 containing the number of points at each depth
  • coneSize - The cone size of each point
  • cones - The concatenation of the cone points for each point, the cone list must be oriented correctly for each point
  • coneOrientations - The orientation of each cone point
  • vertexCoords - An array of numPoints[0] imes spacedim numbers representing the coordinates of each vertex, with spacedim the value set via DMSetCoordinateDim()

Output Parameter:

  • dm - The DM

Level: advanced

-seealso: , DM, DMPLEX, DMPlexCreateFromCellListPetsc(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromFileMethod
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 communicator
  • filename - A file name
  • plexname - The object name of the resulting DM, also used for intra-datafile lookup by some formats
  • interpolate - Flag to create intermediate mesh pieces (edges, faces)

Output Parameter:

  • dm - The DM

Options Database Key:

  • -dm_plex_create_from_hdf5_xdmf - use the PETSC_VIEWER_HDF5_XDMF format 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

source
PETSc.LibPETSc.DMPlexCreateGeomFromFileMethod
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 communicator
  • filename - The name of the EGADS, IGES, or STEP file
  • islite - Flag for EGADSlite support

Output Parameter:

  • dm - The DM object representing the mesh

Level: beginner

-seealso: , DM, DMPLEX, DMCreate(), DMPlexCreateEGADS(), DMPlexCreateEGADSliteFromFile()

External Links

source
PETSc.LibPETSc.DMPlexCreateGlobalToNaturalSFMethod
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 redistributed DM
  • section - The local PetscSection describing the Vec before the mesh was distributed, or NULL if not available
  • sfMigration - The PetscSF used to distribute the mesh, or NULL if it cannot be computed

Output Parameter:

  • sfNatural - PetscSF for mapping the Vec in PETSc ordering to the canonical ordering

Level: intermediate

-seealso: , DM, DMPLEX, PetscSF, PetscSection, DMPlexDistribute(), DMPlexDistributeField()

External Links

source
PETSc.LibPETSc.DMPlexCreateGmshMethod
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 communicator
  • viewer - The PetscViewer associated with a Gmsh file
  • interpolate - Create faces and edges in the mesh

Output Parameter:

  • dm - The DM object 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

source
PETSc.LibPETSc.DMPlexCreateGmshFromFileMethod
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 communicator
  • filename - Name of the Gmsh file
  • interpolate - Create faces and edges in the mesh

Output Parameter:

  • dm - The DM object representing the mesh

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreateFromFile(), DMPlexCreateGmsh(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateHexCylinderMeshMethod
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 the DM object
  • periodicZ - The boundary type for the Z direction
  • Nr - The number of refinements to carry out

Output Parameter:

  • dm - The DM object

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreateBoxMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateHybridMeshMethod
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 original DM
  • label - The label specifying the interface vertices
  • bdlabel - The optional label specifying the interface boundary vertices
  • bdvalue - Value of optional label specifying the interface boundary vertices

Output Parameters:

  • hybridLabel - The label fully marking the interface, or NULL if no output is desired
  • splitLabel - The label containing the split points, or NULL if no output is desired
  • dmInterface - The new interface DM, or NULL
  • dmHybrid - The new DM with cohesive cells

Level: developer

-seealso: , DM, DMPLEX, DMPlexConstructCohesiveCells(), DMPlexLabelCohesiveComplete(), DMPlexGetSubpointMap(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateHypercubicMeshMethod
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 the DM object
  • dim - The spatial dimension
  • edges - Number of edges per dimension, or NULL for (1,) in 1D and (2, 2) in 2D and (1, 1, 1) in 3D
  • lower - The lower left corner, or NULL for (0, 0, 0)
  • upper - The upper right corner, or NULL for (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

source
PETSc.LibPETSc.DMPlexCreateLabelFieldMethod
val::PetscVec = DMPlexCreateLabelField(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)

Create a field whose value is the label value for that point

Input Parameters:

  • dm - The DMPLEX
  • label - The DMLabel

Output Parameter:

  • val - The label value field

Options Database Key:

  • -dm_label_view - Adds the label value field into the DM output from -dm_view using the same viewer

Level: intermediate

-seealso: , DM, DMPLEX, DMView()

External Links

source
PETSc.LibPETSc.DMPlexCreateNaturalVectorMethod
nv::PetscVec = DMPlexCreateNaturalVector(petsclib::PetscLibType,dm::PetscDM)

Provide a Vec capable of holding the natural ordering and distribution.

Collective

Input Parameter:

  • dm - The distributed DMPLEX

Output Parameter:

  • nv - The natural Vec

Level: intermediate

-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalBegin()

External Links

source
PETSc.LibPETSc.DMPlexCreateNeighborCSRMethod
numVertices::PetscInt,offsets::PetscInt,adjacency::PetscInt = DMPlexCreateNeighborCSR(petsclib::PetscLibType,dm::PetscDM, cellHeight::PetscInt)

Create a mesh graph (cell

Collective

Input Parameters:

  • dm - The DMPLEX
  • cellHeight - 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 cell
  • adjacency - The adjacency list for all cells

Level: advanced

-seealso: , DM, DMPLEX, DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateOverlapLabelMethod
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 - The DM
  • levels - Number of overlap levels
  • rootSection - The number of leaves for a given root point
  • rootrank - The rank of each edge into the root point
  • leafSection - The number of processes sharing a given leaf point
  • leafrank - The rank of each process sharing a leaf point

Output Parameter:

  • ovLabel - DMLabel containing remote overlap contributions as point/rank pairings

Level: developer

-seealso: DMPLEX, DMPlexCreateOverlapLabelFromLabels(), DMPlexGetAdjacency(), DMPlexDistributeOwnership(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexCreateOverlapLabelFromLabelsMethod
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 - The DM
  • numLabels - The number of labels to draw candidate points from
  • label - An array of labels containing candidate points
  • value - An array of label values marking the candidate points
  • numExLabels - The number of labels to use for exclusion
  • exLabel - An array of labels indicating points to be excluded, or NULL
  • exValue - An array of label values to be excluded, or NULL
  • rootSection - The number of leaves for a given root point
  • rootrank - The rank of each edge into the root point
  • leafSection - The number of processes sharing a given leaf point
  • leafrank - The rank of each process sharing a leaf point

Output Parameter:

  • ovLabel - DMLabel containing remote overlap contributions as point/rank pairings

Level: developer

-seealso: DMPLEX, DMPlexCreateOverlapLabel(), DMPlexGetAdjacency(), DMPlexDistributeOwnership(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexCreateOverlapMigrationSFMethod
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 - The DM
  • overlapSF - The PetscSF mapping ghost points in overlap to owner points on other processes

Output Parameter:

  • migrationSF - A PetscSF that maps original points in old locations to points in new locations

Level: developer

-seealso: DMPLEX, DMPlexCreateOverlapLabel(), DMPlexDistributeOverlap(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexCreatePLYFromFileMethod
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 communicator
  • filename - Name of the .ply file
  • interpolate - Create faces and edges in the mesh

Output Parameter:

  • dm - The DMPLEX object representing the mesh

Level: beginner

-seealso: DMPlexCreateFromFile(), DMPlexCreateGmsh(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreatePartitionerGraphMethod
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 mesh DM
  • height - Height of the strata from which to construct the graph

Output Parameters:

  • numVertices - Number of vertices in the graph
  • offsets - Point offsets in the graph
  • adjacency - Point connectivity in the graph
  • globalNumbering - 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

source
PETSc.LibPETSc.DMPlexCreatePointNumberingMethod
globalPointNumbers::IS = DMPlexCreatePointNumbering(petsclib::PetscLibType,dm::PetscDM)

Create a global numbering for all points.

Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • globalPointNumbers - Global numbers for all points on this process

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetCellNumbering()

External Links

source
PETSc.LibPETSc.DMPlexCreatePointSFMethod
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 source DMPLEX object
  • migrationSF - The star forest that describes the parallel point remapping
  • ownership - Flag causing a vote to determine point ownership

Output Parameter:

  • pointSF - The star forest describing the point overlap in the remapped DM

Level: developer

-seealso: DMPLEX, PetscSF, DM, DMPlexDistribute(), DMPlexDistributeOverlap()

External Links

source
PETSc.LibPETSc.DMPlexCreateProcessSFMethod
processRanks::IS,sfProcess::PetscSF = DMPlexCreateProcessSF(petsclib::PetscLibType,dm::PetscDM, sfPoint::PetscSF)

Create an PetscSF which just has process connectivity

Collective

Input Parameters:

  • dm - The DM
  • sfPoint - The PetscSF which encodes point connectivity

Output Parameters:

  • processRanks - A list of process neighbors, or NULL
  • sfProcess - An PetscSF encoding the process connectivity, or NULL

Level: developer

-seealso: , DM, DMPLEX, PetscSF, PetscSFCreate(), DMPlexCreateTwoSidedProcessSF()

External Links

source
PETSc.LibPETSc.DMPlexCreateRankFieldMethod
ranks::PetscVec = DMPlexCreateRankField(petsclib::PetscLibType,dm::PetscDM)

Create a cell field whose value is the rank of the owner

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • ranks - The rank field

Options Database Key:

  • -dm_partition_view - Adds the rank field into the DM output from -dm_view using the same viewer

Level: intermediate

-seealso: , DM, DMPLEX, DMView()

External Links

source
PETSc.LibPETSc.DMPlexCreateReferenceCellMethod
refdm::PetscDM = DMPlexCreateReferenceCell(petsclib::PetscLibType,comm::MPI_Comm, ct::DMPolytopeType)

Create a DMPLEX with the appropriate FEM reference cell

Collective

Input Parameters:

  • comm - The communicator
  • ct - The cell type of the reference cell

Output Parameter:

  • refdm - The reference cell

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexCreateBoxMesh()

External Links

source
PETSc.LibPETSc.DMPlexCreateRigidBodiesMethod
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 - the DM
  • nb - The number of bodies
  • label - The DMLabel marking each domain
  • nids - The number of ids per body
  • ids - 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

source
PETSc.LibPETSc.DMPlexCreateRigidBodyMethod
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 - the DM
  • field - 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

source
PETSc.LibPETSc.DMPlexCreateSectionMethod
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 - The DMPLEX object
  • label - An array of DMLabel of length numFields indicating the mesh support of each field, or NULL for the whole mesh
  • numComp - An array of size numFields that holds the number of components for each field
  • numDof - An array of size numFields ime (dim+1) which holds the number of dof for each field on a mesh piece of dimension d
  • numBC - The number of boundary conditions
  • bcField - An array of size numBC giving the field number for each boundary condition
  • bcComps - [Optional] An array of size numBC of IS holding the field components to which each boundary condition applies
  • bcPoints - An array of size numBC of IS holding the DMPLEX points to which each boundary condition applies
  • perm - Optional permutation of the chart, or NULL

Output Parameter:

  • section - The PetscSection object

Level: developer

-seealso: , DM, DMPLEX, DMPlexCreate(), PetscSectionCreate(), PetscSectionSetPermutation()

External Links

source
PETSc.LibPETSc.DMPlexCreateSphereMeshMethod
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 the DM object
  • dim - The dimension
  • simplex - Use simplices, or tensor product cells
  • R - The radius

Output Parameter:

  • dm - The DM object

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreateBallMesh(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateSubmeshMethod
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 mesh
  • vertexLabel - The DMLabel marking points contained in the surface
  • value - The label value to use
  • markedFaces - PETSC_TRUE if surface faces are marked in addition to vertices, PETSC_FALSE if only vertices are marked

Output Parameter:

  • subdm - The surface mesh

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetSubpointMap(), DMGetLabel(), DMLabelSetValue()

External Links

source
PETSc.LibPETSc.DMPlexCreateTPSMeshMethod
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 the DM object
  • tpstype - Type of triply-periodic surface
  • extent - Array of length 3 containing number of periods in each direction
  • periodic - array of length 3 with periodicity, or NULL for non-periodic
  • tps_distribute - Distribute 2D manifold mesh prior to refinement and extrusion (more scalable)
  • refinements - Number of factor-of-2 refinements of 2D manifold mesh
  • layers - Number of cell layers extruded in normal direction
  • thickness - Thickness in normal direction

Output Parameter:

  • dm - The DM object

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreateSphereMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateTwoSidedProcessSFMethod
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 - The DM
  • sfPoint - The PetscSF which encodes point connectivity
  • rootRankSection - to be documented
  • rootRanks - to be documented
  • leafRankSection - to be documented
  • leafRanks - to be documented

Output Parameters:

  • processRanks - A list of process neighbors, or NULL
  • sfProcess - An PetscSF encoding the two-sided process connectivity, or NULL

Level: developer

-seealso: DMPLEX, PetscSFCreate(), DMPlexCreateProcessSF()

External Links

source
PETSc.LibPETSc.DMPlexCreateWedgeBoxMeshMethod
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 the DM object
  • faces - Number of faces per dimension, or NULL for (1, 1, 1)
  • lower - The lower left corner, or NULL for (0, 0, 0)
  • upper - The upper right corner, or NULL for (1, 1, 1)
  • periodicity - The boundary type for the X,Y,Z direction, or NULL for DM_BOUNDARY_NONE
  • orderHeight - If PETSC_TRUE, orders the extruded cells in the height first. Otherwise, orders the cell on the layers first
  • interpolate - Flag to create intermediate mesh pieces (edges, faces)

Output Parameter:

  • dm - The DM object

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreateHexCylinderMesh(), DMPlexCreateWedgeCylinderMesh(), DMExtrude(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateWedgeCylinderMeshMethod
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 the DM object
  • n - The number of wedges around the origin
  • interpolate - Create edges and faces

Output Parameter:

  • dm - The DM object

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreateHexCylinderMesh(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexDistributeMethod
DMPlexDistribute(petsclib::PetscLibType,dm::PetscDM, overlap::PetscInt, sf::PetscSF, dmParallel::PetscDM)

Distributes the mesh and any associated sections.

Collective

Input Parameters:

  • dm - The original DMPLEX object
  • overlap - The overlap of partitions, 0 is the default

Output Parameters:

  • sf - The PetscSF used for point distribution, or NULL if not needed
  • dmParallel - The distributed DMPLEX object

Level: intermediate

-seealso: DMPLEX, DM, DMPlexCreate(), DMSetAdjacency(), DMPlexGetOverlap()

External Links

source
PETSc.LibPETSc.DMPlexDistributeFieldMethod
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 - The DMPLEX object
  • pointSF - The PetscSF describing the communication pattern
  • originalSection - The PetscSection for existing data layout
  • originalVec - The existing data in a local vector

Output Parameters:

  • newSection - The PetscSF describing the new data layout
  • newVec - The new data in a local vector

Level: developer

-seealso: DMPLEX, DMPlexDistribute(), DMPlexDistributeFieldIS(), DMPlexDistributeData()

External Links

source
PETSc.LibPETSc.DMPlexDistributeFieldISMethod
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 - The DMPLEX object
  • pointSF - The PetscSF describing the communication pattern
  • originalSection - The PetscSection for existing data layout
  • originalIS - The existing data

Output Parameters:

  • newSection - The PetscSF describing the new data layout
  • newIS - The new data

Level: developer

-seealso: DMPLEX, DMPlexDistribute(), DMPlexDistributeField(), DMPlexDistributeData()

External Links

source
PETSc.LibPETSc.DMPlexDistributeGetDefaultMethod
dist::PetscBool = DMPlexDistributeGetDefault(petsclib::PetscLibType,dm::PetscDM)

Get flag indicating whether the DM should be distributed by default

Not Collective

Input Parameter:

  • dm - The DM

Output Parameter:

  • dist - Flag for distribution

Level: intermediate

-seealso: DMPLEX, DM, DMPlexDistributeSetDefault(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexDistributeOverlapMethod
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 distributed DMPLEX object
  • overlap - The overlap of partitions (the same on all ranks)

Output Parameters:

  • sf - The PetscSF used for point distribution, or pass NULL if not needed
  • dmOverlap - The overlapping distributed DMPLEX object

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

source
PETSc.LibPETSc.DMPlexDistributeOwnershipMethod
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 - The DM

Output Parameters:

  • rootSection - The number of leaves for a given root point
  • rootrank - The rank of each edge into the root point
  • leafSection - The number of processes sharing a given leaf point
  • leafrank - The rank of each process sharing a leaf point

Level: developer

-seealso: DMPLEX, DMPlexCreateOverlapLabel(), DMPlexDistribute(), DMPlexDistributeOverlap()

External Links

source
PETSc.LibPETSc.DMPlexDistributeSetDefaultMethod
DMPlexDistributeSetDefault(petsclib::PetscLibType,dm::PetscDM, dist::PetscBool)

Set flag indicating whether the DM should be distributed by default

Logically Collective

Input Parameters:

  • dm - The DM
  • dist - Flag for distribution

Level: intermediate

-seealso: DMPLEX, DMPlexDistributeGetDefault(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexDistributionGetNameMethod
DMPlexDistributionGetName(petsclib::PetscLibType,dm::PetscDM, name::String)

Retrieve the name of the specific parallel distribution

Input Parameter:

  • dm - The DM

Output Parameter:

  • name - The name of the specific parallel distribution

Level: developer

-seealso: DMPLEX, DMPlexDistributionSetName(), DMPlexTopologyView(), DMPlexTopologyLoad()

External Links

source
PETSc.LibPETSc.DMPlexDistributionSetNameMethod
DMPlexDistributionSetName(petsclib::PetscLibType,dm::PetscDM, name::String)

Set the name of the specific parallel distribution

Input Parameters:

  • dm - The DM
  • name - The name of the specific parallel distribution

Level: developer

-seealso: DMPLEX, DMPlexDistributionGetName(), DMPlexTopologyView(), DMPlexTopologyLoad()

External Links

source
PETSc.LibPETSc.DMPlexEqualMethod
equal::PetscBool = DMPlexEqual(petsclib::PetscLibType,dmA::PetscDM, dmB::PetscDM)

Determine if two DM have the same topology

Not Collective

Input Parameters:

  • dmA - A DMPLEX object
  • dmB - A DMPLEX object

Output Parameter:

  • equal - PETSC_TRUE if the topologies are identical

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetCone()

External Links

source
PETSc.LibPETSc.DMPlexExtrudeMethod
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 mesh
  • layers - The number of extruded layers
  • thickness - The total thickness of the extruded layers, or PETSC_DETERMINE
  • tensor - Flag to create tensor produt cells
  • symmetric - Flag to extrude symmetrically about the surface
  • periodic - Flag to extrude periodically
  • normal - Surface normal vector, or NULL
  • thicknesses - Thickness of each layer, or NULL
  • activeLabel - DMLabel to extrude from, or NULL to 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

source
PETSc.LibPETSc.DMPlexFilterMethod
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 mesh
  • cellLabel - The DMLabel marking cells contained in the new mesh
  • value - The label value to use
  • ignoreLabelHalo - The flag indicating if labeled points that are in the halo are ignored
  • sanitizeSubmesh - 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 - The PetscSF representing 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

source
PETSc.LibPETSc.DMPlexFindVerticesMethod
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 - The DMPLEX object
  • coordinates - The Vec of coordinates of the sought points
  • eps - The tolerance or PETSC_DEFAULT

Output Parameter:

  • points - The IS of found DAG points or -1

Level: intermediate

-seealso: DMPLEX, DMPlexCreate(), DMGetCoordinatesLocal()

External Links

source
PETSc.LibPETSc.DMPlexFreeGeomObjectMethod
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 object
  • geomObj - PetscGeom object

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGenerateMethod
DMPlexGenerate(petsclib::PetscLibType,boundary::PetscDM, name::String, interpolate::PetscBool, mesh::PetscDM)

Generates a mesh.

Not Collective

Input Parameters:

  • boundary - The DMPLEX boundary object
  • name - The mesh generation package name
  • interpolate - Flag to create intermediate mesh elements

Output Parameter:

  • mesh - The DMPLEX object

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

source
PETSc.LibPETSc.DMPlexGeomDataAndGradsMethod
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 model
  • fullGeomGrad - 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

source
PETSc.LibPETSc.DMPlexGetActivePointMethod
point::PetscInt = DMPlexGetActivePoint(petsclib::PetscLibType,dm::PetscDM)

Get the point on which projection is currently working

Not Collective

Input Parameter:

  • dm - the DM

Output Parameter:

  • point - The mesh point involved in the current projection

Level: developer

-seealso: , DM, DMPLEX, DMPlexSetActivePoint()

External Links

source
PETSc.LibPETSc.DMPlexGetAdjacencyMethod
adjSize::PetscInt,adj::Vector{PetscInt} = DMPlexGetAdjacency(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)

Return all points adjacent to the given point

Input Parameters:

  • dm - The DM object
  • p - The point

Input/Output Parameters:

  • adjSize - The maximum size of adj if it is non-NULL, or PETSC_DETERMINE;

on output the number of adjacent points

  • adj - Either NULL so that the array is allocated, or an existing array with size adjSize;

on output contains the adjacent points

Level: advanced

-seealso: DMPLEX, DMSetAdjacency(), DMPlexDistribute(), DMCreateMatrix(), DMPlexPreallocateOperator()

External Links

source
PETSc.LibPETSc.DMPlexGetAdjacencyUseAnchorsMethod
useAnchors::PetscBool = DMPlexGetAdjacencyUseAnchors(petsclib::PetscLibType,dm::PetscDM)

Query whether adjacency in the mesh uses the point

Input Parameter:

  • dm - The DM object

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

source
PETSc.LibPETSc.DMPlexGetAnchorsMethod
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 - The DMPLEX object

Output Parameters:

  • anchorSection - If not NULL, set to the section describing which points anchor the constrained points.
  • anchorIS - If not NULL, set to the list of anchors indexed by anchorSection

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexSetAnchors(), DMGetDefaultConstraints(), DMSetDefaultConstraints(), IS, PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetCellCoordinatesMethod
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 - The DMPLEX
  • cell - The cell number

Output Parameters:

  • isDG - Using cellwise coordinates
  • Nc - The number of coordinates
  • array - The coordinate array
  • coords - The cell coordinates

Level: developer

-seealso: DMPLEX, DMPlexRestoreCellCoordinates(), DMGetCoordinatesLocal(), DMGetCellCoordinatesLocal()

External Links

source
PETSc.LibPETSc.DMPlexGetCellFieldsMethod
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 - The DM
  • cellIS - The cells to include
  • locX - A local vector with the solution fields
  • locX_t - A local vector with solution field time derivatives, or NULL
  • locA - A local vector with auxiliary fields, or NULL

Output Parameters:

  • u - The field coefficients
  • u_t - The fields derivative coefficients
  • a - The auxiliary field coefficients

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetFaceFields()

External Links

source
PETSc.LibPETSc.DMPlexGetCellNumberingMethod
DMPlexGetCellNumbering(petsclib::PetscLibType,dm::PetscDM, globalCellNumbers::IS)

Get a global cell numbering for all cells on this process

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • globalCellNumbers - Global cell numbers for all cells on this process

Level: developer

-seealso: , DM, DMPLEX, DMPlexCreateCellNumbering(), DMPlexGetVertexNumbering()

External Links

source
PETSc.LibPETSc.DMPlexGetCellTypeMethod
celltype::DMPolytopeType = DMPlexGetCellType(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt)

Get the polytope type of a given cell

Not Collective

Input Parameters:

  • dm - The DMPLEX object
  • cell - The cell

Output Parameter:

  • celltype - The polytope type of the cell

Level: intermediate

-seealso: , DM, DMPLEX, DMPolytopeType, DMPlexGetCellTypeLabel(), DMPlexGetDepthLabel(), DMPlexGetDepth()

External Links

source
PETSc.LibPETSc.DMPlexGetCellTypeLabelMethod
celltypeLabel::DMLabel = DMPlexGetCellTypeLabel(petsclib::PetscLibType,dm::PetscDM)

Get the DMLabel recording the polytope type of each cell

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • celltypeLabel - The DMLabel recording cell polytope type

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetCellType(), DMPlexGetDepthLabel(), DMCreateLabel()

External Links

source
PETSc.LibPETSc.DMPlexGetCellTypeStratumMethod
start::PetscInt,end_::PetscInt = DMPlexGetCellTypeStratum(petsclib::PetscLibType,dm::PetscDM, ct::DMPolytopeType)

Get the range of cells of a given celltype

Input Parameters:

  • dm - The DMPLEX object
  • ct - The DMPolytopeType of the cell

Output Parameters:

  • start - The first cell of this type, or NULL
  • end - The upper bound on this celltype, or NULL

Level: advanced

-seealso: , DM, DMPLEX, DMPlexConstructGhostCells(), DMPlexGetDepthStratum(), DMPlexGetHeightStratum()

External Links

source
PETSc.LibPETSc.DMPlexGetChartMethod
pStart::PetscInt,pEnd::PetscInt = DMPlexGetChart(petsclib::PetscLibType,dm::PetscDM)

Return the interval for all mesh points [pStart, pEnd)

Not Collective

Input Parameter:

  • dm - The DMPLEX

Output Parameters:

  • pStart - The first mesh point
  • pEnd - The upper bound for mesh points

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetClosureIndicesMethod
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 - The DM
  • section - The PetscSection describing the points (a local section)
  • idxSection - The PetscSection from which to obtain indices (may be local or global)
  • point - The point defining the closure
  • useClPerm - Use the closure point permutation if available

Output Parameters:

  • numIndices - The number of dof indices in the closure of point with the input sections
  • indices - The dof indices
  • outOffsets - Array, of length the number of fields plus 1, to write the field offsets into, or NULL
  • values - The input values, which may be modified if sign flips are induced by the point symmetries, or NULL

Level: advanced

-seealso: , DM, DMPLEX, DMPlexRestoreClosureIndices(), DMPlexVecGetClosure(), DMPlexMatSetClosure(), DMGetLocalSection(), PetscSection, DMGetGlobalSection()

External Links

source
PETSc.LibPETSc.DMPlexGetConeMethod
cone::Vector{PetscInt} = DMPlexGetCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)

Return the points on the in

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()

Output Parameter:

  • cone - An array of points which are on the in-edges for point p, the length of cone is the result of DMPlexGetConeSize()

Level: beginner

-seealso: , DM, DMPLEX, DMPlexGetConeSize(), DMPlexSetCone(), DMPlexGetConeTuple(), DMPlexSetChart(), DMPlexRestoreCone()

External Links

source
PETSc.LibPETSc.DMPlexGetConeOrientationMethod
coneOrientation::Vector{PetscInt} = DMPlexGetConeOrientation(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)

Return the orientations on the in

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()

Output Parameter:

  • coneOrientation - An array of orientations which are on the in-edges for point p. 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

source
PETSc.LibPETSc.DMPlexGetConeOrientationsMethod
coneOrientations::Vector{PetscInt} = DMPlexGetConeOrientations(petsclib::PetscLibType,dm::PetscDM)

Return cone orientation data

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • coneOrientations - The array of cone orientations for all points

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetConeSection(), DMPlexGetConeOrientation(), PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetConeRecursiveMethod
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 - The DMPLEX
  • points - The IS of points, which must lie in the chart set with DMPlexSetChart()

Output Parameters:

  • depth - (optional) Size of the output arrays, equal to DMPLEX depth, returned by DMPlexGetDepth()
  • expandedPoints - (optional) An array of index sets with recursively expanded cones
  • sections - (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

source
PETSc.LibPETSc.DMPlexGetConeRecursiveVerticesMethod
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 - The DMPLEX
  • points - The IS of points, which must lie in the chart set with DMPlexSetChart()

Output Parameter:

  • expandedPoints - An IS containing the of vertices recursively expanded from input points

Level: advanced

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeTuple(), DMPlexGetConeRecursive(), DMPlexRestoreConeRecursive(), DMPlexGetDepth(), IS

External Links

source
PETSc.LibPETSc.DMPlexGetConeSectionMethod
DMPlexGetConeSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection)

Return a section which describes the layout of cone data

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • section - The PetscSection object

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetSupportSection(), DMPlexGetCones(), DMPlexGetConeOrientations(), PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetConeSizeMethod
size::PetscInt = DMPlexGetConeSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)

Return the number of in

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()

Output Parameter:

  • size - The cone size for point p

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetConeTupleMethod
DMPlexGetConeTuple(petsclib::PetscLibType,dm::PetscDM, p::IS, pConesSection::PetscSection, pCones::IS)

Return the points on the in

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The IS of points, which must lie in the chart set with DMPlexSetChart()

Output Parameters:

  • pConesSection - PetscSection describing the layout of pCones
  • pCones - An IS containing the points which are on the in-edges for the point set p

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeRecursive(), DMPlexSetChart(), PetscSection, IS

External Links

source
PETSc.LibPETSc.DMPlexGetConesMethod
cones::Vector{PetscInt} = DMPlexGetCones(petsclib::PetscLibType,dm::PetscDM)

Return cone data

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • cones - The cone for each point

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetConeSection()

External Links

source
PETSc.LibPETSc.DMPlexGetCoordinateMapMethod
DMPlexGetCoordinateMap(petsclib::PetscLibType,dm::PetscDM, coordFunc::PetscPoCintFn)

Returns the function used to map coordinates of newly generated mesh points

Not Collective

Input Parameter:

  • dm - the DMPLEX

Output Parameter:

  • coordFunc - the mapping function

Level: developer

-seealso: DMPLEX, DMGetCoordinates(), DMPlexSetCoordinateMap(), PetscPointFn

External Links

source
PETSc.LibPETSc.DMPlexGetDataFVMMethod
DMPlexGetDataFVM(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, cellgeom::PetscVec, facegeom::PetscVec, gradDM::PetscDM)

Retrieve precomputed cell geometry

Collective

Input Parameters:

  • dm - The DM
  • fv - The PetscFV

Output Parameters:

  • cellgeom - The cell geometry
  • facegeom - The face geometry
  • gradDM - The gradient matrices

Level: developer

-seealso: DMPLEX, DMPlexComputeGeometryFVM()

External Links

source
PETSc.LibPETSc.DMPlexGetDepthMethod
depth::PetscInt = DMPlexGetDepth(petsclib::PetscLibType,dm::PetscDM)

Get the depth of the DAG representing this mesh

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • depth - The number of strata (breadth first levels) in the DAG

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetDepthLabel(), DMPlexGetDepthStratum(), DMPlexGetPointDepth(), DMPlexSymmetrize()

External Links

source
PETSc.LibPETSc.DMPlexGetDepthLabelMethod
DMPlexGetDepthLabel(petsclib::PetscLibType,dm::PetscDM, depthLabel::DMLabel)

Get the DMLabel recording the depth of each point

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • depthLabel - The DMLabel recording point depth

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetDepth(), DMPlexGetHeightStratum(), DMPlexGetDepthStratum(), DMPlexGetPointDepth(),

External Links

source
PETSc.LibPETSc.DMPlexGetDepthStratumMethod
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 - The DMPLEX object
  • depth - The requested depth

Output Parameters:

  • start - The first point at this depth
  • end - One beyond the last point at this depth

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetHeightStratum(), DMPlexGetCellTypeStratum(), DMPlexGetDepth(), DMPlexGetDepthLabel(), DMPlexGetPointDepth(), DMPlexSymmetrize(), DMPlexInterpolate()

External Links

source
PETSc.LibPETSc.DMPlexGetDepthStratumGlobalSizeMethod
gsize::PetscInt = DMPlexGetDepthStratumGlobalSize(petsclib::PetscLibType,dm::PetscDM, depth::PetscInt)

Get the global size for a given depth stratum

Input Parameters:

  • dm - The DMPLEX object
  • depth - 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

source
PETSc.LibPETSc.DMPlexGetFaceFieldsMethod
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 - The DM
  • fStart - The first face to include
  • fEnd - The first face to exclude
  • locX - A local vector with the solution fields
  • locX_t - A local vector with solution field time derivatives, or NULL
  • faceGeometry - A local vector with face geometry
  • cellGeometry - A local vector with cell geometry
  • locGrad - A local vector with field gradients, or NULL

Output Parameters:

  • Nface - The number of faces with field values
  • uL - The field values at the left side of the face
  • uR - The field values at the right side of the face

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetCellFields()

External Links

source
PETSc.LibPETSc.DMPlexGetFaceGeometryMethod
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 - The DM
  • fStart - The first face to include
  • fEnd - The first face to exclude
  • faceGeometry - A local vector with face geometry
  • cellGeometry - A local vector with cell geometry

Output Parameters:

  • Nface - The number of faces with field values
  • fgeom - The face centroid and normals
  • vol - The cell volumes

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetCellFields()

External Links

source
PETSc.LibPETSc.DMPlexGetFullJoinMethod
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 - The DMPLEX object
  • numPoints - The number of input points for the join
  • points - The input points, its length is numPoints

Output Parameters:

  • numCoveredPoints - The number of points in the join
  • coveredPoints - The points in the join, its length is numCoveredPoints

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetJoin(), DMPlexRestoreJoin(), DMPlexGetMeet()

External Links

source
PETSc.LibPETSc.DMPlexGetFullMeetMethod
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 - The DMPLEX object
  • numPoints - The number of input points for the meet
  • points - The input points, of length numPoints

Output Parameters:

  • numCoveredPoints - The number of points in the meet
  • coveredPoints - The points in the meet, of length numCoveredPoints

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetMeet(), DMPlexRestoreMeet(), DMPlexGetJoin()

External Links

source
PETSc.LibPETSc.DMPlexGetGatherDMMethod
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 original DMPLEX object

Output Parameters:

  • sf - the PetscSF used for point distribution (optional)
  • gatherMesh - the gathered DM object, or NULL

Level: intermediate

-seealso: DMPLEX, DM, PetscSF, DMPlexDistribute(), DMPlexGetRedundantDM()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomBodyMassPropertiesMethod
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 object
  • body - PetscGeom BODY object

Output Parameters:

  • volume - Volume of the CAD Body attached to the DM Plex
  • surfArea - Surface Area of the CAD Body attached to the DM Plex
  • centerOfGravity - Array with the Center of Gravity coordinates of the CAD Body attached to the DM Plex [x, y, z]
  • COGszie - Size of centerOfGravity[] Array
  • inertiaMatrixCOG - 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

source
PETSc.LibPETSc.DMPlexGetGeomCntrlPntAndWeightDataMethod
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 coordinates
  • wHashTable - 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

source
PETSc.LibPETSc.DMPlexGetGeomCntrlPntMapsMethod
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 DMPlex
  • cntrlPntFaceMap - 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

source
PETSc.LibPETSc.DMPlexGetGeomFaceNumOfControlPointsMethod
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 object
  • face - PetscGeom FACE object

Output Parameter:

  • numCntrlPnts - Number of Control Points (and Weights) defining the FACE

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomGradDataMethod
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 Matrix
  • cpSurfGrad - 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 Geometry
  • gradSACP - 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

source
PETSc.LibPETSc.DMPlexGetGeomIDMethod
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 object
  • body - 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

source
PETSc.LibPETSc.DMPlexGetGeomModelBodiesMethod
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

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyEdgesMethod
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 object
  • body - PetscGeom body object of interest.

Output Parameters:

  • edges - Array of PetscGeom EDGE objects referenced by the PetscGeom BODY object
  • numEdges - Number of EDGEs referenced by the PetscGeom BODY object. Also the size of **edges array.

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyFacesMethod
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 object
  • body - PetscGeom BODY object containing the FACE objects of interest.

Output Parameters:

  • faces - Array of PetscGeom FACE objects referenced by the PetscGeom BODY object
  • numFaces - Number of FACEs referenced by the PetscGeom BODY object. Also the size of **faces array.

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyLoopsMethod
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 object
  • body - PetscGeom BODY object containing the LOOP objects of interest.

Output Parameters:

  • loops - Array of PetscGeom FACE objects referenced by the PetscGeom SHELL object
  • numLoops - Number of LOOPs referenced by the PetscGeom BODY object. Also the size of **loops array.

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyNodesMethod
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 object
  • body - PetscGeom body object of interest.

Output Parameters:

  • nodes - Array of PetscGeom NODE objects referenced by the PetscGeom BODY object
  • numNodes - Number of NODEs referenced by the PetscGeom BODY object. Also the size of **nodes array.

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyShellsMethod
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 object
  • body - PetscGeom BODY object containing the SHELL objects of interest.

Output Parameters:

  • shells - Array of PetscGeom SHELL objects referenced by the PetscGeom BODY object
  • numShells - Number of SHELLs referenced by the PetscGeom BODY object. Also the size of **shells array.

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelEdgeNodesMethod
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 object
  • body - 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 object
  • numNodes - Number of Nodes referenced by the PetscGeom EDGE object. Also the size of **nodes array.

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelFaceEdgesMethod
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 object
  • body - 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 object
  • numEdges - Number of EDGEs referenced by the PetscGeom FACE object. Also the size of **edges array.

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelFaceLoopsMethod
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 object
  • body - 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 object
  • numLoops - Number of LOOPs referenced by the PetscGeom FACE object. Also the size of **loops array.

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelShellFacesMethod
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 object
  • body - 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 object
  • numFaces - Number of FACEs referenced by the PetscGeom SHELL object. Also the size of **faces array.

Level: intermediate

-seealso:

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelTUVMethod
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

source
PETSc.LibPETSc.DMPlexGetGeomObjectMethod
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 object
  • body - 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

source
PETSc.LibPETSc.DMPlexGetGeometryFVMMethod
minRadius::PetscReal = DMPlexGetGeometryFVM(petsclib::PetscLibType,dm::PetscDM, facegeom::PetscVec, cellgeom::PetscVec)

Return precomputed geometric data

Collective

Input Parameter:

  • dm - The DM

Output Parameters:

  • facegeom - The values precomputed from face geometry
  • cellgeom - The values precomputed from cell geometry
  • minRadius - The minimum radius over the mesh of an inscribed sphere in a cell, or NULL if not needed

Level: developer

-seealso: , DM, DMPLEX, DMTSSetRHSFunctionLocal()

External Links

source
PETSc.LibPETSc.DMPlexGetGradientDMMethod
DMPlexGetGradientDM(petsclib::PetscLibType,dm::PetscDM, fv::PetscFV, dmGrad::PetscDM)

Return gradient data layout

Collective

Input Parameters:

  • dm - The DM
  • fv - The PetscFV

Output Parameter:

  • dmGrad - The layout for gradient values

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetGeometryFVM()

External Links

source
PETSc.LibPETSc.DMPlexGetHeightStratumMethod
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 - The DMPLEX object
  • height - The requested height

Output Parameters:

  • start - The first point at this height
  • end - One beyond the last point at this height

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetDepthStratum(), DMPlexGetCellTypeStratum(), DMPlexGetDepth(), DMPlexGetPointHeight()

External Links

source
PETSc.LibPETSc.DMPlexGetInterpolatePreferTensorMethod
preferTensor::PetscBool = DMPlexGetInterpolatePreferTensor(petsclib::PetscLibType,dm::PetscDM)

Get the flag to prefer tensor order when interpolating a cell

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • preferTensor - Flag to prefer tensor order

Level: intermediate

-seealso: DMPlexSetInterpolatePreferTensor(), DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolatedCollective()

External Links

source
PETSc.LibPETSc.DMPlexGetIsoperiodicFaceSFMethod
num_face_sfs::PetscInt = DMPlexGetIsoperiodicFaceSF(petsclib::PetscLibType,dm::PetscDM, face_sfs::PetscSF)

Obtain periodicity for a mesh

Logically Collective

Input Parameter:

  • dm - The DMPLEX for which to obtain periodic relation

Output Parameters:

  • num_face_sfs - Number of PetscSFs in the array
  • face_sfs - Array of PetscSF in 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

source
PETSc.LibPETSc.DMPlexGetJoinMethod
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 - The DMPLEX object
  • numPoints - The number of input points for the join
  • points - The input points

Output Parameters:

  • numCoveredPoints - The number of points in the join
  • coveredPoints - The points in the join

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexRestoreJoin(), DMPlexGetMeet()

External Links

source
PETSc.LibPETSc.DMPlexGetLocalOffsetsMethod
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 - The DMPLEX object
  • domain_label - label for DMPLEX domain, or NULL for whole domain
  • label_value - Stratum value
  • height - Height of target cells in DMPLEX topology
  • dm_field - Index of DMPLEX field

Output Parameters:

  • num_cells - Number of local cells
  • cell_size - Size of each cell, given by cellsize * numcomp = num_dof
  • num_comp - Number of components per dof
  • l_size - Size of local vector
  • offsets - Allocated offsets array for cells

Level: developer

-seealso: , DMPlexGetLocalOffsetsSupport(), DM, DMPLEX, DMLabel, DMPlexGetClosureIndices(), DMPlexSetClosurePermutationTensor(), DMPlexGetCeedRestriction()

External Links

source
PETSc.LibPETSc.DMPlexGetLocalOffsetsSupportMethod
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 - The DMPLEX object
  • domain_label - label for DMPLEX domain, or NULL for whole domain
  • label_value - Stratum value

Output Parameters:

  • num_faces - Number of local, non-boundary faces
  • num_comp - Number of components per dof
  • l_size - Size of local vector
  • offsetsNeg - Allocated offsets array for cells on the inward normal side of each face
  • offsetsPos - 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

source
PETSc.LibPETSc.DMPlexGetMaxProjectionHeightMethod
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 - the DMPLEX object

Output Parameter:

  • height - the maximum projection height

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexSetMaxProjectionHeight(), DMProjectFunctionLocal(), DMProjectFunctionLabelLocal()

External Links

source
PETSc.LibPETSc.DMPlexGetMaxSizesMethod
maxConeSize::PetscInt,maxSupportSize::PetscInt = DMPlexGetMaxSizes(petsclib::PetscLibType,dm::PetscDM)

Return the maximum number of in

Not Collective

Input Parameter:

  • dm - The DMPLEX

Output Parameters:

  • maxConeSize - The maximum number of in-edges
  • maxSupportSize - The maximum number of out-edges

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetMeetMethod
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 - The DMPLEX object
  • numPoints - The number of input points for the meet
  • points - The input points, of length numPoints

Output Parameters:

  • numCoveringPoints - The number of points in the meet
  • coveringPoints - The points in the meet, of length numCoveringPoints

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexRestoreMeet(), DMPlexGetJoin()

External Links

source
PETSc.LibPETSc.DMPlexGetMigrationSFMethod
DMPlexGetMigrationSF(petsclib::PetscLibType,dm::PetscDM, migrationSF::PetscSF)

Gets the PetscSF for migrating from a parent DM into this DM

Note Collective

Input Parameter:

  • dm - The DM

Output Parameter:

  • migrationSF - The PetscSF

Level: intermediate

-seealso: , DM, DMPLEX, PetscSF, DMPlexDistribute(), DMPlexDistributeField(), DMPlexCreateMigrationSF(), DMPlexSetMigrationSF

External Links

source
PETSc.LibPETSc.DMPlexGetMinRadiusMethod
minradius::PetscReal = DMPlexGetMinRadius(petsclib::PetscLibType,dm::PetscDM)

Returns the minimum distance from any cell centroid to a face

Not Collective

Input Parameter:

  • dm - the DMPLEX

Output Parameter:

  • minradius - the minimum cell radius

Level: developer

-seealso: DMPLEX, DMGetCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexGetNumFaceVerticesMethod
numFaceVertices::PetscInt = DMPlexGetNumFaceVertices(petsclib::PetscLibType,dm::PetscDM, cellDim::PetscInt, numCorners::PetscInt)

Returns the number of vertices on a face

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • cellDim - The cell dimension
  • numCorners - 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

source
PETSc.LibPETSc.DMPlexGetOrderingMethod
DMPlexGetOrdering(petsclib::PetscLibType,dm::PetscDM, otype::MatOrderingType, label::DMLabel, perm::IS)

Calculate a reordering of the mesh

Collective

Input Parameters:

  • dm - The DMPLEX object
  • otype - type of reordering, see MatOrderingType
  • label - [Optional] Label used to segregate ordering into sets, or NULL

Output Parameter:

  • perm - The point permutation as an IS, perm[old point number] = new point number

Level: intermediate

-seealso: DMPLEX, DMPlexPermute(), MatOrderingType, MatGetOrdering()

External Links

source
PETSc.LibPETSc.DMPlexGetOrdering1DMethod
DMPlexGetOrdering1D(petsclib::PetscLibType,dm::PetscDM, perm::IS)

Reorder the vertices so that the mesh is in a line

Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • perm - The point permutation as an IS, perm[old point number] = new point number

Level: intermediate

-seealso: DMPLEX, DMPlexGetOrdering(), DMPlexPermute(), MatGetOrdering()

External Links

source
PETSc.LibPETSc.DMPlexGetOrientedConeMethod
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 DMPlex
  • p - 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 point p
  • ornt - An array of orientations which are on the in-edges for point p. An orientation is an

integer giving the prescription for cone traversal.

Level: beginner

-seealso: , DM, DMPLEX, DMPlexRestoreOrientedCone(), DMPlexGetConeSize(), DMPlexGetCone(), DMPlexGetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetOrientedFaceMethod
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 mesh
  • cell - The cell mesh point
  • faceSize - The number of vertices on the face
  • face - The face vertices
  • numCorners - The number of vertices on the cell
  • indices - Local numbering of face vertices in cell cone
  • origVertices - Original face vertices

Output Parameters:

  • faceVertices - The face vertices properly oriented
  • posOriented - PETSC_TRUE if the face was oriented with outward normal

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetCone()

External Links

source
PETSc.LibPETSc.DMPlexGetOverlapMethod
overlap::PetscInt = DMPlexGetOverlap(petsclib::PetscLibType,dm::PetscDM)

Get the width of the cell overlap

Not Collective

Input Parameter:

  • dm - The DM

Output Parameter:

  • overlap - the width of the cell overlap

Level: intermediate

-seealso: DMPLEX, DMPlexSetOverlap(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexGetPartitionBalanceMethod
flg::PetscBool = DMPlexGetPartitionBalance(petsclib::PetscLibType,dm::PetscDM)

Does distribution of the DM attempt to balance the shared point partition?

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • flg - Balance the partition?

Level: intermediate

-seealso: DMPLEX, DMPlexDistribute(), DMPlexSetPartitionBalance()

External Links

source
PETSc.LibPETSc.DMPlexGetPartitionerMethod
DMPlexGetPartitioner(petsclib::PetscLibType,dm::PetscDM, part::PetscPartitioner)

Get the mesh partitioner

Not Collective

Input Parameter:

  • dm - The DM

Output Parameter:

  • part - The PetscPartitioner

Level: developer

-seealso: , DM, DMPLEX, PetscPartitioner, PetscSection, DMPlexDistribute(), DMPlexSetPartitioner(), PetscPartitionerDMPlexPartition(), PetscPartitionerCreate()

External Links

source
PETSc.LibPETSc.DMPlexGetPointDepthMethod
depth::PetscInt = DMPlexGetPointDepth(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)

Get the depth of a given point

Not Collective

Input Parameters:

  • dm - The DMPLEX object
  • point - The point

Output Parameter:

  • depth - The depth of the point

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetCellType(), DMPlexGetDepthLabel(), DMPlexGetDepth(), DMPlexGetPointHeight()

External Links

source
PETSc.LibPETSc.DMPlexGetPointGlobalMethod
start::PetscInt,end_::PetscInt = DMPlexGetPointGlobal(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)

get location of point data in global Vec

Not Collective

Input Parameters:

  • dm - DM defining the topological space
  • point - topological point

Output Parameters:

  • start - start of point data; returns -(globalStart+1) if point is not owned
  • end - 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

source
PETSc.LibPETSc.DMPlexGetPointGlobalFieldMethod
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 - DM defining the topological space
  • point - topological point
  • field - the field number

Output Parameters:

  • start - start of point data; returns -(globalStart+1) if point is not owned
  • end - 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

source
PETSc.LibPETSc.DMPlexGetPointHeightMethod
height::PetscInt = DMPlexGetPointHeight(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)

Get the height of a given point

Not Collective

Input Parameters:

  • dm - The DMPLEX object
  • point - The point

Output Parameter:

  • height - The height of the point

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetCellType(), DMPlexGetDepthLabel(), DMPlexGetDepth(), DMPlexGetPointDepth()

External Links

source
PETSc.LibPETSc.DMPlexGetPointLocalMethod
start::PetscInt,end_::PetscInt = DMPlexGetPointLocal(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)

get location of point data in local Vec

Not Collective

Input Parameters:

  • dm - DM defining the topological space
  • point - topological point

Output Parameters:

  • start - start of point data
  • end - end of point data

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetPointLocalField(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointLocalRead(), DMPlexPointLocalRef()

External Links

source
PETSc.LibPETSc.DMPlexGetPointLocalFieldMethod
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 - DM defining the topological space
  • point - topological point
  • field - the field number

Output Parameters:

  • start - start of point data
  • end - end of point data

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetPointLocal(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointLocalRead(), DMPlexPointLocalRef()

External Links

source
PETSc.LibPETSc.DMPlexGetRedundantDMMethod
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 original DMPLEX object

Output Parameters:

  • sf - the PetscSF used for point distribution (optional)
  • redundantMesh - the redundant DM object, or NULL

Level: intermediate

-seealso: DMPLEX, DMPlexDistribute(), DMPlexGetGatherDM()

External Links

source
PETSc.LibPETSc.DMPlexGetReferenceTreeMethod
DMPlexGetReferenceTree(petsclib::PetscLibType,dm::PetscDM, ref::PetscDM)

get the reference tree for hierarchically non

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • ref - The reference tree DMPLEX object

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexSetReferenceTree(), DMPlexCreateDefaultReferenceTree()

External Links

source
PETSc.LibPETSc.DMPlexGetRefinementLimitMethod
refinementLimit::PetscReal = DMPlexGetRefinementLimit(petsclib::PetscLibType,dm::PetscDM)

Retrieve the maximum cell volume for refinement

Input Parameter:

  • dm - The DM

Output Parameter:

  • refinementLimit - The maximum cell volume in the refined mesh

Level: developer

-seealso: , DM, DMPLEX, DMRefine(), DMPlexSetRefinementLimit(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform()

External Links

source
PETSc.LibPETSc.DMPlexGetRefinementUniformMethod
refinementUniform::PetscBool = DMPlexGetRefinementUniform(petsclib::PetscLibType,dm::PetscDM)

Retrieve the flag for uniform refinement

Input Parameter:

  • dm - The DM

Output Parameter:

  • refinementUniform - The flag for uniform refinement

Level: developer

-seealso: , DM, DMPLEX, DMRefine(), DMPlexSetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()

External Links

source
PETSc.LibPETSc.DMPlexGetRegularRefinementMethod
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 - The DMPLEX object

Output Parameter:

  • regular - The flag

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexSetRegularRefinement()

External Links

source
PETSc.LibPETSc.DMPlexGetScaleMethod
scale::PetscReal = DMPlexGetScale(petsclib::PetscLibType,dm::PetscDM, unit::PetscUnit)

Get the scale for the specified fundamental unit

Not Collective

Input Parameters:

  • dm - the DM
  • unit - 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

source
PETSc.LibPETSc.DMPlexGetSimplexOrBoxCellsMethod
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 - The DMPLEX object
  • height - The cell height in the Plex, 0 is the default

Output Parameters:

  • cStart - The first "normal" cell, pass NULL if not needed
  • cEnd - The upper bound on "normal" cells, pass NULL if not needed

Level: developer

-seealso: , DM, DMPLEX, DMPlexConstructGhostCells(), DMPlexGetCellTypeStratum()

External Links

source
PETSc.LibPETSc.DMPlexGetSubdomainSectionMethod
DMPlexGetSubdomainSection(petsclib::PetscLibType,dm::PetscDM, subsection::PetscSection)

Returns the section associated with the subdomain

Not Collective

Input Parameter:

  • dm - The DMPLEX

Output Parameter:

  • subsection - The subdomain section

Level: developer

-seealso: , DM, DMPLEX, PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetSubpointISMethod
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 submesh DM

Output Parameter:

  • subpointIS - The IS of all the points from the original mesh in this submesh, or NULL if this is not a submesh

Level: developer

-seealso: , DM, DMPLEX, DMPlexCreateSubmesh(), DMPlexGetSubpointMap()

External Links

source
PETSc.LibPETSc.DMPlexGetSubpointMapMethod
DMPlexGetSubpointMap(petsclib::PetscLibType,dm::PetscDM, subpointMap::DMLabel)

Returns a DMLabel with point dimension as values

Input Parameter:

  • dm - The submesh DM

Output Parameter:

  • subpointMap - The DMLabel of all the points from the original mesh in this submesh, or NULL if this is not a submesh

Level: developer

-seealso: , DM, DMPLEX, DMPlexCreateSubmesh(), DMPlexGetSubpointIS()

External Links

source
PETSc.LibPETSc.DMPlexGetSupportMethod
support::Vector{PetscInt} = DMPlexGetSupport(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)

Return the points on the out

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()

Output Parameter:

  • support - An array of points which are on the out-edges for point p, its length is that obtained from DMPlexGetSupportSize()

Level: beginner

-seealso: , DM, DMPLEX, DMPlexGetSupportSize(), DMPlexSetSupport(), DMPlexGetCone(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetSupportSectionMethod
DMPlexGetSupportSection(petsclib::PetscLibType,dm::PetscDM, section::PetscSection)

Return a section which describes the layout of support data

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • section - The PetscSection object

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetConeSection(), PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetSupportSizeMethod
size::PetscInt = DMPlexGetSupportSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt)

Return the number of out

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()

Output Parameter:

  • size - The support size for point p

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart(), DMPlexGetConeSize()

External Links

source
PETSc.LibPETSc.DMPlexGetTransformTypeMethod
type::DMPlexTransformType = DMPlexGetTransformType(petsclib::PetscLibType,dm::PetscDM)

Retrieve the transform type for uniform refinement

Input Parameter:

  • dm - The DM

Output Parameter:

  • type - The transform type for uniform refinement

Level: developer

-seealso: , DM, DMPLEX, DMPlexTransformType, DMRefine(), DMPlexSetTransformType(), DMPlexGetRefinementUniform()

External Links

source
PETSc.LibPETSc.DMPlexGetTransitiveClosureMethod
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 - The DMPLEX
  • p - The mesh point
  • useCone - PETSC_TRUE for 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, so points is of size 2*numPoints

Level: beginner

-seealso: , DM, DMPLEX, DMPlexRestoreTransitiveClosure(), DMPlexCreate(), DMPlexSetCone(), DMPlexSetChart(), DMPlexGetCone()

External Links

source
PETSc.LibPETSc.DMPlexGetTreeMethod
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 - the DMPLEX object

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 parents
  • childIDs - 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 section
  • children - a list of the point children

Level: intermediate

-seealso: , DM, DMPLEX,DMPlexSetTree(), DMPlexSetReferenceTree(), DMPlexSetAnchors(), DMPlexGetTreeParent(), DMPlexGetTreeChildren()

External Links

source
PETSc.LibPETSc.DMPlexGetTreeChildrenMethod
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 - the DMPLEX object
  • point - the query point

Output Parameters:

  • numChildren - if not NULL, set to the number of children
  • children - if not NULL, set to a list children, or set to NULL if the point has no children

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexSetTree(), DMPlexGetTree(), DMPlexGetTreeParent()

External Links

source
PETSc.LibPETSc.DMPlexGetTreeParentMethod
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 - the DMPLEX object
  • point - the query point

Output Parameters:

  • parent - if not NULL, set to the parent of the point, or the point itself if the point does not have a parent
  • childID - if not NULL, 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

source
PETSc.LibPETSc.DMPlexGetVTKCellHeightMethod
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 - The DMPLEX object

Output Parameter:

  • cellHeight - The height of a cell

Level: developer

-seealso: , DM, DMPLEX, DMPlexSetVTKCellHeight()

External Links

source
PETSc.LibPETSc.DMPlexGetVertexNumberingMethod
DMPlexGetVertexNumbering(petsclib::PetscLibType,dm::PetscDM, globalVertexNumbers::IS)

Get a global vertex numbering for all vertices on this process

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • globalVertexNumbers - Global vertex numbers for all vertices on this process

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetCellNumbering()

External Links

source
PETSc.LibPETSc.DMPlexGlobalToLocalBasisMethod
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 - The DM
  • lv - 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

source
PETSc.LibPETSc.DMPlexGlobalToNaturalBeginMethod
DMPlexGlobalToNaturalBegin(petsclib::PetscLibType,dm::PetscDM, gv::PetscVec, nv::PetscVec)

Rearranges a global Vec in the natural order.

Collective

Input Parameters:

  • dm - The distributed DMPLEX
  • gv - The global Vec

Output Parameter:

  • nv - Vec in the canonical ordering distributed over all processors associated with gv

Level: intermediate

-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalEnd()

External Links

source
PETSc.LibPETSc.DMPlexGlobalToNaturalEndMethod
DMPlexGlobalToNaturalEnd(petsclib::PetscLibType,dm::PetscDM, gv::PetscVec, nv::PetscVec)

Rearranges a global Vec in the natural order.

Collective

Input Parameters:

  • dm - The distributed DMPLEX
  • gv - The global Vec

Output Parameter:

  • nv - The natural Vec

Level: intermediate

-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalBegin()

External Links

source
PETSc.LibPETSc.DMPlexGlobalVectorLoadMethod
DMPlexGlobalVectorLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec)

Loads on

Collective

Input Parameters:

  • dm - The DM that represents the topology
  • viewer - The PetscViewer that represents the on-disk vector data
  • sectiondm - The DM that contains the global section on which vec is defined, can be NULL
  • sf - The PetscSF that migrates the on-disk vector data into vec
  • vec - The global vector to set values of

Level: advanced

-seealso: , DM, DMPLEX, DMPlexTopologyLoad(), DMPlexSectionLoad(), DMPlexLocalVectorLoad(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(), PetscSF, PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexGlobalVectorViewMethod
DMPlexGlobalVectorView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec)

Saves a global vector

Collective

Input Parameters:

  • dm - The DM that represents the topology
  • viewer - The PetscViewer to save data with
  • sectiondm - The DM that contains the global section on which vec is defined, can be NULL
  • vec - The global vector to be saved

Level: advanced

-seealso: , DM, DMPLEX, DMPlexTopologyView(), DMPlexSectionView(), DMPlexLocalVectorView(), DMPlexGlobalVectorLoad(), DMPlexLocalVectorLoad()

External Links

source
PETSc.LibPETSc.DMPlexInflateToGeomModelMethod
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 object
  • useTUV - 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

source
PETSc.LibPETSc.DMPlexInflateToGeomModelUseTUVMethod
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

source
PETSc.LibPETSc.DMPlexInflateToGeomModelUseXYZMethod
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 uninflated DM object representing the mesh

Level: intermediate

-seealso: , DM, DMPLEX, DMCreate(), DMPlexCreateEGADS()

External Links

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesMethod
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 - The DM
  • insertEssential - Should I insert essential (e.g. Dirichlet) or inessential (e.g. Neumann) boundary conditions
  • time - The time
  • faceGeomFVM - Face geometry data for FV discretizations
  • cellGeomFVM - Cell geometry data for FV discretizations
  • gradFVM - Gradient reconstruction data for FV discretizations

Output Parameter:

  • locX - Solution updated with boundary values

Level: intermediate

-seealso: , DM, DMPLEX, DMProjectFunctionLabelLocal(), DMAddBoundary()

External Links

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesEssentialMethod
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 - The DM, with a PetscDS that matches the problem being constrained
  • time - The time
  • field - The field to constrain
  • Nc - The number of constrained field components, or 0 for all components
  • comps - An array of constrained component numbers, or NULL for all components
  • label - The DMLabel defining constrained points
  • numids - The number of DMLabel ids for constrained points
  • ids - An array of ids for constrained points
  • func - A pointwise function giving boundary values
  • ctx - 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

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesEssentialBdFieldMethod
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 - The DM, with a PetscDS that matches the problem being constrained
  • time - The time
  • locU - A local vector with the input solution values
  • field - The field to constrain
  • Nc - The number of constrained field components, or 0 for all components
  • comps - An array of constrained component numbers, or NULL for all components
  • label - The DMLabel defining constrained points
  • numids - The number of DMLabel ids for constrained points
  • ids - An array of ids for constrained points
  • func - A pointwise function giving boundary values, the calling sequence is given in DMProjectBdFieldLabelLocal()
  • ctx - An optional user context for func

Output Parameter:

  • locX - A local vector to receive the boundary values

Level: developer

-seealso: , DM, DMPLEX, DMProjectBdFieldLabelLocal(), DMPlexInsertBoundaryValuesEssential(), DMPlexInsertBoundaryValuesEssentialField(), DMAddBoundary()

External Links

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesEssentialFieldMethod
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 - The DM, with a PetscDS that matches the problem being constrained
  • time - The time
  • locU - A local vector with the input solution values
  • field - The field to constrain
  • Nc - The number of constrained field components, or 0 for all components
  • comps - An array of constrained component numbers, or NULL for all components
  • label - The DMLabel defining constrained points
  • numids - The number of DMLabel ids for constrained points
  • ids - An array of ids for constrained points
  • func - A pointwise function giving boundary values
  • ctx - 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

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesRiemannMethod
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 - The DM, with a PetscDS that matches the problem being constrained
  • time - The time
  • faceGeometry - A vector with the FVM face geometry information
  • cellGeometry - A vector with the FVM cell geometry information
  • Grad - A vector with the FVM cell gradient information
  • field - The field to constrain
  • Nc - The number of constrained field components, or 0 for all components
  • comps - An array of constrained component numbers, or NULL for all components
  • label - The DMLabel defining constrained points
  • numids - The number of DMLabel ids for constrained points
  • ids - An array of ids for constrained points
  • func - A pointwise function giving boundary values
  • ctx - 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

source
PETSc.LibPETSc.DMPlexInsertBoundsMethod
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 - The DM
  • lower - If PETSC_TRUE use DM_BC_LOWER_BOUND conditions, otherwise use DM_BC_UPPER_BOUND
  • time - The time

Output Parameter:

  • locB - Bounds vector updated with new bounds

Level: intermediate

-seealso: , DM, DMPLEX, DMProjectFunctionLabelLocal(), PetscDSAddBoundary()

External Links

source
PETSc.LibPETSc.DMPlexInsertConeMethod
DMPlexInsertCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, conePos::PetscInt, conePoint::PetscInt)

Insert a point into the in

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()
  • conePos - The local index in the cone where the point should be put
  • conePoint - The mesh point to insert

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexInsertConeOrientationMethod
DMPlexInsertConeOrientation(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, conePos::PetscInt, coneOrientation::PetscInt)

Insert a point orientation for the in

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()
  • conePos - The local index in the cone where the point should be put
  • coneOrientation - The point orientation to insert

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexInsertSupportMethod
DMPlexInsertSupport(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, supportPos::PetscInt, supportPoint::PetscInt)

Insert a point into the out

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()
  • supportPos - The local index in the cone where the point should be put
  • supportPoint - The mesh point to insert

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexInsertTimeDerivativeBoundaryValuesMethod
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 - The DM
  • insertEssential - Should I insert essential (e.g. Dirichlet) or inessential (e.g. Neumann) boundary conditions
  • time - The time
  • faceGeomFVM - Face geometry data for FV discretizations
  • cellGeomFVM - Cell geometry data for FV discretizations
  • gradFVM - Gradient reconstruction data for FV discretizations

Output Parameter:

  • locX_t - Solution updated with boundary values

Level: developer

-seealso: , DM, DMPLEX, DMProjectFunctionLabelLocal()

External Links

source
PETSc.LibPETSc.DMPlexInterpolateMethod
DMPlexInterpolate(petsclib::PetscLibType,dm::PetscDM, dmInt::PetscDM)

Take in a cell

Collective

Input Parameter:

  • dm - The DMPLEX object with only cells and vertices

Output Parameter:

  • dmInt - The complete DMPLEX object

Level: intermediate

-seealso: DMPLEX, DMPlexUninterpolate(), DMPlexCreateFromCellListPetsc(), DMPlexCopyCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexInterpolatePointSFMethod
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 interpolated DMPLEX
  • pointSF - The initial PetscSF without interpolated points

Level: developer

-seealso: DMPLEX, DMPlexInterpolate(), DMPlexUninterpolate()

External Links

source
PETSc.LibPETSc.DMPlexInvertCellMethod
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 type
  • cone - The incoming cone

Output Parameter:

  • cone - The inverted cone (in-place)

Level: developer

-seealso: , DM, DMPLEX, DMPolytopeType, DMPlexGenerate()

External Links

source
PETSc.LibPETSc.DMPlexIsDistributedMethod
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 - The DM object

Output Parameter:

  • distributed - Flag whether the DM is distributed

Level: intermediate

-seealso: DMPLEX, DMPlexDistribute(), DMPlexGetOverlap(), DMPlexIsInterpolated()

External Links

source
PETSc.LibPETSc.DMPlexIsInterpolatedMethod
DMPlexIsInterpolated(petsclib::PetscLibType,dm::PetscDM, interpolated::DMPlexInterpolatedFlag)

Find out to what extent the DMPLEX is topologically interpolated.

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • interpolated - Flag whether the DM is interpolated

Level: intermediate

-seealso: DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolatedCollective()

External Links

source
PETSc.LibPETSc.DMPlexIsInterpolatedCollectiveMethod
DMPlexIsInterpolatedCollective(petsclib::PetscLibType,dm::PetscDM, interpolated::DMPlexInterpolatedFlag)

Find out to what extent the DMPLEX is topologically interpolated (in collective manner).

Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • interpolated - Flag whether the DM is interpolated

Level: intermediate

-seealso: DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolated()

External Links

source
PETSc.LibPETSc.DMPlexIsSimplexMethod
simplex::PetscBool = DMPlexIsSimplex(petsclib::PetscLibType,dm::PetscDM)

Is the first cell in this mesh a simplex?

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • simplex - Flag checking for a simplex

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetSimplexOrBoxCells(), DMPlexGetCellType(), DMPlexGetHeightStratum(), DMPolytopeTypeGetNumVertices()

External Links

source
PETSc.LibPETSc.DMPlexLabelAddCellsMethod
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 - The DM
  • label - A DMLabel marking the surface points

Output Parameter:

  • label - A DMLabel incorporating cells

Level: developer

-seealso: , DM, DMPLEX, DMPlexLabelAddFaceCells(), DMPlexLabelComplete(), DMPlexLabelCohesiveComplete()

External Links

source
PETSc.LibPETSc.DMPlexLabelAddFaceCellsMethod
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 - The DM
  • label - A DMLabel marking the surface points

Output Parameter:

  • label - A DMLabel incorporating cells

Level: developer

-seealso: , DM, DMPLEX, DMPlexLabelAddCells(), DMPlexLabelComplete(), DMPlexLabelCohesiveComplete()

External Links

source
PETSc.LibPETSc.DMPlexLabelClearCellsMethod
DMPlexLabelClearCells(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)

Remove cells from a label

Input Parameters:

  • dm - The DM
  • label - A DMLabel marking surface points and their adjacent cells

Output Parameter:

  • label - A DMLabel without cells

Level: developer

-seealso: , DM, DMPLEX, DMPlexLabelComplete(), DMPlexLabelCohesiveComplete(), DMPlexLabelAddCells()

External Links

source
PETSc.LibPETSc.DMPlexLabelCohesiveCompleteMethod
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 - The DM
  • label - A DMLabel marking the surface
  • blabel - A DMLabel marking the vertices on the boundary which will not be duplicated, or NULL to find them automatically
  • bvalue - Value of DMLabel marking the vertices on the boundary
  • flip - Flag to flip the submesh normal and replace points on the other side
  • split - Split faces impinging on the surface, rather than clamping the surface boundary
  • subdm - The DM associated with the label, or NULL

Output Parameter:

  • label - A DMLabel marking all surface points

Level: developer

-seealso: , DM, DMPLEX, DMPlexConstructCohesiveCells(), DMPlexLabelComplete()

External Links

source
PETSc.LibPETSc.DMPlexLabelCompleteMethod
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 - The DM
  • label - A DMLabel marking the surface points

Output Parameter:

  • label - A DMLabel marking all surface points in the transitive closure

Level: developer

-seealso: , DM, DMPLEX, DMPlexLabelCohesiveComplete()

External Links

source
PETSc.LibPETSc.DMPlexLabelsLoadMethod
DMPlexLabelsLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF)

Loads labels into a DMPLEX

Collective

Input Parameters:

  • dm - The DM into which the labels are loaded
  • viewer - The PetscViewer for the saved labels
  • globalToLocalPointSF - The PetscSF returned by DMPlexTopologyLoad() when loading dm from viewer

Level: advanced

-seealso: , DM, DMPLEX, DMLoad(), DMPlexTopologyLoad(), DMPlexCoordinatesLoad(), DMView(), PetscViewerHDF5Open(), PetscViewerPushFormat(), PetscSF, PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexLabelsViewMethod
DMPlexLabelsView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer)

Saves DMPLEX labels into a file

Collective

Input Parameters:

  • dm - The DM whose labels are to be saved
  • viewer - The PetscViewer for saving

Level: advanced

-seealso: , DM, DMPLEX, DMView(), DMPlexTopologyView(), DMPlexCoordinatesView(), DMPlexLabelsLoad(), PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexLandauAccessMethod
DMPlexLandauAccess(petsclib::PetscLibType,pack::PetscDM, X::PetscVec, func::external, user_ctx::Cvoid)

Access to the distribution function with user callback

Collective

Input Parameters:

  • pack - the DMCOMPOSITE
  • func - call back function
  • user_ctx - user context

Input/Output Parameter:

  • X - Vector to data to

Level: advanced

-seealso: DMPlexLandauCreateVelocitySpace()

External Links

source
PETSc.LibPETSc.DMPlexLandauAddMaxwelliansMethod
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 time
  • temps - Temperatures of each species (global)
  • ns - Number density of each species (global)
  • grid - index into current grid - just used for offset into temp and ns
  • b_id - batch index
  • n_batch - number of batches
  • actx - Landau context

Output Parameter:

  • X - The state (local to this grid)

Level: beginner

-seealso: DMPlexLandauCreateVelocitySpace()

External Links

source
PETSc.LibPETSc.DMPlexLandauCreateMassMatrixMethod
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 - the DM object. Puts matrix in Landau context M field

Output Parameter:

  • Amat - The mass matrix (optional), mass matrix is added to the DM context

Level: beginner

-seealso: DMPlexLandauCreateVelocitySpace()

External Links

source
PETSc.LibPETSc.DMPlexLandauCreateVelocitySpaceMethod
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 communicator
  • dim - velocity space dimension (2 for axisymmetric, 3 for full 3X + 3V solver)
  • prefix - prefix for options (not tested)

Output Parameters:

  • pack - The DM object representing the mesh
  • X - A vector (user destroys)
  • J - Optional matrix (object destroys)

Level: beginner

-seealso: DMPlexCreate(), DMPlexLandauDestroyVelocitySpace()

External Links

source
PETSc.LibPETSc.DMPlexLandauIFunctionMethod
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 context
  • time_dummy - current time (not used)
  • X - Current state
  • X_t - Time derivative of current state
  • actx - Landau context

Output Parameter:

  • F - The residual

Level: beginner

-seealso: DMPlexLandauCreateVelocitySpace(), DMPlexLandauIJacobian()

External Links

source
PETSc.LibPETSc.DMPlexLandauIJacobianMethod
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 context
  • time_dummy - current time (not used)
  • X - Current state
  • U_tdummy - Time derivative of current state (not used)
  • shift - shift for du/dt term
  • actx - Landau context

Output Parameters:

  • Amat - Jacobian
  • Pmat - same as Amat

Level: beginner

-seealso: DMPlexLandauCreateVelocitySpace(), DMPlexLandauIFunction()

External Links

source
PETSc.LibPETSc.DMPlexLandauPrintNormsMethod
DMPlexLandauPrintNorms(petsclib::PetscLibType,X::PetscVec, stepi::PetscInt)

collects moments and prints them

Collective

Input Parameters:

  • X - the state
  • stepi - current step to print

Level: beginner

-seealso: DMPlexLandauCreateVelocitySpace()

External Links

source
PETSc.LibPETSc.DMPlexLocalToGlobalBasisMethod
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 - The DM
  • lv - 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

source
PETSc.LibPETSc.DMPlexLocalVectorLoadMethod
DMPlexLocalVectorLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, sf::PetscSF, vec::PetscVec)

Loads on

Collective

Input Parameters:

  • dm - The DM that represents the topology
  • viewer - The PetscViewer that represents the on-disk vector data
  • sectiondm - The DM that contains the local section on which vec is defined, can be NULL
  • sf - The PetscSF that migrates the on-disk vector data into vec
  • vec - The local vector to set values of

Level: advanced

-seealso: , DM, DMPLEX, DMPlexTopologyLoad(), DMPlexSectionLoad(), DMPlexGlobalVectorLoad(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(), PetscSF, PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexLocalVectorViewMethod
DMPlexLocalVectorView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, vec::PetscVec)

Saves a local vector

Collective

Input Parameters:

  • dm - The DM that represents the topology
  • viewer - The PetscViewer to save data with
  • sectiondm - The DM that contains the local section on which vec is defined, can be NULL
  • vec - The local vector to be saved

Level: advanced

-seealso: , DM, DMPLEX, DMPlexTopologyView(), DMPlexSectionView(), DMPlexGlobalVectorView(), DMPlexGlobalVectorLoad(), DMPlexLocalVectorLoad()

External Links

source
PETSc.LibPETSc.DMPlexMarkBoundaryFacesMethod
DMPlexMarkBoundaryFaces(petsclib::PetscLibType,dm::PetscDM, val::PetscInt, label::DMLabel)

Mark all faces on the boundary

Collective

Input Parameters:

  • dm - The original DM
  • val - The marker value, or PETSC_DETERMINE to use some value in the closure (or 1 if none are found)

Output Parameter:

  • label - The DMLabel marking boundary faces with the given value

Level: developer

-seealso: , DM, DMPLEX, DMLabelCreate(), DMCreateLabel()

External Links

source
PETSc.LibPETSc.DMPlexMatSetClosureMethod
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 - The DM
  • section - The section describing the layout in v, or NULL to use the default section
  • globalSection - The section describing the layout in v, or NULL to use the default global section
  • A - The matrix
  • point - The point in the DM
  • values - The array of values
  • mode - The insert mode, where INSERT_ALL_VALUES and ADD_ALL_VALUES also overwrite boundary conditions

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexMatSetClosureGeneral(), DMPlexVecGetClosure(), DMPlexVecSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexMatSetClosureGeneralMethod
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 - The DM for the row fields
  • sectionRow - The section describing the layout, or NULL to use the default section in dmRow
  • useRowPerm - The flag to use the closure permutation of the dmRow if available
  • globalSectionRow - The section describing the layout, or NULL to use the default global section in dmRow
  • dmCol - The DM for the column fields
  • sectionCol - The section describing the layout, or NULL to use the default section in dmCol
  • useColPerm - The flag to use the closure permutation of the dmCol if available
  • globalSectionCol - The section describing the layout, or NULL to use the default global section in dmCol
  • A - The matrix
  • point - The point in the DM
  • values - The array of values
  • mode - The insert mode, where INSERT_ALL_VALUES and ADD_ALL_VALUES also overwrite boundary conditions

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexMatSetClosure(), DMPlexVecGetClosure(), DMPlexVecSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexMetricAverageMethod
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 - The DM
  • numMetrics - The number of metrics to be averaged
  • weights - Weights for the average
  • metrics - The metrics to be averaged

Output Parameter:

  • metricAvg - The averaged metric

Level: beginner

-seealso: DMPLEX, DMPlexMetricAverage2(), DMPlexMetricAverage3(), DMPlexMetricIntersection()

External Links

source
PETSc.LibPETSc.DMPlexMetricAverage2Method
DMPlexMetricAverage2(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricAvg::PetscVec)

Compute the unweighted average of two metrics

Input Parameters:

  • dm - The DM
  • metric1 - The first metric to be averaged
  • metric2 - The second metric to be averaged

Output Parameter:

  • metricAvg - The averaged metric

Level: beginner

-seealso: DMPLEX, DMPlexMetricAverage(), DMPlexMetricAverage3()

External Links

source
PETSc.LibPETSc.DMPlexMetricAverage3Method
DMPlexMetricAverage3(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricAvg::PetscVec)

Compute the unweighted average of three metrics

Input Parameters:

  • dm - The DM
  • metric1 - The first metric to be averaged
  • metric2 - The second metric to be averaged
  • metric3 - The third metric to be averaged

Output Parameter:

  • metricAvg - The averaged metric

Level: beginner

-seealso: DMPLEX, DMPlexMetricAverage(), DMPlexMetricAverage2()

External Links

source
PETSc.LibPETSc.DMPlexMetricCreateMethod
metric::PetscVec = DMPlexMetricCreate(petsclib::PetscLibType,dm::PetscDM, f::PetscInt)

Create a Riemannian metric field

Input Parameters:

  • dm - The DM
  • f - 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

source
PETSc.LibPETSc.DMPlexMetricCreateIsotropicMethod
metric::PetscVec = DMPlexMetricCreateIsotropic(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, indicator::PetscVec)

Construct an isotropic metric from an error indicator

Input Parameters:

  • dm - The DM
  • f - The field number to use
  • indicator - The error indicator

Output Parameter:

  • metric - The isotropic metric

Level: beginner

-seealso: DMPLEX, DMPlexMetricCreate(), DMPlexMetricCreateUniform()

External Links

source
PETSc.LibPETSc.DMPlexMetricCreateUniformMethod
metric::PetscVec = DMPlexMetricCreateUniform(petsclib::PetscLibType,dm::PetscDM, f::PetscInt, alpha::PetscReal)

Construct a uniform isotropic metric

Input Parameters:

  • dm - The DM
  • f - The field number to use
  • alpha - Scaling parameter for the diagonal

Output Parameter:

  • metric - The uniform metric

Level: beginner

-seealso: DMPLEX, DMPlexMetricCreate(), DMPlexMetricCreateIsotropic()

External Links

source
PETSc.LibPETSc.DMPlexMetricDeterminantCreateMethod
determinant::PetscVec,dmDet::PetscDM = DMPlexMetricDeterminantCreate(petsclib::PetscLibType,dm::PetscDM, f::PetscInt)

Create the determinant field for a Riemannian metric

Input Parameters:

  • dm - The DM of the metric field
  • f - The field number to use

Output Parameters:

  • determinant - The determinant field
  • dmDet - The corresponding DM

Level: beginner

-seealso: DMPLEX, DMPlexMetricCreateUniform(), DMPlexMetricCreateIsotropic(), DMPlexMetricCreate()

External Links

source
PETSc.LibPETSc.DMPlexMetricEnforceSPDMethod
DMPlexMetricEnforceSPD(petsclib::PetscLibType,dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec)

Enforce symmetric positive

Input Parameters:

  • dm - The DM
  • metricIn - The metric
  • restrictSizes - Should maximum/minimum metric magnitudes be enforced?
  • restrictAnisotropy - Should maximum anisotropy be enforced?

Output Parameters:

  • metricOut - The metric
  • determinant - 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

source
PETSc.LibPETSc.DMPlexMetricGetMaximumMagnitudeMethod
h_max::PetscReal = DMPlexMetricGetMaximumMagnitude(petsclib::PetscLibType,dm::PetscDM)

Get the maximum tolerated metric magnitude

Input Parameters:

  • dm - The DM

Output Parameters:

  • h_max - The maximum tolerated metric magnitude

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetMaximumMagnitude(), DMPlexMetricGetMinimumMagnitude()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetMinimumMagnitudeMethod
h_min::PetscReal = DMPlexMetricGetMinimumMagnitude(petsclib::PetscLibType,dm::PetscDM)

Get the minimum tolerated metric magnitude

Input Parameters:

  • dm - The DM

Output Parameters:

  • h_min - The minimum tolerated metric magnitude

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetMinimumMagnitude(), DMPlexMetricGetMaximumMagnitude()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetNumIterationsMethod
numIter::PetscInt = DMPlexMetricGetNumIterations(petsclib::PetscLibType,dm::PetscDM)

Get the number of parallel adaptation iterations

Input Parameters:

  • dm - The DM

Output Parameters:

  • numIter - the number of parallel adaptation iterations

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetNumIterations(), DMPlexMetricGetVerbosity()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetTargetComplexityMethod
targetComplexity::PetscReal = DMPlexMetricGetTargetComplexity(petsclib::PetscLibType,dm::PetscDM)

Get the target metric complexity

Input Parameters:

  • dm - The DM

Output Parameters:

  • targetComplexity - The target metric complexity

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetTargetComplexity(), DMPlexMetricGetNormalizationOrder()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetVerbosityMethod
verbosity::PetscInt = DMPlexMetricGetVerbosity(petsclib::PetscLibType,dm::PetscDM)

Get the verbosity of the mesh adaptation package

Input Parameters:

  • dm - The DM

Output Parameters:

  • verbosity - The verbosity, where -1 is silent and 10 is maximum

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetVerbosity(), DMPlexMetricGetNumIterations()

External Links

source
PETSc.LibPETSc.DMPlexMetricIntersectionMethod
DMPlexMetricIntersection(petsclib::PetscLibType,dm::PetscDM, numMetrics::PetscInt, metrics::Vector{PetscVec}, metricInt::PetscVec)

Compute the intersection of a list of metrics

Input Parameters:

  • dm - The DM
  • numMetrics - The number of metrics to be intersected
  • metrics - The metrics to be intersected

Output Parameter:

  • metricInt - The intersected metric

Level: beginner

-seealso: DMPLEX, DMPlexMetricIntersection2(), DMPlexMetricIntersection3(), DMPlexMetricAverage()

External Links

source
PETSc.LibPETSc.DMPlexMetricIntersection2Method
DMPlexMetricIntersection2(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metricInt::PetscVec)

Compute the intersection of two metrics

Input Parameters:

  • dm - The DM
  • metric1 - The first metric to be intersected
  • metric2 - The second metric to be intersected

Output Parameter:

  • metricInt - The intersected metric

Level: beginner

-seealso: DMPLEX, DMPlexMetricIntersection(), DMPlexMetricIntersection3()

External Links

source
PETSc.LibPETSc.DMPlexMetricIntersection3Method
DMPlexMetricIntersection3(petsclib::PetscLibType,dm::PetscDM, metric1::PetscVec, metric2::PetscVec, metric3::PetscVec, metricInt::PetscVec)

Compute the intersection of three metrics

Input Parameters:

  • dm - The DM
  • metric1 - The first metric to be intersected
  • metric2 - The second metric to be intersected
  • metric3 - The third metric to be intersected

Output Parameter:

  • metricInt - The intersected metric

Level: beginner

-seealso: DMPLEX, DMPlexMetricIntersection(), DMPlexMetricIntersection2()

External Links

source
PETSc.LibPETSc.DMPlexMetricIsIsotropicMethod
isotropic::PetscBool = DMPlexMetricIsIsotropic(petsclib::PetscLibType,dm::PetscDM)

Is a metric isotropic?

Input Parameters:

  • dm - The DM

Output Parameters:

  • isotropic - Is the metric isotropic?

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetIsotropic(), DMPlexMetricIsUniform(), DMPlexMetricRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricIsUniformMethod
uniform::PetscBool = DMPlexMetricIsUniform(petsclib::PetscLibType,dm::PetscDM)

Is a metric uniform?

Input Parameters:

  • dm - The DM

Output Parameters:

  • uniform - Is the metric uniform?

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetUniform(), DMPlexMetricIsIsotropic(), DMPlexMetricRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricNoInsertionMethod
noInsert::PetscBool = DMPlexMetricNoInsertion(petsclib::PetscLibType,dm::PetscDM)

Are node insertion and deletion turned off?

Input Parameters:

  • dm - The DM

Output Parameters:

  • noInsert - Are node insertion and deletion turned off?

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetNoInsertion(), DMPlexMetricNoSwapping(), DMPlexMetricNoMovement(), DMPlexMetricNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricNoMovementMethod
noMove::PetscBool = DMPlexMetricNoMovement(petsclib::PetscLibType,dm::PetscDM)

Is node movement turned off?

Input Parameters:

  • dm - The DM

Output Parameters:

  • noMove - Is node movement turned off?

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetNoMovement(), DMPlexMetricNoInsertion(), DMPlexMetricNoSwapping(), DMPlexMetricNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricNoSurfMethod
noSurf::PetscBool = DMPlexMetricNoSurf(petsclib::PetscLibType,dm::PetscDM)

Is surface modification turned off?

Input Parameters:

  • dm - The DM

Output Parameters:

  • noSurf - Is surface modification turned off?

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetNoSurf(), DMPlexMetricNoMovement(), DMPlexMetricNoInsertion(), DMPlexMetricNoSwapping()

External Links

source
PETSc.LibPETSc.DMPlexMetricNoSwappingMethod
noSwap::PetscBool = DMPlexMetricNoSwapping(petsclib::PetscLibType,dm::PetscDM)

Is facet swapping turned off?

Input Parameters:

  • dm - The DM

Output Parameters:

  • noSwap - Is facet swapping turned off?

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetNoSwapping(), DMPlexMetricNoInsertion(), DMPlexMetricNoMovement(), DMPlexMetricNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricNormalizeMethod
DMPlexMetricNormalize(petsclib::PetscLibType,dm::PetscDM, metricIn::PetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::PetscVec, determinant::PetscVec)

Apply L

Input Parameters:

  • dm - The DM
  • metricIn - The unnormalized metric
  • restrictSizes - Should maximum/minimum metric magnitudes be enforced?
  • restrictAnisotropy - Should maximum metric anisotropy be enforced?

Output Parameters:

  • metricOut - The normalized metric
  • determinant - 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

source
PETSc.LibPETSc.DMPlexMetricRestrictAnisotropyFirstMethod
restrictAnisotropyFirst::PetscBool = DMPlexMetricRestrictAnisotropyFirst(petsclib::PetscLibType,dm::PetscDM)

Is anisotropy restricted before normalization or after?

Input Parameters:

  • dm - The DM

Output Parameters:

  • restrictAnisotropyFirst - Is anisotropy be normalized first?

Level: beginner

-seealso: DMPLEX, DMPlexMetricIsIsotropic(), DMPlexMetricSetRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetIsotropicMethod
DMPlexMetricSetIsotropic(petsclib::PetscLibType,dm::PetscDM, isotropic::PetscBool)

Record whether a metric is isotropic

Input Parameters:

  • dm - The DM
  • isotropic - Is the metric isotropic?

Level: beginner

-seealso: DMPLEX, DMPlexMetricIsIsotropic(), DMPlexMetricSetUniform(), DMPlexMetricSetRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNoInsertionMethod
DMPlexMetricSetNoInsertion(petsclib::PetscLibType,dm::PetscDM, noInsert::PetscBool)

Should node insertion and deletion be turned off?

Input Parameters:

  • dm - The DM
  • noInsert - Should node insertion and deletion be turned off?

Level: beginner

-seealso: DMPLEX, DMPlexMetricNoInsertion(), DMPlexMetricSetNoSwapping(), DMPlexMetricSetNoMovement(), DMPlexMetricSetNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNoMovementMethod
DMPlexMetricSetNoMovement(petsclib::PetscLibType,dm::PetscDM, noMove::PetscBool)

Should node movement be turned off?

Input Parameters:

  • dm - The DM
  • noMove - Should node movement be turned off?

Level: beginner

-seealso: DMPLEX, DMPlexMetricNoMovement(), DMPlexMetricSetNoInsertion(), DMPlexMetricSetNoSwapping(), DMPlexMetricSetNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNoSurfMethod
DMPlexMetricSetNoSurf(petsclib::PetscLibType,dm::PetscDM, noSurf::PetscBool)

Should surface modification be turned off?

Input Parameters:

  • dm - The DM
  • noSurf - Should surface modification be turned off?

Level: beginner

-seealso: DMPLEX, DMPlexMetricNoSurf(), DMPlexMetricSetNoMovement(), DMPlexMetricSetNoInsertion(), DMPlexMetricSetNoSwapping()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNoSwappingMethod
DMPlexMetricSetNoSwapping(petsclib::PetscLibType,dm::PetscDM, noSwap::PetscBool)

Should facet swapping be turned off?

Input Parameters:

  • dm - The DM
  • noSwap - Should facet swapping be turned off?

Level: beginner

-seealso: DMPLEX, DMPlexMetricNoSwapping(), DMPlexMetricSetNoInsertion(), DMPlexMetricSetNoMovement(), DMPlexMetricSetNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNumIterationsMethod
DMPlexMetricSetNumIterations(petsclib::PetscLibType,dm::PetscDM, numIter::PetscInt)

Set the number of parallel adaptation iterations

Input Parameters:

  • dm - The DM
  • numIter - the number of parallel adaptation iterations

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetVerbosity(), DMPlexMetricGetNumIterations()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetRestrictAnisotropyFirstMethod
DMPlexMetricSetRestrictAnisotropyFirst(petsclib::PetscLibType,dm::PetscDM, restrictAnisotropyFirst::PetscBool)

Record whether anisotropy should be restricted before normalization

Input Parameters:

  • dm - The DM
  • restrictAnisotropyFirst - Should anisotropy be normalized first?

Level: beginner

-seealso: DMPLEX, DMPlexMetricSetIsotropic(), DMPlexMetricRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetUniformMethod
DMPlexMetricSetUniform(petsclib::PetscLibType,dm::PetscDM, uniform::PetscBool)

Record whether a metric is uniform

Input Parameters:

  • dm - The DM
  • uniform - Is the metric uniform?

Level: beginner

-seealso: DMPLEX, DMPlexMetricIsUniform(), DMPlexMetricSetIsotropic(), DMPlexMetricSetRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetVerbosityMethod
DMPlexMetricSetVerbosity(petsclib::PetscLibType,dm::PetscDM, verbosity::PetscInt)

Set the verbosity of the mesh adaptation package

Input Parameters:

  • dm - The DM
  • verbosity - The verbosity, where -1 is silent and 10 is maximum

Level: beginner

-seealso: DMPLEX, DMPlexMetricGetVerbosity(), DMPlexMetricSetNumIterations()

External Links

source
PETSc.LibPETSc.DMPlexMigrateMethod
DMPlexMigrate(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, targetDM::PetscDM)

Migrates internal DM data over the supplied star forest

Collective

Input Parameters:

  • dm - The source DMPLEX object
  • sf - The star forest communication context describing the migration pattern

Output Parameter:

  • targetDM - The target DMPLEX object

Level: intermediate

-seealso: DMPLEX, PetscSF, DM, DMPlexDistribute(), DMPlexDistributeOverlap()

External Links

source
PETSc.LibPETSc.DMPlexMigrateGlobalToNaturalSFMethod
DMPlexMigrateGlobalToNaturalSF(petsclib::PetscLibType,dmOld::PetscDM, dmNew::PetscDM, sfNaturalOld::PetscSF, sfMigration::PetscSF, sfNaturalNew::PetscSF)

Migrates the input sfNatural based on sfMigration

Input Parameters:

  • dmOld - The original DM
  • dmNew - The DM to be migrated to
  • sfNaturalOld - The sfNatural for the dmOld
  • sfMigration - The PetscSF used to distribute the mesh, or NULL if it cannot be computed

Output Parameter:

  • sfNaturalNew - PetscSF for mapping the Vec in PETSc ordering to the canonical ordering

Level: intermediate

-seealso: , DM, DMPLEX, PetscSF, PetscSection, DMPlexDistribute(), DMPlexDistributeField()

External Links

source
PETSc.LibPETSc.DMPlexModifyGeomModelMethod
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 model
  • comm - MPI_Comm object
  • newCP - 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

source
PETSc.LibPETSc.DMPlexMonitorThroughputMethod
DMPlexMonitorThroughput(petsclib::PetscLibType,dm::PetscDM, dummy::Cvoid)

Report the cell throughput of FE integration

Input Parameters:

  • dm - The DM
  • dummy - unused argument

Options Database Key:

  • -dm_plex_monitor_throughput - Activate the monitor

Level: developer

-seealso: , DM, DMPLEX, DMSetFromOptions(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexNaturalToGlobalBeginMethod
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 distributed DMPLEX
  • nv - The natural Vec

Output Parameter:

  • gv - The global Vec

Level: intermediate

-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexGlobalToNaturalEnd()

External Links

source
PETSc.LibPETSc.DMPlexNaturalToGlobalEndMethod
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 distributed DMPLEX
  • nv - The natural Vec

Output Parameter:

  • gv - The global Vec

Level: intermediate

-seealso: , DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalBegin()

External Links

source
PETSc.LibPETSc.DMPlexOrientPointMethod
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 - The DM
  • p - The mesh point
  • o - The orientation

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexOrient(), DMPlexGetCone(), DMPlexGetConeOrientation(), DMPlexInterpolate(), DMPlexGetChart()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelAdjacencyMethod
DMPlexPartitionLabelAdjacency(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)

Add one level of adjacent points to the partition label

Input Parameters:

  • dm - The DM
  • label - DMLabel assigning ranks to remote roots

Level: developer

-seealso: , DM, DMPLEX, DMLabel, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelClosureMethod
DMPlexPartitionLabelClosure(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)

Add the closure of all points to the partition label

Input Parameters:

  • dm - The DM
  • label - DMLabel assigning ranks to remote roots

Level: developer

-seealso: , DM, DMPLEX, DMLabel, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelCreateSFMethod
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 - The DM
  • label - DMLabel assigning ranks to remote roots
  • sortRanks - Whether or not to sort the PetscSF leaves by rank

Output Parameter:

  • sf - The star forest communication context encapsulating the defined mapping

Level: developer

-seealso: , DM, DMPLEX, DMLabel, PetscSF, DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelInvertMethod
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 - The DM
  • rootLabel - DMLabel assigning ranks to local roots
  • processSF - A star forest mapping into the local index on each remote rank

Output Parameter:

  • leafLabel - DMLabel assigning ranks to remote roots

Level: developer

-seealso: , DM, DMPLEX, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelPropagateMethod
DMPlexPartitionLabelPropagate(petsclib::PetscLibType,dm::PetscDM, label::DMLabel)

Propagate points in a partition label over the point PetscSF

Input Parameters:

  • dm - The DM
  • label - DMLabel assigning ranks to remote roots

Level: developer

-seealso: , DM, DMPLEX, DMLabel, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPermuteMethod
DMPlexPermute(petsclib::PetscLibType,dm::PetscDM, perm::IS, pdm::PetscDM)

Reorder the mesh according to the input permutation

Collective

Input Parameters:

  • dm - The DMPLEX object
  • perm - The point permutation, perm[old point number] = new point number

Output Parameter:

  • pdm - The permuted DM

Level: intermediate

-seealso: DMPLEX, MatPermute()

External Links

source
PETSc.LibPETSc.DMPlexPointGlobalFieldReadMethod
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 - DM defining topological space
  • point - topological point
  • field - field number
  • array - 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

source
PETSc.LibPETSc.DMPlexPointGlobalFieldRefMethod
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 - DM defining topological space
  • point - topological point
  • field - field number
  • array - 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

source
PETSc.LibPETSc.DMPlexPointGlobalReadMethod
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 - DM defining topological space
  • point - topological point
  • array - 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

source
PETSc.LibPETSc.DMPlexPointGlobalRefMethod
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 - DM defining topological space
  • point - topological point
  • array - 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

source
PETSc.LibPETSc.DMPlexPointLocalFieldReadMethod
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 - DM defining topological space
  • point - topological point
  • field - field number
  • array - 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

source
PETSc.LibPETSc.DMPlexPointLocalFieldRefMethod
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 - DM defining topological space
  • point - topological point
  • field - field number
  • array - 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

source
PETSc.LibPETSc.DMPlexPointLocalReadMethod
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 - DM defining topological space
  • point - topological point
  • array - 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

source
PETSc.LibPETSc.DMPlexPointLocalRefMethod
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 - DM defining topological space
  • point - topological point
  • array - 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

source
PETSc.LibPETSc.DMPlexPreallocateOperatorMethod
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 - The DMPLEX
  • bs - The matrix blocksize
  • dnz - An array to hold the number of nonzeros in the diagonal block
  • onz - An array to hold the number of nonzeros in the off-diagonal block
  • dnzu - An array to hold the number of nonzeros in the upper triangle of the diagonal block
  • onzu - An array to hold the number of nonzeros in the upper triangle of the off-diagonal block
  • fillMatrix - If PETSC_TRUE, fill the matrix with zeros

Output Parameter:

  • A - The preallocated matrix

Level: advanced

-seealso: , DM, DMPLEX, DMCreateMatrix()

External Links

source
PETSc.LibPETSc.DMPlexRebalanceSharedPointsMethod
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 - The DMPLEX object.
  • 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

source
PETSc.LibPETSc.DMPlexReconstructGradientsFVMMethod
DMPlexReconstructGradientsFVM(petsclib::PetscLibType,dm::PetscDM, locX::PetscVec, grad::PetscVec)

reconstruct the gradient of a vector using a finite volume method.

Input Parameters:

  • dm - the mesh
  • locX - the local representation of the vector

Output Parameter:

  • grad - the global representation of the gradient

Level: developer

-seealso: , DM, Vec, DMPlexGetGradientDM()

External Links

source
PETSc.LibPETSc.DMPlexReferenceToCoordinatesMethod
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 coordinate DM (see DMGetCoordinateDM()) 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 locate
  • refCoords - (numPoints x dimension) array of reference coordinates (see DMGetDimension())

Output Parameter:

  • realCoords - (numPoints x coordinate dimension) array of coordinates (see DMGetCoordinateDim())

Level: intermediate

-seealso: DMPLEX, DMPlexCoordinatesToReference()

External Links

source
PETSc.LibPETSc.DMPlexReferenceTreeGetChildSymmetryMethod
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 tree DMPLEX object
  • parent - the parent point
  • parentOrientA - the reference orientation for describing the parent
  • childOrientA - the reference orientation for describing the child
  • childA - the reference childID for describing the child
  • parentOrientB - the new orientation for describing the parent

Output Parameters:

  • childOrientB - if not NULL, set to the new orientation for describing the child
  • childB - if not NULL, the new childID for describing the child

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetReferenceTree(), DMPlexSetReferenceTree(), DMPlexSetTree()

External Links

source
PETSc.LibPETSc.DMPlexRefineRegularGetAffineFaceTransformsMethod
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 - The DMPlexTransform object
  • ct - The cell type

Output Parameters:

  • Nf - The number of faces for this cell type
  • v0 - The translation of the first vertex for each face
  • J - The Jacobian for each face (map from original cell to subcell)
  • invJ - The inverse Jacobian for each face
  • detJ - The determinant of the Jacobian for each face

Level: developer

-seealso: DMPLEX, DM, DMPlexTransform, DMPolytopeType, DMPlexCellRefinerGetAffineTransforms()

External Links

source
PETSc.LibPETSc.DMPlexRefineRegularGetAffineTransformsMethod
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 - The DMPlexTransform object
  • ct - The cell type

Output Parameters:

  • Nc - The number of subcells produced from this cell type
  • v0 - The translation of the first vertex for each subcell, an array of length dim * Nc. Pass NULL to ignore.
  • J - The Jacobian for each subcell (map from reference cell to subcell), an array of length dim^2 * Nc. Pass NULL to ignore.
  • invJ - The inverse Jacobian for each subcell, an array of length dim^2 * Nc. Pass NULL to ignore.

Level: developer

-seealso: DMPLEX, DM, DMPlexTransform, DMPolytopeType, DMPlexRefineRegularGetAffineFaceTransforms(), DMPLEXREFINEREGULAR

External Links

source
PETSc.LibPETSc.DMPlexRemapGeometryMethod
DMPlexRemapGeometry(petsclib::PetscLibType,dm::PetscDM, time::PetscReal, func::external)

This function maps the original DM coordinates to new coordinates.

Not Collective

Input Parameters:

  • dm - The DM
  • time - The time
  • func - The function transforming current coordinates to new coordinates

Calling sequence of func:

  • dim - The spatial dimension
  • Nf - The number of input fields (here 1)
  • NfAux - The number of input auxiliary fields
  • uOff - 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 space
  • u_t - The coordinate time derivative at this point in space (here NULL)
  • u_x - The coordinate derivatives at this point in space
  • aOff - 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 space
  • a_t - The auxiliary field time derivative at this point in space (or NULL)
  • a_x - The auxiliary field derivatives at this point in space
  • t - The current time
  • x - The coordinates of this point (here not used)
  • numConstants - The number of constants
  • constants - The value of each constant
  • f - The new coordinates at this point in space

Level: intermediate

-seealso: DMPLEX, DMGetCoordinates(), DMGetCoordinatesLocal(), DMGetCoordinateDM(), DMProjectFieldLocal(), DMProjectFieldLabelLocal()

External Links

source
PETSc.LibPETSc.DMPlexRemapMigrationSFMethod
DMPlexRemapMigrationSF(petsclib::PetscLibType,sfOverlap::PetscSF, sfMigration::PetscSF, sfMigrationNew::PetscSF)

Rewrite the distribution SF to account for overlap

Collective

Input Parameters:

  • sfOverlap - The PetscSF object just for the overlap
  • sfMigration - The original distribution PetscSF object

Output Parameters:

  • sfMigrationNew - A rewritten PetscSF object that incorporates the overlap

Level: developer

-seealso: DMPLEX, DM, DMPlexDistribute(), DMPlexDistributeOverlap(), DMPlexGetOverlap()

External Links

source
PETSc.LibPETSc.DMPlexReorderCellMethod
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 - The DMPLEX object
  • cell - The cell
  • cone - The incoming cone

Output Parameter:

  • cone - The reordered cone (in-place)

Level: developer

-seealso: , DM, DMPLEX, DMPolytopeType, DMPlexGenerate()

External Links

source
PETSc.LibPETSc.DMPlexReorderGetDefaultMethod
DMPlexReorderGetDefault(petsclib::PetscLibType,dm::PetscDM, reorder::DMReorderDefaultFlag)

Get flag indicating whether the DM should be reordered by default

Not Collective

Input Parameter:

  • dm - The DM

Output Parameter:

  • reorder - Flag for reordering

Level: intermediate

-seealso: DMPlexReorderSetDefault()

External Links

source
PETSc.LibPETSc.DMPlexReorderSetDefaultMethod
DMPlexReorderSetDefault(petsclib::PetscLibType,dm::PetscDM, reorder::DMReorderDefaultFlag)

Set flag indicating whether the DM should be reordered by default

Logically Collective

Input Parameters:

  • dm - The DM
  • reorder - Flag for reordering

Level: intermediate

-seealso: DMPlexReorderGetDefault()

External Links

source
PETSc.LibPETSc.DMPlexRestoreCellCoordinatesMethod
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 - The DMPLEX
  • cell - The cell number

Output Parameters:

  • isDG - Using cellwise coordinates
  • Nc - The number of coordinates
  • array - The coordinate array
  • coords - The cell coordinates

Level: developer

-seealso: DMPLEX, DMPlexGetCellCoordinates(), DMGetCoordinatesLocal(), DMGetCellCoordinatesLocal()

External Links

source
PETSc.LibPETSc.DMPlexRestoreCellFieldsMethod
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 - The DM
  • cellIS - The cells to include
  • locX - A local vector with the solution fields
  • locX_t - A local vector with solution field time derivatives, or NULL
  • locA - A local vector with auxiliary fields, or NULL

Output Parameters:

  • u - The field coefficients
  • u_t - The fields derivative coefficients
  • a - The auxiliary field coefficients

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetFaceFields()

External Links

source
PETSc.LibPETSc.DMPlexRestoreClosureIndicesMethod
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 - The DM
  • section - The PetscSection describing the points (a local section)
  • idxSection - The PetscSection from which to obtain indices (may be local or global)
  • point - The point defining the closure
  • useClPerm - Use the closure point permutation if available

Output Parameters:

  • numIndices - The number of dof indices in the closure of point with the input sections
  • indices - The dof indices
  • outOffsets - Array to write the field offsets into, or NULL
  • values - The input values, which may be modified if sign flips are induced by the point symmetries, or NULL

Level: advanced

-seealso: , DM, DMPLEX, DMPlexGetClosureIndices(), DMPlexVecGetClosure(), DMPlexMatSetClosure(), DMGetLocalSection(), DMGetGlobalSection()

External Links

source
PETSc.LibPETSc.DMPlexRestoreConeRecursiveMethod
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 - The DMPLEX
  • points - The IS of points, which must lie in the chart set with DMPlexSetChart()

Output Parameters:

  • depth - (optional) Size of the output arrays, equal to DMPLEX depth, returned by DMPlexGetDepth()
  • expandedPoints - (optional) An array of recursively expanded cones
  • sections - (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

source
PETSc.LibPETSc.DMPlexRestoreFaceFieldsMethod
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 - The DM
  • fStart - The first face to include
  • fEnd - The first face to exclude
  • locX - A local vector with the solution fields
  • locX_t - A local vector with solution field time derivatives, or NULL
  • faceGeometry - A local vector with face geometry
  • cellGeometry - A local vector with cell geometry
  • locGrad - A local vector with field gradients, or NULL

Output Parameters:

  • Nface - The number of faces with field values
  • uL - The field values at the left side of the face
  • uR - The field values at the right side of the face

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetFaceFields()

External Links

source
PETSc.LibPETSc.DMPlexRestoreFaceGeometryMethod
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 - The DM
  • fStart - The first face to include
  • fEnd - The first face to exclude
  • faceGeometry - A local vector with face geometry
  • cellGeometry - A local vector with cell geometry

Output Parameters:

  • Nface - The number of faces with field values
  • fgeom - The face centroid and normals
  • vol - The cell volumes

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetFaceFields()

External Links

source
PETSc.LibPETSc.DMPlexRestoreJoinMethod
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 - The DMPLEX object
  • numPoints - The number of input points for the join
  • points - The input points

Output Parameters:

  • numCoveredPoints - The number of points in the join
  • coveredPoints - The points in the join

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetJoin(), DMPlexGetFullJoin(), DMPlexGetMeet()

External Links

source
PETSc.LibPETSc.DMPlexRestoreMeetMethod
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 - The DMPLEX object
  • numPoints - The number of input points for the meet
  • points - The input points

Output Parameters:

  • numCoveredPoints - The number of points in the meet
  • coveredPoints - The points in the meet

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetMeet(), DMPlexGetFullMeet(), DMPlexGetJoin()

External Links

source
PETSc.LibPETSc.DMPlexRestoreOrientedConeMethod
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 DMPlex
  • p - The point, which must lie in the chart set with DMPlexSetChart()
  • cone - An array of points which are on the in-edges for point p
  • ornt - An array of orientations which are on the in-edges for point p. An orientation is an

integer giving the prescription for cone traversal.

Level: beginner

-seealso: , DM, DMPLEX, DMPlexGetOrientedCone(), DMPlexGetConeSize(), DMPlexGetCone(), DMPlexGetChart()

External Links

source
PETSc.LibPETSc.DMPlexRestoreTransitiveClosureMethod
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 - The DMPLEX
  • p - The mesh point
  • useCone - PETSC_TRUE for the closure, otherwise return the star
  • numPoints - The number of points in the closure, so points[] is of size 2*numPoints
  • points - The points and point orientations, interleaved as pairs [p0, o0, p1, o1, ...]

Level: beginner

-seealso: , DM, DMPLEX, DMPlexGetTransitiveClosure(), DMPlexCreate(), DMPlexSetCone(), DMPlexSetChart(), DMPlexGetCone()

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeBoundaryFEMMethod
DMPlexSNESComputeBoundaryFEM(petsclib::PetscLibType,dm::PetscDM, X::PetscVec, user::Cvoid)

Form the boundary values for the local input X

Input Parameters:

  • dm - The mesh
  • user - The user context

Output Parameter:

  • X - Local solution

Level: developer

-seealso: , DM, DMPLEX, DMPlexComputeJacobianAction()

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeJacobianFEMMethod
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 - The DM
  • X - Local input vector
  • user - The user context

Output Parameters:

  • Jac - Jacobian matrix
  • JacP - approximate Jacobian from which the preconditioner will be built, often Jac

Level: developer

-seealso: , DMPLEX, Mat

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeObjectiveFEMMethod
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 mesh
  • X - Local solution
  • user - The user context

Output Parameter:

  • obj - Local objective value

Level: developer

-seealso: DM, DMPlexSNESComputeResidualFEM()

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeResidualDSMethod
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 mesh
  • X - Local solution
  • user - The user context

Output Parameter:

  • F - Local output vector

Level: developer

-seealso: , DM, DMPLEX, DMPlexComputeJacobianAction()

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeResidualFEMMethod
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 mesh
  • X - Local solution
  • user - The user context

Output Parameter:

  • F - Local output vector

Level: developer

-seealso: , DM, DMPLEX, DMSNESComputeJacobianAction()

External Links

source
PETSc.LibPETSc.DMPlexSectionLoadMethod
DMPlexSectionLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM, globalToLocalPointSF::PetscSF, globalDofSF::PetscSF, locDofSF::PetscSF)

Loads section into a DMPLEX

Collective

Input Parameters:

  • dm - The DM that represents the topology
  • viewer - The PetscViewer that represents the on-disk section (sectionA)
  • sectiondm - The DM into which the on-disk section (sectionA) is migrated, can be NULL
  • globalToLocalPointSF - The PetscSF returned by DMPlexTopologyLoad() when loading dm from viewer

Output Parameters:

  • globalDofSF - The PetscSF that migrates any on-disk Vec data associated with sectionA into a global Vec associated with the sectiondm's global section (NULL if not needed)
  • localDofSF - The PetscSF that migrates any on-disk Vec data associated with sectionA into a local Vec associated with the sectiondm's local section (NULL if not needed)

Level: advanced

-seealso: , DM, DMPLEX, DMLoad(), DMPlexTopologyLoad(), DMPlexCoordinatesLoad(), DMPlexLabelsLoad(), DMPlexGlobalVectorLoad(), DMPlexLocalVectorLoad(), PetscSectionLoad(), DMPlexSectionView(), PetscSF, PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexSectionViewMethod
DMPlexSectionView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, sectiondm::PetscDM)

Saves a section associated with a DMPLEX

Collective

Input Parameters:

  • dm - The DM that contains the topology on which the section to be saved is defined
  • viewer - The PetscViewer for saving
  • sectiondm - The DM that contains the section to be saved, can be NULL

Level: advanced

-seealso: , DM, DMPLEX, DMView(), DMPlexTopologyView(), DMPlexCoordinatesView(), DMPlexLabelsView(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(), PetscSectionView(), DMPlexSectionLoad(), PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexSetActivePointMethod
DMPlexSetActivePoint(petsclib::PetscLibType,dm::PetscDM, point::PetscInt)

Set the point on which projection is currently working

Not Collective

Input Parameters:

  • dm - the DM
  • point - The mesh point involved in the current projection

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetActivePoint()

External Links

source
PETSc.LibPETSc.DMPlexSetAdjacencyUseAnchorsMethod
DMPlexSetAdjacencyUseAnchors(petsclib::PetscLibType,dm::PetscDM, useAnchors::PetscBool)

Define adjacency in the mesh using the point

Input Parameters:

  • dm - The DM object
  • useAnchors - 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

source
PETSc.LibPETSc.DMPlexSetAdjacencyUserMethod
DMPlexSetAdjacencyUser(petsclib::PetscLibType,dm::PetscDM, user::external, ctx::Cvoid)

Define adjacency in the mesh using a user

Input Parameters:

  • dm - The DM object
  • user - The user callback, may be NULL (to clear the callback)
  • ctx - context for callback evaluation, may be NULL

Level: advanced

-seealso: DMPLEX, DMSetAdjacency(), DMPlexDistribute(), DMPlexPreallocateOperator(), DMPlexGetAdjacency(), DMPlexGetAdjacencyUser()

External Links

source
PETSc.LibPETSc.DMPlexSetAnchorsMethod
DMPlexSetAnchors(petsclib::PetscLibType,dm::PetscDM, anchorSection::PetscSection, anchorIS::IS)

Set the layout of the local anchor (point

Collective

Input Parameters:

  • dm - The DMPLEX object
  • anchorSection - 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_SELF or derivative).

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetAnchors(), DMGetDefaultConstraints(), DMSetDefaultConstraints()

External Links

source
PETSc.LibPETSc.DMPlexSetCellTypeMethod
DMPlexSetCellType(petsclib::PetscLibType,dm::PetscDM, cell::PetscInt, celltype::DMPolytopeType)

Set the polytope type of a given cell

Not Collective

Input Parameters:

  • dm - The DMPLEX object
  • cell - The cell
  • celltype - The polytope type of the cell

Level: advanced

-seealso: , DM, DMPLEX, DMPlexGetCellTypeLabel(), DMPlexGetDepthLabel(), DMPlexGetDepth(), DMPlexComputeCellTypes(), DMCreateLabel()

External Links

source
PETSc.LibPETSc.DMPlexSetChartMethod
DMPlexSetChart(petsclib::PetscLibType,dm::PetscDM, pStart::PetscInt, pEnd::PetscInt)

Set the interval for all mesh points [pStart, pEnd)

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • pStart - The first mesh point
  • pEnd - The upper bound for mesh points

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetChart()

External Links

source
PETSc.LibPETSc.DMPlexSetClosurePermutationTensorMethod
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 - The DM
  • point - Either a cell (highest dim point) or an edge (dim 1 point), or PETSC_DETERMINE
  • section - The PetscSection to reorder, or NULL for the default section

Example: A typical interpolated single-quad mesh might order points as -seealso: , DM, DMPLEX, DMGetLocalSection(), PetscSectionSetClosurePermutation(), DMSetGlobalSection()

External Links

source
PETSc.LibPETSc.DMPlexSetConeMethod
DMPlexSetCone(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, cone::Vector{PetscInt})

Set the points on the in

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()
  • cone - An array of points which are on the in-edges for point p, its length must have been previously provided with DMPlexSetConeSize()

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp(), DMPlexSetSupport(), DMPlexSetSupportSize()

External Links

source
PETSc.LibPETSc.DMPlexSetConeOrientationMethod
DMPlexSetConeOrientation(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, coneOrientation::Vector{PetscInt})

Set the orientations on the in

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()
  • coneOrientation - An array of orientations. Its length is given by the result of DMPlexSetConeSize()

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetConeOrientation(), DMPlexSetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexSetConeSizeMethod
DMPlexSetConeSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, size::PetscInt)

Set the number of in

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()
  • size - The cone size for point p

Level: beginner

-seealso: , DM, DMPLEX, DMPlexSetCone(), DMPlexCreate(), DMPlexGetConeSize(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexSetCoordinateMapMethod
DMPlexSetCoordinateMap(petsclib::PetscLibType,dm::PetscDM, coordFunc::PetscPoCintFn)

Sets the function used to map coordinates of newly generated mesh points

Logically Collective

Input Parameters:

  • dm - the DMPLEX
  • coordFunc - the mapping function

Level: developer

-seealso: DMPLEX, DMSetCoordinates(), DMPlexGetCoordinateMap(), PetscPointFn

External Links

source
PETSc.LibPETSc.DMPlexSetInterpolatePreferTensorMethod
DMPlexSetInterpolatePreferTensor(petsclib::PetscLibType,dm::PetscDM, preferTensor::PetscBool)

Set the flag to prefer tensor order when interpolating a cell

Logically Collective

Input Parameters:

  • dm - The DMPLEX object
  • preferTensor - Flag to prefer tensor order

Level: intermediate

-seealso: DMPlexGetInterpolatePreferTensor(), DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolatedCollective()

External Links

source
PETSc.LibPETSc.DMPlexSetIsoperiodicFaceSFMethod
DMPlexSetIsoperiodicFaceSF(petsclib::PetscLibType,dm::PetscDM, num_face_sfs::PetscInt, face_sfs::PetscSF)

Express periodicity from an existing mesh

Logically Collective

Input Parameters:

  • dm - The DMPLEX on which to set periodicity
  • num_face_sfs - Number of PetscSFs in face_sfs
  • face_sfs - Array of PetscSF in 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

source
PETSc.LibPETSc.DMPlexSetIsoperiodicFaceTransformMethod
DMPlexSetIsoperiodicFaceTransform(petsclib::PetscLibType,dm::PetscDM, n::PetscInt, t::Vector{PetscScalar})

set geometric transform from donor to periodic points

Logically Collective

Input Parameters:

  • dm - DMPLEX that has been configured with DMPlexSetIsoperiodicFaceSF()
  • n - Number of transforms in array
  • t - Array of 4x4 affine transformation basis.

Level: advanced

-seealso: , DMPLEX, DMGetGlobalSection(), DMPlexSetIsoperiodicFaceSF()

External Links

source
PETSc.LibPETSc.DMPlexSetMaxProjectionHeightMethod
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 - the DMPLEX object
  • height - the maximum projection height >= 0

Level: advanced

-seealso: , DM, DMPLEX, DMPlexGetMaxProjectionHeight(), DMProjectFunctionLocal(), DMProjectFunctionLabelLocal()

External Links

source
PETSc.LibPETSc.DMPlexSetMigrationSFMethod
DMPlexSetMigrationSF(petsclib::PetscLibType,dm::PetscDM, migrationSF::PetscSF)

Sets the PetscSF for migrating from a parent DM into this DM

Logically Collective

Input Parameters:

  • dm - The DM
  • migrationSF - The PetscSF

Level: intermediate

-seealso: , DM, DMPLEX, PetscSF, DMPlexDistribute(), DMPlexDistributeField(), DMPlexCreateMigrationSF(), DMPlexGetMigrationSF()

External Links

source
PETSc.LibPETSc.DMPlexSetMinRadiusMethod
DMPlexSetMinRadius(petsclib::PetscLibType,dm::PetscDM, minradius::PetscReal)

Sets the minimum distance from the cell centroid to a face

Logically Collective

Input Parameters:

  • dm - the DMPLEX
  • minradius - the minimum cell radius

Level: developer

-seealso: DMPLEX, DMSetCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexSetOptionsPrefixMethod
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 - the DM context
  • prefix - the prefix to prepend to all option names

Level: advanced

-seealso: , DM, DMPLEX, SNESSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexSetOverlapMethod
DMPlexSetOverlap(petsclib::PetscLibType,dm::PetscDM, dmSrc::PetscDM, overlap::PetscInt)

Set the width of the cell overlap

Logically Collective

Input Parameters:

  • dm - The DM
  • dmSrc - The DM that produced this one, or NULL
  • overlap - the width of the cell overlap

Level: intermediate

-seealso: DMPLEX, DMPlexGetOverlap(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexSetPartitionBalanceMethod
DMPlexSetPartitionBalance(petsclib::PetscLibType,dm::PetscDM, flg::PetscBool)

Should distribution of the DM attempt to balance the shared point partition?

Input Parameters:

  • dm - The DMPLEX object
  • flg - Balance the partition?

Level: intermediate

-seealso: DMPLEX, DMPlexDistribute(), DMPlexGetPartitionBalance()

External Links

source
PETSc.LibPETSc.DMPlexSetPartitionerMethod
DMPlexSetPartitioner(petsclib::PetscLibType,dm::PetscDM, part::PetscPartitioner)

Set the mesh partitioner

logically Collective

Input Parameters:

  • dm - The DM
  • part - The partitioner

Level: developer

-seealso: , DM, DMPLEX, PetscPartitioner,DMPlexDistribute(), DMPlexGetPartitioner(), PetscPartitionerCreate()

External Links

source
PETSc.LibPETSc.DMPlexSetReferenceTreeMethod
DMPlexSetReferenceTree(petsclib::PetscLibType,dm::PetscDM, ref::PetscDM)

set the reference tree for hierarchically non

Not Collective

Input Parameters:

  • dm - The DMPLEX object
  • ref - The reference tree DMPLEX object

Level: intermediate

-seealso: , DM, DMPLEX,DMPlexGetReferenceTree(), DMPlexCreateDefaultReferenceTree()

External Links

source
PETSc.LibPETSc.DMPlexSetRefinementFunctionMethod
DMPlexSetRefinementFunction(petsclib::PetscLibType,dm::PetscDM, refinementFunc::external)

Set the function giving the maximum cell volume for refinement

Input Parameters:

  • dm - The DM
  • refinementFunc - Function giving the maximum cell volume in the refined mesh

Calling Sequence of refinementFunc:

  • coords - Coordinates of the current point, usually a cell centroid
  • limit - The maximum cell volume for a cell containing this point

Level: developer

-seealso: , DM, DMPLEX, DMRefine(), DMPlexGetRefinementFunction(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()

External Links

source
PETSc.LibPETSc.DMPlexSetRefinementLimitMethod
DMPlexSetRefinementLimit(petsclib::PetscLibType,dm::PetscDM, refinementLimit::PetscReal)

Set the maximum cell volume for refinement

Input Parameters:

  • dm - The DM
  • refinementLimit - The maximum cell volume in the refined mesh

Level: developer

-seealso: , DM, DMPLEX, DMRefine(), DMPlexGetRefinementLimit(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform()

External Links

source
PETSc.LibPETSc.DMPlexSetRefinementUniformMethod
DMPlexSetRefinementUniform(petsclib::PetscLibType,dm::PetscDM, refinementUniform::PetscBool)

Set the flag for uniform refinement

Input Parameters:

  • dm - The DM
  • refinementUniform - The flag for uniform refinement

Level: developer

-seealso: , DM, DMPLEX, DMRefine(), DMPlexGetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()

External Links

source
PETSc.LibPETSc.DMPlexSetRegularRefinementMethod
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 - The DMPLEX object
  • regular - The flag

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexGetRegularRefinement()

External Links

source
PETSc.LibPETSc.DMPlexSetSNESLocalFEMMethod
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 - The DM object
  • use_obj - Use the objective function callback
  • ctx - The user context that will be passed to pointwise evaluation routines

Level: developer

-seealso: ,DMPLEX, SNES, PetscDSAddBoundary(), PetscDSSetObjective(), PetscDSSetResidual(), PetscDSSetJacobian()

External Links

source
PETSc.LibPETSc.DMPlexSetSNESVariableBoundsMethod
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 - The DM object
  • snes - the SNES object

Level: intermediate

-seealso: SNESVISetVariableBounds(), SNESVI, , DM

External Links

source
PETSc.LibPETSc.DMPlexSetScaleMethod
DMPlexSetScale(petsclib::PetscLibType,dm::PetscDM, unit::PetscUnit, scale::PetscReal)

Set the scale for the specified fundamental unit

Not Collective

Input Parameters:

  • dm - the DM
  • unit - The SI unit
  • scale - The value used to scale all quantities with this unit

Level: advanced

-seealso: , DM, DMPLEX, DMPlexGetScale(), PetscUnit

External Links

source
PETSc.LibPETSc.DMPlexSetSubpointMapMethod
DMPlexSetSubpointMap(petsclib::PetscLibType,dm::PetscDM, subpointMap::DMLabel)

Sets the DMLabel with point dimension as values

Input Parameters:

  • dm - The submesh DM
  • subpointMap - The DMLabel of all the points from the original mesh in this submesh

Level: developer

-seealso: , DM, DMPLEX, DMPlexCreateSubmesh(), DMPlexGetSubpointIS()

External Links

source
PETSc.LibPETSc.DMPlexSetSupportMethod
DMPlexSetSupport(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, support::Vector{PetscInt})

Set the points on the out

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()
  • support - An array of points which are on the out-edges for point p, its length is that obtained from DMPlexGetSupportSize()

Level: beginner

-seealso: , DM, DMPLEX, DMPlexSetCone(), DMPlexSetConeSize(), DMPlexCreate(), DMPlexGetSupport(), DMPlexSetChart(), DMPlexSetSupportSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexSetSupportSizeMethod
DMPlexSetSupportSize(petsclib::PetscLibType,dm::PetscDM, p::PetscInt, size::PetscInt)

Set the number of out

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The point, which must lie in the chart set with DMPlexSetChart()
  • size - The support size for point p

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexGetSupportSize(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexSetTransformTypeMethod
DMPlexSetTransformType(petsclib::PetscLibType,dm::PetscDM, type::DMPlexTransformType)

Set the transform type for uniform refinement

Input Parameters:

  • dm - The DM
  • type - The transform type for uniform refinement

Level: developer

-seealso: , DM, DMPLEX, DMPlexTransformType, DMRefine(), DMPlexGetTransformType(), DMPlexSetRefinementUniform()

External Links

source
PETSc.LibPETSc.DMPlexSetTreeMethod
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 - the DMPLEX object
  • 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; the reference count of parentSection is incremented

  • parents - a list of the point parents; copied, can be destroyed
  • childIDs - 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

source
PETSc.LibPETSc.DMPlexSetVTKCellHeightMethod
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 - The DMPLEX object
  • cellHeight - The height of a cell

Level: developer

-seealso: , DM, DMPLEX, DMPlexGetVTKCellHeight()

External Links

source
PETSc.LibPETSc.DMPlexShearGeometryMethod
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 - The DMPLEX
  • direction - The shear coordinate direction, e.g. DM_X is the x-axis
  • multipliers - 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

source
PETSc.LibPETSc.DMPlexStratifyMethod
DMPlexStratify(petsclib::PetscLibType,dm::PetscDM)

Computes the strata for all points in the DMPLEX

Collective

Input Parameter:

  • dm - The DMPLEX

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSymmetrize(), DMPlexComputeCellTypes()

External Links

source
PETSc.LibPETSc.DMPlexStratifyMigrationSFMethod
DMPlexStratifyMigrationSF(petsclib::PetscLibType,dm::PetscDM, sf::PetscSF, migrationSF::PetscSF)

Rearrange the leaves of a migration sf for stratification.

Input Parameters:

  • dm - The DM
  • sf - 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

source
PETSc.LibPETSc.DMPlexSymmetrizeMethod
DMPlexSymmetrize(petsclib::PetscLibType,dm::PetscDM)

Create support (out

Not Collective

Input Parameter:

  • dm - The DMPLEX

Level: beginner

-seealso: , DM, DMPLEX, DMPlexCreate(), DMPlexSetChart(), DMPlexSetConeSize(), DMPlexSetCone()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeBoundaryMethod
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 mesh
  • time - The time
  • locX - Local solution
  • locX_t - Local solution time derivative, or NULL
  • user - The user context

Level: developer

-seealso: , DMPLEX, TS, DMPlexComputeJacobianActionFEM()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeIFunctionFEMMethod
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 mesh
  • time - The time
  • locX - Local solution
  • locX_t - Local solution time derivative, or NULL
  • user - The user context

Output Parameter:

  • locF - Local output vector

Level: developer

-seealso: , DMPLEX, TS, DMPlexTSComputeRHSFunctionFEM()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeIJacobianFEMMethod
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 mesh
  • time - The time
  • locX - Local solution
  • locX_t - Local solution time derivative, or NULL
  • X_tShift - The multiplicative parameter for dF/du_t
  • user - The user context

Output Parameters:

  • Jac - the Jacobian
  • JacP - an additional approximation for the Jacobian to be used to compute the preconditioner (often is Jac)

Level: developer

-seealso: , TS, DM, DMPlexTSComputeIFunctionFEM(), DMPlexTSComputeRHSFunctionFEM()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeRHSFunctionFEMMethod
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 mesh
  • time - The time
  • locX - Local solution
  • user - The user context

Output Parameter:

  • locG - Local output vector

Level: developer

-seealso: , TS, DM, DMPlexTSComputeIFunctionFEM(), DMPlexTSComputeIJacobianFEM()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeRHSFunctionFVMMethod
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 mesh
  • time - The time
  • locX - Local solution
  • user - The user context

Output Parameter:

  • F - Global output vector

Level: developer

-seealso: , DMPLEX, TS, DMPlexComputeJacobianActionFEM()

External Links

source
PETSc.LibPETSc.DMPlexTetgenSetOptionsMethod
DMPlexTetgenSetOptions(petsclib::PetscLibType,dm::PetscDM, opts::String)

Set the options used for the Tetgen mesh generator

Not Collective

Input Parameters:

  • dm - The DMPLEX object
  • opts - The command line options

Level: developer

-seealso: , DM, DMPLEX, DMPlexTriangleSetOptions(), DMPlexGenerate()

External Links

source
PETSc.LibPETSc.DMPlexTopologyLoadMethod
DMPlexTopologyLoad(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer, globalToLocalPointSF::PetscSF)

Loads a topology into a DMPLEX

Collective

Input Parameters:

  • dm - The DM into which the topology is loaded
  • viewer - The PetscViewer for the saved topology

Output Parameter:

  • globalToLocalPointSF - The PetscSF that pushes points in [0, N) to the associated points in the loaded DMPLEX, 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

source
PETSc.LibPETSc.DMPlexTopologyViewMethod
DMPlexTopologyView(petsclib::PetscLibType,dm::PetscDM, viewer::PetscViewer)

Saves a DMPLEX topology into a file

Collective

Input Parameters:

  • dm - The DM whose topology is to be saved
  • viewer - The PetscViewer to save it in

Level: advanced

-seealso: , DM, DMPLEX, DMView(), DMPlexCoordinatesView(), DMPlexLabelsView(), DMPlexTopologyLoad(), PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexTransferVecTreeMethod
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 - The DMPLEX mesh for the input vector
  • dmOut - The second DMPLEX mesh
  • vecIn - The input vector
  • sfRefine - A star forest indicating points in the mesh dmIn (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 mesh dmOut (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 in dmOut. 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 in dmIn. 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_TRUE indicates that boundary values should be inserted into vecIn before 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

source
PETSc.LibPETSc.DMPlexTriangleSetOptionsMethod
DMPlexTriangleSetOptions(petsclib::PetscLibType,dm::PetscDM, opts::String)

Set the options used for the Triangle mesh generator

Not Collective

Input Parameters:

  • dm - The DMPLEX object
  • opts - The command line options

Level: developer

-seealso: , DM, DMPLEX, DMPlexTetgenSetOptions(), DMPlexGenerate()

External Links

source
PETSc.LibPETSc.DMPlexUninterpolateMethod
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 complete DMPLEX object

Output Parameter:

  • dmUnint - The DMPLEX object with only cells and vertices

Level: intermediate

-seealso: DMPLEX, DMPlexInterpolate(), DMPlexCreateFromCellListPetsc(), DMPlexCopyCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexVTKWriteAllMethod
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 - The DMPLEX specifying the mesh, passed as a PetscObject
  • viewer - viewer of type PETSCVIEWERVTK

Level: developer

-seealso: , DM, PETSCVIEWEREXODUSII, DMPLEX, PETSCVIEWERVTK

External Links

source
PETSc.LibPETSc.DMPlexVecGetClosureMethod
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 - The DM
  • section - The section describing the layout in v, or NULL to use the default section
  • v - The local vector
  • point - The point in the DM

Input/Output Parameters:

  • csize - The size of the input values array, or NULL; on output the number of values in the closure
  • values - An array to use for the values, or *values = NULL to 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

source
PETSc.LibPETSc.DMPlexVecGetOrientedClosureMethod
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 - The DM
  • section - The section describing the layout in v, or NULL to use the default section
  • useClPerm - Flag for whether the provided closure permutation should be applied to the values
  • v - The local vector
  • point - The point in the DM
  • ornt - 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, or NULL; on output the number of values in the closure
  • values - An array to use for the values, or *values = NULL to 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

source
PETSc.LibPETSc.DMPlexVecRestoreClosureMethod
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 - The DM
  • section - The section describing the layout in v, or NULL to use the default section
  • v - The local vector
  • point - The point in the DM
  • csize - The number of values in the closure, or NULL
  • values - The array of values

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexVecGetClosure(), DMPlexVecSetClosure(), DMPlexMatSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexVecSetClosureMethod
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 - The DM
  • section - The section describing the layout in v, or NULL to use the default section
  • v - The local vector
  • point - The point in the DM
  • values - The array of values
  • mode - The insert mode. One of INSERT_ALL_VALUES, ADD_ALL_VALUES, INSERT_VALUES, ADD_VALUES, INSERT_BC_VALUES, and ADD_BC_VALUES,

where INSERT_ALL_VALUES and ADD_ALL_VALUES also overwrite boundary conditions.

Level: intermediate

-seealso: , DM, DMPLEX, DMPlexVecGetClosure(), DMPlexMatSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexVecView1DMethod
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 - The DMPLEX object
  • n - The number of vectors
  • u - The array of local vectors
  • viewer - The PetscViewer

Level: advanced

-seealso: , DM, DMPLEX, VecViewFromOptions(), VecView()

External Links

source