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; in serial no new DM is created (NULL handle).
# `sf` is the point migration star forest (NULL in serial).
sf, dmParallel = LibPETSc.DMPlexDistribute(petsclib, dm, 0)
if dmParallel.ptr != C_NULL
    LibPETSc.DMDestroy(petsclib, dm)
    dm = dmParallel
    LibPETSc.PetscSFDestroy(petsclib, sf)
end

# Set up
LibPETSc.DMSetFromOptions(petsclib, dm)
LibPETSc.DMSetUp(petsclib, dm)

# The section describing the field layout (owned by the DM)
section = LibPETSc.DMGetLocalSection(petsclib, dm)

# Create vectors and matrices
x = LibPETSc.DMCreateGlobalVector(petsclib, dm)

# Cleanup
LibPETSc.VecDestroy(petsclib, x)
LibPETSc.DMDestroy(petsclib, dm)
PETSc.finalize(petsclib)
MPI.Finalize()

DMPlex Functions

PETSc.LibPETSc.DMPlexBuildCoordinatesFromCellList — Method
DMPlexBuildCoordinatesFromCellList(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexBuildCoordinatesFromCellListParallel(), DMPlexCreateFromCellListPetsc(), DMPlexBuildFromCellList()

External Links

source
PETSc.LibPETSc.DMPlexBuildCoordinatesFromCellListParallel — Method
DMPlexBuildCoordinatesFromCellListParallel(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexBuildCoordinatesFromCellList(), DMPlexCreateFromCellListParallelPetsc(), DMPlexBuildFromCellListParallel()

External Links

source
PETSc.LibPETSc.DMPlexBuildFromCellList — Method
DMPlexBuildFromCellList(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexBuildFromCellListParallel(), DMPlexBuildCoordinatesFromCellList(), DMPlexCreateFromCellListPetsc()

External Links

source
PETSc.LibPETSc.DMPlexBuildFromCellListParallel — Method
vertexSF::PetscSF,verticesAdjSaved::Ptr{PetscInt} = DMPlexBuildFromCellListParallel(petsclib::PetscLibType, dm::AbstractPetscDM, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, numCorners::PetscInt, cells::Vector{PetscInt})

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 \times numCorners numbers, the global vertex numbers for each cell

Output Parameters:

  • vertexSF - (Optional) PetscSF describing complete vertex ownership
  • verticesAdjSaved - (Optional) vertex adjacency array, must be freed by user

Level: advanced

See also: DM, DMPLEX, DMPlexBuildFromCellList(), DMPlexCreateFromCellListParallelPetsc(), DMPlexBuildCoordinatesFromCellListParallel(), PetscSF

External Links

source
PETSc.LibPETSc.DMPlexBuildFromCellSectionParallel — Method
vertexSF::PetscSF,verticesAdjSaved::Ptr{PetscInt} = DMPlexBuildFromCellSectionParallel(petsclib::PetscLibType, dm::AbstractPetscDM, numCells::PetscInt, numVertices::PetscInt, NVertices::PetscInt, cellSection::PetscSection, cells::Vector{PetscInt})

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, must be freed by user

Level: advanced

See also: DM, DMPLEX, DMPlexBuildFromCellListParallel(), DMPlexCreateFromCellSectionParallel(), DMPlexBuildCoordinatesFromCellListParallel(), PetscSF

External Links

source
PETSc.LibPETSc.DMPlexCheck — Method
DMPlexCheck(petsclib::PetscLibType, dm::AbstractPetscDM)

Perform various checks of DMPLEX sanity

Input Parameter:

  • dm - The DMPLEX object

Level: developer

See also: DM, DMPLEX, DMCreate(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckCellShape — Method
DMPlexCheckCellShape(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMSetFromOptions(), DMPlexComputeOrthogonalQuality()

External Links

source
PETSc.LibPETSc.DMPlexCheckFaces — Method
DMPlexCheckFaces(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMCreate(), DMPlexGetVTKCellHeight(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckInterfaceCones — Method
DMPlexCheckInterfaceCones(petsclib::PetscLibType, dm::AbstractPetscDM)

Check that points on inter-partition interfaces have conforming order of cone points.

Input Parameter:

  • dm - The DMPLEX object

Level: developer

See also: DM, DMPLEX, DMPlexGetCone(), DMPlexGetConeSize(), DMGetPointSF(), DMGetCoordinates(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckOrphanVertices — Method
DMPlexCheckOrphanVertices(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexCheck(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckPointSF — Method
DMPlexCheckPointSF(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMGetPointSF(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckSkeleton — Method
DMPlexCheckSkeleton(petsclib::PetscLibType, dm::AbstractPetscDM, cellHeight::PetscInt)

Check that each cell has the correct number of vertices

Input Parameters:

  • dm - The DMPLEX object
  • cellHeight - Normally 0

Level: developer

See also: DM, DMPLEX, DMCreate(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexCheckSymmetry — Method
DMPlexCheckSymmetry(petsclib::PetscLibType, dm::AbstractPetscDM)

Check that the adjacency information in the mesh is symmetric.

Input Parameter:

  • dm - The DMPLEX object

Level: developer

See also: DM, DMPLEX, DMCreate(), DMSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexComputeBdIntegral — Method
DMPlexComputeBdIntegral(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, label::DMLabel, numVals::PetscInt, vals::Vector{PetscInt}, noname::Ptr{Cvoid})

Form the integral over the specified boundary from the global input X using pointwise functions specified by the user

Input Parameters:

  • dm - The mesh
  • X - Global input vector
  • label - The boundary DMLabel
  • numVals - The number of label values to use, or PETSC_DETERMINE for all values
  • vals - The label values to use, or NULL for all values
  • funcs - The functions to integrate along the boundary for each field
  • ctx - The application context

Output Parameter:

  • integral - Integral for each field

Level: developer

See also: DM, DMPLEX, DMPlexComputeIntegralFEM(), DMPlexComputeBdResidualFEM()

External Links

source
PETSc.LibPETSc.DMPlexComputeBdJacobianSingle — Method
DMPlexComputeBdJacobianSingle(petsclib::PetscLibType, dm::AbstractPetscDM, wf::PetscWeakForm, label::DMLabel, numValues::PetscInt, values::Vector{PetscInt}, fieldI::PetscInt, locX::AbstractPetscVec, locX_t::AbstractPetscVec, t::PetscReal, X_tShift::PetscReal, Jac::AbstractPetscMat, JacP::AbstractPetscMat)

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

See also: DMPlexComputeBdJacobianSingleByLabel(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeBdJacobianSingleByLabel — Method
DMPlexComputeBdJacobianSingleByLabel(petsclib::PetscLibType, dm::AbstractPetscDM, wf::PetscWeakForm, label::DMLabel, numValues::PetscInt, values::Vector{PetscInt}, fieldI::PetscInt, facetIS::AbstractIS, locX::AbstractPetscVec, locX_t::AbstractPetscVec, t::PetscReal, coordField::DMField, X_tShift::PetscReal, Jac::AbstractPetscMat, JacP::AbstractPetscMat)

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

See also: DMPlexComputeBdJacobianSingle(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeBdResidualSingle — Method
DMPlexComputeBdResidualSingle(petsclib::PetscLibType, dm::AbstractPetscDM, wf::PetscWeakForm, key::PetscFormKey, locX::AbstractPetscVec, locX_t::AbstractPetscVec, t::PetscReal, locF::AbstractPetscVec)

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

See also: DMPlexComputeBdResidualSingleByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeBdResidualSingleByKey — Method
DMPlexComputeBdResidualSingleByKey(petsclib::PetscLibType, dm::AbstractPetscDM, wf::PetscWeakForm, key::PetscFormKey, facetIS::AbstractIS, locX::AbstractPetscVec, locX_t::AbstractPetscVec, t::PetscReal, coordField::DMField, locF::AbstractPetscVec)

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

See also: DMPlexComputeBdResidualSingle(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeCellGeometryAffineFEM — Method
detJ::PetscReal = DMPlexComputeCellGeometryAffineFEM(petsclib::PetscLibType, dm::AbstractPetscDM, cell::PetscInt, v0::Vector{PetscReal}, J::Vector{PetscReal}, invJ::Vector{PetscReal})

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

See also: DMPLEX, DMPlexComputeCellGeometryFEM(), DMGetCoordinateSection(), DMGetCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexComputeCellGeometryFEM — Method
DMPlexComputeCellGeometryFEM(petsclib::PetscLibType, dm::AbstractPetscDM, cell::PetscInt, quad::PetscQuadrature, v::Vector{PetscReal}, J::Vector{PetscReal}, invJ::Vector{PetscReal}, detJ::Vector{PetscReal})

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

See also: DMPLEX, DMGetCoordinateSection(), DMGetCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexComputeCellGeometryFVM — Method
vol::PetscReal = DMPlexComputeCellGeometryFVM(petsclib::PetscLibType, dm::AbstractPetscDM, cell::PetscInt, centroid::Vector{PetscReal}, normal::Vector{PetscReal})

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

See also: DMPLEX, DMGetCoordinateSection(), DMGetCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexComputeCellTypes — Method
DMPlexComputeCellTypes(petsclib::PetscLibType, dm::AbstractPetscDM)

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

Collective

Input Parameter:

  • dm - The DMPLEX

Level: developer

See also: DM, DMPLEX, DMPlexCreate(), DMPlexSymmetrize(), DMPlexStratify(), DMGetLabel(), DMCreateLabel()

External Links

source
PETSc.LibPETSc.DMPlexComputeCellwiseIntegralFEM — Method
DMPlexComputeCellwiseIntegralFEM(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, F::AbstractPetscVec, ctx::Ptr{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
  • ctx - The application context

Output Parameter:

  • F - Cellwise integrals for each field

Level: developer

See also: DM, DMPLEX, DMPlexSNESComputeResidualFEM()

External Links

source
PETSc.LibPETSc.DMPlexComputeClementInterpolant — Method
DMPlexComputeClementInterpolant(petsclib::PetscLibType, dm::AbstractPetscDM, locX::AbstractPetscVec, locC::AbstractPetscVec)

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

See also: DM, DMPLEX, DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeGeometryFVM — Method
cellgeom::PetscVec,facegeom::PetscVec = DMPlexComputeGeometryFVM(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, PetscFVFaceGeom, PetscFVCellGeom

External Links

source
PETSc.LibPETSc.DMPlexComputeGradientClementInterpolant — Method
DMPlexComputeGradientClementInterpolant(petsclib::PetscLibType, dm::AbstractPetscDM, locX::AbstractPetscVec, locC::AbstractPetscVec)

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

See also: DM, DMPLEX, DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeGradientFVM — Method
dmGrad::PetscDM = DMPlexComputeGradientFVM(petsclib::PetscLibType, dm::AbstractPetscDM, fvm::PetscFV, faceGeometry::AbstractPetscVec, cellGeometry::AbstractPetscVec)

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

See also: DMPLEX, DMPlexGetFaceGeometryFVM(), DMPlexGetCellGeometryFVM()

External Links

source
PETSc.LibPETSc.DMPlexComputeInjectorFEM — Method
sc::VecScatter = DMPlexComputeInjectorFEM(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM, ctx::Ptr{Cvoid})

Compute a mapping from coarse unknowns to fine unknowns

Input Parameters:

  • dmc - The coarse mesh
  • dmf - The fine mesh
  • ctx - The application context

Output Parameter:

  • sc - The mapping

Level: developer

See also: DM, DMPLEX, DMPlexComputeInterpolatorNested()

External Links

source
PETSc.LibPETSc.DMPlexComputeInjectorReferenceTree — Method
inj::PetscMat = DMPlexComputeInjectorReferenceTree(petsclib::PetscLibType, refTree::AbstractPetscDM)

Compute the injection matrix from fine to coarse degrees of freedom on the reference tree

Collective

Input Parameter:

  • refTree - The reference-tree DMPLEX (see DMPlexCreateDefaultReferenceTree())

Output Parameter:

  • inj - The newly created injection Mat mapping fine-space coefficients on the reference tree to their coarse-space counterparts

Level: developer

See also: DM, DMPLEX, DMPlexSetReferenceTree(), DMPlexCreateDefaultReferenceTree(), DMPlexComputeInjectorTree(), DMPlexComputeInterpolatorTree()

External Links

source
PETSc.LibPETSc.DMPlexComputeIntegralFEM — Method
integral::PetscScalar = DMPlexComputeIntegralFEM(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, ctx::Ptr{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
  • ctx - The application context

Output Parameter:

  • integral - Integral for each field

Level: developer

See also: DM, DMPLEX, DMPlexSNESComputeResidualFEM()

External Links

source
PETSc.LibPETSc.DMPlexComputeInterpolatorGeneral — Method
DMPlexComputeInterpolatorGeneral(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM, In::AbstractPetscMat, ctx::Ptr{Cvoid})

Form the local portion of the interpolation matrix from the coarse DM to a non-nested fine DM.

Input Parameters:

  • dmf - The fine mesh
  • dmc - The coarse mesh
  • ctx - The application context

Output Parameter:

  • In - The interpolation matrix

Level: developer

See also: DM, DMPLEX, DMPlexComputeInterpolatorNested()

External Links

source
PETSc.LibPETSc.DMPlexComputeInterpolatorNested — Method
DMPlexComputeInterpolatorNested(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM, isRefined::PetscBool, In::AbstractPetscMat, ctx::Ptr{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
  • ctx - The application context

Output Parameter:

  • In - The interpolation matrix

Level: developer

See also: DM, DMPLEX, DMPlexComputeInterpolatorGeneral()

External Links

source
PETSc.LibPETSc.DMPlexComputeJacobianActionByKey — Method
DMPlexComputeJacobianActionByKey(petsclib::PetscLibType, dm::AbstractPetscDM, key::PetscFormKey, cellIS::AbstractIS, t::PetscReal, X_tShift::PetscReal, locX::AbstractPetscVec, locX_t::AbstractPetscVec, locY::AbstractPetscVec, locF::AbstractPetscVec, ctx::Ptr{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
  • ctx - An optional application context, passed to the pointwise functions

Output Parameter:

  • locF - The local residual F = J(X) Y

Level: developer

See also: DMPlexComputeResidualByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeJacobianByKey — Method
DMPlexComputeJacobianByKey(petsclib::PetscLibType, dm::AbstractPetscDM, key::PetscFormKey, cellIS::AbstractIS, t::PetscReal, X_tShift::PetscReal, locX::AbstractPetscVec, locX_t::AbstractPetscVec, Jac::AbstractPetscMat, JacP::AbstractPetscMat, ctx::Ptr{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
  • ctx - An optional application context, passed to the pointwise functions

Output Parameters:

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

Level: developer

See also: DMPlexComputeResidualByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeJacobianByKeyGeneral — Method
DMPlexComputeJacobianByKeyGeneral(petsclib::PetscLibType, dmr::AbstractPetscDM, dmc::AbstractPetscDM, key::PetscFormKey, cellIS::AbstractIS, t::PetscReal, X_tShift::PetscReal, locX::AbstractPetscVec, locX_t::AbstractPetscVec, Jac::AbstractPetscMat, JacP::AbstractPetscMat, ctx::Ptr{Cvoid})

Assemble the Jacobian and its preconditioning matrix over a cell range described by a PetscFormKey for a general (possibly non-square, non-nested) pair of row/column DMs.

Collective

Input Parameters:

  • dmr - the row DMPLEX
  • dmc - the column DMPLEX
  • key - the PetscFormKey selecting the label, value, part, and field for assembly
  • cellIS - the IS listing cells to process, or NULL
  • t - the current time
  • X_tShift - the time-derivative shift used to combine dynamic and static Jacobian contributions
  • locX - the local solution vector
  • locX_t - the local time-derivative vector, or NULL
  • ctx - the application context (unused; kept for API symmetry)

Output Parameters:

  • Jac - the assembled Jacobian matrix
  • JacP - the assembled matrix from which the preconditioner is constructed

Level: developer

See also: DM, DMPLEX, PetscFormKey, DMPlexComputeJacobianByKey(), DMPlexComputeInterpolatorGeneral()

External Links

source
PETSc.LibPETSc.DMPlexComputeJacobianHybridByKey — Method
DMPlexComputeJacobianHybridByKey(petsclib::PetscLibType, dm::AbstractPetscDM, key::Vector{PetscFormKey}, cellIS::AbstractIS, t::PetscReal, X_tShift::PetscReal, locX::AbstractPetscVec, locX_t::AbstractPetscVec, Jac::AbstractPetscMat, JacP::AbstractPetscMat, ctx::Ptr{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
  • ctx - An optional application context, passed to the pointwise functions

Output Parameters:

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

Level: developer

See also: DMPlexComputeResidualByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeL2DiffLocal — Method
DMPlexComputeL2DiffLocal(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, noname::Ptr{Cvoid})

This function computes the L2 difference between a function u and an FEM interpolant solution uh.

Collective

Input Parameters:

  • dm - The DM
  • time - The time
  • funcs - The functions to evaluate for each field component
  • ctxs - Optional array of contexts to pass to each function, or NULL.
  • localX - The coefficient vector u_h, a local vector

Output Parameter:

  • diff - The diff ||u - uh||2

Level: developer

See also: DM, DMPLEX, DMProjectFunction(), DMComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeL2DiffVec — Method
DMPlexComputeL2DiffVec(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, noname::Ptr{Cvoid})

This function computes the cellwise L2 difference between a function u and an FEM interpolant solution uh, and stores it in a Vec.

Collective

Input Parameters:

  • dm - The DM
  • time - The time
  • funcs - The functions to evaluate for each field component: NULL means that component does not contribute to error calculation
  • ctxs - Optional array of contexts to pass to each function, or NULL.
  • X - The coefficient vector u_h

Output Parameter:

  • D - A Vec which holds the difference ||u - uh||2 for each cell

Level: developer

See also: DM, DMPLEX, DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeL2FluxDiffVec — Method
DMPlexComputeL2FluxDiffVec(petsclib::PetscLibType, u::AbstractPetscVec, f::PetscInt, mu::AbstractPetscVec, mf::PetscInt, eFlux::AbstractPetscVec)

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 ||\nabla uf - \mu{mf}||

Level: advanced

See also: DM, DMPLEX, DMPlexComputeL2FluxDiffVecLocal(), DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeL2FluxDiffVecLocal — Method
DMPlexComputeL2FluxDiffVecLocal(petsclib::PetscLibType, lu::AbstractPetscVec, f::PetscInt, lmu::AbstractPetscVec, mf::PetscInt, eFlux::AbstractPetscVec)

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 ||\nabla uf - \mu{mf}||

Level: advanced

See also: DM, DMPLEX, DMPlexComputeL2FluxDiffVec(), DMProjectFunction(), DMComputeL2Diff(), DMPlexComputeL2FieldDiff(), DMComputeL2GradientDiff()

External Links

source
PETSc.LibPETSc.DMPlexComputeMassMatrixGeneral — Method
DMPlexComputeMassMatrixGeneral(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM, mass::AbstractPetscMat, ctx::Ptr{Cvoid})

Form the local portion of the mass matrix from the coarse DM to a non-nested fine DM.

Input Parameters:

  • dmf - The fine mesh
  • dmc - The coarse mesh
  • ctx - The application context

Output Parameter:

  • mass - The mass matrix

Level: developer

See also: DM, DMPLEX, DMPlexComputeMassMatrixNested(), DMPlexComputeInterpolatorNested(), DMPlexComputeInterpolatorGeneral()

External Links

source
PETSc.LibPETSc.DMPlexComputeMassMatrixNested — Method
DMPlexComputeMassMatrixNested(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM, mass::AbstractPetscMat, ctx::Ptr{Cvoid})

Form the local portion of the mass matrix from a coarse DM to a nested fine DM.

Collective

Input Parameters:

  • dmc - the coarse mesh
  • dmf - the fine mesh
  • ctx - the application context

Output Parameter:

  • mass - the mass matrix

Level: developer

See also: DM, DMPLEX, DMPlexComputeMassMatrixGeneral(), DMPlexComputeInterpolatorNested()

External Links

source
PETSc.LibPETSc.DMPlexComputeMoments — Method
DMPlexComputeMoments(petsclib::PetscLibType, dm::AbstractPetscDM, u::AbstractPetscVec, moments::Vector{PetscReal})

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

See also: DM, DMPLEX, DMSwarmComputeMoments()

External Links

source
PETSc.LibPETSc.DMPlexComputeOrthogonalQuality — Method
OrthQual::PetscVec,OrthQualLabel::DMLabel = DMPlexComputeOrthogonalQuality(petsclib::PetscLibType, dm::AbstractPetscDM, fv::PetscFV, atol::PetscReal)

Compute cell-wise orthogonal quality mesh statistic. Optionally tags all cells with 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

See also: DM, DMPLEX, DMPlexCheckCellShape(), DMCreateLabel(), PetscFV, DMLabel, Vec

External Links

source
PETSc.LibPETSc.DMPlexComputeProjection2Dto1D — Method
DMPlexComputeProjection2Dto1D(petsclib::PetscLibType, coords::Vector{PetscScalar}, R::Vector{PetscReal})

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

See also: DMPLEX, DMPlexComputeProjection3Dto1D(), DMPlexComputeProjection3Dto2D()

External Links

source
PETSc.LibPETSc.DMPlexComputeProjection3Dto1D — Method
DMPlexComputeProjection3Dto1D(petsclib::PetscLibType, coords::Vector{PetscScalar}, R::Vector{PetscReal})

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

See also: DMPLEX, DMPlexComputeProjection2Dto1D(), DMPlexComputeProjection3Dto2D()

External Links

source
PETSc.LibPETSc.DMPlexComputeProjection3Dto2D — Method
DMPlexComputeProjection3Dto2D(petsclib::PetscLibType, coordSize::PetscInt, coords::Vector{PetscScalar}, R::Vector{PetscReal})

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

See also: DMPLEX, DMPlexComputeProjection2Dto1D(), DMPlexComputeProjection3Dto1D()

External Links

source
PETSc.LibPETSc.DMPlexComputeResidualByKey — Method
DMPlexComputeResidualByKey(petsclib::PetscLibType, dm::AbstractPetscDM, key::PetscFormKey, cellIS::AbstractIS, time::PetscReal, locX::AbstractPetscVec, locX_t::AbstractPetscVec, t::PetscReal, locF::AbstractPetscVec, ctx::Ptr{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
  • ctx - An optional application context, passed to the pointwise functions

Output Parameter:

  • locF - The local residual

Level: developer

See also: DMPlexComputeJacobianByKey(), DMPlexComputeResidualHybridByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexComputeResidualHybridByKey — Method
DMPlexComputeResidualHybridByKey(petsclib::PetscLibType, dm::AbstractPetscDM, key::Vector{PetscFormKey}, cellIS::AbstractIS, time::PetscReal, locX::AbstractPetscVec, locX_t::AbstractPetscVec, t::PetscReal, locF::AbstractPetscVec, ctx::Ptr{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
  • ctx - An optional application context, passed to the pointwise functions

Output Parameter:

  • locF - The local residual

Level: developer

See also: DMPlexComputeResidualByKey(), DMPlexComputeJacobianByKey(), DMPlexComputeJacobianHybridByKey(), PetscFormKey

External Links

source
PETSc.LibPETSc.DMPlexConstructCohesiveCells — Method
dmSplit::PetscDM = DMPlexConstructCohesiveCells(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel, splitLabel::DMLabel)

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

See also: DM, DMPLEX, DMCreate(), DMPlexLabelCohesiveComplete()

External Links

source
PETSc.LibPETSc.DMPlexConstructGhostCells — Method
numGhostCells::PetscInt,dmGhosted::PetscDM = DMPlexConstructGhostCells(petsclib::PetscLibType, dm::AbstractPetscDM, labelName::String)

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

See also: DM, DMPLEX, DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCoordinatesLoad — Method
DMPlexCoordinatesLoad(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMLoad(), DMPlexTopologyLoad(), DMPlexLabelsLoad(), DMView(), PetscViewerHDF5Open(), PetscViewerPushFormat(), PetscSF, PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexCoordinatesToReference — Method
DMPlexCoordinatesToReference(petsclib::PetscLibType, dm::AbstractPetscDM, cell::PetscInt, numPoints::PetscInt, realCoords::Vector{PetscReal}, refCoords::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

See also: DMPLEX, DMPlexReferenceToCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexCoordinatesView — Method
DMPlexCoordinatesView(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMView(), DMPlexTopologyView(), DMPlexLabelsView(), DMPlexCoordinatesLoad(), PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexCopyCoordinates — Method
DMPlexCopyCoordinates(petsclib::PetscLibType, dmA::AbstractPetscDM, dmB::AbstractPetscDM)

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

See also: DMPLEX, DMCopyLabels(), DMGetCoordinates(), DMGetCoordinatesLocal(), DMGetCoordinateDM(), DMGetCoordinateSection()

External Links

source
PETSc.LibPETSc.DMPlexCreate — Method
mesh::PetscDM = DMPlexCreate(petsclib::PetscLibType, comm::MPI_Comm)

Creates a DMPLEX object, which encapsulates an unstructured mesh, or CW complex, which can be expressed using a Hasse Diagram.

Collective

Input Parameter:

  • comm - The communicator for the DMPLEX object

Output Parameter:

  • mesh - The DMPLEX object

Level: beginner

See also: DM, DMPLEX, DMType, DMCreate(), DMSetType()

External Links

source
PETSc.LibPETSc.DMPlexCreateBallMesh — Method
dm::PetscDM = DMPlexCreateBallMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, R::PetscReal)

Creates a simplex mesh on the d-dimensional ball, B^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

See also: DM, DMPLEX, DMPlexCreateSphereMesh(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateBasisRotation — Method
DMPlexCreateBasisRotation(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGlobalToLocalBasis(), DMPlexLocalToGlobalBasis()

External Links

source
PETSc.LibPETSc.DMPlexCreateBoxMesh — Method
dm::PetscDM = DMPlexCreateBoxMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, periodicity::Vector{DMBoundaryType}, interpolate::PetscBool, localizationHeight::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

See also: DM, DMPLEX, DMSetFromOptions(), DMPlexCreateFromFile(), DMPlexCreateHexCylinderMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateBoxSurfaceMesh — Method
dm::PetscDM = DMPlexCreateBoxSurfaceMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, interpolate::PetscBool)

Creates a mesh on the surface of the tensor product of unit intervals (box) using tensor cells (hexahedra).

Collective

Input Parameters:

  • comm - The communicator for 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

See also: DM, DMPLEX, DMSetFromOptions(), DMPlexCreateBoxMesh(), DMPlexCreateFromFile(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateCGNS — Method
dm::PetscDM = DMPlexCreateCGNS(petsclib::PetscLibType, comm::MPI_Comm, cgid::PetscInt, interpolate::PetscBool)

Create a DMPLEX mesh from a CGNS file ID.

Collective

Input Parameters:

  • comm - The MPI 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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexCreateExodus()

External Links

source
PETSc.LibPETSc.DMPlexCreateCGNSFromFile — Method
dm::PetscDM = DMPlexCreateCGNSFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool)

Create a DMPLEX mesh from a CGNS file.

Collective

Input Parameters:

  • comm - The MPI 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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexCreateCGNS(), DMPlexCreateExodus()

External Links

source
PETSc.LibPETSc.DMPlexCreateCellNumbering — Method
globalCellNumbers::IS = DMPlexCreateCellNumbering(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetCellNumbering(), DMPlexGetVertexNumbering()

External Links

source
PETSc.LibPETSc.DMPlexCreateClosureIndex — Method
DMPlexCreateClosureIndex(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, PetscSection, DMPlexVecGetClosure(), DMPlexVecRestoreClosure(), DMPlexVecSetClosure(), DMPlexMatSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexCreateCoarsePointIS — Method
fpointIS::IS = DMPlexCreateCoarsePointIS(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, IS, DMRefine(), DMPlexSetRefinementUniform(), DMPlexGetSubpointIS()

External Links

source
PETSc.LibPETSc.DMPlexCreateCohesiveSubmesh — Method
subdm::PetscDM = DMPlexCreateCohesiveSubmesh(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetSubpointMap(), DMPlexCreateSubmesh()

External Links

source
PETSc.LibPETSc.DMPlexCreateColoring — Method
coloring::ISColoring = DMPlexCreateColoring(petsclib::PetscLibType, dm::AbstractPetscDM, depth::PetscInt, distance::PetscInt)

Gets coloring of the connectivity graph of the DMPlex points at a given depth.

Collective

Input Parameters:

  • dm - the DMPlex object
  • depth - the dimension of the entities in the connectivity graph.
  • distance - the distance of the coloring (either 1 or 2).

Output Parameter:

  • coloring - the coloring

Level: developer

See also: DMPlex, ISColoring, MatColoring, DMCreateColoring()

External Links

source
PETSc.LibPETSc.DMPlexCreateCoordinateSpace — Method
DMPlexCreateCoordinateSpace(petsclib::PetscLibType, dm::AbstractPetscDM, degree::PetscInt, localized::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

See also: DM, DMPLEX, PetscPointFn, PetscFECreateLagrange(), DMGetCoordinateDM(), DMPlexSetCoordinateMap()

External Links

source
PETSc.LibPETSc.DMPlexCreateDefaultReferenceTree — Method
ref::PetscDM = DMPlexCreateDefaultReferenceTree(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, simplex::PetscBool)

create a reference tree for isotropic hierarchical mesh refinement.

Collective

Input Parameters:

  • comm - the MPI 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

See also: DMPlexSetReferenceTree(), DMPlexGetReferenceTree()

External Links

source
PETSc.LibPETSc.DMPlexCreateDoublet — Method
newdm::PetscDM = DMPlexCreateDoublet(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, interpolate::PetscBool, refinementLimit::PetscReal)

Creates a mesh of two cells of the specified type, optionally with later refinement.

Collective

Input Parameters:

  • comm - The communicator for 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

See also: DM, DMPLEX, DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateEdgeNumbering — Method
globalEdgeNumbers::IS = DMPlexCreateEdgeNumbering(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetCellNumbering(), DMPlexGetVertexNumbering(), DMPlexCreatePointNumbering()

External Links

source
PETSc.LibPETSc.DMPlexCreateEphemeral — Method
dm::PetscDM = DMPlexCreateEphemeral(petsclib::PetscLibType, tr::DMPlexTransform, prefix::String)

This takes a DMPlexTransform and a base DMPlex and produces an ephemeral DM, meaning one that is created on the fly in response to queries.

Input Parameters:

  • tr - The DMPlexTransform
  • prefix - An options prefix, or NULL

Output Parameter:

  • dm - The DM

Level: beginner

See also: DMPlexCreateFromFile, DMPlexCreateFromDAG(), DMPlexCreateFromCellListPetsc(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateExodus — Method
dm::PetscDM = DMPlexCreateExodus(petsclib::PetscLibType, comm::MPI_Comm, exoid::PetscExodusIIInt, interpolate::PetscBool)

Create a DMPLEX mesh from an ExodusII file ID.

Collective

Input Parameters:

  • comm - The MPI 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

See also: DM, PETSCVIEWEREXODUSII, DMPLEX, DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateExodusFromFile — Method
dm::PetscDM = DMPlexCreateExodusFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool)

Create a DMPLEX mesh from an ExodusII file.

Collective

Input Parameters:

  • comm - The MPI 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

See also: DM, PETSCVIEWEREXODUSII, DMPLEX, DMCreate(), DMPlexCreateExodus()

External Links

source
PETSc.LibPETSc.DMPlexCreateFluent — Method
dm::PetscDM = DMPlexCreateFluent(petsclib::PetscLibType, comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool)

Create a DMPLEX mesh from a Fluent mesh file http://aerojet.engr.ucdavis.edu/fluenthelp/html/ug/node1490.htm.

Collective

Input Parameters:

  • comm - The MPI 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

See also: DM, DMPLEX, DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFluentFromFile — Method
dm::PetscDM = DMPlexCreateFluentFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool)

Create a DMPLEX mesh from a Fluent mesh file

Collective

Input Parameters:

  • comm - The MPI 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

See also: DM, DMPLEX, DMPlexCreateFromFile(), DMPlexCreateFluent(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromCellListParallelPetsc — Method
vertexSF::PetscSF,verticesAdj::Ptr{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, must be freed by user

Level: intermediate

See also: DM, DMPLEX, DMPlexCreateFromCellListPetsc(), DMPlexBuildFromCellListParallel(), DMPlexBuildCoordinatesFromCellListParallel(), DMPlexCreateFromDAG(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromCellListPetsc — Method
dm::PetscDM = DMPlexCreateFromCellListPetsc(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, numCells::PetscInt, numVertices::PetscInt, numCorners::PetscInt, interpolate::PetscBool, cells::Vector{PetscInt}, spaceDim::PetscInt, vertexCoords::Vector{PetscReal})

Create DMPLEX from a list of vertices for each cell (common mesh generator output), but only process 0 takes in the input

Collective

Input Parameters:

  • comm - The 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 \times numCorners numbers, the vertices for each cell, only on process 0
  • spaceDim - The spatial dimension used for coordinates
  • vertexCoords - An array of numVertices \times 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

See also: DM, DMPLEX, DMPlexCreateFromCellListParallelPetsc(), DMPlexBuildFromCellList(), DMPlexBuildCoordinatesFromCellList(), DMPlexCreateFromDAG(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromCellSectionParallel — Method
vertexSF::PetscSF,verticesAdj::Ptr{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, must be freed by user

Level: intermediate

See also: DM, DMPLEX, DMPlexCreateFromCellListPetsc(), DMPlexBuildFromCellListParallel(), DMPlexBuildCoordinatesFromCellListParallel(), DMPlexCreateFromDAG(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromDAG — Method
DMPlexCreateFromDAG(petsclib::PetscLibType, dm::AbstractPetscDM, depth::PetscInt, numPoints::Vector{PetscInt}, coneSize::Vector{PetscInt}, cones::Vector{PetscInt}, coneOrientations::Vector{PetscInt}, vertexCoords::Vector{PetscScalar})

This takes as input the adjacency-list representation of the Directed Acyclic Graph (Hasse Diagram) encoding a mesh, and produces a DM

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] \times spacedim numbers representing the coordinates of each vertex, with spacedim the value set via DMSetCoordinateDim()

Output Parameter:

  • dm - The DM

Level: advanced

See also: DM, DMPLEX, DMPlexCreateFromCellListPetsc(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateFromFile — Method
dm::PetscDM = DMPlexCreateFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, plexname::String, interpolate::PetscBool)

This takes a filename and produces a DM

Collective

Input Parameters:

  • comm - The 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

See also: DM, DMPLEX, DMPlexCreateFromDAG(), DMPlexCreateFromCellListPetsc(), DMPlexCreate(), PetscObjectSetName(), DMView(), DMLoad()

External Links

source
PETSc.LibPETSc.DMPlexCreateGeomFromFile — Method
dm::PetscDM = DMPlexCreateGeomFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, islite::PetscBool)

Create a DMPLEX mesh from an EGADS, IGES, or STEP file.

Collective

Input Parameters:

  • comm - The MPI 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

See also: DM, DMPLEX, DMCreate(), DMPlexCreateEGADS(), DMPlexCreateEGADSliteFromFile()

External Links

source
PETSc.LibPETSc.DMPlexCreateGlobalToNaturalSF — Method
sfNatural::PetscSF = DMPlexCreateGlobalToNaturalSF(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, PetscSF, PetscSection, DMPlexDistribute(), DMPlexDistributeField()

External Links

source
PETSc.LibPETSc.DMPlexCreateGmsh — Method
dm::PetscDM = DMPlexCreateGmsh(petsclib::PetscLibType, comm::MPI_Comm, viewer::PetscViewer, interpolate::PetscBool)

Create a DMPLEX mesh from a Gmsh file viewer

Collective

Input Parameters:

  • comm - The MPI 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

See also: DM, DMPLEX, DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateGmshFromFile — Method
dm::PetscDM = DMPlexCreateGmshFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool)

Create a DMPLEX mesh from a Gmsh file

Input Parameters:

  • comm - The MPI 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

See also: DM, DMPLEX, DMPlexCreateFromFile(), DMPlexCreateGmsh(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateHexCylinderMesh — Method
dm::PetscDM = DMPlexCreateHexCylinderMesh(petsclib::PetscLibType, comm::MPI_Comm, periodicZ::DMBoundaryType, Nr::PetscInt)

Creates a mesh on the tensor product of the unit interval with the circle (cylinder) using hexahedra.

Collective

Input Parameters:

  • comm - The communicator for 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

See also: DM, DMPLEX, DMPlexCreateBoxMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateHybridMesh — Method
hybridLabel::DMLabel,splitLabel::DMLabel,dmInterface::PetscDM,dmHybrid::PetscDM = DMPlexCreateHybridMesh(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexConstructCohesiveCells(), DMPlexLabelCohesiveComplete(), DMPlexGetSubpointMap(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateHypercubicMesh — Method
dm::PetscDM = DMPlexCreateHypercubicMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, edges::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, overlap::PetscInt)

Creates a periodic mesh on the tensor product of unit intervals using only vertices and edges.

Collective

Input Parameters:

  • comm - The communicator for 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

See also: DMSetFromOptions(), DMPlexCreateFromFile(), DMPlexCreateHexCylinderMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateLabelField — Method
val::PetscVec = DMPlexCreateLabelField(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMView()

External Links

source
PETSc.LibPETSc.DMPlexCreateNaturalVector — Method
nv::PetscVec = DMPlexCreateNaturalVector(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalBegin()

External Links

source
PETSc.LibPETSc.DMPlexCreateNeighborCSR — Method
numVertices::PetscInt,offsets::Ptr{PetscInt},adjacency::Ptr{PetscInt} = DMPlexCreateNeighborCSR(petsclib::PetscLibType, dm::AbstractPetscDM, cellHeight::PetscInt)

Create a mesh graph (cell-cell adjacency) in parallel CSR format.

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

See also: DM, DMPLEX, DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateOverlapLabel — Method
ovLabel::DMLabel = DMPlexCreateOverlapLabel(petsclib::PetscLibType, dm::AbstractPetscDM, levels::PetscInt, rootSection::PetscSection, rootrank::AbstractIS, leafSection::PetscSection, leafrank::AbstractIS)

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

See also: DMPLEX, DMPlexCreateOverlapLabelFromLabels(), DMPlexGetAdjacency(), DMPlexDistributeOwnership(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexCreateOverlapLabelFromLabels — Method
ovLabel::DMLabel = DMPlexCreateOverlapLabelFromLabels(petsclib::PetscLibType, dm::AbstractPetscDM, numLabels::PetscInt, label::Vector{DMLabel}, value::Vector{PetscInt}, numExLabels::PetscInt, exLabel::Vector{DMLabel}, exValue::Vector{PetscInt}, rootSection::PetscSection, rootrank::AbstractIS, leafSection::PetscSection, leafrank::AbstractIS)

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

See also: DMPLEX, DMPlexCreateOverlapLabel(), DMPlexGetAdjacency(), DMPlexDistributeOwnership(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexCreateOverlapMigrationSF — Method
migrationSF::PetscSF = DMPlexCreateOverlapMigrationSF(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexCreateOverlapLabel(), DMPlexDistributeOverlap(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexCreatePLYFromFile — Method
dm::PetscDM = DMPlexCreatePLYFromFile(petsclib::PetscLibType, comm::MPI_Comm, filename::String, interpolate::PetscBool)

Create a DMPLEX mesh from a PLY https://en.wikipedia.org/wiki/PLY_(file_format) file.

Input Parameters:

  • comm - The MPI 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

See also: DMPlexCreateFromFile(), DMPlexCreateGmsh(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreatePartitionerGraph — Method
numVertices::PetscInt,offsets::Ptr{PetscInt},adjacency::Ptr{PetscInt},globalNumbering::IS = DMPlexCreatePartitionerGraph(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexCSRAlgorithm, PetscPartitionerGetType(), PetscPartitionerCreate(), DMSetAdjacency()

External Links

source
PETSc.LibPETSc.DMPlexCreatePointNumbering — Method
globalPointNumbers::IS = DMPlexCreatePointNumbering(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetCellNumbering()

External Links

source
PETSc.LibPETSc.DMPlexCreatePointSF — Method
pointSF::PetscSF = DMPlexCreatePointSF(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, PetscSF, DM, DMPlexDistribute(), DMPlexDistributeOverlap()

External Links

source
PETSc.LibPETSc.DMPlexCreateProcessSF — Method
processRanks::IS,sfProcess::PetscSF = DMPlexCreateProcessSF(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, PetscSF, PetscSFCreate(), DMPlexCreateTwoSidedProcessSF()

External Links

source
PETSc.LibPETSc.DMPlexCreateRankField — Method
ranks::PetscVec = DMPlexCreateRankField(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMView()

External Links

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

Create a DMPLEX with the appropriate FEM reference cell

Collective

Input Parameters:

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

Output Parameter:

  • refdm - The reference cell

Level: intermediate

See also: DM, DMPLEX, DMPlexCreateBoxMesh()

External Links

source
PETSc.LibPETSc.DMPlexCreateRigidBodies — Method
sp::MatNullSpace = DMPlexCreateRigidBodies(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, MatNullSpaceCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateRigidBody — Method
sp::MatNullSpace = DMPlexCreateRigidBody(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, MatNullSpaceCreate(), PCGAMG

External Links

source
PETSc.LibPETSc.DMPlexCreateSection — Method
section::PetscSection = DMPlexCreateSection(petsclib::PetscLibType, dm::AbstractPetscDM, label::Vector{DMLabel}, numComp::Vector{PetscInt}, numDof::Vector{PetscInt}, numBC::PetscInt, bcField::Vector{PetscInt}, bcComps::Vector{<:AbstractIS}, bcPoints::Vector{<:AbstractIS}, perm::AbstractIS)

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 \time (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

See also: DM, DMPLEX, DMPlexCreate(), PetscSectionCreate(), PetscSectionSetPermutation()

External Links

source
PETSc.LibPETSc.DMPlexCreateSphereMesh — Method
dm::PetscDM = DMPlexCreateSphereMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, simplex::PetscBool, R::PetscReal)

Creates a mesh on the d-dimensional sphere, S^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

See also: DM, DMPLEX, DMPlexCreateBallMesh(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateSubmesh — Method
subdm::PetscDM = DMPlexCreateSubmesh(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetSubpointMap(), DMGetLabel(), DMLabelSetValue()

External Links

source
PETSc.LibPETSc.DMPlexCreateTPSMesh — Method
dm::PetscDM = DMPlexCreateTPSMesh(petsclib::PetscLibType, comm::MPI_Comm, tpstype::DMPlexTPSType, extent::Vector{PetscInt}, periodic::Vector{DMBoundaryType}, tps_distribute::PetscBool, refinements::PetscInt, layers::PetscInt, thickness::PetscReal)

Create a distributed, interpolated mesh of a triply-periodic surface

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

See also: DM, DMPLEX, DMPlexCreateSphereMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateTwoSidedProcessSF — Method
processRanks::IS,sfProcess::PetscSF = DMPlexCreateTwoSidedProcessSF(petsclib::PetscLibType, dm::AbstractPetscDM, sfPoint::PetscSF, rootRankSection::PetscSection, rootRanks::AbstractIS, leafRankSection::PetscSection, leafRanks::AbstractIS)

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

See also: DMPLEX, PetscSFCreate(), DMPlexCreateProcessSF()

External Links

source
PETSc.LibPETSc.DMPlexCreateWedgeBoxMesh — Method
dm::PetscDM = DMPlexCreateWedgeBoxMesh(petsclib::PetscLibType, comm::MPI_Comm, faces::Vector{PetscInt}, lower::Vector{PetscReal}, upper::Vector{PetscReal}, periodicity::Vector{DMBoundaryType}, orderHeight::PetscBool, interpolate::PetscBool)

Creates a 3-D mesh tessellating the (x,y) plane and extruding in the third direction using wedge cells.

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

See also: DM, DMPLEX, DMPlexCreateHexCylinderMesh(), DMPlexCreateWedgeCylinderMesh(), DMExtrude(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexCreateWedgeCylinderMesh — Method
dm::PetscDM = DMPlexCreateWedgeCylinderMesh(petsclib::PetscLibType, comm::MPI_Comm, n::PetscInt, interpolate::PetscBool)

Creates a mesh on the tensor product of the unit interval with the circle (cylinder) using wedges.

Collective

Input Parameters:

  • comm - The communicator for the DM object
  • n - The number of wedges around the origin
  • interpolate - Create edges and faces

Output Parameter:

  • dm - The DM object

Level: beginner

See also: DM, DMPLEX, DMPlexCreateHexCylinderMesh(), DMPlexCreateBoxMesh(), DMSetType(), DMCreate()

External Links

source
PETSc.LibPETSc.DMPlexDistribute — Method
sf::PetscSF,dmParallel::PetscDM = DMPlexDistribute(petsclib::PetscLibType, dm::AbstractPetscDM, overlap::PetscInt)

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

See also: DMPLEX, DM, DMPlexCreate(), DMSetAdjacency(), DMPlexGetOverlap()

External Links

source
PETSc.LibPETSc.DMPlexDistributeField — Method
DMPlexDistributeField(petsclib::PetscLibType, dm::AbstractPetscDM, pointSF::PetscSF, originalSection::PetscSection, originalVec::AbstractPetscVec, newSection::PetscSection, newVec::AbstractPetscVec)

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

See also: DMPLEX, DMPlexDistribute(), DMPlexDistributeFieldIS(), DMPlexDistributeData(), PetscSectionMigrateData()

External Links

source
PETSc.LibPETSc.DMPlexDistributeFieldIS — Method
newIS::IS = DMPlexDistributeFieldIS(petsclib::PetscLibType, dm::AbstractPetscDM, pointSF::PetscSF, originalSection::PetscSection, originalIS::AbstractIS, newSection::PetscSection)

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

See also: DMPLEX, DMPlexDistribute(), DMPlexDistributeField(), DMPlexDistributeData(), PetscSectionMigrateData()

External Links

source
PETSc.LibPETSc.DMPlexDistributeGetDefault — Method
dist::PetscBool = DMPlexDistributeGetDefault(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DM, DMPlexDistributeSetDefault(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexDistributeOverlap — Method
sf::PetscSF,dmOverlap::PetscDM = DMPlexDistributeOverlap(petsclib::PetscLibType, dm::AbstractPetscDM, overlap::PetscInt)

Add partition overlap to a distributed non-overlapping DM.

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 label - Label used to exclude points from overlap
  • -dm_plex_overlap_exclude_value value - Label value used to exclude points from overlap

Level: advanced

See also: DMPLEX, PetscSF, DM, DMPlexCreate(), DMSetAdjacency(), DMPlexDistribute(), DMPlexCreateOverlapLabel(), DMPlexGetOverlap()

External Links

source
PETSc.LibPETSc.DMPlexDistributeOwnership — Method
rootrank::IS,leafrank::IS = DMPlexDistributeOwnership(petsclib::PetscLibType, dm::AbstractPetscDM, rootSection::PetscSection, leafSection::PetscSection)

Compute owner information for shared points. This basically gets two-sided for an SF.

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

See also: DMPLEX, DMPlexCreateOverlapLabel(), DMPlexDistribute(), DMPlexDistributeOverlap()

External Links

source
PETSc.LibPETSc.DMPlexDistributeSetDefault — Method
DMPlexDistributeSetDefault(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexDistributeGetDefault(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexDistributionGetName — Method
name::String = DMPlexDistributionGetName(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMPlexDistributionSetName(), DMPlexTopologyView(), DMPlexTopologyLoad()

External Links

source
PETSc.LibPETSc.DMPlexDistributionSetName — Method
DMPlexDistributionSetName(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexDistributionGetName(), DMPlexTopologyView(), DMPlexTopologyLoad()

External Links

source
PETSc.LibPETSc.DMPlexEqual — Method
equal::PetscBool = DMPlexEqual(petsclib::PetscLibType, dmA::AbstractPetscDM, dmB::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetCone()

External Links

source
PETSc.LibPETSc.DMPlexExtrude — Method
edm::PetscDM = DMPlexExtrude(petsclib::PetscLibType, dm::AbstractPetscDM, layers::PetscInt, thickness::PetscReal, tensor::PetscBool, symmetric::PetscBool, periodic::PetscBool, normal::Vector{PetscReal}, thicknesses::Vector{PetscReal}, activeLabel::DMLabel)

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 product 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 (true|false) - Use tensor cells when extruding
  • -dm_plex_transform_extrude_symmetric (true|false) - Extrude layers symmetrically about the surface
  • -dm_plex_transform_extrude_periodic (true|false) - 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

See also: DM, DMPLEX, DMExtrude(), DMPlexTransform, DMPlexTransformExtrudeSetThickness(), DMPlexTransformExtrudeSetTensor()

External Links

source
PETSc.LibPETSc.DMPlexFilter — Method
ownershipTransferSF::PetscSF,subdm::PetscDM = DMPlexFilter(petsclib::PetscLibType, dm::AbstractPetscDM, cellLabel::DMLabel, value::PetscInt, ignoreLabelHalo::PetscBool, sanitizeSubmesh::PetscBool, comm::MPI_Comm)

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
  • comm - The communicator you want the mesh on (currently supports only a sequential communicator or the same communicator of the original mesh)

Output Parameters:

  • ownershipTransferSF - The PetscSF representing the ownership transfers between parent local meshes due to submeshing.
  • subdm - The new mesh

Level: developer

See also: DM, DMPLEX, DMPlexGetSubpointMap(), DMGetLabel(), DMLabelSetValue(), DMPlexCreateSubmesh()

External Links

source
PETSc.LibPETSc.DMPlexFindVertices — Method
points::IS = DMPlexFindVertices(petsclib::PetscLibType, dm::AbstractPetscDM, coordinates::AbstractPetscVec, eps::PetscReal)

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

See also: DMPLEX, DMPlexCreate(), DMGetCoordinatesLocal()

External Links

source
PETSc.LibPETSc.DMPlexFreeGeomObject — Method
DMPlexFreeGeomObject(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGenerate — Method
mesh::PetscDM = DMPlexGenerate(petsclib::PetscLibType, boundary::AbstractPetscDM, name::String, interpolate::PetscBool)

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

See also: DM, DMPLEX, DMPlexCreate(), DMRefine()

External Links

source
PETSc.LibPETSc.DMPlexGeomDataAndGrads — Method
DMPlexGeomDataAndGrads(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMCreate(), DMPlexCreateGeom(), DMPlexModifyEGADSGeomModel()

External Links

source
PETSc.LibPETSc.DMPlexGetActivePoint — Method
point::PetscInt = DMPlexGetActivePoint(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexSetActivePoint()

External Links

source
PETSc.LibPETSc.DMPlexGetAdjacency — Method
adjSize::PetscInt,adj::Vector{PetscInt} = DMPlexGetAdjacency(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMSetAdjacency(), DMPlexDistribute(), DMCreateMatrix(), DMPlexPreallocateOperator()

External Links

source
PETSc.LibPETSc.DMPlexGetAdjacencyUseAnchors — Method
useAnchors::PetscBool = DMPlexGetAdjacencyUseAnchors(petsclib::PetscLibType, dm::AbstractPetscDM)

Query whether adjacency in the mesh uses the point-to-point constraints.

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

See also: DMPLEX, DMPlexSetAdjacencyUseAnchors(), DMSetAdjacency(), DMGetAdjacency(), DMPlexDistribute(), DMPlexPreallocateOperator(), DMPlexSetAnchors()

External Links

source
PETSc.LibPETSc.DMPlexGetAdjacencyUser — Method
DMPlexGetAdjacencyUser(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})

get the user-defined adjacency callback

Input Parameter:

  • dm - The DM object

Output Parameters:

  • user - The callback
  • ctx - context for callback evaluation

Level: advanced

See also: DMPLEX, DMSetAdjacency(), DMPlexDistribute(), DMPlexPreallocateOperator(), DMPlexGetAdjacency(), DMPlexSetAdjacencyUser()

External Links

source
PETSc.LibPETSc.DMPlexGetAnchors — Method
anchorSection::PetscSection,anchorIS::IS = DMPlexGetAnchors(petsclib::PetscLibType, dm::AbstractPetscDM)

Get the layout of the anchor (point-to-point) constraints. Typically, the user will not have to 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

See also: DM, DMPLEX, DMPlexSetAnchors(), DMGetDefaultConstraints(), DMSetDefaultConstraints(), IS, PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetCellCoordinates — Method
isDG::PetscBool,Nc::PetscInt,array::Vector{PetscScalar},coords::Vector{PetscScalar} = DMPlexGetCellCoordinates(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexRestoreCellCoordinates(), DMGetCoordinatesLocal(), DMGetCellCoordinatesLocal()

External Links

source
PETSc.LibPETSc.DMPlexGetCellFields — Method
u::Ptr{PetscScalar},u_t::Ptr{PetscScalar},a::Ptr{PetscScalar} = DMPlexGetCellFields(petsclib::PetscLibType, dm::AbstractPetscDM, cellIS::AbstractIS, locX::AbstractPetscVec, locX_t::AbstractPetscVec, locA::AbstractPetscVec)

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

See also: DM, DMPLEX, DMPlexGetFaceFields()

External Links

source
PETSc.LibPETSc.DMPlexGetCellNumbering — Method
globalCellNumbers::IS = DMPlexGetCellNumbering(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexCreateCellNumbering(), DMPlexGetVertexNumbering()

External Links

source
PETSc.LibPETSc.DMPlexGetCellType — Method
celltype::DMPolytopeType = DMPlexGetCellType(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPolytopeType, DMPlexGetCellTypeLabel(), DMPlexGetDepthLabel(), DMPlexGetDepth()

External Links

source
PETSc.LibPETSc.DMPlexGetCellTypeLabel — Method
celltypeLabel::DMLabel = DMPlexGetCellTypeLabel(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetCellType(), DMPlexGetDepthLabel(), DMCreateLabel()

External Links

source
PETSc.LibPETSc.DMPlexGetCellTypeStratum — Method
start::PetscInt,end_::PetscInt = DMPlexGetCellTypeStratum(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexConstructGhostCells(), DMPlexGetDepthStratum(), DMPlexGetHeightStratum()

External Links

source
PETSc.LibPETSc.DMPlexGetChart — Method
pStart::PetscInt,pEnd::PetscInt = DMPlexGetChart(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetClosureIndices — Method
numIndices::PetscInt,indices::Vector{PetscInt},outOffsets::Vector{PetscInt} = DMPlexGetClosureIndices(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, idxSection::PetscSection, point::PetscInt, useClPerm::PetscBool, values::Union{Ptr, AbstractArray{PetscScalar}})

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

See also: DM, DMPLEX, DMPlexRestoreClosureIndices(), DMPlexVecGetClosure(), DMPlexMatSetClosure(), DMGetLocalSection(), PetscSection, DMGetGlobalSection()

External Links

source
PETSc.LibPETSc.DMPlexGetCompressedClosure — Method
numPoints::PetscInt,points::Ptr{PetscInt},clSec::PetscSection,clPoints::IS,clp::Ptr{PetscInt} = DMPlexGetCompressedClosure(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, point::PetscInt, ornt::PetscInt)

Return the transitive closure of a point, restricted to points with dof in the given section

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • section - The PetscSection used to filter closure points
  • point - The mesh point
  • ornt - The orientation of point; when zero the cached closure index (if any) is used directly

Output Parameters:

  • numPoints - Number of closure points that participate in section
  • points - Array of (point, orientation) pairs; either the cached closure or a work array from DMPlexGetTransitiveClosure_Internal()
  • clSec - The section describing the closure index, or NULL if none is cached
  • clPoints - The IS holding the closure indices, or NULL if none is cached
  • clp - Raw pointer into the closure-index IS when it is used, or NULL otherwise

Level: developer

See also: DM, DMPLEX, PetscSection, DMPlexRestoreCompressedClosure(), DMPlexGetTransitiveClosure(), PetscSectionGetClosureIndex()

External Links

source
PETSc.LibPETSc.DMPlexGetCone — Method
cone::Vector{PetscInt} = DMPlexGetCone(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt)

Return the points on the in-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexGetConeSize(), DMPlexSetCone(), DMPlexGetConeTuple(), DMPlexSetChart(), DMPlexRestoreCone()

External Links

source
PETSc.LibPETSc.DMPlexGetConeOrientation — Method
coneOrientation::Vector{PetscInt} = DMPlexGetConeOrientation(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt)

Return the orientations on the in-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexSetConeSize(), DMPolytopeTypeComposeOrientation(), DMPolytopeTypeComposeOrientationInv(), DMPlexCreate(), DMPlexGetCone(), DMPlexSetCone(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetConeOrientations — Method
coneOrientations::Ptr{PetscInt} = DMPlexGetConeOrientations(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetConeSection(), DMPlexGetConeOrientation(), PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetConeRecursive — Method
depth::PetscInt,expandedPoints::Ptr{CIS},sections::Ptr{PetscSection} = DMPlexGetConeRecursive(petsclib::PetscLibType, dm::AbstractPetscDM, points::AbstractIS)

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeTuple(), DMPlexRestoreConeRecursive(), DMPlexGetConeRecursiveVertices(), DMPlexGetDepth(), PetscSection, IS

External Links

source
PETSc.LibPETSc.DMPlexGetConeRecursiveVertices — Method
expandedPoints::IS = DMPlexGetConeRecursiveVertices(petsclib::PetscLibType, dm::AbstractPetscDM, points::AbstractIS)

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeTuple(), DMPlexGetConeRecursive(), DMPlexRestoreConeRecursive(), DMPlexGetDepth(), IS

External Links

source
PETSc.LibPETSc.DMPlexGetConeSection — Method
section::PetscSection = DMPlexGetConeSection(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetSupportSection(), DMPlexGetCones(), DMPlexGetConeOrientations(), PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetConeSize — Method
size::PetscInt = DMPlexGetConeSize(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt)

Return the number of in-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetConeTuple — Method
pConesSection::PetscSection,pCones::IS = DMPlexGetConeTuple(petsclib::PetscLibType, dm::AbstractPetscDM, p::AbstractIS)

Return the points on the in-edges of several points in the DAG

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeRecursive(), DMPlexSetChart(), PetscSection, IS

External Links

source
PETSc.LibPETSc.DMPlexGetCones — Method
cones::Ptr{PetscInt} = DMPlexGetCones(petsclib::PetscLibType, dm::AbstractPetscDM)

Return cone data

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • cones - The cone for each point

Level: developer

See also: DM, DMPLEX, DMPlexGetConeSection()

External Links

source
PETSc.LibPETSc.DMPlexGetCoordinateMap — Method
coordFunc::Ptr{Cvoid} = DMPlexGetCoordinateMap(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMGetCoordinates(), DMPlexSetCoordinateMap(), PetscPointFn

External Links

source
PETSc.LibPETSc.DMPlexGetDataFVM — Method
cellgeom::PetscVec,facegeom::PetscVec,gradDM::PetscDM = DMPlexGetDataFVM(petsclib::PetscLibType, dm::AbstractPetscDM, fv::PetscFV)

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

See also: DMPLEX, DMPlexComputeGeometryFVM()

External Links

source
PETSc.LibPETSc.DMPlexGetDepth — Method
depth::PetscInt = DMPlexGetDepth(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetDepthLabel(), DMPlexGetDepthStratum(), DMPlexGetPointDepth(), DMPlexSymmetrize()

External Links

source
PETSc.LibPETSc.DMPlexGetDepthLabel — Method
depthLabel::DMLabel = DMPlexGetDepthLabel(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetDepth(), DMPlexGetHeightStratum(), DMPlexGetDepthStratum(), DMPlexGetPointDepth()

External Links

source
PETSc.LibPETSc.DMPlexGetDepthStratum — Method
start::PetscInt,end_::PetscInt = DMPlexGetDepthStratum(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetHeightStratum(), DMPlexGetCellTypeStratum(), DMPlexGetDepth(), DMPlexGetDepthLabel(), DMPlexGetPointDepth(), DMPlexSymmetrize(), DMPlexInterpolate()

External Links

source
PETSc.LibPETSc.DMPlexGetDepthStratumGlobalSize — Method
gsize::PetscInt = DMPlexGetDepthStratumGlobalSize(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetCellNumbering(), DMPlexGetVertexNumbering(), DMPlexGetDepthStratum(), DMPlexGetHeightStratum()

External Links

source
PETSc.LibPETSc.DMPlexGetFaceFields — Method
Nface::PetscInt,uL::Ptr{PetscScalar},uR::Ptr{PetscScalar} = DMPlexGetFaceFields(petsclib::PetscLibType, dm::AbstractPetscDM, fStart::PetscInt, fEnd::PetscInt, locX::AbstractPetscVec, locX_t::AbstractPetscVec, faceGeometry::AbstractPetscVec, cellGeometry::AbstractPetscVec, locGrad::AbstractPetscVec)

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

See also: DM, DMPLEX, DMPlexGetCellFields()

External Links

source
PETSc.LibPETSc.DMPlexGetFaceGeometry — Method
Nface::PetscInt,fgeom::Vector{PetscFVFaceGeom},vol::Vector{PetscReal} = DMPlexGetFaceGeometry(petsclib::PetscLibType, dm::AbstractPetscDM, fStart::PetscInt, fEnd::PetscInt, faceGeometry::AbstractPetscVec, cellGeometry::AbstractPetscVec)

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

See also: DM, DMPLEX, DMPlexGetCellFields()

External Links

source
PETSc.LibPETSc.DMPlexGetFullJoin — Method
numCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexGetFullJoin(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetJoin(), DMPlexRestoreJoin(), DMPlexGetMeet()

External Links

source
PETSc.LibPETSc.DMPlexGetFullMeet — Method
numCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexGetFullMeet(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetMeet(), DMPlexRestoreMeet(), DMPlexGetJoin()

External Links

source
PETSc.LibPETSc.DMPlexGetGatherDM — Method
sf::PetscSF,gatherMesh::PetscDM = DMPlexGetGatherDM(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DM, PetscSF, DMPlexDistribute(), DMPlexGetRedundantDM()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomBodyMassProperties — Method
volume::PetscScalar,surfArea::PetscScalar,centerOfGravity::Ptr{PetscScalar},COGsize::PetscInt,inertiaMatrixCOG::Ptr{PetscScalar},IMCOGsize::PetscInt = DMPlexGetGeomBodyMassProperties(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomCntrlPntAndWeightData — Method
cpHashTable::PetscHMapI,cpCoordDataLength::PetscInt,cpCoordData::Ptr{PetscScalar},maxNumEquiv::PetscInt,cpEquiv::PetscMat,wHashTable::PetscHMapI,wDataLength::PetscInt,wData::Ptr{PetscScalar} = DMPlexGetGeomCntrlPntAndWeightData(petsclib::PetscLibType, dm::AbstractPetscDM)

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.

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomCntrlPntMaps — Method
numCntrlPnts::PetscInt,cntrlPntFaceMap::Ptr{PetscInt},cntrlPntWeightFaceMap::Ptr{PetscInt},cntrlPntEdgeMap::Ptr{PetscInt},cntrlPntWeightEdgeMap::Ptr{PetscInt},cntrlPntVertexMap::Ptr{PetscInt},cntrlPntWeightVertexMap::Ptr{PetscInt} = DMPlexGetGeomCntrlPntMaps(petsclib::PetscLibType, dm::AbstractPetscDM)

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.

Level: intermediate

See also: DMPlexGeomDataAndGrads()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomFaceNumOfControlPoints — Method
numCntrlPnts::PetscInt = DMPlexGetGeomFaceNumOfControlPoints(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomGradData — Method
cpSurfGradHashTable::PetscHMapI,cpSurfGrad::PetscMat,cpArraySize::PetscInt,gradSACP::Ptr{PetscScalar},gradVolCP::Ptr{PetscScalar},wArraySize::PetscInt,gradSAW::Ptr{PetscScalar},gradVolW::Ptr{PetscScalar} = DMPlexGetGeomGradData(petsclib::PetscLibType, dm::AbstractPetscDM)

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.

See also: DMPlexGeomDataAndGrads()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomID — Method
id::PetscInt = DMPlexGetGeomID(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodies — Method
bodies::Ptr{PetscGeom},numBodies::PetscInt = DMPlexGetGeomModelBodies(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPlexGetGeomModelBodyShells(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyEdges — Method
edges::Ptr{PetscGeom},numEdges::PetscInt = DMPlexGetGeomModelBodyEdges(petsclib::PetscLibType, dm::AbstractPetscDM, body::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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyFaces — Method
faces::Ptr{PetscGeom},numFaces::PetscInt = DMPlexGetGeomModelBodyFaces(petsclib::PetscLibType, dm::AbstractPetscDM, body::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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyLoops — Method
loops::Ptr{PetscGeom},numLoops::PetscInt = DMPlexGetGeomModelBodyLoops(petsclib::PetscLibType, dm::AbstractPetscDM, body::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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyNodes — Method
nodes::Ptr{PetscGeom},numNodes::PetscInt = DMPlexGetGeomModelBodyNodes(petsclib::PetscLibType, dm::AbstractPetscDM, body::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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelBodyShells — Method
shells::Ptr{PetscGeom},numShells::PetscInt = DMPlexGetGeomModelBodyShells(petsclib::PetscLibType, dm::AbstractPetscDM, body::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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelEdgeNodes — Method
nodes::Ptr{PetscGeom},numNodes::PetscInt = DMPlexGetGeomModelEdgeNodes(petsclib::PetscLibType, dm::AbstractPetscDM, body::PetscGeom, edge::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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelFaceEdges — Method
edges::Ptr{PetscGeom},numEdges::PetscInt = DMPlexGetGeomModelFaceEdges(petsclib::PetscLibType, dm::AbstractPetscDM, body::PetscGeom, face::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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelFaceLoops — Method
loops::Ptr{PetscGeom},numLoops::PetscInt = DMPlexGetGeomModelFaceLoops(petsclib::PetscLibType, dm::AbstractPetscDM, body::PetscGeom, face::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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelShellFaces — Method
faces::Ptr{PetscGeom},numFaces::PetscInt = DMPlexGetGeomModelShellFaces(petsclib::PetscLibType, dm::AbstractPetscDM, body::PetscGeom, shell::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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomModelTUV — Method
DMPlexGetGeomModelTUV(petsclib::PetscLibType, dm::AbstractPetscDM)

Gets the [t] (EDGES) and [u, v] (FACES) geometry parameters of DM points that are associated geometry relationships. Requires a DM with an EGADS model attached.

Collective

Input Parameter:

  • dm - The DM object representing the mesh with PetscContainer containing an EGADS geometry model

Level: intermediate

See also: DMPLEX, DMCreate(), DMPlexCreateGeom(), DMPlexGeomDataAndGrads()

External Links

source
PETSc.LibPETSc.DMPlexGetGeomObject — Method
geomObj::PetscGeom = DMPlexGetGeomObject(petsclib::PetscLibType, dm::AbstractPetscDM, body::PetscGeom, geomType::PetscInt, geomID::PetscInt)

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

See also: DMPlexGetGeomModelBodies(), DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexGetGeometryFVM — Method
facegeom::PetscVec,cellgeom::PetscVec,minRadius::PetscReal = DMPlexGetGeometryFVM(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMTSSetRHSFunctionLocal()

External Links

source
PETSc.LibPETSc.DMPlexGetGradientDM — Method
dmGrad::PetscDM = DMPlexGetGradientDM(petsclib::PetscLibType, dm::AbstractPetscDM, fv::PetscFV)

Return gradient data layout

Collective

Input Parameters:

  • dm - The DM
  • fv - The PetscFV

Output Parameter:

  • dmGrad - The layout for gradient values

Level: developer

See also: DM, DMPLEX, DMPlexGetGeometryFVM()

External Links

source
PETSc.LibPETSc.DMPlexGetHeightStratum — Method
start::PetscInt,end_::PetscInt = DMPlexGetHeightStratum(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetDepthStratum(), DMPlexGetCellTypeStratum(), DMPlexGetDepth(), DMPlexGetPointHeight()

External Links

source
PETSc.LibPETSc.DMPlexGetInterpolatePreferTensor — Method
preferTensor::PetscBool = DMPlexGetInterpolatePreferTensor(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPlexSetInterpolatePreferTensor(), DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolatedCollective()

External Links

source
PETSc.LibPETSc.DMPlexGetIsoperiodicFaceSF — Method
num_face_sfs::PetscInt,face_sfs::Ptr{PetscSF} = DMPlexGetIsoperiodicFaceSF(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMGetGlobalSection(), DMPlexSetIsoperiodicFaceSF()

External Links

source
PETSc.LibPETSc.DMPlexGetJoin — Method
numCoveredPoints::PetscInt,coveredPoints::Vector{PetscInt} = DMPlexGetJoin(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexRestoreJoin(), DMPlexGetMeet()

External Links

source
PETSc.LibPETSc.DMPlexGetLocalOffsets — Method
num_cells::PetscInt,cell_size::PetscInt,num_comp::PetscInt,l_size::PetscInt,offsets::Vector{PetscInt} = DMPlexGetLocalOffsets(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPlexGetLocalOffsetsSupport(), DM, DMPLEX, DMLabel, DMPlexGetClosureIndices(), DMPlexSetClosurePermutationTensor(), DMPlexGetCeedRestriction()

External Links

source
PETSc.LibPETSc.DMPlexGetLocalOffsetsSupport — Method
num_faces::PetscInt,num_comp::PetscInt,l_size::PetscInt,offsetsNeg::Ptr{PetscInt},offsetsPos::Ptr{PetscInt} = DMPlexGetLocalOffsetsSupport(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPlexGetLocalOffsets(), DM, DMPLEX, DMLabel, DMPlexGetClosureIndices(), DMPlexSetClosurePermutationTensor(), DMPlexGetCeedRestriction()

External Links

source
PETSc.LibPETSc.DMPlexGetMaxProjectionHeight — Method
height::PetscInt = DMPlexGetMaxProjectionHeight(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexSetMaxProjectionHeight(), DMProjectFunctionLocal(), DMProjectFunctionLabelLocal()

External Links

source
PETSc.LibPETSc.DMPlexGetMaxSizes — Method
maxConeSize::PetscInt,maxSupportSize::PetscInt = DMPlexGetMaxSizes(petsclib::PetscLibType, dm::AbstractPetscDM)

Return the maximum number of in-edges (cone) and out-edges (support) for any point in the DAG

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetMeet — Method
numCoveringPoints::PetscInt,coveringPoints::Vector{PetscInt} = DMPlexGetMeet(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexRestoreMeet(), DMPlexGetJoin()

External Links

source
PETSc.LibPETSc.DMPlexGetMigrationSF — Method
migrationSF::PetscSF = DMPlexGetMigrationSF(petsclib::PetscLibType, dm::AbstractPetscDM)

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

Not Collective

Input Parameter:

  • dm - The DM

Output Parameter:

  • migrationSF - The PetscSF

Level: intermediate

See also: DM, DMPLEX, PetscSF, DMPlexDistribute(), DMPlexDistributeField(), DMPlexCreateMigrationSF(), DMPlexSetMigrationSF

External Links

source
PETSc.LibPETSc.DMPlexGetMinRadius — Method
minradius::PetscReal = DMPlexGetMinRadius(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMGetCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexGetNumFaceVertices — Method
numFaceVertices::PetscInt = DMPlexGetNumFaceVertices(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetCone()

External Links

source
PETSc.LibPETSc.DMPlexGetOrdering — Method
perm::IS = DMPlexGetOrdering(petsclib::PetscLibType, dm::AbstractPetscDM, otype::String, label::DMLabel)

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

See also: DMPLEX, DMPlexPermute(), MatOrderingType, MatGetOrdering()

External Links

source
PETSc.LibPETSc.DMPlexGetOrdering1D — Method
perm::IS = DMPlexGetOrdering1D(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMPlexGetOrdering(), DMPlexPermute(), MatGetOrdering()

External Links

source
PETSc.LibPETSc.DMPlexGetOrientedCone — Method
cone::Vector{PetscInt},ornt::Vector{PetscInt} = DMPlexGetOrientedCone(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt)

Return the points and orientations on the in-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexRestoreOrientedCone(), DMPlexGetConeSize(), DMPlexGetCone(), DMPlexGetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetOrientedFace — Method
posOriented::PetscBool = DMPlexGetOrientedFace(petsclib::PetscLibType, dm::AbstractPetscDM, cell::PetscInt, faceSize::PetscInt, face::Vector{PetscInt}, numCorners::PetscInt, indices::Vector{PetscInt}, origVertices::Vector{PetscInt}, faceVertices::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

See also: DM, DMPLEX, DMPlexGetCone()

External Links

source
PETSc.LibPETSc.DMPlexGetOverlap — Method
overlap::PetscInt = DMPlexGetOverlap(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMPlexSetOverlap(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexGetPartitionBalance — Method
flg::PetscBool = DMPlexGetPartitionBalance(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMPlexDistribute(), DMPlexSetPartitionBalance()

External Links

source
PETSc.LibPETSc.DMPlexGetPartitioner — Method
part::PetscPartitioner = DMPlexGetPartitioner(petsclib::PetscLibType, dm::AbstractPetscDM)

Get the mesh partitioner

Not Collective

Input Parameter:

  • dm - The DM

Output Parameter:

  • part - The PetscPartitioner

Level: developer

See also: DM, DMPLEX, PetscPartitioner, PetscSection, DMPlexDistribute(), DMPlexSetPartitioner(), PetscPartitionerDMPlexPartition(), PetscPartitionerCreate()

External Links

source
PETSc.LibPETSc.DMPlexGetPointDepth — Method
depth::PetscInt = DMPlexGetPointDepth(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetCellType(), DMPlexGetDepthLabel(), DMPlexGetDepth(), DMPlexGetPointHeight()

External Links

source
PETSc.LibPETSc.DMPlexGetPointGlobal — Method
start::PetscInt,end_::PetscInt = DMPlexGetPointGlobal(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetPointGlobalField(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointGlobalRead(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()

External Links

source
PETSc.LibPETSc.DMPlexGetPointGlobalField — Method
start::PetscInt,end_::PetscInt = DMPlexGetPointGlobalField(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetPointGlobal(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointGlobalRead(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()

External Links

source
PETSc.LibPETSc.DMPlexGetPointHeight — Method
height::PetscInt = DMPlexGetPointHeight(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetCellType(), DMPlexGetDepthLabel(), DMPlexGetDepth(), DMPlexGetPointDepth()

External Links

source
PETSc.LibPETSc.DMPlexGetPointLocal — Method
start::PetscInt,end_::PetscInt = DMPlexGetPointLocal(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetPointLocalField(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointLocalRead(), DMPlexPointLocalRef()

External Links

source
PETSc.LibPETSc.DMPlexGetPointLocalField — Method
start::PetscInt,end_::PetscInt = DMPlexGetPointLocalField(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetPointLocal(), DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexPointLocalRead(), DMPlexPointLocalRef()

External Links

source
PETSc.LibPETSc.DMPlexGetRedundantDM — Method
sf::PetscSF,redundantMesh::PetscDM = DMPlexGetRedundantDM(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMPlexDistribute(), DMPlexGetGatherDM()

External Links

source
PETSc.LibPETSc.DMPlexGetReferenceTree — Method
ref::PetscDM = DMPlexGetReferenceTree(petsclib::PetscLibType, dm::AbstractPetscDM)

get the reference tree for hierarchically non-conforming meshes.

Not Collective

Input Parameter:

  • dm - The DMPLEX object

Output Parameter:

  • ref - The reference tree DMPLEX object

Level: intermediate

See also: DM, DMPLEX, DMPlexSetReferenceTree(), DMPlexCreateDefaultReferenceTree()

External Links

source
PETSc.LibPETSc.DMPlexGetRefinementFunction — Method
DMPlexGetRefinementFunction(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})

Get the function giving the maximum cell volume for refinement

Input Parameter:

  • dm - The DM

Output Parameter:

  • 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

See also: DM, DMPLEX, DMRefine(), DMPlexSetRefinementFunction(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()

External Links

source
PETSc.LibPETSc.DMPlexGetRefinementLimit — Method
refinementLimit::PetscReal = DMPlexGetRefinementLimit(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMRefine(), DMPlexSetRefinementLimit(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform()

External Links

source
PETSc.LibPETSc.DMPlexGetRefinementUniform — Method
refinementUniform::PetscBool = DMPlexGetRefinementUniform(petsclib::PetscLibType, dm::AbstractPetscDM)

Retrieve the flag for uniform refinement

Input Parameter:

  • dm - The DM

Output Parameter:

  • refinementUniform - The flag for uniform refinement

Level: developer

See also: DM, DMPLEX, DMRefine(), DMPlexSetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()

External Links

source
PETSc.LibPETSc.DMPlexGetRegularRefinement — Method
regular::PetscBool = DMPlexGetRegularRefinement(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexSetRegularRefinement()

External Links

source
PETSc.LibPETSc.DMPlexGetSaveTransform — Method
save::PetscBool = DMPlexGetSaveTransform(petsclib::PetscLibType, dm::AbstractPetscDM)

Get the flag which determines whether the DMPlexTransform used to produce a refined DM is retained

Not Collective

Input Parameter:

  • dm - The DM

Output Parameter:

  • save - If PETSC_TRUE, the transform will be kept on the refined DM

Level: developer

See also: DM, DMPLEX, DMPlexTransform, DMPlexSetSaveTransform(), DMPlexGetTransform(), DMPlexSetTransform()

External Links

source
PETSc.LibPETSc.DMPlexGetScale — Method
scale::PetscReal = DMPlexGetScale(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexSetScale(), PetscUnit

External Links

source
PETSc.LibPETSc.DMPlexGetSimplexOrBoxCells — Method
cStart::PetscInt,cEnd::PetscInt = DMPlexGetSimplexOrBoxCells(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexConstructGhostCells(), DMPlexGetCellTypeStratum()

External Links

source
PETSc.LibPETSc.DMPlexGetSubdomainSection — Method
subsection::PetscSection = DMPlexGetSubdomainSection(petsclib::PetscLibType, dm::AbstractPetscDM)

Returns the section associated with the subdomain

Not Collective

Input Parameter:

  • dm - The DMPLEX

Output Parameter:

  • subsection - The subdomain section

Level: developer

See also: DM, DMPLEX, PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetSubpointIS — Method
subpointIS::IS = DMPlexGetSubpointIS(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexCreateSubmesh(), DMPlexGetSubpointMap()

External Links

source
PETSc.LibPETSc.DMPlexGetSubpointMap — Method
subpointMap::DMLabel = DMPlexGetSubpointMap(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexCreateSubmesh(), DMPlexGetSubpointIS()

External Links

source
PETSc.LibPETSc.DMPlexGetSupport — Method
support::Vector{PetscInt} = DMPlexGetSupport(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt)

Return the points on the out-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexGetSupportSize(), DMPlexSetSupport(), DMPlexGetCone(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexGetSupportSection — Method
section::PetscSection = DMPlexGetSupportSection(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetConeSection(), PetscSection

External Links

source
PETSc.LibPETSc.DMPlexGetSupportSize — Method
size::PetscInt = DMPlexGetSupportSize(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt)

Return the number of out-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexSetConeSize(), DMPlexSetChart(), DMPlexGetConeSize()

External Links

source
PETSc.LibPETSc.DMPlexGetTransform — Method
tr::DMPlexTransform = DMPlexGetTransform(petsclib::PetscLibType, dm::AbstractPetscDM)

Get the DMPlexTransform cached on the DM

Not Collective

Input Parameter:

  • dm - The DM

Output Parameter:

  • tr - The DMPlexTransform, or NULL if none has been saved

Level: developer

See also: DM, DMPLEX, DMPlexTransform, DMPlexSetTransform(), DMPlexSetSaveTransform(), DMPlexGetSaveTransform()

External Links

source
PETSc.LibPETSc.DMPlexGetTransformType — Method
type::String = DMPlexGetTransformType(petsclib::PetscLibType, dm::AbstractPetscDM)

Retrieve the transform type for uniform refinement

Input Parameter:

  • dm - The DM

Output Parameter:

  • type - The transform type for uniform refinement

Level: developer

See also: DM, DMPLEX, DMPlexTransformType, DMRefine(), DMPlexSetTransformType(), DMPlexGetRefinementUniform()

External Links

source
PETSc.LibPETSc.DMPlexGetTransitiveClosure — Method
numPoints::PetscInt,points::Vector{PetscInt} = DMPlexGetTransitiveClosure(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, useCone::PetscBool)

Return the points on the transitive closure of the in-edges or out-edges for this point in the DAG

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • p - The mesh point
  • useCone - PETSC_TRUE for the closure, otherwise return the support

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

See also: DM, DMPLEX, DMPlexRestoreTransitiveClosure(), DMPlexCreate(), DMPlexSetCone(), DMPlexSetChart(), DMPlexGetCone()

External Links

source
PETSc.LibPETSc.DMPlexGetTree — Method
parentSection::PetscSection,parents::Ptr{PetscInt},childIDs::Ptr{PetscInt},childSection::PetscSection,children::Ptr{PetscInt} = DMPlexGetTree(petsclib::PetscLibType, dm::AbstractPetscDM)

get the tree that describes the hierarchy of non-conforming mesh points. 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

See also: DM, DMPLEX, DMPlexSetTree(), DMPlexSetReferenceTree(), DMPlexSetAnchors(), DMPlexGetTreeParent(), DMPlexGetTreeChildren()

External Links

source
PETSc.LibPETSc.DMPlexGetTreeChildren — Method
numChildren::PetscInt,children::Vector{PetscInt} = DMPlexGetTreeChildren(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexSetTree(), DMPlexGetTree(), DMPlexGetTreeParent()

External Links

source
PETSc.LibPETSc.DMPlexGetTreeParent — Method
parent::PetscInt,childID::PetscInt = DMPlexGetTreeParent(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexSetTree(), DMPlexGetTree(), DMPlexGetTreeChildren()

External Links

source
PETSc.LibPETSc.DMPlexGetVTKCellHeight — Method
cellHeight::PetscInt = DMPlexGetVTKCellHeight(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexSetVTKCellHeight()

External Links

source
PETSc.LibPETSc.DMPlexGetVertexNumbering — Method
globalVertexNumbers::IS = DMPlexGetVertexNumbering(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetCellNumbering()

External Links

source
PETSc.LibPETSc.DMPlexGlobalToLocalBasis — Method
DMPlexGlobalToLocalBasis(petsclib::PetscLibType, dm::AbstractPetscDM, lv::AbstractPetscVec)

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

See also: DM, DMPLEX, DMPlexLocalToGlobalBasis(), DMGetLocalSection(), DMPlexCreateBasisRotation()

External Links

source
PETSc.LibPETSc.DMPlexGlobalToNaturalBegin — Method
DMPlexGlobalToNaturalBegin(petsclib::PetscLibType, dm::AbstractPetscDM, gv::AbstractPetscVec, nv::AbstractPetscVec)

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

See also: DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalEnd()

External Links

source
PETSc.LibPETSc.DMPlexGlobalToNaturalEnd — Method
DMPlexGlobalToNaturalEnd(petsclib::PetscLibType, dm::AbstractPetscDM, gv::AbstractPetscVec, nv::AbstractPetscVec)

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

See also: DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalBegin()

External Links

source
PETSc.LibPETSc.DMPlexGlobalVectorLoad — Method
DMPlexGlobalVectorLoad(petsclib::PetscLibType, dm::AbstractPetscDM, viewer::PetscViewer, sectiondm::AbstractPetscDM, sf::PetscSF, vec::AbstractPetscVec)

Loads on-disk vector data into a global vector

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

See also: DM, DMPLEX, DMPlexTopologyLoad(), DMPlexSectionLoad(), DMPlexLocalVectorLoad(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(), PetscSF, PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexGlobalVectorView — Method
DMPlexGlobalVectorView(petsclib::PetscLibType, dm::AbstractPetscDM, viewer::PetscViewer, sectiondm::AbstractPetscDM, vec::AbstractPetscVec)

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

See also: DM, DMPLEX, DMPlexTopologyView(), DMPlexSectionView(), DMPlexLocalVectorView(), DMPlexGlobalVectorLoad(), DMPlexLocalVectorLoad()

External Links

source
PETSc.LibPETSc.DMPlexInflateToGeomModel — Method
DMPlexInflateToGeomModel(petsclib::PetscLibType, dm::AbstractPetscDM, 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.

See also: DMPlexGetGeomModelTUV(), DMPlexInflateToGeomModelUseTUV(), DMPlexInflateToGeomModelUseXYZ()

External Links

source
PETSc.LibPETSc.DMPlexInflateToGeomModelUseTUV — Method
DMPlexInflateToGeomModelUseTUV(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMCreate(), DMPlexCreateGeom(), DMPlexGeomDataAndGrads(), DMPlexGetGeomModelTUV()

External Links

source
PETSc.LibPETSc.DMPlexInflateToGeomModelUseXYZ — Method
DMPlexInflateToGeomModelUseXYZ(petsclib::PetscLibType, dm::AbstractPetscDM)

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-conforming refinement.

Collective

Input Parameter:

  • dm - The uninflated DM object representing the mesh

Level: intermediate

See also: DM, DMPLEX, DMCreate(), DMPlexCreateEGADS()

External Links

source
PETSc.LibPETSc.DMPlexInsertBoundaryValues — Method
DMPlexInsertBoundaryValues(petsclib::PetscLibType, dm::AbstractPetscDM, insertEssential::PetscBool, locX::AbstractPetscVec, time::PetscReal, faceGeomFVM::AbstractPetscVec, cellGeomFVM::AbstractPetscVec, gradFVM::AbstractPetscVec)

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

See also: DM, DMPLEX, DMProjectFunctionLabelLocal(), DMAddBoundary()

External Links

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesEssential — Method
DMPlexInsertBoundaryValuesEssential(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Ptr{Cvoid}, locX::AbstractPetscVec)

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 application context for bcFunc

Output Parameter:

  • locX - A local vector to receives the boundary values

Level: developer

See also: DM, DMPLEX, DMLabel, DMPlexInsertBoundaryValuesEssentialField(), DMPlexInsertBoundaryValuesEssentialBdField(), DMAddBoundary()

External Links

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesEssentialBdField — Method
DMPlexInsertBoundaryValuesEssentialBdField(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, locU::AbstractPetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Ptr{Cvoid}, locX::AbstractPetscVec)

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 application context for func

Output Parameter:

  • locX - A local vector to receive the boundary values

Level: developer

See also: DM, DMPLEX, DMProjectBdFieldLabelLocal(), DMPlexInsertBoundaryValuesEssential(), DMPlexInsertBoundaryValuesEssentialField(), DMAddBoundary()

External Links

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesEssentialField — Method
DMPlexInsertBoundaryValuesEssentialField(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, locU::AbstractPetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Ptr{Cvoid}, locX::AbstractPetscVec)

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 application context for bcFunc

Output Parameter:

  • locX - A local vector to receives the boundary values

Level: developer

See also: DM, DMPLEX, DMPlexInsertBoundaryValuesEssential(), DMPlexInsertBoundaryValuesEssentialBdField(), DMAddBoundary()

External Links

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesFVM — Method
locGradient::PetscVec = DMPlexInsertBoundaryValuesFVM(petsclib::PetscLibType, dm::AbstractPetscDM, fv::PetscFV, locX::AbstractPetscVec, time::PetscReal)

Reconstruct cell gradients and insert non-essential (e.g. outflow) boundary values into a local finite-volume solution vector.

Collective

Input Parameters:

  • dm - the DMPLEX
  • fv - the PetscFV discretization
  • locX - the local solution vector; updated with non-essential boundary values
  • time - the current time

Output Parameter:

  • locGradient - if non-NULL, the local vector holding the reconstructed cell gradients

Level: developer

See also: DM, DMPLEX, PetscFV, DMPlexInsertBoundaryValues(), DMPlexReconstructGradientsFVM()

External Links

source
PETSc.LibPETSc.DMPlexInsertBoundaryValuesRiemann — Method
DMPlexInsertBoundaryValuesRiemann(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, faceGeometry::AbstractPetscVec, cellGeometry::AbstractPetscVec, Grad::AbstractPetscVec, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, label::DMLabel, numids::PetscInt, ids::Vector{PetscInt}, func::external, ctx::Ptr{Cvoid}, locX::AbstractPetscVec)

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 application context for bcFunc

Output Parameter:

  • locX - A local vector to receives the boundary values

Level: developer

See also: DM, DMPLEX, DMPlexInsertBoundaryValuesEssential(), DMPlexInsertBoundaryValuesEssentialField(), DMAddBoundary()

External Links

source
PETSc.LibPETSc.DMPlexInsertBounds — Method
DMPlexInsertBounds(petsclib::PetscLibType, dm::AbstractPetscDM, lower::PetscBool, time::PetscReal, locB::AbstractPetscVec)

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

See also: DM, DMPLEX, DMProjectFunctionLabelLocal(), PetscDSAddBoundary()

External Links

source
PETSc.LibPETSc.DMPlexInsertCone — Method
DMPlexInsertCone(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, conePos::PetscInt, conePoint::PetscInt)

Insert a point into the in-edges for the point p in the DAG

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexInsertConeOrientation — Method
DMPlexInsertConeOrientation(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, conePos::PetscInt, coneOrientation::PetscInt)

Insert a point orientation for the in-edge for the point p in the DAG

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexInsertSupport — Method
DMPlexInsertSupport(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, supportPos::PetscInt, supportPoint::PetscInt)

Insert a point into the out-edges for the point p in the DAG

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexInsertTimeDerivativeBoundaryValues — Method
DMPlexInsertTimeDerivativeBoundaryValues(petsclib::PetscLibType, dm::AbstractPetscDM, insertEssential::PetscBool, locX_t::AbstractPetscVec, time::PetscReal, faceGeomFVM::AbstractPetscVec, cellGeomFVM::AbstractPetscVec, gradFVM::AbstractPetscVec)

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

See also: DM, DMPLEX, DMProjectFunctionLabelLocal()

External Links

source
PETSc.LibPETSc.DMPlexInterpolate — Method
dmInt::PetscDM = DMPlexInterpolate(petsclib::PetscLibType, dm::AbstractPetscDM)

Take in a cell-vertex mesh and return one with all intermediate faces, edges, etc.

Collective

Input Parameter:

  • dm - The DMPLEX object with only cells and vertices

Output Parameter:

  • dmInt - The complete DMPLEX object

Level: intermediate

See also: DMPLEX, DMPlexUninterpolate(), DMPlexCreateFromCellListPetsc(), DMPlexCopyCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexInterpolatePointSF — Method
DMPlexInterpolatePointSF(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexInterpolate(), DMPlexUninterpolate()

External Links

source
PETSc.LibPETSc.DMPlexInvertCell — Method
DMPlexInvertCell(petsclib::PetscLibType, cellType::DMPolytopeType, cone::Vector{PetscInt})

Flips cell orientations since DMPLEX stores some of them internally with outward normals.

Input Parameters:

  • cellType - The cell type
  • cone - The incoming cone

Output Parameter:

  • cone - The inverted cone (in-place)

Level: developer

See also: DM, DMPLEX, DMPolytopeType, DMPlexGenerate()

External Links

source
PETSc.LibPETSc.DMPlexIsDistributed — Method
distributed::PetscBool = DMPlexIsDistributed(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMPlexDistribute(), DMPlexGetOverlap(), DMPlexIsInterpolated()

External Links

source
PETSc.LibPETSc.DMPlexIsInterpolated — Method
interpolated::DMPlexInterpolatedFlag = DMPlexIsInterpolated(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolatedCollective()

External Links

source
PETSc.LibPETSc.DMPlexIsInterpolatedCollective — Method
interpolated::DMPlexInterpolatedFlag = DMPlexIsInterpolatedCollective(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolated()

External Links

source
PETSc.LibPETSc.DMPlexIsSimplex — Method
simplex::PetscBool = DMPlexIsSimplex(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexGetSimplexOrBoxCells(), DMPlexGetCellType(), DMPlexGetHeightStratum(), DMPolytopeTypeGetNumVertices()

External Links

source
PETSc.LibPETSc.DMPlexLabelAddCells — Method
DMPlexLabelAddCells(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexLabelAddFaceCells(), DMPlexLabelComplete(), DMPlexLabelCohesiveComplete()

External Links

source
PETSc.LibPETSc.DMPlexLabelAddFaceCells — Method
DMPlexLabelAddFaceCells(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexLabelAddCells(), DMPlexLabelComplete(), DMPlexLabelCohesiveComplete()

External Links

source
PETSc.LibPETSc.DMPlexLabelClearCells — Method
DMPlexLabelClearCells(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexLabelComplete(), DMPlexLabelCohesiveComplete(), DMPlexLabelAddCells()

External Links

source
PETSc.LibPETSc.DMPlexLabelCohesiveComplete — Method
DMPlexLabelCohesiveComplete(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel, blabel::DMLabel, bvalue::PetscInt, flip::PetscBool, split::PetscBool, subdm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMPlexConstructCohesiveCells(), DMPlexLabelComplete()

External Links

source
PETSc.LibPETSc.DMPlexLabelComplete — Method
DMPlexLabelComplete(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel)

Starting with a label marking points, we add their transitive closure

Input Parameters:

  • dm - The DM
  • label - A DMLabel marking the points

Output Parameter:

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

Level: developer

See also: DM, DMPLEX, DMPlexLabelCohesiveComplete()

External Links

source
PETSc.LibPETSc.DMPlexLabelsLoad — Method
DMPlexLabelsLoad(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMLoad(), DMPlexTopologyLoad(), DMPlexCoordinatesLoad(), DMView(), PetscViewerHDF5Open(), PetscViewerPushFormat(), PetscSF, PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexLabelsView — Method
DMPlexLabelsView(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMView(), DMPlexTopologyView(), DMPlexCoordinatesView(), DMPlexLabelsLoad(), PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexLandauAccess — Method
DMPlexLandauAccess(petsclib::PetscLibType, pack::AbstractPetscDM, X::AbstractPetscVec, func::external, user_ctx::Ptr{Cvoid})

Access to the distribution function with user callback

Collective

Input Parameters:

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

Input/Output Parameter:

  • X - Vector to data to

Level: advanced

See also: DMPlexLandauCreateVelocitySpace()

External Links

source
PETSc.LibPETSc.DMPlexLandauAddMaxwellians — Method
DMPlexLandauAddMaxwellians(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, time::PetscReal, temps::Vector{PetscReal}, ns::Vector{PetscReal}, grid::PetscInt, b_id::PetscInt, n_batch::PetscInt, actx::Ptr{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

See also: DMPlexLandauCreateVelocitySpace()

External Links

source
PETSc.LibPETSc.DMPlexLandauCreateMassMatrix — Method
Amat::PetscMat = DMPlexLandauCreateMassMatrix(petsclib::PetscLibType, pack::AbstractPetscDM)

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

See also: DMPlexLandauCreateVelocitySpace()

External Links

source
PETSc.LibPETSc.DMPlexLandauCreateVelocitySpace — Method
X::PetscVec,J::PetscMat,pack::PetscDM = DMPlexLandauCreateVelocitySpace(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, prefix::String)

Create a DMPLEX velocity space mesh

Collective

Input Parameters:

  • comm - The MPI 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

See also: DMPlexCreate(), DMPlexLandauDestroyVelocitySpace()

External Links

source
PETSc.LibPETSc.DMPlexLandauIFunction — Method
DMPlexLandauIFunction(petsclib::PetscLibType, ts::AbstractTS, time_dummy::PetscReal, X::AbstractPetscVec, X_t::AbstractPetscVec, F::AbstractPetscVec, actx::Ptr{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

See also: DMPlexLandauCreateVelocitySpace(), DMPlexLandauIJacobian()

External Links

source
PETSc.LibPETSc.DMPlexLandauIJacobian — Method
DMPlexLandauIJacobian(petsclib::PetscLibType, ts::AbstractTS, time_dummy::PetscReal, X::AbstractPetscVec, U_tdummy::AbstractPetscVec, shift::PetscReal, Amat::AbstractPetscMat, Pmat::AbstractPetscMat, actx::Ptr{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

See also: DMPlexLandauCreateVelocitySpace(), DMPlexLandauIFunction()

External Links

source
PETSc.LibPETSc.DMPlexLocalToGlobalBasis — Method
DMPlexLocalToGlobalBasis(petsclib::PetscLibType, dm::AbstractPetscDM, lv::AbstractPetscVec)

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

See also: DM, DMPLEX, DMPlexGlobalToLocalBasis(), DMGetLocalSection(), DMPlexCreateBasisRotation()

External Links

source
PETSc.LibPETSc.DMPlexLocalVectorLoad — Method
DMPlexLocalVectorLoad(petsclib::PetscLibType, dm::AbstractPetscDM, viewer::PetscViewer, sectiondm::AbstractPetscDM, sf::PetscSF, vec::AbstractPetscVec)

Loads on-disk vector data into a local vector

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

See also: DM, DMPLEX, DMPlexTopologyLoad(), DMPlexSectionLoad(), DMPlexGlobalVectorLoad(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(), PetscSF, PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexLocalVectorView — Method
DMPlexLocalVectorView(petsclib::PetscLibType, dm::AbstractPetscDM, viewer::PetscViewer, sectiondm::AbstractPetscDM, vec::AbstractPetscVec)

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

See also: DM, DMPLEX, DMPlexTopologyView(), DMPlexSectionView(), DMPlexGlobalVectorView(), DMPlexGlobalVectorLoad(), DMPlexLocalVectorLoad()

External Links

source
PETSc.LibPETSc.DMPlexMarkBoundaryFaces — Method
DMPlexMarkBoundaryFaces(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMLabelCreate(), DMCreateLabel()

External Links

source
PETSc.LibPETSc.DMPlexMatGetClosureIndicesRefined — Method
DMPlexMatGetClosureIndicesRefined(petsclib::PetscLibType, dmf::AbstractPetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::AbstractPetscDM, csection::PetscSection, globalCSection::PetscSection, point::PetscInt, cindices::Vector{PetscInt}, findices::Vector{PetscInt})

Compute the fine-row and coarse-column global indices associated with the refined closure of a coarse point

Not Collective

Input Parameters:

  • dmf - The fine DMPLEX
  • fsection - The fine local PetscSection, or NULL to use DMGetLocalSection(dmf, ...)
  • globalFSection - The fine global PetscSection, or NULL to use DMGetGlobalSection(dmf, ...)
  • dmc - The coarse DMPLEX
  • csection - The coarse local PetscSection, or NULL to use DMGetLocalSection(dmc, ...)
  • globalCSection - The coarse global PetscSection, or NULL to use DMGetGlobalSection(dmc, ...)
  • point - The coarse-mesh point

Output Parameters:

  • cindices - Global column indices for the coarse closure (caller-provided buffer of the correct size)
  • findices - Global row indices for the fine closure across all subcells produced by uniformly refining point

Level: developer

See also: DM, DMPLEX, DMPlexMatSetClosureRefined(), DMPlexGetClosureIndices(), DMPlexTransformCellTransform()

External Links

source
PETSc.LibPETSc.DMPlexMatSetClosure — Method
DMPlexMatSetClosure(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, globalSection::PetscSection, A::AbstractPetscMat, 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

See also: DM, DMPLEX, DMPlexMatSetClosureGeneral(), DMPlexVecGetClosure(), DMPlexVecSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexMatSetClosureGeneral — Method
DMPlexMatSetClosureGeneral(petsclib::PetscLibType, dmRow::AbstractPetscDM, sectionRow::PetscSection, globalSectionRow::PetscSection, useRowPerm::PetscBool, dmCol::AbstractPetscDM, sectionCol::PetscSection, globalSectionCol::PetscSection, useColPerm::PetscBool, A::AbstractPetscMat, 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

See also: DM, DMPLEX, DMPlexMatSetClosure(), DMPlexVecGetClosure(), DMPlexVecSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexMatSetClosureRefined — Method
DMPlexMatSetClosureRefined(petsclib::PetscLibType, dmf::AbstractPetscDM, fsection::PetscSection, globalFSection::PetscSection, dmc::AbstractPetscDM, csection::PetscSection, globalCSection::PetscSection, A::AbstractPetscMat, point::PetscInt, values::Vector{PetscScalar}, mode::InsertMode)

Insert values into A for the closure of a coarse-cell point, using indices from the associated refined subcells

Not Collective

Input Parameters:

  • dmf - The fine DMPLEX
  • fsection - The fine local PetscSection, or NULL to use DMGetLocalSection(dmf, ...)
  • globalFSection - The fine global PetscSection, or NULL to use DMGetGlobalSection(dmf, ...)
  • dmc - The coarse DMPLEX
  • csection - The coarse local PetscSection, or NULL to use DMGetLocalSection(dmc, ...)
  • globalCSection - The coarse global PetscSection, or NULL to use DMGetGlobalSection(dmc, ...)
  • A - The matrix
  • point - The coarse-mesh point whose refined closure is inserted
  • values - The values to insert (row block of size equal to the fine-closure dof count, column block of size equal to the coarse-closure dof count)
  • mode - The InsertMode (ADD_VALUES or INSERT_VALUES)

Level: developer

See also: DM, DMPLEX, DMPlexMatSetClosure(), DMPlexMatGetClosureIndicesRefined(), DMPlexTransformCellTransform(), MatSetValues()

External Links

source
PETSc.LibPETSc.DMPlexMetricAverage — Method
DMPlexMetricAverage(petsclib::PetscLibType, dm::AbstractPetscDM, numMetrics::PetscInt, weights::Vector{PetscReal}, metrics::Vector{<:AbstractPetscVec}, metricAvg::AbstractPetscVec)

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

See also: DMPLEX, DMPlexMetricAverage2(), DMPlexMetricAverage3(), DMPlexMetricIntersection()

External Links

source
PETSc.LibPETSc.DMPlexMetricAverage2 — Method
DMPlexMetricAverage2(petsclib::PetscLibType, dm::AbstractPetscDM, metric1::AbstractPetscVec, metric2::AbstractPetscVec, metricAvg::AbstractPetscVec)

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

See also: DMPLEX, DMPlexMetricAverage(), DMPlexMetricAverage3()

External Links

source
PETSc.LibPETSc.DMPlexMetricAverage3 — Method
DMPlexMetricAverage3(petsclib::PetscLibType, dm::AbstractPetscDM, metric1::AbstractPetscVec, metric2::AbstractPetscVec, metric3::AbstractPetscVec, metricAvg::AbstractPetscVec)

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

See also: DMPLEX, DMPlexMetricAverage(), DMPlexMetricAverage2()

External Links

source
PETSc.LibPETSc.DMPlexMetricCreate — Method
metric::PetscVec = DMPlexMetricCreate(petsclib::PetscLibType, dm::AbstractPetscDM, 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 DMAdapterType 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

See also: DMPLEX, DMPlexMetricCreateUniform(), DMPlexMetricCreateIsotropic()

External Links

source
PETSc.LibPETSc.DMPlexMetricCreateIsotropic — Method
metric::PetscVec = DMPlexMetricCreateIsotropic(petsclib::PetscLibType, dm::AbstractPetscDM, f::PetscInt, indicator::AbstractPetscVec)

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

See also: DMPLEX, DMPlexMetricCreate(), DMPlexMetricCreateUniform()

External Links

source
PETSc.LibPETSc.DMPlexMetricCreateUniform — Method
metric::PetscVec = DMPlexMetricCreateUniform(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexMetricCreate(), DMPlexMetricCreateIsotropic()

External Links

source
PETSc.LibPETSc.DMPlexMetricDeterminantCreate — Method
determinant::PetscVec,dmDet::PetscDM = DMPlexMetricDeterminantCreate(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexMetricCreateUniform(), DMPlexMetricCreateIsotropic(), DMPlexMetricCreate()

External Links

source
PETSc.LibPETSc.DMPlexMetricEnforceSPD — Method
DMPlexMetricEnforceSPD(petsclib::PetscLibType, dm::AbstractPetscDM, metricIn::AbstractPetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::AbstractPetscVec, determinant::AbstractPetscVec)

Enforce symmetric positive-definiteness of a metric

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

See also: DMPLEX, DMPlexMetricNormalize(), DMPlexMetricIntersection()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetMaximumAnisotropy — Method
a_max::PetscReal = DMPlexMetricGetMaximumAnisotropy(petsclib::PetscLibType, dm::AbstractPetscDM)

Get the maximum tolerated metric anisotropy

Input Parameters:

  • dm - The DM

Output Parameters:

  • a_max - The maximum tolerated metric anisotropy

Level: beginner

See also: DMPLEX, DMPlexMetricSetMaximumAnisotropy(), DMPlexMetricGetMaximumMagnitude()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetMaximumMagnitude — Method
h_max::PetscReal = DMPlexMetricGetMaximumMagnitude(petsclib::PetscLibType, dm::AbstractPetscDM)

Get the maximum tolerated metric magnitude

Input Parameters:

  • dm - The DM

Output Parameters:

  • h_max - The maximum tolerated metric magnitude

Level: beginner

See also: DMPLEX, DMPlexMetricSetMaximumMagnitude(), DMPlexMetricGetMinimumMagnitude()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetMinimumMagnitude — Method
h_min::PetscReal = DMPlexMetricGetMinimumMagnitude(petsclib::PetscLibType, dm::AbstractPetscDM)

Get the minimum tolerated metric magnitude

Input Parameters:

  • dm - The DM

Output Parameters:

  • h_min - The minimum tolerated metric magnitude

Level: beginner

See also: DMPLEX, DMPlexMetricSetMinimumMagnitude(), DMPlexMetricGetMaximumMagnitude()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetNumIterations — Method
numIter::PetscInt = DMPlexMetricGetNumIterations(petsclib::PetscLibType, dm::AbstractPetscDM)

Get the number of parallel adaptation iterations

Input Parameters:

  • dm - The DM

Output Parameters:

  • numIter - the number of parallel adaptation iterations

Level: beginner

See also: DMPLEX, DMPlexMetricSetNumIterations(), DMPlexMetricGetVerbosity()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetTargetComplexity — Method
targetComplexity::PetscReal = DMPlexMetricGetTargetComplexity(petsclib::PetscLibType, dm::AbstractPetscDM)

Get the target metric complexity

Input Parameters:

  • dm - The DM

Output Parameters:

  • targetComplexity - The target metric complexity

Level: beginner

See also: DMPLEX, DMPlexMetricSetTargetComplexity(), DMPlexMetricGetNormalizationOrder()

External Links

source
PETSc.LibPETSc.DMPlexMetricGetVerbosity — Method
verbosity::PetscInt = DMPlexMetricGetVerbosity(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPLEX, DMPlexMetricSetVerbosity(), DMPlexMetricGetNumIterations()

External Links

source
PETSc.LibPETSc.DMPlexMetricIntersection — Method
DMPlexMetricIntersection(petsclib::PetscLibType, dm::AbstractPetscDM, numMetrics::PetscInt, metrics::Vector{<:AbstractPetscVec}, metricInt::AbstractPetscVec)

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

See also: DMPLEX, DMPlexMetricIntersection2(), DMPlexMetricIntersection3(), DMPlexMetricAverage()

External Links

source
PETSc.LibPETSc.DMPlexMetricIntersection2 — Method
DMPlexMetricIntersection2(petsclib::PetscLibType, dm::AbstractPetscDM, metric1::AbstractPetscVec, metric2::AbstractPetscVec, metricInt::AbstractPetscVec)

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

See also: DMPLEX, DMPlexMetricIntersection(), DMPlexMetricIntersection3()

External Links

source
PETSc.LibPETSc.DMPlexMetricIntersection3 — Method
DMPlexMetricIntersection3(petsclib::PetscLibType, dm::AbstractPetscDM, metric1::AbstractPetscVec, metric2::AbstractPetscVec, metric3::AbstractPetscVec, metricInt::AbstractPetscVec)

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

See also: DMPLEX, DMPlexMetricIntersection(), DMPlexMetricIntersection2()

External Links

source
PETSc.LibPETSc.DMPlexMetricIsIsotropic — Method
isotropic::PetscBool = DMPlexMetricIsIsotropic(petsclib::PetscLibType, dm::AbstractPetscDM)

Is a metric isotropic?

Input Parameters:

  • dm - The DM

Output Parameters:

  • isotropic - Is the metric isotropic?

Level: beginner

See also: DMPLEX, DMPlexMetricSetIsotropic(), DMPlexMetricIsUniform(), DMPlexMetricRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricIsUniform — Method
uniform::PetscBool = DMPlexMetricIsUniform(petsclib::PetscLibType, dm::AbstractPetscDM)

Is a metric uniform?

Input Parameters:

  • dm - The DM

Output Parameters:

  • uniform - Is the metric uniform?

Level: beginner

See also: DMPLEX, DMPlexMetricSetUniform(), DMPlexMetricIsIsotropic(), DMPlexMetricRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricNoInsertion — Method
noInsert::PetscBool = DMPlexMetricNoInsertion(petsclib::PetscLibType, dm::AbstractPetscDM)

Are node insertion and deletion turned off?

Input Parameters:

  • dm - The DM

Output Parameters:

  • noInsert - Are node insertion and deletion turned off?

Level: beginner

See also: DMPLEX, DMPlexMetricSetNoInsertion(), DMPlexMetricNoSwapping(), DMPlexMetricNoMovement(), DMPlexMetricNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricNoMovement — Method
noMove::PetscBool = DMPlexMetricNoMovement(petsclib::PetscLibType, dm::AbstractPetscDM)

Is node movement turned off?

Input Parameters:

  • dm - The DM

Output Parameters:

  • noMove - Is node movement turned off?

Level: beginner

See also: DMPLEX, DMPlexMetricSetNoMovement(), DMPlexMetricNoInsertion(), DMPlexMetricNoSwapping(), DMPlexMetricNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricNoSurf — Method
noSurf::PetscBool = DMPlexMetricNoSurf(petsclib::PetscLibType, dm::AbstractPetscDM)

Is surface modification turned off?

Input Parameters:

  • dm - The DM

Output Parameters:

  • noSurf - Is surface modification turned off?

Level: beginner

See also: DMPLEX, DMPlexMetricSetNoSurf(), DMPlexMetricNoMovement(), DMPlexMetricNoInsertion(), DMPlexMetricNoSwapping()

External Links

source
PETSc.LibPETSc.DMPlexMetricNoSwapping — Method
noSwap::PetscBool = DMPlexMetricNoSwapping(petsclib::PetscLibType, dm::AbstractPetscDM)

Is facet swapping turned off?

Input Parameters:

  • dm - The DM

Output Parameters:

  • noSwap - Is facet swapping turned off?

Level: beginner

See also: DMPLEX, DMPlexMetricSetNoSwapping(), DMPlexMetricNoInsertion(), DMPlexMetricNoMovement(), DMPlexMetricNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricNormalize — Method
DMPlexMetricNormalize(petsclib::PetscLibType, dm::AbstractPetscDM, metricIn::AbstractPetscVec, restrictSizes::PetscBool, restrictAnisotropy::PetscBool, metricOut::AbstractPetscVec, determinant::AbstractPetscVec)

Apply L-p normalization to a metric

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

See also: DMPLEX, DMPlexMetricEnforceSPD(), DMPlexMetricIntersection()

External Links

source
PETSc.LibPETSc.DMPlexMetricRestrictAnisotropyFirst — Method
restrictAnisotropyFirst::PetscBool = DMPlexMetricRestrictAnisotropyFirst(petsclib::PetscLibType, dm::AbstractPetscDM)

Is anisotropy restricted before normalization or after?

Input Parameters:

  • dm - The DM

Output Parameters:

  • restrictAnisotropyFirst - Is anisotropy be normalized first?

Level: beginner

See also: DMPLEX, DMPlexMetricIsIsotropic(), DMPlexMetricSetRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetFromOptions — Method
DMPlexMetricSetFromOptions(petsclib::PetscLibType, dm::AbstractPetscDM)

Configure the Riemannian metric context on a DMPLEX from the options database

Collective

Input Parameter:

  • dm - The DM

Options Database Keys:

  • -dm_plex_metric_isotropic (true|false) - Is the metric isotropic?
  • -dm_plex_metric_uniform (true|false) - Is the metric uniform?
  • -dm_plex_metric_restrict_anisotropy_first (true|false) - Restrict anisotropy before normalization
  • -dm_plex_metric_no_insert (true|false) - Turn off node insertion and deletion during adaptation
  • -dm_plex_metric_no_swap (true|false) - Turn off facet swapping
  • -dm_plex_metric_no_move (true|false) - Turn off facet node movement
  • -dm_plex_metric_no_surf (true|false) - Turn off surface modification
  • -dm_plex_metric_num_iterations nits - Number of ParMmg adaptation iterations
  • -dm_plex_metric_verbosity verbosity - Verbosity of the metric-based adaptation package (-1 silent, 10 maximum)
  • -dm_plex_metric_h_min h_min - Minimum tolerated metric magnitude
  • -dm_plex_metric_h_max h_max - Maximum tolerated metric magnitude
  • -dm_plex_metric_a_max a_max - Maximum tolerated anisotropy
  • -dm_plex_metric_p order - L-p normalization order
  • -dm_plex_metric_target_complexity comp - Target metric complexity
  • -dm_plex_metric_gradation_factor fact - Metric gradation factor
  • -dm_plex_metric_hausdorff_number h - Metric Hausdorff number

Level: beginner

See also: DM, DMPLEX, DMPlexMetricSetIsotropic(), DMPlexMetricSetUniform(), DMPlexMetricSetMinimumMagnitude(), DMPlexMetricSetMaximumMagnitude(), DMPlexMetricSetTargetComplexity()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetIsotropic — Method
DMPlexMetricSetIsotropic(petsclib::PetscLibType, dm::AbstractPetscDM, isotropic::PetscBool)

Record whether a metric is isotropic

Input Parameters:

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

Level: beginner

See also: DMPLEX, DMPlexMetricIsIsotropic(), DMPlexMetricSetUniform(), DMPlexMetricSetRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNoInsertion — Method
DMPlexMetricSetNoInsertion(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexMetricNoInsertion(), DMPlexMetricSetNoSwapping(), DMPlexMetricSetNoMovement(), DMPlexMetricSetNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNoMovement — Method
DMPlexMetricSetNoMovement(petsclib::PetscLibType, dm::AbstractPetscDM, noMove::PetscBool)

Should node movement be turned off?

Input Parameters:

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

Level: beginner

See also: DMPLEX, DMPlexMetricNoMovement(), DMPlexMetricSetNoInsertion(), DMPlexMetricSetNoSwapping(), DMPlexMetricSetNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNoSurf — Method
DMPlexMetricSetNoSurf(petsclib::PetscLibType, dm::AbstractPetscDM, noSurf::PetscBool)

Should surface modification be turned off?

Input Parameters:

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

Level: beginner

See also: DMPLEX, DMPlexMetricNoSurf(), DMPlexMetricSetNoMovement(), DMPlexMetricSetNoInsertion(), DMPlexMetricSetNoSwapping()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNoSwapping — Method
DMPlexMetricSetNoSwapping(petsclib::PetscLibType, dm::AbstractPetscDM, noSwap::PetscBool)

Should facet swapping be turned off?

Input Parameters:

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

Level: beginner

See also: DMPLEX, DMPlexMetricNoSwapping(), DMPlexMetricSetNoInsertion(), DMPlexMetricSetNoMovement(), DMPlexMetricSetNoSurf()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetNumIterations — Method
DMPlexMetricSetNumIterations(petsclib::PetscLibType, dm::AbstractPetscDM, numIter::PetscInt)

Set the number of parallel adaptation iterations

Input Parameters:

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

Level: beginner

See also: DMPLEX, DMPlexMetricSetVerbosity(), DMPlexMetricGetNumIterations()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetRestrictAnisotropyFirst — Method
DMPlexMetricSetRestrictAnisotropyFirst(petsclib::PetscLibType, dm::AbstractPetscDM, restrictAnisotropyFirst::PetscBool)

Record whether anisotropy should be restricted before normalization

Input Parameters:

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

Level: beginner

See also: DMPLEX, DMPlexMetricSetIsotropic(), DMPlexMetricRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetUniform — Method
DMPlexMetricSetUniform(petsclib::PetscLibType, dm::AbstractPetscDM, uniform::PetscBool)

Record whether a metric is uniform

Input Parameters:

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

Level: beginner

See also: DMPLEX, DMPlexMetricIsUniform(), DMPlexMetricSetIsotropic(), DMPlexMetricSetRestrictAnisotropyFirst()

External Links

source
PETSc.LibPETSc.DMPlexMetricSetVerbosity — Method
DMPlexMetricSetVerbosity(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexMetricGetVerbosity(), DMPlexMetricSetNumIterations()

External Links

source
PETSc.LibPETSc.DMPlexMigrate — Method
DMPlexMigrate(petsclib::PetscLibType, dm::AbstractPetscDM, sf::PetscSF, targetDM::AbstractPetscDM)

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

See also: DMPLEX, PetscSF, DM, DMPlexDistribute(), DMPlexDistributeOverlap()

External Links

source
PETSc.LibPETSc.DMPlexMigrateGlobalToNaturalSF — Method
sfNaturalNew::PetscSF = DMPlexMigrateGlobalToNaturalSF(petsclib::PetscLibType, dmOld::AbstractPetscDM, dmNew::AbstractPetscDM, sfNaturalOld::PetscSF, sfMigration::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

See also: DM, DMPLEX, PetscSF, PetscSection, DMPlexDistribute(), DMPlexDistributeField()

External Links

source
PETSc.LibPETSc.DMPlexModifyGeomModel — Method
DMPlexModifyGeomModel(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMCreate(), DMPlexCreateGeom(), DMPlexGeomDataAndGrads()

External Links

source
PETSc.LibPETSc.DMPlexMonitorThroughput — Method
DMPlexMonitorThroughput(petsclib::PetscLibType, dm::AbstractPetscDM, unused::Ptr{Cvoid})

Report the cell throughput of FE integration

Input Parameters:

  • dm - The DM
  • unused - unused argument

Options Database Key:

  • -dm_plex_monitor_throughput - Activate the monitor

Level: developer

See also: DM, DMPLEX, DMSetFromOptions(), DMPlexCreate()

External Links

source
PETSc.LibPETSc.DMPlexNaturalToGlobalBegin — Method
DMPlexNaturalToGlobalBegin(petsclib::PetscLibType, dm::AbstractPetscDM, nv::AbstractPetscVec, gv::AbstractPetscVec)

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

See also: DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexGlobalToNaturalEnd()

External Links

source
PETSc.LibPETSc.DMPlexNaturalToGlobalEnd — Method
DMPlexNaturalToGlobalEnd(petsclib::PetscLibType, dm::AbstractPetscDM, nv::AbstractPetscVec, gv::AbstractPetscVec)

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

See also: DM, DMPLEX, Vec, DMPlexDistribute(), DMPlexDistributeField(), DMPlexNaturalToGlobalBegin(), DMPlexGlobalToNaturalBegin()

External Links

source
PETSc.LibPETSc.DMPlexOrient — Method
DMPlexOrient(petsclib::PetscLibType, dm::AbstractPetscDM)

Give a consistent orientation to the input mesh

Input Parameter:

  • dm - The DM

See also: DM, DMPLEX, DMCreate(), DMPlexOrientLabel()

External Links

source
PETSc.LibPETSc.DMPlexOrientLabel — Method
DMPlexOrientLabel(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel)

Give a consistent orientation to the hypersurface marked by the DMLabel in the input mesh

Collective on dm

Input Parameters:

  • dm - The DM
  • label - The DMLabel

See also: DM, DMPLEX, DMCreate(), DMPlexOrient()

External Links

source
PETSc.LibPETSc.DMPlexOrientPoint — Method
DMPlexOrientPoint(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexOrient(), DMPlexGetCone(), DMPlexGetConeOrientation(), DMPlexInterpolate(), DMPlexGetChart()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelAdjacency — Method
DMPlexPartitionLabelAdjacency(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMLabel, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelClosure — Method
DMPlexPartitionLabelClosure(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMLabel, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelCreateSF — Method
sf::PetscSF = DMPlexPartitionLabelCreateSF(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMLabel, PetscSF, DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelInvert — Method
DMPlexPartitionLabelInvert(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPartitionLabelPropagate — Method
DMPlexPartitionLabelPropagate(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMLabel, DMPlexPartitionLabelCreateSF(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexPermute — Method
pdm::PetscDM = DMPlexPermute(petsclib::PetscLibType, dm::AbstractPetscDM, perm::AbstractIS)

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

See also: DMPLEX, MatPermute()

External Links

source
PETSc.LibPETSc.DMPlexPointGlobalFieldRead — Method
ptr::Ptr{Cvoid} = DMPlexPointGlobalFieldRead(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt, field::PetscInt, array::Vector{PetscScalar})

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

See also: DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRead(), DMPlexPointGlobalRef()

External Links

source
PETSc.LibPETSc.DMPlexPointGlobalFieldRef — Method
array::PetscScalar,ptr::Ptr{Cvoid} = DMPlexPointGlobalFieldRef(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt, field::PetscInt)

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

See also: DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRef(), DMPlexPointGlobalRead()

External Links

source
PETSc.LibPETSc.DMPlexPointGlobalRead — Method
ptr::Ptr{Cvoid} = DMPlexPointGlobalRead(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt, array::Vector{PetscScalar})

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

See also: DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRead(), DMPlexPointGlobalRef()

External Links

source
PETSc.LibPETSc.DMPlexPointGlobalRef — Method
array::PetscScalar,ptr::Ptr{Cvoid} = DMPlexPointGlobalRef(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt)

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

See also: DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointGlobal(), DMPlexPointLocalRef(), DMPlexPointGlobalRead()

External Links

source
PETSc.LibPETSc.DMPlexPointLocalFieldRead — Method
ptr::Ptr{Cvoid} = DMPlexPointLocalFieldRead(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt, field::PetscInt, array::Vector{PetscScalar})

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

See also: DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()

External Links

source
PETSc.LibPETSc.DMPlexPointLocalFieldRef — Method
array::PetscScalar,ptr::Ptr{Cvoid} = DMPlexPointLocalFieldRef(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt, field::PetscInt)

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

See also: DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()

External Links

source
PETSc.LibPETSc.DMPlexPointLocalRead — Method
ptr::Ptr{Cvoid} = DMPlexPointLocalRead(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt, array::Vector{PetscScalar})

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

See also: DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointLocal(), DMPlexPointGlobalRead()

External Links

source
PETSc.LibPETSc.DMPlexPointLocalRef — Method
array::PetscScalar,ptr::Ptr{Cvoid} = DMPlexPointLocalRef(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt)

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

See also: DM, DMPLEX, DMGetLocalSection(), PetscSectionGetOffset(), PetscSectionGetDof(), DMPlexGetPointLocal(), DMPlexPointGlobalRef()

External Links

source
PETSc.LibPETSc.DMPlexPreallocateOperator — Method
DMPlexPreallocateOperator(petsclib::PetscLibType, dm::AbstractPetscDM, bs::PetscInt, dnz::Vector{PetscInt}, onz::Vector{PetscInt}, dnzu::Vector{PetscInt}, onzu::Vector{PetscInt}, A::AbstractPetscMat, 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

See also: DM, DMPLEX, DMCreateMatrix()

External Links

source
PETSc.LibPETSc.DMPlexRebalanceSharedPoints — Method
success::PetscBool = DMPlexRebalanceSharedPoints(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexReconstructGradientsFVM — Method
DMPlexReconstructGradientsFVM(petsclib::PetscLibType, dm::AbstractPetscDM, locX::AbstractPetscVec, grad::AbstractPetscVec)

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

See also: DM, Vec, DMPlexGetGradientDM()

External Links

source
PETSc.LibPETSc.DMPlexReferenceToCoordinates — Method
DMPlexReferenceToCoordinates(petsclib::PetscLibType, dm::AbstractPetscDM, cell::PetscInt, numPoints::PetscInt, refCoords::Vector{PetscReal}, realCoords::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

See also: DMPLEX, DMPlexCoordinatesToReference()

External Links

source
PETSc.LibPETSc.DMPlexReferenceTreeGetChildSymmetry — Method
childOrientB::PetscInt,childB::PetscInt = DMPlexReferenceTreeGetChildSymmetry(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetReferenceTree(), DMPlexSetReferenceTree(), DMPlexSetTree()

External Links

source
PETSc.LibPETSc.DMPlexRefineRegularGetAffineFaceTransforms — Method
Nf::PetscInt,v0::Ptr{PetscReal},J::Ptr{PetscReal},invJ::Ptr{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

See also: DMPLEX, DM, DMPlexTransform, DMPolytopeType, DMPlexCellRefinerGetAffineTransforms()

External Links

source
PETSc.LibPETSc.DMPlexRefineRegularGetAffineTransforms — Method
Nc::PetscInt,v0::Ptr{PetscReal},J::Ptr{PetscReal},invJ::Ptr{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

See also: DMPLEX, DM, DMPlexTransform, DMPolytopeType, DMPlexRefineRegularGetAffineFaceTransforms(), DMPLEXREFINEREGULAR

External Links

source
PETSc.LibPETSc.DMPlexRefineToSimplexGetReflect — Method
reflect::PetscBool = DMPlexRefineToSimplexGetReflect(petsclib::PetscLibType, tr::DMPlexTransform)

Get the flag to reflect the transform

Not Collective

Input Parameter:

  • tr - The DMPlexTransform

Output Parameter:

  • reflect - Whether to reflect the transform

Level: intermediate

See also: DMPlexTransform, DMPlexRefineToSimplexSetReflect()

External Links

source
PETSc.LibPETSc.DMPlexRemapGeometry — Method
DMPlexRemapGeometry(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMGetCoordinates(), DMGetCoordinatesLocal(), DMGetCoordinateDM(), DMProjectFieldLocal(), DMProjectFieldLabelLocal()

External Links

source
PETSc.LibPETSc.DMPlexRemapMigrationSF — Method
sfMigrationNew::PetscSF = DMPlexRemapMigrationSF(petsclib::PetscLibType, sfOverlap::PetscSF, sfMigration::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

See also: DMPLEX, DM, DMPlexDistribute(), DMPlexDistributeOverlap(), DMPlexGetOverlap()

External Links

source
PETSc.LibPETSc.DMPlexReorderCell — Method
DMPlexReorderCell(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPolytopeType, DMPlexGenerate()

External Links

source
PETSc.LibPETSc.DMPlexReorderGetDefault — Method
reorder::DMReorderDefaultFlag = DMPlexReorderGetDefault(petsclib::PetscLibType, dm::AbstractPetscDM)

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

See also: DMPlexReorderSetDefault()

External Links

source
PETSc.LibPETSc.DMPlexReorderSetDefault — Method
DMPlexReorderSetDefault(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPlexReorderGetDefault()

External Links

source
PETSc.LibPETSc.DMPlexRestoreCellCoordinates — Method
DMPlexRestoreCellCoordinates(petsclib::PetscLibType, dm::AbstractPetscDM, cell::PetscInt, isDG::Union{PetscBool, Bool}, Nc::PetscInt, array::Union{Ptr, AbstractArray{PetscScalar}}, coords::Union{Ptr, AbstractArray{PetscScalar}})

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

See also: DMPLEX, DMPlexGetCellCoordinates(), DMGetCoordinatesLocal(), DMGetCellCoordinatesLocal()

External Links

source
PETSc.LibPETSc.DMPlexRestoreCellFields — Method
DMPlexRestoreCellFields(petsclib::PetscLibType, dm::AbstractPetscDM, cellIS::AbstractIS, locX::AbstractPetscVec, locX_t::AbstractPetscVec, locA::AbstractPetscVec, u::Union{Ptr, AbstractArray{PetscScalar}}, u_t::Union{Ptr, AbstractArray{PetscScalar}}, a::Union{Ptr, AbstractArray{PetscScalar}})

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

See also: DM, DMPLEX, DMPlexGetFaceFields()

External Links

source
PETSc.LibPETSc.DMPlexRestoreClosureIndices — Method
DMPlexRestoreClosureIndices(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, idxSection::PetscSection, point::PetscInt, useClPerm::PetscBool, numIndices::PetscInt, indices::Union{Ptr, AbstractArray{PetscInt}}, outOffsets::Union{Ptr, Vector{PetscInt}}, values::Union{Ptr, AbstractArray{PetscScalar}})

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

See also: DM, DMPLEX, DMPlexGetClosureIndices(), DMPlexVecGetClosure(), DMPlexMatSetClosure(), DMGetLocalSection(), DMGetGlobalSection()

External Links

source
PETSc.LibPETSc.DMPlexRestoreCompressedClosure — Method
DMPlexRestoreCompressedClosure(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, point::PetscInt, numPoints::PetscInt, points::PetscInt, clSec::PetscSection, clPoints::AbstractIS, clp::PetscInt)

Release the arrays returned by DMPlexGetCompressedClosure()

Not Collective

Input Parameters:

  • dm - The DMPLEX
  • section - The PetscSection passed to DMPlexGetCompressedClosure()
  • point - The mesh point
  • numPoints - The number of closure points
  • points - The closure array
  • clSec - The cached closure section
  • clPoints - The cached closure IS
  • clp - The raw pointer into the closure index

Level: developer

See also: DM, DMPLEX, PetscSection, DMPlexGetCompressedClosure(), DMPlexRestoreTransitiveClosure()

External Links

source
PETSc.LibPETSc.DMPlexRestoreConeRecursive — Method
DMPlexRestoreConeRecursive(petsclib::PetscLibType, dm::AbstractPetscDM, points::AbstractIS, depth::PetscInt, expandedPoints::Ptr, sections::Union{Ptr, AbstractArray{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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexGetConeTuple(), DMPlexGetConeRecursive(), DMPlexGetConeRecursiveVertices(), DMPlexGetDepth(), IS, PetscSection

External Links

source
PETSc.LibPETSc.DMPlexRestoreFaceFields — Method
DMPlexRestoreFaceFields(petsclib::PetscLibType, dm::AbstractPetscDM, fStart::PetscInt, fEnd::PetscInt, locX::AbstractPetscVec, locX_t::AbstractPetscVec, faceGeometry::AbstractPetscVec, cellGeometry::AbstractPetscVec, locGrad::AbstractPetscVec, Nface::PetscInt, uL::Union{Ptr, AbstractArray{PetscScalar}}, uR::Union{Ptr, AbstractArray{PetscScalar}})

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

See also: DM, DMPLEX, DMPlexGetFaceFields()

External Links

source
PETSc.LibPETSc.DMPlexRestoreFaceGeometry — Method
DMPlexRestoreFaceGeometry(petsclib::PetscLibType, dm::AbstractPetscDM, fStart::PetscInt, fEnd::PetscInt, faceGeometry::AbstractPetscVec, cellGeometry::AbstractPetscVec, Nface::PetscInt, fgeom::Union{Ptr, AbstractArray{PetscFVFaceGeom}}, vol::Union{Ptr, AbstractArray{PetscReal}})

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

See also: DM, DMPLEX, DMPlexGetFaceFields()

External Links

source
PETSc.LibPETSc.DMPlexRestoreGeomBodyMassProperties — Method
DMPlexRestoreGeomBodyMassProperties(petsclib::PetscLibType, dm::AbstractPetscDM, body::PetscGeom, volume::PetscScalar, surfArea::PetscScalar, centerOfGravity::PetscScalar, COGsize::PetscInt, inertiaMatrixCOG::PetscScalar, IMCOGsize::PetscInt)

Release the arrays returned by DMPlexGetGeomBodyMassProperties()

Not Collective

Input Parameters:

  • dm - The DMPLEX with an attached CAD geometry
  • body - The PetscGeom body previously queried
  • volume - The volume value (unused, retained for API symmetry)
  • surfArea - The surface area value (unused, retained for API symmetry)
  • centerOfGravity - Center-of-gravity array to free
  • COGsize - The size of centerOfGravity (unused, retained for API symmetry)
  • inertiaMatrixCOG - Inertia-matrix-at-COG array to free
  • IMCOGsize - The size of inertiaMatrixCOG (unused, retained for API symmetry)

Level: intermediate

See also: DMPlexGetGeomBodyMassProperties(), DMPlexGetGeomModelBodies()

External Links

source
PETSc.LibPETSc.DMPlexRestoreGeomCntrlPntAndWeightData — Method
DMPlexRestoreGeomCntrlPntAndWeightData(petsclib::PetscLibType, dm::AbstractPetscDM, cpHashTable::PetscHMapI, cpCoordDataLength::PetscInt, cpCoordData::PetscScalar, maxNumEquiv::PetscInt, cpEquiv::AbstractPetscMat, wHashTable::PetscHMapI, wDataLength::PetscInt, wData::PetscScalar)

Release the arrays returned by DMPlexGetGeomCntrlPntAndWeightData()

Not Collective

Input Parameters:

  • dm - The DMPLEX with an attached CAD geometry
  • cpHashTable - Control-point hash table (unused, retained for API symmetry)
  • cpCoordDataLength - Length of cpCoordData (unused, retained for API symmetry)
  • cpCoordData - Control-point coordinate array to release
  • maxNumEquiv - Maximum number of equivalent control points (unused, retained for API symmetry)
  • cpEquiv - Control-point equivalency matrix (unused, retained for API symmetry)
  • wHashTable - Weight hash table (unused, retained for API symmetry)
  • wDataLength - Length of wData (unused, retained for API symmetry)
  • wData - Weight array to release

Level: intermediate

See also: DMPlexGetGeomCntrlPntAndWeightData(), DMPlexGeomDataAndGrads()

External Links

source
PETSc.LibPETSc.DMPlexRestoreGeomGradData — Method
DMPlexRestoreGeomGradData(petsclib::PetscLibType, dm::AbstractPetscDM, cpSurfGradHashTable::PetscHMapI, cpSurfGrad::AbstractPetscMat, cpArraySize::PetscInt, gradSACP::PetscScalar, gradVolCP::PetscScalar, wArraySize::PetscInt, gradSAW::PetscScalar, gradVolW::PetscScalar)

Release the arrays returned by DMPlexGetGeomGradData()

Not Collective

Input Parameters:

  • dm - The DMPLEX with an attached CAD geometry
  • cpSurfGradHashTable - Surface-gradient hash table (unused, retained for API symmetry)
  • cpSurfGrad - Surface-gradient matrix (unused, retained for API symmetry)
  • cpArraySize - Length of the control-point gradient arrays (unused, retained for API symmetry)
  • gradSACP - Surface-area gradient with respect to control points, to release
  • gradVolCP - Volume gradient with respect to control points, to release
  • wArraySize - Length of the control-point-weight gradient arrays (unused, retained for API symmetry)
  • gradSAW - Surface-area gradient with respect to weights, to release
  • gradVolW - Volume gradient with respect to weights, to release

Level: intermediate

See also: DMPlexGetGeomGradData(), DMPlexGeomDataAndGrads()

External Links

source
PETSc.LibPETSc.DMPlexRestoreJoin — Method
DMPlexRestoreJoin(petsclib::PetscLibType, dm::AbstractPetscDM, numPoints::PetscInt, points::Vector{PetscInt}, numCoveredPoints::PetscInt, coveredPoints::Union{Ptr, AbstractArray{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

See also: DM, DMPLEX, DMPlexGetJoin(), DMPlexGetFullJoin(), DMPlexGetMeet()

External Links

source
PETSc.LibPETSc.DMPlexRestoreMeet — Method
DMPlexRestoreMeet(petsclib::PetscLibType, dm::AbstractPetscDM, numPoints::PetscInt, points::Vector{PetscInt}, numCoveredPoints::PetscInt, coveredPoints::Union{Ptr, AbstractArray{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

See also: DM, DMPLEX, DMPlexGetMeet(), DMPlexGetFullMeet(), DMPlexGetJoin()

External Links

source
PETSc.LibPETSc.DMPlexRestoreOrientedCone — Method
DMPlexRestoreOrientedCone(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, cone::Union{Ptr, AbstractArray{PetscInt}}, ornt::Union{Ptr, AbstractArray{PetscInt}})

Restore the points and orientations on the in-edges for this point in the DAG obtained with DMPlexGetOrientedCone()

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

See also: DM, DMPLEX, DMPlexGetOrientedCone(), DMPlexGetConeSize(), DMPlexGetCone(), DMPlexGetChart()

External Links

source
PETSc.LibPETSc.DMPlexRestoreTransitiveClosure — Method
DMPlexRestoreTransitiveClosure(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, useCone::PetscBool, numPoints::PetscInt, points::Union{Ptr, AbstractArray{PetscInt}})

Restore the array of points on the transitive closure of the in-edges or out-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexGetTransitiveClosure(), DMPlexCreate(), DMPlexSetCone(), DMPlexSetChart(), DMPlexGetCone()

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeBoundaryFEM — Method
DMPlexSNESComputeBoundaryFEM(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, ctx::Ptr{Cvoid})

Form the boundary values for the local input X

Input Parameters:

  • dm - The mesh
  • ctx - The application context

Output Parameter:

  • X - Local solution

Level: developer

See also: DM, DMPLEX, DMPlexComputeJacobianAction()

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeJacobianFEM — Method
DMPlexSNESComputeJacobianFEM(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, Jac::AbstractPetscMat, JacP::AbstractPetscMat, ctx::Ptr{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
  • ctx - The application context

Output Parameters:

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

Level: developer

See also: DMPLEX, Mat

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeObjectiveFEM — Method
obj::PetscReal = DMPlexSNESComputeObjectiveFEM(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, ctx::Ptr{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
  • ctx - The application context

Output Parameter:

  • obj - Local objective value

Level: developer

See also: DM, DMPlexSNESComputeResidualFEM()

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeResidualCEED — Method
DMPlexSNESComputeResidualCEED(petsclib::PetscLibType, dm::AbstractPetscDM, locX::AbstractPetscVec, locF::AbstractPetscVec, ctx::Ptr{Cvoid})

Assemble the local residual for a SNES on a DMPLEX using the libCEED operator attached to the DM

Collective

Input Parameters:

  • dm - the DMPLEX for which libCEED operators have been created by DMCeedCreate()
  • locX - local solution vector including ghost values
  • ctx - application context (unused)

Output Parameter:

  • locF - local residual vector to be assembled

Level: developer

See also: SNES, DMPLEX, DMCeedCreate(), DMSNESSetFunctionLocal(), DMPlexTSComputeRHSFunctionFVMCEED()

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeResidualDS — Method
DMPlexSNESComputeResidualDS(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, F::AbstractPetscVec, ctx::Ptr{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
  • ctx - The application context

Output Parameter:

  • F - Local output vector

Level: developer

See also: DM, DMPLEX, DMPlexComputeJacobianAction()

External Links

source
PETSc.LibPETSc.DMPlexSNESComputeResidualFEM — Method
DMPlexSNESComputeResidualFEM(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, F::AbstractPetscVec, ctx::Ptr{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
  • ctx - The application context

Output Parameter:

  • F - Local output vector

Level: developer

See also: DM, DMPLEX, DMSNESComputeJacobianAction()

External Links

source
PETSc.LibPETSc.DMPlexSectionLoad — Method
globalDofSF::PetscSF,localDofSF::PetscSF = DMPlexSectionLoad(petsclib::PetscLibType, dm::AbstractPetscDM, viewer::PetscViewer, sectiondm::AbstractPetscDM, globalToLocalPointSF::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

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

External Links

source
PETSc.LibPETSc.DMPlexSectionView — Method
DMPlexSectionView(petsclib::PetscLibType, dm::AbstractPetscDM, viewer::PetscViewer, sectiondm::AbstractPetscDM)

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

See also: DM, DMPLEX, DMView(), DMPlexTopologyView(), DMPlexCoordinatesView(), DMPlexLabelsView(), DMPlexGlobalVectorView(), DMPlexLocalVectorView(), PetscSectionView(), DMPlexSectionLoad(), PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexSetActivePoint — Method
DMPlexSetActivePoint(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetActivePoint()

External Links

source
PETSc.LibPETSc.DMPlexSetAdjacencyUseAnchors — Method
DMPlexSetAdjacencyUseAnchors(petsclib::PetscLibType, dm::AbstractPetscDM, useAnchors::PetscBool)

Define adjacency in the mesh using the point-to-point constraints.

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

See also: DMPLEX, DMGetAdjacency(), DMSetAdjacency(), DMPlexDistribute(), DMPlexPreallocateOperator(), DMPlexSetAnchors()

External Links

source
PETSc.LibPETSc.DMPlexSetAdjacencyUser — Method
DMPlexSetAdjacencyUser(petsclib::PetscLibType, dm::AbstractPetscDM, user::external, ctx::Ptr{Cvoid})

Define adjacency in the mesh using a user-provided callback

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

See also: DMPLEX, DMSetAdjacency(), DMPlexDistribute(), DMPlexPreallocateOperator(), DMPlexGetAdjacency(), DMPlexGetAdjacencyUser()

External Links

source
PETSc.LibPETSc.DMPlexSetAnchors — Method
DMPlexSetAnchors(petsclib::PetscLibType, dm::AbstractPetscDM, anchorSection::PetscSection, anchorIS::AbstractIS)

Set the layout of the local anchor (point-to-point) constraints.

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

See also: DM, DMPLEX, DMPlexGetAnchors(), DMGetDefaultConstraints(), DMSetDefaultConstraints()

External Links

source
PETSc.LibPETSc.DMPlexSetCellType — Method
DMPlexSetCellType(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetCellTypeLabel(), DMPlexGetDepthLabel(), DMPlexGetDepth(), DMPlexComputeCellTypes(), DMCreateLabel()

External Links

source
PETSc.LibPETSc.DMPlexSetChart — Method
DMPlexSetChart(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetChart()

External Links

source
PETSc.LibPETSc.DMPlexSetClosurePermutationTensor — Method
DMPlexSetClosurePermutationTensor(petsclib::PetscLibType, dm::AbstractPetscDM, 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 `` [c0, v1, v2, v3, v4, e5, e6, e7, e8]

v4 – e6 – v3 | | e7 c0 e8 | | v1 – e5 – v2 ``

(There is no significance to the ordering described here.) The default section for a Q3 quad might typically assign dofs in the order of points, e.g., $c0 -> [0,1,2,3] v1 -> [4] -.. e5 -> [8, 9]$

which corresponds to the dofs $6 10 11 7 13 2 3 15 12 0 1 14 4 8 9 5$

The closure in BFS ordering works through height strata (cells, edges, vertices) to produce the ordering $0 1 2 3 8 9 14 15 11 10 13 12 4 5 7 6$

After calling DMPlexSetClosurePermutationTensor(), the closure will be ordered lexicographically, $4 8 9 5 12 0 1 14 13 2 3 15 6 10 11 7$

Level: developer

See also: DM, DMPLEX, DMGetLocalSection(), PetscSectionSetClosurePermutation(), DMSetGlobalSection()

External Links

source
PETSc.LibPETSc.DMPlexSetCone — Method
DMPlexSetCone(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, cone::Vector{PetscInt})

Set the points on the in-edges for this point in the DAG; that is these are the points that cover the specific point

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp(), DMPlexSetSupport(), DMPlexSetSupportSize()

External Links

source
PETSc.LibPETSc.DMPlexSetConeOrientation — Method
DMPlexSetConeOrientation(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, coneOrientation::Vector{PetscInt})

Set the orientations on the in-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetConeOrientation(), DMPlexSetCone(), DMPlexSetChart(), DMPlexSetConeSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexSetConeSize — Method
DMPlexSetConeSize(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, size::PetscInt)

Set the number of in-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexSetCone(), DMPlexCreate(), DMPlexGetConeSize(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexSetCoordinateMap — Method
DMPlexSetCoordinateMap(petsclib::PetscLibType, dm::AbstractPetscDM, coordFunc::Ptr{Cvoid})

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

See also: DMPLEX, DMSetCoordinates(), DMPlexGetCoordinateMap(), PetscPointFn

External Links

source
PETSc.LibPETSc.DMPlexSetInterpolatePreferTensor — Method
DMPlexSetInterpolatePreferTensor(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPlexGetInterpolatePreferTensor(), DMPLEX, DMPlexInterpolate(), DMPlexIsInterpolatedCollective()

External Links

source
PETSc.LibPETSc.DMPlexSetIsoperiodicFaceSF — Method
DMPlexSetIsoperiodicFaceSF(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMGetGlobalSection(), DMPlexGetIsoperiodicFaceSF()

External Links

source
PETSc.LibPETSc.DMPlexSetIsoperiodicFaceTransform — Method
DMPlexSetIsoperiodicFaceTransform(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMGetGlobalSection(), DMPlexSetIsoperiodicFaceSF()

External Links

source
PETSc.LibPETSc.DMPlexSetMaxProjectionHeight — Method
DMPlexSetMaxProjectionHeight(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetMaxProjectionHeight(), DMProjectFunctionLocal(), DMProjectFunctionLabelLocal()

External Links

source
PETSc.LibPETSc.DMPlexSetMigrationSF — Method
DMPlexSetMigrationSF(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, PetscSF, DMPlexDistribute(), DMPlexDistributeField(), DMPlexCreateMigrationSF(), DMPlexGetMigrationSF()

External Links

source
PETSc.LibPETSc.DMPlexSetMinRadius — Method
DMPlexSetMinRadius(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMSetCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexSetOptionsPrefix — Method
DMPlexSetOptionsPrefix(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, SNESSetFromOptions()

External Links

source
PETSc.LibPETSc.DMPlexSetOverlap — Method
DMPlexSetOverlap(petsclib::PetscLibType, dm::AbstractPetscDM, dmSrc::AbstractPetscDM, 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

See also: DMPLEX, DMPlexGetOverlap(), DMPlexDistribute()

External Links

source
PETSc.LibPETSc.DMPlexSetPartitionBalance — Method
DMPlexSetPartitionBalance(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexDistribute(), DMPlexGetPartitionBalance()

External Links

source
PETSc.LibPETSc.DMPlexSetPartitioner — Method
DMPlexSetPartitioner(petsclib::PetscLibType, dm::AbstractPetscDM, part::PetscPartitioner)

Set the mesh partitioner

logically Collective

Input Parameters:

  • dm - The DM
  • part - The partitioner

Level: developer

See also: DM, DMPLEX, PetscPartitioner, DMPlexDistribute(), DMPlexGetPartitioner(), PetscPartitionerCreate()

External Links

source
PETSc.LibPETSc.DMPlexSetReferenceTree — Method
DMPlexSetReferenceTree(petsclib::PetscLibType, dm::AbstractPetscDM, ref::AbstractPetscDM)

set the reference tree for hierarchically non-conforming meshes.

Not Collective

Input Parameters:

  • dm - The DMPLEX object
  • ref - The reference tree DMPLEX object

Level: intermediate

See also: DM, DMPLEX, DMPlexGetReferenceTree(), DMPlexCreateDefaultReferenceTree()

External Links

source
PETSc.LibPETSc.DMPlexSetRefinementFunction — Method
DMPlexSetRefinementFunction(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMRefine(), DMPlexGetRefinementFunction(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()

External Links

source
PETSc.LibPETSc.DMPlexSetRefinementLimit — Method
DMPlexSetRefinementLimit(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMRefine(), DMPlexGetRefinementLimit(), DMPlexGetRefinementUniform(), DMPlexSetRefinementUniform()

External Links

source
PETSc.LibPETSc.DMPlexSetRefinementUniform — Method
DMPlexSetRefinementUniform(petsclib::PetscLibType, dm::AbstractPetscDM, refinementUniform::PetscBool)

Set the flag for uniform refinement

Input Parameters:

  • dm - The DM
  • refinementUniform - The flag for uniform refinement

Level: developer

See also: DM, DMPLEX, DMRefine(), DMPlexGetRefinementUniform(), DMPlexGetRefinementLimit(), DMPlexSetRefinementLimit()

External Links

source
PETSc.LibPETSc.DMPlexSetRegularRefinement — Method
DMPlexSetRegularRefinement(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetRegularRefinement()

External Links

source
PETSc.LibPETSc.DMPlexSetSNESLocalFEM — Method
DMPlexSetSNESLocalFEM(petsclib::PetscLibType, dm::AbstractPetscDM, use_obj::PetscBool, ctx::Ptr{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 application context that will be passed to pointwise evaluation routines

Level: developer

See also: DMPLEX, SNES, PetscDSAddBoundary(), PetscDSSetObjective(), PetscDSSetResidual(), PetscDSSetJacobian()

External Links

source
PETSc.LibPETSc.DMPlexSetSNESVariableBounds — Method
DMPlexSetSNESVariableBounds(petsclib::PetscLibType, dm::AbstractPetscDM, snes::AbstractSNES)

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

See also: SNESVISetVariableBounds(), SNESVI, DM

External Links

source
PETSc.LibPETSc.DMPlexSetSaveTransform — Method
DMPlexSetSaveTransform(petsclib::PetscLibType, dm::AbstractPetscDM, save::PetscBool)

Set the flag which determines whether the DMPlexTransform used to produce a refined DM is retained

Logically Collective

Input Parameters:

  • dm - The DM
  • save - If PETSC_TRUE, keep the transform on the refined DM so it can be retrieved with DMPlexGetTransform()

Level: developer

See also: DM, DMPLEX, DMPlexTransform, DMPlexGetSaveTransform(), DMPlexGetTransform(), DMPlexSetTransform()

External Links

source
PETSc.LibPETSc.DMPlexSetScale — Method
DMPlexSetScale(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetScale(), PetscUnit

External Links

source
PETSc.LibPETSc.DMPlexSetSubpointMap — Method
DMPlexSetSubpointMap(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexCreateSubmesh(), DMPlexGetSubpointIS()

External Links

source
PETSc.LibPETSc.DMPlexSetSupport — Method
DMPlexSetSupport(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, support::Vector{PetscInt})

Set the points on the out-edges for this point in the DAG, that is the list of points that this point covers

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

See also: DM, DMPLEX, DMPlexSetCone(), DMPlexSetConeSize(), DMPlexCreate(), DMPlexGetSupport(), DMPlexSetChart(), DMPlexSetSupportSize(), DMSetUp()

External Links

source
PETSc.LibPETSc.DMPlexSetSupportSize — Method
DMPlexSetSupportSize(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, size::PetscInt)

Set the number of out-edges for this point in the DAG

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

See also: DM, DMPLEX, DMPlexCreate(), DMPlexGetSupportSize(), DMPlexSetChart()

External Links

source
PETSc.LibPETSc.DMPlexSetTransform — Method
DMPlexSetTransform(petsclib::PetscLibType, dm::AbstractPetscDM, tr::DMPlexTransform)

Set the DMPlexTransform cached on the DM

Not Collective

Input Parameters:

  • dm - The DM
  • tr - The DMPlexTransform

Level: developer

See also: DM, DMPLEX, DMPlexTransform, DMPlexGetTransform(), DMPlexSetSaveTransform(), DMPlexGetSaveTransform()

External Links

source
PETSc.LibPETSc.DMPlexSetTransformType — Method
DMPlexSetTransformType(petsclib::PetscLibType, dm::AbstractPetscDM, type::String)

Set the transform type for uniform refinement

Input Parameters:

  • dm - The DM
  • type - The transform type for uniform refinement

Level: developer

See also: DM, DMPLEX, DMPlexTransformType, DMRefine(), DMPlexGetTransformType(), DMPlexSetRefinementUniform()

External Links

source
PETSc.LibPETSc.DMPlexSetTree — Method
DMPlexSetTree(petsclib::PetscLibType, dm::AbstractPetscDM, parentSection::PetscSection, parents::Vector{PetscInt}, childIDs::Vector{PetscInt})

set the tree that describes the hierarchy of non-conforming mesh points. This routine also creates 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

See also: DM, DMPLEX, DMPlexGetTree(), DMPlexSetReferenceTree(), DMPlexSetAnchors(), DMPlexGetTreeParent(), DMPlexGetTreeChildren()

External Links

source
PETSc.LibPETSc.DMPlexSetVTKCellHeight — Method
DMPlexSetVTKCellHeight(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexGetVTKCellHeight()

External Links

source
PETSc.LibPETSc.DMPlexShearGeometry — Method
DMPlexShearGeometry(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DMPLEX, DMPlexRemapGeometry(), DMDirection, DM_X, DM_Y, DM_Z

External Links

source
PETSc.LibPETSc.DMPlexStratify — Method
DMPlexStratify(petsclib::PetscLibType, dm::AbstractPetscDM)

Computes the strata for all points in the DMPLEX

Collective

Input Parameter:

  • dm - The DMPLEX

Level: beginner

See also: DM, DMPLEX, DMPlexCreate(), DMPlexSymmetrize(), DMPlexComputeCellTypes()

External Links

source
PETSc.LibPETSc.DMPlexStratifyMigrationSF — Method
migrationSF::PetscSF = DMPlexStratifyMigrationSF(petsclib::PetscLibType, dm::AbstractPetscDM, sf::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

See also: DMPLEX, DMPlexPartitionLabelCreateSF(), DMPlexDistribute(), DMPlexDistributeOverlap()

External Links

source
PETSc.LibPETSc.DMPlexSymmetrize — Method
DMPlexSymmetrize(petsclib::PetscLibType, dm::AbstractPetscDM)

Create support (out-edge) information from cone (in-edge) information

Not Collective

Input Parameter:

  • dm - The DMPLEX

Level: beginner

See also: DM, DMPLEX, DMPlexCreate(), DMPlexSetChart(), DMPlexSetConeSize(), DMPlexSetCone()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeBoundary — Method
DMPlexTSComputeBoundary(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, locX::AbstractPetscVec, locX_t::AbstractPetscVec, ctx::Ptr{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
  • ctx - The application context

Level: developer

See also: DMPLEX, TS, DMPlexComputeJacobianActionFEM()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeIFunctionFEM — Method
DMPlexTSComputeIFunctionFEM(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, locX::AbstractPetscVec, locX_t::AbstractPetscVec, locF::AbstractPetscVec, ctx::Ptr{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
  • ctx - The application context

Output Parameter:

  • locF - Local output vector

Level: developer

See also: DMPLEX, TS, DMPlexTSComputeRHSFunctionFEM()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeIJacobianFEM — Method
DMPlexTSComputeIJacobianFEM(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, locX::AbstractPetscVec, locX_t::AbstractPetscVec, X_tShift::PetscReal, Jac::AbstractPetscMat, JacP::AbstractPetscMat, ctx::Ptr{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
  • ctx - The application 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

See also: TS, DM, DMPlexTSComputeIFunctionFEM(), DMPlexTSComputeRHSFunctionFEM()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeRHSFunctionFEM — Method
DMPlexTSComputeRHSFunctionFEM(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, locX::AbstractPetscVec, locG::AbstractPetscVec, ctx::Ptr{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
  • ctx - The application context

Output Parameter:

  • locG - Local output vector

Level: developer

See also: TS, DM, DMPlexTSComputeIFunctionFEM(), DMPlexTSComputeIJacobianFEM()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeRHSFunctionFVM — Method
DMPlexTSComputeRHSFunctionFVM(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, locX::AbstractPetscVec, F::AbstractPetscVec, ctx::Ptr{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
  • ctx - The application context

Output Parameter:

  • F - Global output vector

Level: developer

See also: DMPLEX, TS, DMPlexComputeJacobianActionFEM()

External Links

source
PETSc.LibPETSc.DMPlexTSComputeRHSFunctionFVMCEED — Method
DMPlexTSComputeRHSFunctionFVMCEED(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, locX::AbstractPetscVec, F::AbstractPetscVec, ctx::Ptr{Cvoid})

Assemble the right-hand-side vector of a finite-volume TS step using the libCEED operator attached to a DMPLEX

Collective

Input Parameters:

  • dm - the DMPLEX for which libCEED operators have been created by DMCeedCreate()
  • time - the current time
  • locX - local solution vector including ghost values
  • F - the global right-hand-side vector to assemble
  • ctx - application context (unused)

Level: developer

See also: TS, DMPLEX, DMCeedCreate(), DMPlexSNESComputeResidualCEED(), DMTSSetRHSFunctionLocal()

External Links

source
PETSc.LibPETSc.DMPlexTetgenSetOptions — Method
DMPlexTetgenSetOptions(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexTriangleSetOptions(), DMPlexGenerate()

External Links

source
PETSc.LibPETSc.DMPlexTopologyLoad — Method
globalToLocalPointSF::PetscSF = DMPlexTopologyLoad(petsclib::PetscLibType, dm::AbstractPetscDM, viewer::PetscViewer)

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

See also: DM, DMPLEX, DMLoad(), DMPlexCoordinatesLoad(), DMPlexLabelsLoad(), DMView(), PetscViewerHDF5Open(), PetscViewerPushFormat(), PetscViewer, PetscSF

External Links

source
PETSc.LibPETSc.DMPlexTopologyView — Method
DMPlexTopologyView(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMView(), DMPlexCoordinatesView(), DMPlexLabelsView(), DMPlexTopologyLoad(), PetscViewer

External Links

source
PETSc.LibPETSc.DMPlexTransferVecTree — Method
cidsRefine::PetscInt,cidsCoarsen::PetscInt = DMPlexTransferVecTree(petsclib::PetscLibType, dmIn::AbstractPetscDM, vecIn::AbstractPetscVec, dmOut::AbstractPetscDM, vecOut::AbstractPetscVec, sfRefine::PetscSF, sfCoarsen::PetscSF, 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

See also: DM, DMPLEX, PetscSF, Vec, PetscFV, DMPlexSetReferenceTree(), DMPlexGetReferenceTree(), PetscFVGetComputeGradients()

External Links

source
PETSc.LibPETSc.DMPlexTreeRefineCell — Method
ncdm::PetscDM = DMPlexTreeRefineCell(petsclib::PetscLibType, dm::AbstractPetscDM, cell::PetscInt)

Refine a single cell on rank 0 using the DM's reference tree, producing a non-conforming mesh

Collective

Input Parameters:

  • dm - The DM with an attached reference tree (see DMPlexSetReferenceTree())
  • cell - The cell to be refined

Output Parameter:

  • ncdm - A new DM in which cell has been split according to the reference tree

Level: developer

See also: DM, DMPLEX, DMPlexSetReferenceTree(), DMPlexGetReferenceTree(), DMPlexSetTree()

External Links

source
PETSc.LibPETSc.DMPlexTriangleSetOptions — Method
DMPlexTriangleSetOptions(petsclib::PetscLibType, dm::AbstractPetscDM, 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

See also: DM, DMPLEX, DMPlexTetgenSetOptions(), DMPlexGenerate()

External Links

source
PETSc.LibPETSc.DMPlexUninterpolate — Method
dmUnint::PetscDM = DMPlexUninterpolate(petsclib::PetscLibType, dm::AbstractPetscDM)

Take in a mesh with all intermediate faces, edges, etc. and return a cell-vertex mesh

Collective

Input Parameter:

  • dm - The complete DMPLEX object

Output Parameter:

  • dmUnint - The DMPLEX object with only cells and vertices

Level: intermediate

See also: DMPLEX, DMPlexInterpolate(), DMPlexCreateFromCellListPetsc(), DMPlexCopyCoordinates()

External Links

source
PETSc.LibPETSc.DMPlexVTKWriteAll — Method
DMPlexVTKWriteAll(petsclib::PetscLibType, odm, 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

See also: DM, PETSCVIEWEREXODUSII, DMPLEX, PETSCVIEWERVTK

External Links

source
PETSc.LibPETSc.DMPlexVecGetClosure — Method
csize::PetscInt,values::Vector{PetscScalar} = DMPlexVecGetClosure(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, v::AbstractPetscVec, 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

See also: DM, DMPLEX, DMPlexVecGetClosureAtDepth(), DMPlexVecRestoreClosure(), DMPlexVecSetClosure(), DMPlexMatSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexVecGetClosureAtDepth — Method
csize::PetscInt,values::Ptr{PetscScalar} = DMPlexVecGetClosureAtDepth(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, v::AbstractPetscVec, point::PetscInt, depth::PetscInt)

Get an array of the values on the closure of point that are at a specific depth

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
  • depth - The depth of mesh points that should be returned
  • 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

See also: DM, DMPLEX, DMPlexVecGetClosure(), DMPlexVecRestoreClosure(), DMPlexVecSetClosure(), DMPlexMatSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexVecGetOrientedClosure — Method
csize::PetscInt,values::Ptr{PetscScalar} = DMPlexVecGetOrientedClosure(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, useClPerm::PetscBool, v::AbstractPetscVec, 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

See also: DM, DMPLEX, DMPlexVecGetClosure(), DMPlexGetCellCoordinates(), DMPlexVecRestoreClosure(), DMPlexVecSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexVecRestoreClosure — Method
DMPlexVecRestoreClosure(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, v::AbstractPetscVec, point::PetscInt, csize::PetscInt, values::Union{Ptr, AbstractArray{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

See also: DM, DMPLEX, DMPlexVecGetClosure(), DMPlexVecSetClosure(), DMPlexMatSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexVecSetClosure — Method
DMPlexVecSetClosure(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, v::AbstractPetscVec, 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

See also: DM, DMPLEX, DMPlexVecGetClosure(), DMPlexMatSetClosure()

External Links

source
PETSc.LibPETSc.DMPlexVecView1D — Method
DMPlexVecView1D(petsclib::PetscLibType, dm::AbstractPetscDM, n::PetscInt, u::Vector{<:AbstractPetscVec}, 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

See also: DM, DMPLEX, VecViewFromOptions(), VecView()

External Links

source