DM (Domain Management)
The DM (Domain Management) object encapsulates the relationship between a mesh data structure and the algebraic objects (vectors, matrices). It provides a common interface for structured and unstructured meshes, particles, networks, and other geometric/topological structures.
Overview
The DM abstraction in PETSc manages:
- Topology and geometry of computational domains
- Mapping between geometric entities and degrees of freedom
- Distribution of data across MPI processes
- Multi-level representations for multigrid
- Field definitions and discretizations
Basic Usage Pattern
using PETSc, MPI
# Initialize
petsclib = PETSc.petsclibs[1]
PETSc.initialize(petsclib)
# Create a DM (specific type created via DMDACreate, DMPlexCreate, etc.)
# See subtype-specific pages for creation functions
# Setup the DM
LibPETSc.DMSetFromOptions(petsclib, dm)
LibPETSc.DMSetUp(petsclib, dm)
# Create global vectors
x = LibPETSc.DMCreateGlobalVector(petsclib, dm)
# Create matrices
A = LibPETSc.DMCreateMatrix(petsclib, dm)
# Use the DM...
# Cleanup
LibPETSc.VecDestroy(petsclib, x)
LibPETSc.MatDestroy(petsclib, A)
LibPETSc.DMDestroy(petsclib, dm)
PETSc.finalize(petsclib)DM Subtypes
PETSc provides several DM implementations for different problem types:
- DMDA: Structured grids (1D, 2D, 3D) with regular topology
- DMPlex: Unstructured meshes using Sieve/DMPlex topology
- DMStag: Staggered grids for staggered finite differences
- DMSwarm: Particle methods and particle-in-cell
- DMForest: Adaptive mesh refinement with forest-of-octrees
- DMNetwork: Network/graph-based problems
- DMShell and others: User-defined and composite DM types
General DM Functions
The following functions work across all DM types:
PETSc.LibPETSc.DMAdaptInterpolator — Method
InAdapt::PetscMat = DMAdaptInterpolator(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM, In::AbstractPetscMat, smoother::AbstractKSP, MF::AbstractPetscMat, MC::AbstractPetscMat, user::Ptr{Cvoid})Adapts a grid interpolator so that it accurately reproduces a set of sample fine-grid vectors
Collective
Input Parameters:
dmc- the coarseDMdmf- the fineDMIn- the input (unadapted) interpolation matrix fromdmctodmfsmoother- aKSPwhose operator provides the fine-grid matrix used to weight modes by their Rayleigh quotientMF- a dense matrix whose columns are fine-grid sample vectorsMC- a dense matrix whose columns are the corresponding coarse-grid sample vectors (may beNULL, in which case In^T MF is used)user- unused application context
Output Parameter:
InAdapt- the adapted interpolation matrix (created inside the routine)
Options Database Key:
-dm_interpolator_adapt_debug flag- print diagnostic information about the least-squares systems solved for each row
Level: developer
See also: DM, Mat, KSP, DMCheckInterpolator(), DMCreateInterpolation(), PCMG
External Links
- PETSc Manual:
DM/DMAdaptInterpolator
PETSc.LibPETSc.DMAdaptLabel — Method
dmAdapt::PetscDM = DMAdaptLabel(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel)Adapt a DM based on a DMLabel with values interpreted as coarsening and refining flags. Specific implementations of DM maybe have specialized flags, but all implementations should accept flag values DM_ADAPT_DETERMINE, DM_ADAPT_KEEP, DM_ADAPT_REFINE, and, DM_ADAPT_COARSEN.
Collective
Input Parameters:
dm- the pre-adaptationDMobjectlabel- label with the flags
Output Parameters:
dmAdapt- the adaptedDMobject: may beNULLif an adaptedDMcould not be produced.
Level: intermediate
See also: DM, DMAdaptMetric(), DMCoarsen(), DMRefine()
External Links
- PETSc Manual:
DM/DMAdaptLabel
PETSc.LibPETSc.DMAdaptMetric — Method
dmAdapt::PetscDM = DMAdaptMetric(petsclib::PetscLibType, dm::AbstractPetscDM, metric::AbstractPetscVec, bdLabel::DMLabel, rgLabel::DMLabel)Generates a mesh adapted to the specified metric field.
Input Parameters:
dm- The DM objectmetric- The metric to which the mesh is adapted, defined vertex-wise.bdLabel- Label for boundary tags, which will be preserved in the output mesh.bdLabelshould beNULLif there is no such label, and should be different from "boundary".rgLabel- Label for cell tags, which will be preserved in the output mesh.rgLabelshould beNULLif there is no such label, and should be different from "regions".
Output Parameter:
dmAdapt- Pointer to theDMobject containing the adapted mesh
See also: DMAdaptLabel(), DMCoarsen(), DMRefine()
External Links
- PETSc Manual:
DM/DMAdaptMetric
PETSc.LibPETSc.DMAddBoundary — Method
bd::PetscInt = DMAddBoundary(petsclib::PetscLibType, dm::AbstractPetscDM, type::DMBoundaryConditionType, name::String, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt}, field::PetscInt, Nc::PetscInt, comps::Vector{PetscInt}, bcFunc::Ptr{Cvoid}, bcFunc_t::Ptr{Cvoid}, ctx::Ptr{Cvoid})Add a boundary condition, for a single field, to a model represented by a DM
Collective
Input Parameters:
dm- TheDM, with aPetscDSthat matches the problem being constrainedtype- The type of condition, e.g.DM_BC_ESSENTIAL_ANALYTIC,DM_BC_ESSENTIAL_FIELD(Dirichlet), orDM_BC_NATURAL(Neumann)name- The BC namelabel- The label defining constrained pointsNv- The number ofDMLabelvalues for constrained pointsvalues- An array of values for constrained pointsfield- The field to constrainNc- The number of constrained field components (0 will constrain all components)comps- An array of constrained component numbersbcFunc- A pointwise function giving boundary valuesbcFunc_t- A pointwise function giving the time derivative of the boundary values, orNULLctx- An optional application context forbcFunc
Output Parameter:
bd- (Optional) Boundary number
Options Database Keys:
-bc_NAME values- Overrides the boundary ids for boundary named NAME-bc_NAME_comp comps- Overrides the boundary components for boundary named NAME
Level: intermediate
See also: DM, DSGetBoundary(), PetscDSAddBoundary()
External Links
- PETSc Manual:
DM/DMAddBoundary
PETSc.LibPETSc.DMAddField — Method
DMAddField(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel, disc)Add a field to a DM object. A field is a function space defined by of a set of discretization points (geometric entities) and a discretization object that defines the function space associated with those points.
Logically Collective
Input Parameters:
dm- TheDMlabel- The label indicating the support of the field, orNULLfor the entire meshdisc- The discretization object
Level: intermediate
See also: DM, DMSetLabel(), DMSetField(), DMGetField(), PetscFE
External Links
- PETSc Manual:
DM/DMAddField
PETSc.LibPETSc.DMAddLabel — Method
DMAddLabel(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel)Add the label to this DM
Not Collective
Input Parameters:
dm- TheDMobjectlabel- TheDMLabel
Level: developer
See also: DM, DMLabel, DMCreateLabel(), DMHasLabel(), DMGetLabelValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMAddLabel
PETSc.LibPETSc.DMAppendOptionsPrefix — Method
DMAppendOptionsPrefix(petsclib::PetscLibType, dm::AbstractPetscDM, prefix::String)Appends an additional string to an already existing prefix used for searching for DM options in the options database.
Logically Collective
Input Parameters:
dm- theDMcontextprefix- the string to append to the current prefix
Level: advanced
See also: DM, DMSetOptionsPrefix(), DMGetOptionsPrefix(), PetscObjectAppendOptionsPrefix(), DMSetFromOptions()
External Links
- PETSc Manual:
DM/DMAppendOptionsPrefix
PETSc.LibPETSc.DMCheckInterpolator — Method
DMCheckInterpolator(petsclib::PetscLibType, dmf::AbstractPetscDM, In::AbstractPetscMat, MC::AbstractPetscMat, MF::AbstractPetscMat, tol::PetscReal)Check that an interpolation matrix accurately reproduces a set of sample fine-grid vectors
Collective
Input Parameters:
dmf- the fineDMIn- the interpolation matrix from a coarseDMtodmfMC- a dense matrix whose columns are coarse-grid sample vectorsMF- a dense matrix whose columns are the corresponding fine-grid sample vectorstol- tolerance on the maximum 2-norm of vf - I vc across all sample vectors
Options Database Key:
-dm_interpolator_adapt_error view- view the coarse, fine, and error vectors for each sample
Level: developer
See also: DM, Mat, DMAdaptInterpolator(), DMCreateInterpolation(), PCMG
External Links
- PETSc Manual:
DM/DMCheckInterpolator
PETSc.LibPETSc.DMClearAuxiliaryVec — Method
DMClearAuxiliaryVec(petsclib::PetscLibType, dm::AbstractPetscDM)Destroys the auxiliary vector information and creates a new empty one
Not Collective
Input Parameter:
dm- TheDM
Level: advanced
See also: DM, DMCopyAuxiliaryVec(), DMGetNumAuxiliaryVec(), DMGetAuxiliaryVec(), DMSetAuxiliaryVec()
External Links
- PETSc Manual:
DM/DMClearAuxiliaryVec
PETSc.LibPETSc.DMClearDS — Method
DMClearDS(petsclib::PetscLibType, dm::AbstractPetscDM)Remove all discrete systems from the DM
Logically Collective
Input Parameter:
dm- TheDM
Level: intermediate
See also: DM, DMGetNumDS(), DMGetDS(), DMSetField()
External Links
- PETSc Manual:
DM/DMClearDS
PETSc.LibPETSc.DMClearFields — Method
DMClearFields(petsclib::PetscLibType, dm::AbstractPetscDM)Remove all fields from the DM
Logically Collective
Input Parameter:
dm- TheDM
Level: intermediate
See also: DM, DMGetNumFields(), DMSetNumFields(), DMSetField()
External Links
- PETSc Manual:
DM/DMClearFields
PETSc.LibPETSc.DMClearGlobalVectors — Method
DMClearGlobalVectors(petsclib::PetscLibType, dm::AbstractPetscDM)Destroys all the global vectors that have been created for DMGetGlobalVector() calls in this DM
Collective
Input Parameter:
dm- theDM
Level: developer
See also: DM, DMCreateGlobalVector(), VecDuplicate(), VecDuplicateVecs(), DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMGlobalToLocalBegin(), DMGlobalToLocalEnd(), DMLocalToGlobalBegin(), DMCreateLocalVector(), DMRestoreLocalVector(), VecStrideMax(), VecStrideMin(), VecStrideNorm(), DMClearLocalVectors()
External Links
- PETSc Manual:
DM/DMClearGlobalVectors
PETSc.LibPETSc.DMClearLabelStratum — Method
DMClearLabelStratum(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, value::PetscInt)Remove all points from a stratum from a DMLabel
Not Collective
Input Parameters:
dm- TheDMobjectname- The label namevalue- The label value for this point
Output Parameter:
Level: beginner
See also: DM, DMLabel, DMLabelClearStratum(), DMSetLabelValue(), DMGetStratumIS(), DMClearLabelValue()
External Links
- PETSc Manual:
DM/DMClearLabelStratum
PETSc.LibPETSc.DMClearLabelValue — Method
DMClearLabelValue(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, point::PetscInt, value::PetscInt)Remove a point from a DMLabel with given value
Not Collective
Input Parameters:
dm- TheDMobjectname- The label namepoint- The mesh pointvalue- The label value for this point
Level: beginner
See also: DM, DMLabelClearValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMClearLabelValue
PETSc.LibPETSc.DMClearLocalVectors — Method
DMClearLocalVectors(petsclib::PetscLibType, dm::AbstractPetscDM)Destroys all the local vectors that have been created for DMGetLocalVector() calls in this DM
Collective
Input Parameter:
dm- theDM
Level: developer
See also: DM, DMCreateLocalVector(), VecDuplicate(), VecDuplicateVecs(), DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMLocalToLocalBegin(), DMLocalToLocalEnd(), DMRestoreLocalVector(), VecStrideMax(), VecStrideMin(), VecStrideNorm(), DMClearGlobalVectors()
External Links
- PETSc Manual:
DM/DMClearLocalVectors
PETSc.LibPETSc.DMClearNamedGlobalVectors — Method
DMClearNamedGlobalVectors(petsclib::PetscLibType, dm::AbstractPetscDM)Destroys all the named global vectors that have been created with DMGetNamedGlobalVector() in this DM
Collective
Input Parameter:
dm- theDM
Level: developer
See also: DM, DMGetNamedGlobalVector(), DMGetNamedLocalVector(), DMClearNamedLocalVectors()
External Links
- PETSc Manual:
DM/DMClearNamedGlobalVectors
PETSc.LibPETSc.DMClearNamedLocalVectors — Method
DMClearNamedLocalVectors(petsclib::PetscLibType, dm::AbstractPetscDM)Destroys all the named local vectors that have been created with DMGetNamedLocalVector() in this DM
Collective
Input Parameter:
dm- theDM
Level: developer
See also: DM, DMGetNamedGlobalVector(), DMGetNamedLocalVector(), DMClearNamedGlobalVectors()
External Links
- PETSc Manual:
DM/DMClearNamedLocalVectors
PETSc.LibPETSc.DMClone — Method
newdm::PetscDM = DMClone(petsclib::PetscLibType, dm::AbstractPetscDM)Creates a DM object with the same topology as the original.
Collective
Input Parameter:
dm- The originalDMobject
Output Parameter:
newdm- The newDMobject
Level: beginner
See also: DM, DMDestroy(), DMCreate(), DMSetType(), DMSetLocalSection(), DMSetGlobalSection(), DMPLEX, DMConvert()
External Links
- PETSc Manual:
DM/DMClone
PETSc.LibPETSc.DMCoarsen — Method
dmc::PetscDM = DMCoarsen(petsclib::PetscLibType, dm::AbstractPetscDM, comm::MPI_Comm)Coarsens a DM object using a standard, non-adaptive coarsening of the underlying mesh
Collective
Input Parameters:
dm- theDMobjectcomm- the communicator to contain the newDMobject (orMPI_COMM_NULL)
Output Parameter:
dmc- the coarsenedDM
Level: developer
See also: DM, DMRefine(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateDomainDecomposition(), DMCoarsenHookAdd(), DMCoarsenHookRemove()
External Links
- PETSc Manual:
DM/DMCoarsen
PETSc.LibPETSc.DMCoarsenHierarchy — Method
DMCoarsenHierarchy(petsclib::PetscLibType, dm::AbstractPetscDM, nlevels::PetscInt, dmc::Vector{<:AbstractPetscDM})Coarsens a DM object, all levels at once
Collective
Input Parameters:
dm- theDMobjectnlevels- the number of levels of coarsening
Output Parameter:
dmc- the coarsenedDMhierarchy
Level: developer
See also: DM, DMCoarsen(), DMRefineHierarchy(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation()
External Links
- PETSc Manual:
DM/DMCoarsenHierarchy
PETSc.LibPETSc.DMCoarsenHookAdd — Method
DMCoarsenHookAdd(petsclib::PetscLibType, fine::AbstractPetscDM, coarsenhook::external, restricthook::external, ctx::Ptr{Cvoid})adds a callback to be run when restricting a nonlinear problem to the coarse grid
Logically Collective; No Fortran Support
Input Parameters:
fine-DMon which to run a hook when restricting to a coarser levelcoarsenhook- function to run when setting up a coarser levelrestricthook- function to run to update data on coarser levels (called once perSNESSolve())ctx- [optional] application context for provide data for the hooks (may beNULL)
Calling sequence of coarsenhook:
fine- fine levelDMcoarse- coarse levelDMto restrict problem toctx- optional application function context
Calling sequence of restricthook:
fine- fine levelDMmrestrict- matrix restricting a fine-level solution to the coarse grid, usually the transpose of the interpolationrscale- scaling vector for restrictioninject- matrix restricting by injectioncoarse- coarse level DM to updatectx- optional application function context
Level: advanced
See also: DM, DMCoarsenHookRemove(), DMRefineHookAdd(), SNESFASGetInterpolation(), SNESFASGetInjection(), PetscObjectCompose(), PetscContainerCreate()
External Links
- PETSc Manual:
DM/DMCoarsenHookAdd
PETSc.LibPETSc.DMCoarsenHookRemove — Method
DMCoarsenHookRemove(petsclib::PetscLibType, fine::AbstractPetscDM, coarsenhook::external, restricthook::external, ctx::Ptr{Cvoid})remove a callback set with DMCoarsenHookAdd()
Logically Collective; No Fortran Support
Input Parameters:
fine-DMon which to run a hook when restricting to a coarser levelcoarsenhook- function to run when setting up a coarser levelrestricthook- function to run to update data on coarser levelsctx- [optional] application context for provide data for the hooks (may beNULL)
Calling sequence of coarsenhook:
fine- fine levelDMcoarse- coarse levelDMto restrict problem toctx- optional application function context
Calling sequence of restricthook:
fine- fine levelDMrstrict- matrix restricting a fine-level solution to the coarse grid, usually the transpose of the interpolationrscale- scaling vector for restrictioninject- matrix restricting by injectioncoarse- coarse level DM to updatectx- optional application function context
Level: advanced
See also: DM, DMCoarsenHookAdd(), DMRefineHookAdd(), SNESFASGetInterpolation(), SNESFASGetInjection(), PetscObjectCompose(), PetscContainerCreate()
External Links
- PETSc Manual:
DM/DMCoarsenHookRemove
PETSc.LibPETSc.DMCompareLabels — Method
equal::PetscBool,message::Ptr{Cchar} = DMCompareLabels(petsclib::PetscLibType, dm0::AbstractPetscDM, dm1::AbstractPetscDM)Compare labels between two DM objects
Collective; No Fortran Support
Input Parameters:
dm0- FirstDMobjectdm1- SecondDMobject
Output Parameters:
equal- (Optional) Flag whether labels ofdm0anddm1are the samemessage- (Optional) Message describing the difference, orNULLif there is no difference
Level: intermediate
See also: DM, DMLabel, DMAddLabel(), DMCopyLabelsMode, DMLabelCompare()
External Links
- PETSc Manual:
DM/DMCompareLabels
PETSc.LibPETSc.DMComputeError — Method
errorVec::PetscVec = DMComputeError(petsclib::PetscLibType, dm::AbstractPetscDM, sol::AbstractPetscVec, errors::Vector{PetscReal})Computes the error assuming the user has provided the exact solution functions
Collective
Input Parameters:
dm- TheDMsol- The solution vector
Input/Output Parameter:
errors- An array of length Nf, the number of fields, orNULLfor no output; on output
contains the error in each field
Output Parameter:
errorVec- A vector to hold the cellwise error (may beNULL)
Level: developer
See also: DM, DMMonitorSet(), DMGetRegionNumDS(), PetscDSGetExactSolution(), DMGetOutputSequenceNumber()
External Links
- PETSc Manual:
DM/DMComputeError
PETSc.LibPETSc.DMComputeExactSolution — Method
DMComputeExactSolution(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, u::AbstractPetscVec, u_t::AbstractPetscVec)Compute the exact solution for a given DM, using the PetscDS information.
Collective
Input Parameters:
dm- TheDMtime- The time
Output Parameters:
u- The vector will be filled with exact solution values, orNULLu_t- The vector will be filled with the time derivative of exact solution values, orNULL
Level: developer
See also: DM, PetscDSSetExactSolution()
External Links
- PETSc Manual:
DM/DMComputeExactSolution
PETSc.LibPETSc.DMComputeL2Diff — Method
DMComputeL2Diff(petsclib, dm, time, funcs, ctxs, X) -> PetscRealCompute the L² norm of the difference between the global vector X and the pointwise exact functions funcs. ctxs is a Vector{Ptr{Cvoid}} of context pointers (use C_NULL entries for no context).
PETSc.LibPETSc.DMComputeL2FieldDiff — Method
DMComputeL2FieldDiff(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, separated into field components.
Collective
Input Parameters:
dm- TheDMtime- The timefuncs- The functions to evaluate for each field componentctxs- Optional array of contexts to pass to each function, orNULL.X- The coefficient vector u_h, a global vector
Output Parameter:
diff- The array of differences, ||u^f - u^fh||2
Level: developer
See also: DM, DMProjectFunction(), DMComputeL2GradientDiff()
External Links
- PETSc Manual:
DM/DMComputeL2FieldDiff
PETSc.LibPETSc.DMComputeL2GradientDiff — Method
DMComputeL2GradientDiff(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, noname::Ptr{Cvoid})This function computes the L2 difference between the gradient of a function u and an FEM interpolant solution grad uh.
Collective
Input Parameters:
dm- TheDMtime- The timefuncs- The gradient functions to evaluate for each field componentctxs- Optional array of contexts to pass to each function, orNULL.X- The coefficient vector u_h, a global vectorn- The vector to project along
Output Parameter:
diff- The diff ||(grad u - grad uh) . n||2
Level: developer
See also: DM, DMProjectFunction(), DMComputeL2Diff(), DMComputeL2FieldDiff()
External Links
- PETSc Manual:
DM/DMComputeL2GradientDiff
PETSc.LibPETSc.DMComputeVariableBounds — Method
DMComputeVariableBounds(petsclib::PetscLibType, dm::AbstractPetscDM, xl::AbstractPetscVec, xu::AbstractPetscVec)compute variable bounds used by SNESVI.
Logically Collective
Input Parameter:
dm- theDMobject
Output Parameters:
xl- lower boundxu- upper bound
Level: advanced
See also: DM, DMHasVariableBounds(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMGetApplicationContext()
External Links
- PETSc Manual:
DM/DMComputeVariableBounds
PETSc.LibPETSc.DMConvert — Method
M::PetscDM = DMConvert(petsclib::PetscLibType, dm::AbstractPetscDM, newtype::String)Converts a DM to another DM, either of the same or different type.
Collective
Input Parameters:
dm- theDMnewtype- newDMtype (use "same" for the same type)
Output Parameter:
M- pointer to newDM
Level: intermediate
See also: DM, DMSetType(), DMCreate(), DMClone()
External Links
- PETSc Manual:
DM/DMConvert
PETSc.LibPETSc.DMCopyAuxiliaryVec — Method
DMCopyAuxiliaryVec(petsclib::PetscLibType, dm::AbstractPetscDM, dmNew::AbstractPetscDM)Copy the auxiliary vector data on a DM to a new DM
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
dmNew- The newDM, now with the same auxiliary data
Level: advanced
See also: DM, DMClearAuxiliaryVec(), DMGetNumAuxiliaryVec(), DMGetAuxiliaryVec(), DMSetAuxiliaryVec()
External Links
- PETSc Manual:
DM/DMCopyAuxiliaryVec
PETSc.LibPETSc.DMCopyDMKSP — Method
DMCopyDMKSP(petsclib::PetscLibType, dmsrc::AbstractPetscDM, dmdest::AbstractPetscDM)copies a DM DMKSP context to a new DM
Logically Collective
Input Parameters:
dmsrc-DMto obtain context fromdmdest-DMto add context to
Level: developer
See also: DMKSP, DM, KSP, DMGetDMKSP(), KSPSetDM()
External Links
- PETSc Manual:
KSP/DMCopyDMKSP
PETSc.LibPETSc.DMCopyDMSNES — Method
DMCopyDMSNES(petsclib::PetscLibType, dmsrc::AbstractPetscDM, dmdest::AbstractPetscDM)copies a DMSNES context to a new DM
Logically Collective
Input Parameters:
dmsrc-DMto obtain context fromdmdest-DMto add context to
Level: developer
See also: DMSNES, DMGetDMSNES(), SNESSetDM()
External Links
- PETSc Manual:
SNES/DMCopyDMSNES
PETSc.LibPETSc.DMCopyDS — Method
DMCopyDS(petsclib::PetscLibType, dm::AbstractPetscDM, minDegree::PetscInt, maxDegree::PetscInt, newdm::AbstractPetscDM)Copy the discrete systems for the DM into another DM
Collective
Input Parameters:
dm- TheDMminDegree- Minimum degree for a discretization, orPETSC_DETERMINEfor no limitmaxDegree- Maximum degree for a discretization, orPETSC_DETERMINEfor no limit
Output Parameter:
newdm- TheDM
Level: advanced
See also: DM, DMCopyFields(), DMAddField(), DMGetDS(), DMGetCellDS(), DMGetRegionDS(), DMSetRegionDS()
External Links
- PETSc Manual:
DM/DMCopyDS
PETSc.LibPETSc.DMCopyDisc — Method
DMCopyDisc(petsclib::PetscLibType, dm::AbstractPetscDM, newdm::AbstractPetscDM)Copy the fields and discrete systems for the DM into another DM
Collective
Input Parameter:
dm- TheDM
Output Parameter:
newdm- TheDM
Level: advanced
See also: DM, DMCopyFields(), DMCopyDS()
External Links
- PETSc Manual:
DM/DMCopyDisc
PETSc.LibPETSc.DMCopyFields — Method
DMCopyFields(petsclib::PetscLibType, dm::AbstractPetscDM, minDegree::PetscInt, maxDegree::PetscInt, newdm::AbstractPetscDM)Copy the discretizations for the DM into another DM
Collective
Input Parameters:
dm- TheDMminDegree- Minimum degree for a discretization, orPETSC_DETERMINEfor no limitmaxDegree- Maximum degree for a discretization, orPETSC_DETERMINEfor no limit
Output Parameter:
newdm- TheDM
Level: advanced
See also: DM, DMGetField(), DMSetField(), DMAddField(), DMCopyDS(), DMGetDS(), DMGetCellDS()
External Links
- PETSc Manual:
DM/DMCopyFields
PETSc.LibPETSc.DMCopyLabels — Method
DMCopyLabels(petsclib::PetscLibType, dmA::AbstractPetscDM, dmB::AbstractPetscDM, mode::PetscCopyMode, all::PetscBool, emode::DMCopyLabelsMode)Copy labels from one DM mesh to another DM with a superset of the points
Collective
Input Parameters:
dmA- TheDMobject with initial labelsdmB- TheDMobject to which labels are copiedmode- Copy labels by pointers (PETSC_OWN_POINTER) or duplicate them (PETSC_COPY_VALUES)all- Copy all labels including "depth", "dim", and "celltype" (PETSC_TRUE) which are otherwise ignored (PETSC_FALSE)emode- How to behave when aDMLabelin the source and destinationDMs with the same name is encountered (seeDMCopyLabelsMode)
Level: intermediate
See also: DM, DMLabel, DMAddLabel(), DMCopyLabelsMode
External Links
- PETSc Manual:
DM/DMCopyLabels
PETSc.LibPETSc.DMCopyTransform — Method
DMCopyTransform(petsclib::PetscLibType, dm::AbstractPetscDM, newdm::AbstractPetscDM)Copy the basis transform context and callbacks from dm to newdm
Not Collective
Input Parameter:
dm- the sourceDM
Output Parameter:
newdm- the destinationDM
Level: developer
See also: DM, DMCopyDS(), DMCopyDisc()
External Links
- PETSc Manual:
DM/DMCopyTransform
PETSc.LibPETSc.DMCreate — Method
dm::PetscDM = DMCreate(petsclib::PetscLibType, comm::MPI_Comm)Creates an empty DM object. DMs are the abstract objects in PETSc that mediate between meshes and discretizations and the algebraic solvers, time integrators, and optimization algorithms in PETSc.
Collective
Input Parameter:
comm- The communicator for theDMobject
Output Parameter:
dm- TheDMobject
Level: beginner
See also: DM, DMSetType(), DMType, DMDACreate(), DMDA, DMSLICED, DMCOMPOSITE, DMPLEX, DMMOAB, DMNETWORK
External Links
- PETSc Manual:
DM/DMCreate
PETSc.LibPETSc.DMCreateColoring — Method
coloring::ISColoring = DMCreateColoring(petsclib::PetscLibType, dm::AbstractPetscDM, ctype::ISColoringType)Gets coloring of a graph associated with the DM. Often the graph represents the operator matrix associated with the discretization of a PDE on the DM.
Collective
Input Parameters:
dm- theDMobjectctype-IS_COLORING_LOCALorIS_COLORING_GLOBAL
Output Parameter:
coloring- the coloring
Level: developer
See also: DM, ISColoring, DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateMatrix(), DMCreateMassMatrix(), DMSetMatType(), MatColoring, MatFDColoringCreate()
External Links
- PETSc Manual:
DM/DMCreateColoring
PETSc.LibPETSc.DMCreateDS — Method
DMCreateDS(petsclib::PetscLibType, dm::AbstractPetscDM)Create the discrete systems for the DM based upon the fields added to the DM
Collective
Input Parameter:
dm- TheDM
Options Database Key:
-dm_petscds_view- View all thePetscDSobjects in thisDM
Level: intermediate
See also: DM, DMSetField, DMAddField(), DMGetDS(), DMGetCellDS(), DMGetRegionDS(), DMSetRegionDS()
External Links
- PETSc Manual:
DM/DMCreateDS
PETSc.LibPETSc.DMCreateDomainDecomposition — Method
n::PetscInt,namelist::Vector{String},innerislist::Vector{IS},outerislist::Vector{IS},dmlist::Vector{PetscDM} = DMCreateDomainDecomposition(petsclib::PetscLibType, dm::AbstractPetscDM)Returns lists of IS objects defining a decomposition of a problem into subproblems corresponding to restrictions to pairs of nested subdomains.
Not Collective
Input Parameter:
dm- theDMobject
Output Parameters:
n- The number of subproblems in the domain decomposition (orNULLif not requested), also the length of the four arrays belownamelist- The name for each subdomain (orNULLif not requested)innerislist- The global indices for each inner subdomain (orNULL, if not requested)outerislist- The global indices for each outer subdomain (orNULL, if not requested)dmlist- TheDMs for each subdomain subproblem (orNULL, if not requested; ifNULLis returned, noDMs are defined)
Level: intermediate
See also: DM, DMCreateFieldDecomposition(), DMDestroy(), DMCreateDomainDecompositionScatters(), DMView(), DMCreateInterpolation(), DMSubDomainHookAdd(), DMSubDomainHookRemove(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMRefine(), DMCoarsen()
External Links
- PETSc Manual:
DM/DMCreateDomainDecomposition
PETSc.LibPETSc.DMCreateDomainDecompositionScatters — Method
iscat::Vector{VecScatter},oscat::Vector{VecScatter},gscat::Vector{VecScatter} = DMCreateDomainDecompositionScatters(petsclib::PetscLibType, dm::AbstractPetscDM, n::PetscInt, subdms::Vector{<:AbstractPetscDM})Returns scatters to the subdomain vectors from the global vector for subdomains created with DMCreateDomainDecomposition()
Not Collective
Input Parameters:
dm- theDMobjectn- the number of subdomainssubdms- the local subdomains
Output Parameters:
iscat- scatter from global vector to nonoverlapping global vector entries on subdomainoscat- scatter from global vector to overlapping global vector entries on subdomaingscat- scatter from global vector to local vector on subdomain (fills in ghosts)
Level: developer
See also: DM, DMCreateDomainDecomposition(), DMDestroy(), DMView(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMCreateFieldIS()
External Links
- PETSc Manual:
DM/DMCreateDomainDecompositionScatters
PETSc.LibPETSc.DMCreateFEDefault — Method
fem::PetscFE = DMCreateFEDefault(petsclib::PetscLibType, dm::AbstractPetscDM, Nc::PetscInt, prefix::String, qorder::PetscInt)Create a PetscFE based on the celltype for the mesh
Not Collective
Input Parameters:
dm- TheDMNc- The number of components for the fieldprefix- The options prefix for the outputPetscFE, orNULLqorder- The quadrature order orPETSC_DETERMINEto usePetscSpacepolynomial degree
Output Parameter:
fem- ThePetscFE
Level: intermediate
See also: DM, PetscFECreateByCell(), DMAddField(), DMCreateDS(), DMGetCellDS(), DMGetRegionDS()
External Links
- PETSc Manual:
DM/DMCreateFEDefault
PETSc.LibPETSc.DMCreateFieldDecomposition — Method
len::PetscInt,namelist::String,islist::Vector{IS},dmlist::Vector{PetscDM} = DMCreateFieldDecomposition(petsclib::PetscLibType, dm::AbstractPetscDM)Returns a list of IS objects defining a decomposition of a problem into subproblems corresponding to different fields.
Not Collective; No Fortran Support
Input Parameter:
dm- theDMobject
Output Parameters:
len- The number of fields (orNULLif not requested)namelist- The name for each field (orNULLif not requested)islist- The global indices for each field (orNULLif not requested)dmlist- TheDMs for each field subproblem (orNULL, if not requested; ifNULLis returned, noDMs are defined)
Level: intermediate
See also: DM, DMAddField(), DMCreateFieldIS(), DMCreateSubDM(), DMCreateDomainDecomposition(), DMDestroy(), DMView(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMRefine(), DMCoarsen()
External Links
- PETSc Manual:
DM/DMCreateFieldDecomposition
PETSc.LibPETSc.DMCreateFieldIS — Method
numFields::PetscInt,fieldNames::Vector{String},fields::Vector{IS} = DMCreateFieldIS(petsclib::PetscLibType, dm::AbstractPetscDM)Creates a set of IS objects with the global indices of dofs for each field defined with DMAddField()
Not Collective; No Fortran Support
Input Parameter:
dm- theDMobject
Output Parameters:
numFields- The number of fields (orNULLif not requested)fieldNames- The name of each field (orNULLif not requested)fields- The global indices for each field (orNULLif not requested)
Level: intermediate
Note: The names come back as Julia Strings and the C arrays are freed here. Every entry of fields is owned by the caller and should be destroyed with ISDestroy() (or PETSc.destroy!).
Developer Note: It is not clear why both this function and DMCreateFieldDecomposition() exist. Having two seems redundant and confusing. This function should likely be removed.
See also:
DM, DMAddField(), DMGetField(), DMDestroy(), DMView(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateFieldDecomposition()
External Links
- PETSc Manual:
DM/DMCreateFieldIS
PETSc.LibPETSc.DMCreateGlobalVector — Method
vec::PetscVec = DMCreateGlobalVector(petsclib::PetscLibType, dm::AbstractPetscDM)Creates a global vector from a DM object. A global vector is a parallel vector that has no duplicate values shared between MPI ranks, that is it has no ghost locations.
Collective
Input Parameter:
dm- theDMobject
Output Parameter:
vec- the global vector
Level: beginner
See also: DM, Vec, DMCreateLocalVector(), DMGetGlobalVector(), DMDestroy(), DMView(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMGlobalToLocalBegin(), DMGlobalToLocalEnd()
External Links
- PETSc Manual:
DM/DMCreateGlobalVector
PETSc.LibPETSc.DMCreateGradientMatrix — Method
mat::PetscMat = DMCreateGradientMatrix(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM)Gets the gradient matrix between two DM objects, M(ic)j = \int \partialc \phii \psij where the \phi are Galerkin basis functions for a Galerkin finite element model on the DM
Collective
Input Parameters:
dmc- the targetDMobjectdmf- the sourceDMobject, can beNULL
Output Parameter:
mat- the gradient matrix
Level: developer
See also: DM, DMCreateMassMatrix(), DMCreateMassMatrixLumped(), DMCreateMatrix(), DMRefine(), DMCoarsen(), DMCreateRestriction(), DMCreateInterpolation(), DMCreateInjection()
External Links
- PETSc Manual:
DM/DMCreateGradientMatrix
PETSc.LibPETSc.DMCreateInjection — Method
mat::PetscMat = DMCreateInjection(petsclib::PetscLibType, dac::AbstractPetscDM, daf::AbstractPetscDM)Gets injection matrix between two DM objects.
Collective
Input Parameters:
dac- theDMobjectdaf- the second, finerDMobject
Output Parameter:
mat- the injection
Level: developer
See also: DM, DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMCreateInterpolation(), DMCreateRestriction(), MatRestrict(), MatInterpolate()
External Links
- PETSc Manual:
DM/DMCreateInjection
PETSc.LibPETSc.DMCreateInterpolation — Method
mat::PetscMat,vec::PetscVec = DMCreateInterpolation(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM)Gets the interpolation matrix between two DM objects. The resulting matrix map degrees of freedom in the vector obtained by DMCreateGlobalVector() on the coarse DM to similar vectors on the fine grid DM.
Collective
Input Parameters:
dmc- theDMobjectdmf- the second, finerDMobject
Output Parameters:
mat- the interpolationvec- the scaling (optional, passNULLif not needed), seeDMCreateInterpolationScale()
Level: developer
See also: DM, DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMRefine(), DMCoarsen(), DMCreateRestriction(), DMCreateInterpolationScale()
External Links
- PETSc Manual:
DM/DMCreateInterpolation
PETSc.LibPETSc.DMCreateInterpolationScale — Method
scale::PetscVec = DMCreateInterpolationScale(petsclib::PetscLibType, dac::AbstractPetscDM, daf::AbstractPetscDM, mat::AbstractPetscMat)Forms L = 1/(R*1) where 1 is the vector of all ones, and R is the transpose of the interpolation between the DM.
Input Parameters:
dac-DMthat defines a coarse meshdaf-DMthat defines a fine meshmat- the restriction (or interpolation operator) from fine to coarse
Output Parameter:
scale- the scaled vector
Level: advanced
See also: DM, MatRestrict(), MatInterpolate(), DMCreateInterpolation(), DMCreateRestriction(), DMCreateGlobalVector()
External Links
- PETSc Manual:
DM/DMCreateInterpolationScale
PETSc.LibPETSc.DMCreateLabel — Method
DMCreateLabel(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)Create a label of the given name if it does not already exist in the DM
Not Collective
Input Parameters:
dm- TheDMobjectname- The label name
Level: intermediate
See also: DM, DMLabelCreate(), DMHasLabel(), DMGetLabelValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMCreateLabel
PETSc.LibPETSc.DMCreateLabelAtIndex — Method
DMCreateLabelAtIndex(petsclib::PetscLibType, dm::AbstractPetscDM, l::PetscInt, name::String)Create a label of the given name at the given index. If it already exists in the DM, move it to this index.
Not Collective
Input Parameters:
dm- TheDMobjectl- The index for the labelname- The label name
Level: intermediate
See also: DM, DMCreateLabel(), DMLabelCreate(), DMHasLabel(), DMGetLabelValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMCreateLabelAtIndex
PETSc.LibPETSc.DMCreateLocalVector — Method
vec::PetscVec = DMCreateLocalVector(petsclib::PetscLibType, dm::AbstractPetscDM)Creates a local vector from a DM object.
Not Collective
Input Parameter:
dm- theDMobject
Output Parameter:
vec- the local vector
Level: beginner
See also: DM, Vec, DMCreateGlobalVector(), DMGetLocalVector(), DMDestroy(), DMView(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMGlobalToLocalBegin(), DMGlobalToLocalEnd()
External Links
- PETSc Manual:
DM/DMCreateLocalVector
PETSc.LibPETSc.DMCreateMassMatrix — Method
mat::PetscMat = DMCreateMassMatrix(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM)Gets the mass matrix between two DM objects, Mij = \int \phii \psi_j where the \phi are Galerkin basis functions for a a Galerkin finite element model on the DM
Collective
Input Parameters:
dmc- the targetDMobjectdmf- the sourceDMobject, can beNULL
Output Parameter:
mat- the mass matrix
Level: developer
See also: DM, DMCreateMassMatrixLumped(), DMCreateMatrix(), DMRefine(), DMCoarsen(), DMCreateRestriction(), DMCreateInterpolation(), DMCreateInjection()
External Links
- PETSc Manual:
DM/DMCreateMassMatrix
PETSc.LibPETSc.DMCreateMassMatrixLumped — Method
llm::PetscVec,lm::PetscVec = DMCreateMassMatrixLumped(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the lumped mass matrix for a given DM
Collective
Input Parameter:
dm- theDMobject
Output Parameters:
llm- the local lumped mass matrix, which is a diagonal matrix, represented as a vectorlm- the global lumped mass matrix, which is a diagonal matrix, represented as a vector
Level: developer
See also: DM, DMCreateMassMatrix(), DMCreateMatrix(), DMRefine(), DMCoarsen(), DMCreateRestriction(), DMCreateInterpolation(), DMCreateInjection()
External Links
- PETSc Manual:
DM/DMCreateMassMatrixLumped
PETSc.LibPETSc.DMCreateMatrix — Method
mat::PetscMat = DMCreateMatrix(petsclib::PetscLibType, dm::AbstractPetscDM)Creates a matrix of appropriate size and nonzero structure for a DM. The matrix is most commonly used to store the Jacobian of a discrete PDE operator.
Collective
Input Parameter:
dm- theDMobject
Output Parameter:
mat- the matrix
Options Database Key:
-dm_preallocate_only (true|false)- Only preallocate the matrix forDMCreateMatrix()andDMCreateMassMatrix(), but do not fill its nonzero structure
Level: beginner
See also: DM, DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMSetMatType(), DMCreateMassMatrix()
External Links
- PETSc Manual:
DM/DMCreateMatrix
PETSc.LibPETSc.DMCreateRestriction — Method
mat::PetscMat = DMCreateRestriction(petsclib::PetscLibType, dmc::AbstractPetscDM, dmf::AbstractPetscDM)Gets restriction matrix between two DM objects. The resulting matrix map degrees of freedom in the vector obtained by DMCreateGlobalVector() on the fine DM to similar vectors on the coarse grid DM.
Collective
Input Parameters:
dmc- theDMobjectdmf- the second, finerDMobject
Output Parameter:
mat- the restriction
Level: developer
See also: DM, DMRestrict(), DMInterpolate(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMRefine(), DMCoarsen(), DMCreateInterpolation()
External Links
- PETSc Manual:
DM/DMCreateRestriction
PETSc.LibPETSc.DMCreateSectionPermutation — Method
perm::IS,blockStarts::PetscBT = DMCreateSectionPermutation(petsclib::PetscLibType, dm::AbstractPetscDM)Create a permutation of the PetscSection chart and optionally a block structure.
Input Parameter:
dm- TheDM
Output Parameters:
perm- A permutation of the mesh points in the chartblockStarts- A high bit is set for the point that begins every block, orNULLfor default blocking
Level: developer
See also: DM, PetscSection, DMGetLocalSection(), DMGetGlobalSection()
External Links
- PETSc Manual:
DM/DMCreateSectionPermutation
PETSc.LibPETSc.DMCreateSectionSF — Method
DMCreateSectionSF(petsclib::PetscLibType, dm::AbstractPetscDM, localSection::PetscSection, globalSection::PetscSection)Create the PetscSF encoding the parallel dof overlap for the DM based upon the PetscSections describing the data layout.
Input Parameters:
dm- TheDMlocalSection-PetscSectiondescribing the local data layoutglobalSection-PetscSectiondescribing the global data layout
Level: developer
See also: DM, DMGetSectionSF(), DMSetSectionSF(), DMGetLocalSection(), DMGetGlobalSection()
External Links
- PETSc Manual:
DM/DMCreateSectionSF
PETSc.LibPETSc.DMCreateSectionSubDM — Method
is::IS,subdm::PetscDM = DMCreateSectionSubDM(petsclib::PetscLibType, dm::AbstractPetscDM, numFields::PetscInt, fields::Vector{PetscInt}, numComps::Vector{PetscInt}, comps::Vector{PetscInt})Returns an IS and subDM containing a PetscSection that encapsulates a subproblem defined by a subset of the fields in a PetscSection in the DM.
Not Collective
Input Parameters:
dm- TheDMobjectnumFields- The number of fields to incorporate intosubdmfields- The field numbers of the selected fieldsnumComps- The number of components from each field to incorporate intosubdm, or PETSC_DECIDE for all componentscomps- The component numbers of the selected fields (omitted for PTESC_DECIDE fields)
Output Parameters:
is- The global indices for the subproblem orNULLsubdm- TheDMfor the subproblem, which must already have be cloned fromdmorNULL
Level: intermediate
See also: DMCreateSubDM(), DMGetLocalSection(), DMPlexSetMigrationSF(), DMView()
External Links
- PETSc Manual:
DM/DMCreateSectionSubDM
PETSc.LibPETSc.DMCreateSectionSuperDM — Method
is::Vector{IS},superdm::PetscDM = DMCreateSectionSuperDM(petsclib::PetscLibType, dms::Vector{<:AbstractPetscDM}, len::PetscInt)Returns an arrays of IS and a DM containing a PetscSection that encapsulates a superproblem defined by the array of DM and their PetscSection
Not Collective
Input Parameters:
dms- TheDMobjects, the must all have the same topology; for example obtained withDMClone()len- The number ofDMindms
Output Parameters:
is- The global indices for the subproblem, orNULLsuperdm- TheDMfor the superproblem, which must already have be cloned and contain the same topology as thedms
Level: intermediate
See also: DMCreateSuperDM(), DMGetLocalSection(), DMPlexSetMigrationSF(), DMView()
External Links
- PETSc Manual:
DM/DMCreateSectionSuperDM
PETSc.LibPETSc.DMCreateSubDM — Method
is::IS,subdm::PetscDM = DMCreateSubDM(petsclib::PetscLibType, dm::AbstractPetscDM, numFields::PetscInt, fields::Vector{PetscInt})Returns an IS and DM encapsulating a subproblem defined by the fields passed in. The fields are defined by DMCreateFieldIS().
Not collective
Input Parameters:
dm- TheDMobjectnumFields- The number of fields to selectfields- The field numbers of the selected fields
Output Parameters:
is- The global indices for all the degrees of freedom in the new subDM, useNULLif not neededsubdm- TheDMfor the subproblem, useNULLif not needed
Level: intermediate
See also: DM, DMCreateFieldIS(), DMCreateFieldDecomposition(), DMAddField(), DMCreateSuperDM(), IS, VecISCopy(), DMPlexSetMigrationSF(), DMDestroy(), DMView(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix()
External Links
- PETSc Manual:
DM/DMCreateSubDM
PETSc.LibPETSc.DMCreateSuperDM — Method
is::Vector{IS},superdm::PetscDM = DMCreateSuperDM(petsclib::PetscLibType, dms::Vector{<:AbstractPetscDM}, n::PetscInt)Returns an arrays of IS and a single DM encapsulating a superproblem defined by multiple DMs passed in.
Not collective
Input Parameters:
dms- TheDMobjectsn- The number ofDMs
Output Parameters:
is- The global indices for each of subproblem within the superDM, orNULL, its length isnsuperdm- TheDMfor the superproblem
Level: intermediate
See also: DM, DMCreateSubDM(), DMPlexSetMigrationSF(), DMDestroy(), DMView(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMCreateFieldIS(), DMCreateDomainDecomposition()
External Links
- PETSc Manual:
DM/DMCreateSuperDM
PETSc.LibPETSc.DMDestroy — Method
DMDestroy(petsclib::PetscLibType, dm::AbstractPetscDM)Destroys a DM.
Collective
Input Parameter:
dm- theDMobject to destroy
Level: developer
See also: DM, DMCreate(), DMType, DMSetType(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix()
External Links
- PETSc Manual:
DM/DMDestroy
PETSc.LibPETSc.DMDestroyVI — Method
DMDestroyVI(petsclib::PetscLibType, dm::AbstractPetscDM)Frees the DM_SNESVI object contained in the DM and resets any function pointers the reduced-space SNESVI code composed onto it
Not Collective
Input Parameter:
dm- theDMfrom which the VI context should be removed (may beNULL)
Level: developer
See also: DM, SNESVINEWTONRSLS, SNESVISetVariableBounds(), PetscObjectCompose()
External Links
- PETSc Manual:
SNES/DMDestroyVI
PETSc.LibPETSc.DMExtrude — Method
dme::PetscDM = DMExtrude(petsclib::PetscLibType, dm::AbstractPetscDM, layers::PetscInt)Extrude a DM object from a surface
Collective
Input Parameters:
dm- theDMobjectlayers- the number of extruded cell layers
Output Parameter:
dme- the extrudedDM, orNULL
Level: developer
See also: DM, DMRefine(), DMCoarsen(), DMDestroy(), DMView(), DMCreateGlobalVector()
External Links
- PETSc Manual:
DM/DMExtrude
PETSc.LibPETSc.DMFinalizePackage — Method
DMFinalizePackage(petsclib::PetscLibType)This function finalizes everything in the DM package. It is called from PetscFinalize().
Level: developer
See also: PetscInitialize()
External Links
- PETSc Manual:
DM/DMFinalizePackage
PETSc.LibPETSc.DMFindRegionNum — Method
num::PetscInt = DMFindRegionNum(petsclib::PetscLibType, dm::AbstractPetscDM, ds::PetscDS)Find the region number for a given PetscDS, or -1 if it is not found.
Not Collective
Input Parameters:
dm- TheDMds- ThePetscDSdefined on the given region
Output Parameter:
num- The region number, in [0, Nds), or -1 if not found
Level: advanced
See also: DM, DMGetRegionNumDS(), DMGetRegionDS(), DMSetRegionDS(), DMGetDS(), DMGetCellDS()
External Links
- PETSc Manual:
DM/DMFindRegionNum
PETSc.LibPETSc.DMGenerateRegister — Method
DMGenerateRegister(petsclib::PetscLibType, sname::String, fnc::external, rfnc::external, alfnc::external, dim::PetscInt)Adds a grid generator to DM
Not Collective, No Fortran Support
Input Parameters:
sname- name of a new user-defined grid generatorfnc- generator functionrfnc- refinement functionalfnc- adapt by label functiondim- dimension of boundary of domain
See also: DM, DMGenerateRegisterAll(), DMPlexGenerate(), DMGenerateRegisterDestroy()
External Links
- PETSc Manual:
DM/DMGenerateRegister
PETSc.LibPETSc.DMGenerateRegisterAll — Method
DMGenerateRegisterAll(petsclib::PetscLibType)Registers all of the mesh generation methods in the DM package.
Not Collective
Level: advanced
See also: DM, DMGenerateRegisterDestroy()
External Links
- PETSc Manual:
DM/DMGenerateRegisterAll
PETSc.LibPETSc.DMGenerateRegisterDestroy — Method
DMGenerateRegisterDestroy(petsclib::PetscLibType)Frees the list of DM mesh generators that were registered by DMGenerateRegister() or DMGenerateRegisterAll().
Not Collective
Level: advanced
See also: DM, DMGenerateRegister(), DMGenerateRegisterAll()
External Links
- PETSc Manual:
DM/DMGenerateRegisterDestroy
PETSc.LibPETSc.DMGeomModelRegister — Method
DMGeomModelRegister(petsclib::PetscLibType, sname::String, fnc::external)Adds a geometry model to DM
Not Collective, No Fortran Support
Input Parameters:
sname- name of a new user-defined geometry modelfnc- geometry model function
See also: DM, DMGeomModelRegisterAll(), DMPlexGeomModel(), DMGeomModelRegisterDestroy()
External Links
- PETSc Manual:
DM/DMGeomModelRegister
PETSc.LibPETSc.DMGeomModelRegisterAll — Method
DMGeomModelRegisterAll(petsclib::PetscLibType)Registers all of the geometry model methods in the DM package.
Not Collective
Level: advanced
See also: DM, DMGeomModelRegisterDestroy()
External Links
- PETSc Manual:
DM/DMGeomModelRegisterAll
PETSc.LibPETSc.DMGeomModelRegisterDestroy — Method
DMGeomModelRegisterDestroy(petsclib::PetscLibType)Frees the list of DM geometry models that were registered by DMGeomModelRegister() or DMGeomModelRegisterAll().
Not Collective
Level: advanced
See also: DM, DMGeomModelRegister(), DMGeomModelRegisterAll()
External Links
- PETSc Manual:
DM/DMGeomModelRegisterDestroy
PETSc.LibPETSc.DMGetAdjacency — Method
useCone::PetscBool,useClosure::PetscBool = DMGetAdjacency(petsclib::PetscLibType, dm::AbstractPetscDM, f::PetscInt)Returns the flags for determining variable influence
Not Collective
Input Parameters:
dm- TheDMobjectf- The field number, orPETSC_DEFAULTfor the default adjacency
Output Parameters:
useCone- Flag for variable influence starting with the cone operationuseClosure- Flag for variable influence using transitive closure
Level: developer
See also: DM, DMSetAdjacency(), DMGetField(), DMSetField()
External Links
- PETSc Manual:
DM/DMGetAdjacency
PETSc.LibPETSc.DMGetApplicationContext — Method
ctx::Ptr{Cvoid} = DMGetApplicationContext(petsclib::PetscLibType, dm::AbstractPetscDM)Gets an application context from a DM object provided with DMSetApplicationContext()
Not Collective
Input Parameter:
dm- theDMobject
Output Parameter:
ctx- a pointer to the application context
Level: intermediate
See also: DM, DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix()
External Links
- PETSc Manual:
DM/DMGetApplicationContext
PETSc.LibPETSc.DMGetAuxiliaryLabels — Method
DMGetAuxiliaryLabels(petsclib::PetscLibType, dm::AbstractPetscDM, labels::Vector{DMLabel}, values::Vector{PetscInt}, parts::Vector{PetscInt})Get the labels, values, and parts for all auxiliary vectors in this DM
Not Collective
Input Parameter:
dm- TheDM
Output Parameters:
labels- TheDMLabels for eachVecvalues- The label values for eachVecparts- The equation parts for eachVec
Level: advanced
See also: DM, DMClearAuxiliaryVec(), DMGetNumAuxiliaryVec(), DMGetAuxiliaryVec(), DMSetAuxiliaryVec(), DMCopyAuxiliaryVec()
External Links
- PETSc Manual:
DM/DMGetAuxiliaryLabels
PETSc.LibPETSc.DMGetAuxiliaryVec — Method
aux::PetscVec = DMGetAuxiliaryVec(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel, value::PetscInt, part::PetscInt)Get the auxiliary vector for region specified by the given label and value, and equation part
Not Collective
Input Parameters:
dm- TheDMlabel- TheDMLabelvalue- The label value indicating the regionpart- The equation part, or 0 if unused
Output Parameter:
aux- TheVecholding auxiliary field data
Level: advanced
See also: DM, DMClearAuxiliaryVec(), DMSetAuxiliaryVec(), DMGetNumAuxiliaryVec(), DMGetAuxiliaryLabels()
External Links
- PETSc Manual:
DM/DMGetAuxiliaryVec
PETSc.LibPETSc.DMGetBasicAdjacency — Method
useCone::PetscBool,useClosure::PetscBool = DMGetBasicAdjacency(petsclib::PetscLibType, dm::AbstractPetscDM)Returns the flags for determining variable influence, using either the default or field 0 if it is defined
Not collective
Input Parameter:
dm- TheDMobject
Output Parameters:
useCone- Flag for variable influence starting with the cone operationuseClosure- Flag for variable influence using transitive closure
Level: developer
See also: DM, DMSetBasicAdjacency(), DMGetField(), DMSetField()
External Links
- PETSc Manual:
DM/DMGetBasicAdjacency
PETSc.LibPETSc.DMGetBlockSize — Method
bs::PetscInt = DMGetBlockSize(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the inherent block size associated with a DM
Not Collective
Input Parameter:
dm- theDMwith block structure
Output Parameter:
bs- the block size, 1 implies no exploitable block structure
Level: intermediate
See also: DM, ISCreateBlock(), VecSetBlockSize(), MatSetBlockSize(), DMGetLocalToGlobalMapping()
External Links
- PETSc Manual:
DM/DMGetBlockSize
PETSc.LibPETSc.DMGetBlockingType — Method
btype::DMBlockingType = DMGetBlockingType(petsclib::PetscLibType, dm::AbstractPetscDM)get the blocking granularity to be used for variable block size DMCreateMatrix() is called
Not Collective
Input Parameter:
dm- theDM
Output Parameter:
btype- block by topological point or field node
Level: advanced
See also: DM, DMCreateMatrix(), MatSetVariableBlockSizes()
External Links
- PETSc Manual:
DM/DMGetBlockingType
PETSc.LibPETSc.DMGetBoundingBox — Method
DMGetBoundingBox(petsclib::PetscLibType, dm::AbstractPetscDM, gmin::Vector{PetscReal}, gmax::Vector{PetscReal})Returns the global bounding box for the DM.
Collective
Input Parameter:
dm- theDM
Output Parameters:
gmin- global minimum coordinates (length coord dim, optional)gmax- global maximum coordinates (length coord dim, optional)
Level: beginner
See also: DM, DMGetLocalBoundingBox(), DMGetCoordinates(), DMGetCoordinatesLocal()
External Links
- PETSc Manual:
DM/DMGetBoundingBox
PETSc.LibPETSc.DMGetCellCoordinateDM — Method
cdm::PetscDM = DMGetCellCoordinateDM(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the DM that prescribes cellwise coordinate layout and scatters between global and local cellwise coordinates
Collective
Input Parameter:
dm- theDM
Output Parameter:
cdm- cellwise coordinateDM, orNULLif they are not defined
Level: intermediate
See also: DM, DMSetCellCoordinateDM(), DMSetCellCoordinates(), DMSetCellCoordinatesLocal(), DMGetCellCoordinates(), DMGetCellCoordinatesLocal(), DMLocalizeCoordinates(), DMSetCoordinateDM(), DMGetCoordinateDM()
External Links
- PETSc Manual:
DM/DMGetCellCoordinateDM
PETSc.LibPETSc.DMGetCellCoordinateSection — Method
section::PetscSection = DMGetCellCoordinateSection(petsclib::PetscLibType, dm::AbstractPetscDM)Retrieve the PetscSection of cellwise coordinate values over the mesh.
Collective
Input Parameter:
dm- TheDMobject
Output Parameter:
section- ThePetscSectionobject, orNULLif no cellwise coordinates are defined
Level: intermediate
See also: DM, DMGetCoordinateSection(), DMSetCellCoordinateSection(), DMGetCellCoordinateDM(), DMGetCoordinateDM(), DMGetLocalSection(), DMSetLocalSection()
External Links
- PETSc Manual:
DM/DMGetCellCoordinateSection
PETSc.LibPETSc.DMGetCellCoordinates — Method
c::PetscVec = DMGetCellCoordinates(petsclib::PetscLibType, dm::AbstractPetscDM)Gets a global vector with the cellwise coordinates associated with the DM.
Collective
Input Parameter:
dm- theDM
Output Parameter:
c- global coordinate vector
Level: intermediate
See also: DM, DMGetCoordinates(), DMSetCellCoordinates(), DMGetCellCoordinatesLocal(), DMGetCellCoordinateDM()
External Links
- PETSc Manual:
DM/DMGetCellCoordinates
PETSc.LibPETSc.DMGetCellCoordinatesLocal — Method
c::PetscVec = DMGetCellCoordinatesLocal(petsclib::PetscLibType, dm::AbstractPetscDM)Gets a local vector with the cellwise coordinates associated with the DM.
Collective
Input Parameter:
dm- theDM
Output Parameter:
c- coordinate vector
Level: intermediate
See also: DM, DMSetCellCoordinatesLocal(), DMGetCellCoordinates(), DMSetCellCoordinates(), DMGetCellCoordinateDM(), DMGetCellCoordinatesLocalNoncollective()
External Links
- PETSc Manual:
DM/DMGetCellCoordinatesLocal
PETSc.LibPETSc.DMGetCellCoordinatesLocalNoncollective — Method
c::PetscVec = DMGetCellCoordinatesLocalNoncollective(petsclib::PetscLibType, dm::AbstractPetscDM)Non-collective version of DMGetCellCoordinatesLocal(). Fails if global cellwise coordinates have been set and DMGetCellCoordinatesLocalSetUp() not called.
Not Collective
Input Parameter:
dm- theDM
Output Parameter:
c- cellwise coordinate vector
Level: advanced
See also: DM, DMGetCellCoordinatesLocalSetUp(), DMGetCellCoordinatesLocal(), DMSetCellCoordinatesLocal(), DMGetCellCoordinates(), DMSetCellCoordinates(), DMGetCellCoordinateDM()
External Links
- PETSc Manual:
DM/DMGetCellCoordinatesLocalNoncollective
PETSc.LibPETSc.DMGetCellCoordinatesLocalSetUp — Method
DMGetCellCoordinatesLocalSetUp(petsclib::PetscLibType, dm::AbstractPetscDM)Prepares a local vector of cellwise coordinates, so that DMGetCellCoordinatesLocalNoncollective() can be used as non-collective afterwards.
Collective
Input Parameter:
dm- theDM
Level: advanced
See also: DM, DMGetCellCoordinatesLocalNoncollective()
External Links
- PETSc Manual:
DM/DMGetCellCoordinatesLocalSetUp
PETSc.LibPETSc.DMGetCellDS — Method
ds::PetscDS,dsIn::PetscDS = DMGetCellDS(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt)Get the PetscDS defined on a given cell
Not Collective
Input Parameters:
dm- TheDMpoint- Cell for thePetscDS
Output Parameters:
ds- ThePetscDSdefined on the given celldsIn- ThePetscDSfor input on the given cell, orNULLif the same ds
Level: developer
See also: DM, DMGetDS(), DMSetRegionDS()
External Links
- PETSc Manual:
DM/DMGetCellDS
PETSc.LibPETSc.DMGetCoarseDM — Method
cdm::PetscDM = DMGetCoarseDM(petsclib::PetscLibType, dm::AbstractPetscDM)Get the coarse DMfrom which this DM was obtained by refinement
Not Collective
Input Parameter:
dm- TheDMobject
Output Parameter:
cdm- The coarseDM
Level: intermediate
See also: DM, DMSetCoarseDM(), DMCoarsen()
External Links
- PETSc Manual:
DM/DMGetCoarseDM
PETSc.LibPETSc.DMGetCoarsenLevel — Method
level::PetscInt = DMGetCoarsenLevel(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the number of coarsenings that have generated this DM.
Not Collective
Input Parameter:
dm- theDMobject
Output Parameter:
level- number of coarsenings
Level: developer
See also: DM, DMCoarsen(), DMSetCoarsenLevel(), DMGetRefineLevel(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation()
External Links
- PETSc Manual:
DM/DMGetCoarsenLevel
PETSc.LibPETSc.DMGetCompatibility — Method
compatible::PetscBool,set::PetscBool = DMGetCompatibility(petsclib::PetscLibType, dm1::AbstractPetscDM, dm2::AbstractPetscDM)determine if two DMs are compatible
Collective
Input Parameters:
dm1- the firstDMdm2- the secondDM
Output Parameters:
compatible- whether or not the twoDMs are compatibleset- whether or not the compatible value was actually determined and set
Level: advanced
See also: DM, DMDACreateCompatibleDMDA(), DMStagCreateCompatibleDMStag()
External Links
- PETSc Manual:
DM/DMGetCompatibility
PETSc.LibPETSc.DMGetCoordinateDM — Method
cdm::PetscDM = DMGetCoordinateDM(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the DM that prescribes coordinate layout and scatters between global and local coordinates
Collective
Input Parameter:
dm- theDM
Output Parameter:
cdm- coordinateDM
Level: intermediate
See also: DM, DMSetCoordinateDM(), DMSetCoordinates(), DMSetCoordinatesLocal(), DMGetCoordinates(), DMGetCoordinatesLocal(), DMGSetCellCoordinateDM()
External Links
- PETSc Manual:
DM/DMGetCoordinateDM
PETSc.LibPETSc.DMGetCoordinateDim — Method
dim::PetscInt = DMGetCoordinateDim(petsclib::PetscLibType, dm::AbstractPetscDM)Retrieve the dimension of the embedding space for coordinate values. For example a mesh on the surface of a sphere would have a 3 dimensional embedding space
Not Collective
Input Parameter:
dm- TheDMobject
Output Parameter:
dim- The embedding dimension
Level: intermediate
See also: DM, DMSetCoordinateDim(), DMGetCoordinateSection(), DMGetCoordinateDM(), DMGetLocalSection(), DMSetLocalSection()
External Links
- PETSc Manual:
DM/DMGetCoordinateDim
PETSc.LibPETSc.DMGetCoordinateField — Method
field::DMField = DMGetCoordinateField(petsclib::PetscLibType, dm::AbstractPetscDM)Get the DMField representation of the mesh coordinates
Not Collective
Input Parameter:
dm- theDM
Output Parameter:
field- theDMFielddescribing the coordinates
Level: advanced
See also: DM, DMField, DMSetCoordinateField(), DMGetCoordinateDM(), DMGetCoordinates()
External Links
- PETSc Manual:
DM/DMGetCoordinateField
PETSc.LibPETSc.DMGetCoordinateSection — Method
section::PetscSection = DMGetCoordinateSection(petsclib::PetscLibType, dm::AbstractPetscDM)Retrieve the PetscSection of coordinate values over the mesh.
Collective
Input Parameter:
dm- TheDMobject
Output Parameter:
section- ThePetscSectionobject
Level: intermediate
See also: DM, DMGetCoordinateDM(), DMGetLocalSection(), DMSetLocalSection()
External Links
- PETSc Manual:
DM/DMGetCoordinateSection
PETSc.LibPETSc.DMGetCoordinates — Method
c::PetscVec = DMGetCoordinates(petsclib::PetscLibType, dm::AbstractPetscDM)Gets a global vector with the coordinates associated with the DM.
Collective if the global vector with coordinates has not been set yet but the local vector with coordinates has been set
Input Parameter:
dm- theDM
Output Parameter:
c- global coordinate vector
Level: intermediate
See also: DM, DMDA, DMSetCoordinates(), DMGetCoordinatesLocal(), DMGetCoordinateDM(), DMDASetUniformCoordinates()
External Links
- PETSc Manual:
DM/DMGetCoordinates
PETSc.LibPETSc.DMGetCoordinatesLocal — Method
c::PetscVec = DMGetCoordinatesLocal(petsclib::PetscLibType, dm::AbstractPetscDM)Gets a local vector with the coordinates associated with the DM.
Collective the first time it is called
Input Parameter:
dm- theDM
Output Parameter:
c- coordinate vector
Level: intermediate
See also: DM, DMSetCoordinatesLocal(), DMGetCoordinates(), DMSetCoordinates(), DMGetCoordinateDM(), DMGetCoordinatesLocalNoncollective()
External Links
- PETSc Manual:
DM/DMGetCoordinatesLocal
PETSc.LibPETSc.DMGetCoordinatesLocalNoncollective — Method
c::PetscVec = DMGetCoordinatesLocalNoncollective(petsclib::PetscLibType, dm::AbstractPetscDM)Non-collective version of DMGetCoordinatesLocal(). Fails if global coordinates have been set and DMGetCoordinatesLocalSetUp() not called.
Not Collective
Input Parameter:
dm- theDM
Output Parameter:
c- coordinate vector
Level: advanced
See also: DM, DMGetCoordinatesLocalSetUp(), DMGetCoordinatesLocal(), DMSetCoordinatesLocal(), DMGetCoordinates(), DMSetCoordinates(), DMGetCoordinateDM()
External Links
- PETSc Manual:
DM/DMGetCoordinatesLocalNoncollective
PETSc.LibPETSc.DMGetCoordinatesLocalSetUp — Method
DMGetCoordinatesLocalSetUp(petsclib::PetscLibType, dm::AbstractPetscDM)Prepares a local vector of coordinates, so that DMGetCoordinatesLocalNoncollective() can be used as non-collective afterwards.
Collective
Input Parameter:
dm- theDM
Level: advanced
See also: DM, DMSetCoordinates(), DMGetCoordinatesLocalNoncollective()
External Links
- PETSc Manual:
DM/DMGetCoordinatesLocalSetUp
PETSc.LibPETSc.DMGetCoordinatesLocalTuple — Method
pCoordSection::PetscSection,pCoord::PetscVec = DMGetCoordinatesLocalTuple(petsclib::PetscLibType, dm::AbstractPetscDM, p::AbstractIS)Gets a local vector with the coordinates of specified points and the section describing its layout.
Not Collective
Input Parameters:
dm- theDMp- theISof points whose coordinates will be returned
Output Parameters:
pCoordSection- thePetscSectiondescribing the layout of pCoord, i.e. each point corresponds to one point inp, and DOFs correspond to coordinatespCoord- theVecwith coordinates of points inp
Level: advanced
See also: DM, DMDA, DMSetCoordinatesLocal(), DMGetCoordinatesLocal(), DMGetCoordinatesLocalNoncollective(), DMGetCoordinatesLocalSetUp(), DMGetCoordinates(), DMSetCoordinates(), DMGetCoordinateDM()
External Links
- PETSc Manual:
DM/DMGetCoordinatesLocalTuple
PETSc.LibPETSc.DMGetCoordinatesLocalized — Method
areLocalized::PetscBool = DMGetCoordinatesLocalized(petsclib::PetscLibType, dm::AbstractPetscDM)Check if the DM coordinates have been localized for cells
Collective
Input Parameter:
dm- TheDM
Output Parameter:
areLocalized-PETSC_TRUEif localized
Level: developer
See also: DM, DMLocalizeCoordinates(), DMSetPeriodicity(), DMGetCoordinatesLocalizedLocal()
External Links
- PETSc Manual:
DM/DMGetCoordinatesLocalized
PETSc.LibPETSc.DMGetCoordinatesLocalizedLocal — Method
areLocalized::PetscBool = DMGetCoordinatesLocalizedLocal(petsclib::PetscLibType, dm::AbstractPetscDM)Check if the DM coordinates have been localized for cells on this process
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
areLocalized-PETSC_TRUEif localized
Level: developer
See also: DM, DMLocalizeCoordinates(), DMGetCoordinatesLocalized(), DMSetPeriodicity()
External Links
- PETSc Manual:
DM/DMGetCoordinatesLocalizedLocal
PETSc.LibPETSc.DMGetDS — Method
ds::PetscDS = DMGetDS(petsclib::PetscLibType, dm::AbstractPetscDM)Get the default PetscDS
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
ds- The defaultPetscDS
Level: intermediate
See also: DM, DMGetCellDS(), DMGetRegionDS()
External Links
- PETSc Manual:
DM/DMGetDS
PETSc.LibPETSc.DMGetDefaultConstraints — Method
section::PetscSection,mat::PetscMat,bias::PetscVec = DMGetDefaultConstraints(petsclib::PetscLibType, dm::AbstractPetscDM)Get the PetscSection and Mat that specify the local constraint interpolation. See DMSetDefaultConstraints() for a description of the purpose of constraint interpolation.
not Collective
Input Parameter:
dm- TheDM
Output Parameters:
section- ThePetscSectiondescribing the range of the constraint matrix: relates rows of the constraint matrix to dofs of the default section. ReturnsNULLif there are no local constraints.mat- TheMatthat interpolates local constraints: its width should be the layout size of the default section. ReturnsNULLif there are no local constraints.bias- Vector containing bias to be added to constrained dofs
Level: advanced
See also: DM, DMSetDefaultConstraints()
External Links
- PETSc Manual:
DM/DMGetDefaultConstraints
PETSc.LibPETSc.DMGetDimPoints — Method
pStart::PetscInt,pEnd::PetscInt = DMGetDimPoints(petsclib::PetscLibType, dm::AbstractPetscDM, dim::PetscInt)Get the half-open interval for all points of a given dimension
Collective
Input Parameters:
dm- theDMdim- the dimension
Output Parameters:
pStart- The first point of the given dimensionpEnd- The first point following points of the given dimension
Level: intermediate
See also: DM, DMPLEX, DMPlexGetDepthStratum(), DMPlexGetHeightStratum()
External Links
- PETSc Manual:
DM/DMGetDimPoints
PETSc.LibPETSc.DMGetDimension — Method
dim::PetscInt = DMGetDimension(petsclib::PetscLibType, dm::AbstractPetscDM)Return the topological dimension of the DM
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
dim- The topological dimension
Level: beginner
See also: DM, DMSetDimension(), DMCreate()
External Links
- PETSc Manual:
DM/DMGetDimension
PETSc.LibPETSc.DMGetEnclosurePoint — Method
pA::PetscInt = DMGetEnclosurePoint(petsclib::PetscLibType, dmA::AbstractPetscDM, dmB::AbstractPetscDM, etype::DMEnclosureType, pB::PetscInt)Get the point pA in dmA which corresponds to the point pB in dmB
Input Parameters:
dmA- The firstDMdmB- The secondDMetype- The type of enclosure relation thatdmAhas todmBpB- A point ofdmB
Output Parameter:
pA- The corresponding point ofdmA
Level: intermediate
See also: DM, DMPLEX, DMGetEnclosureRelation()
External Links
- PETSc Manual:
DMPlex/DMGetEnclosurePoint
PETSc.LibPETSc.DMGetEnclosureRelation — Method
rel::DMEnclosureType = DMGetEnclosureRelation(petsclib::PetscLibType, dmA::AbstractPetscDM, dmB::AbstractPetscDM)Get the relationship between dmA and dmB
Input Parameters:
dmA- The firstDMdmB- The secondDM
Output Parameter:
rel- The relation ofdmAtodmB
Level: intermediate
See also: DM, DMPLEX, DMGetEnclosurePoint()
External Links
- PETSc Manual:
DMPlex/DMGetEnclosureRelation
PETSc.LibPETSc.DMGetField — Method
label::DMLabel,disc::PetscObject = DMGetField(petsclib::PetscLibType, dm::AbstractPetscDM, f::PetscInt)Return the DMLabel and discretization object for a given DM field
Not Collective
Input Parameters:
dm- TheDMf- The field number
Output Parameters:
label- The label indicating the support of the field, orNULLfor the entire mesh (pass inNULLif not needed)disc- The discretization object (pass inNULLif not needed)
Level: intermediate
See also: DM, DMAddField(), DMSetField()
External Links
- PETSc Manual:
DM/DMGetField
PETSc.LibPETSc.DMGetFieldAvoidTensor — Method
avoidTensor::PetscBool = DMGetFieldAvoidTensor(petsclib::PetscLibType, dm::AbstractPetscDM, f::PetscInt)Get flag to avoid defining the field on tensor cells
Not Collective
Input Parameters:
dm- TheDMf- The field index
Output Parameter:
avoidTensor- The flag to avoid defining the field on tensor cells
Level: intermediate
See also: DM, DMAddField(), DMSetField(), DMGetField(), DMSetFieldAvoidTensor()
External Links
- PETSc Manual:
DM/DMGetFieldAvoidTensor
PETSc.LibPETSc.DMGetFineDM — Method
fdm::PetscDM = DMGetFineDM(petsclib::PetscLibType, dm::AbstractPetscDM)Get the fine mesh from which this DM was obtained by coarsening
Input Parameter:
dm- TheDMobject
Output Parameter:
fdm- The fineDM
Level: intermediate
See also: DM, DMSetFineDM(), DMCoarsen(), DMRefine()
External Links
- PETSc Manual:
DM/DMGetFineDM
PETSc.LibPETSc.DMGetFirstLabeledPoint — Method
point::PetscInt,ds::PetscDS = DMGetFirstLabeledPoint(petsclib::PetscLibType, dm::AbstractPetscDM, odm::AbstractPetscDM, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, height::PetscInt)Find first labeled point in odm such that the corresponding point in dm has the specified height. Return point and the corresponding ds.
Input Parameters:
dm- theDModm- the enclosingDMlabel- label forDMdomain, orNULLfor whole domainnumIds- the number ofidsids- An array of the label ids in sequence for the domainheight- Height of target cells inDMPLEXtopology
Output Parameters:
point- the first labeled pointds- thePetscDScorresponding to the first labeled point
Level: developer
See also: DM, DMPLEX, DMPlexSetActivePoint(), DMLabel, PetscDS
External Links
- PETSc Manual:
DMPlex/DMGetFirstLabeledPoint
PETSc.LibPETSc.DMGetGlobalSection — Method
section::PetscSection = DMGetGlobalSection(petsclib::PetscLibType, dm::AbstractPetscDM)Get the PetscSection encoding the global data layout for the DM.
Collective
Input Parameter:
dm- TheDM
Output Parameter:
section- ThePetscSection
Level: intermediate
See also: DM, DMSetLocalSection(), DMGetLocalSection()
External Links
- PETSc Manual:
DM/DMGetGlobalSection
PETSc.LibPETSc.DMGetGlobalVector — Method
g::PetscVec = DMGetGlobalVector(petsclib::PetscLibType, dm::AbstractPetscDM)Gets a PETSc vector that may be used with the DM global routines.
Collective
Input Parameter:
dm- theDM
Output Parameter:
g- the global vector
Level: beginner
See also: DM, DMCreateGlobalVector(), VecDuplicate(), VecDuplicateVecs(), DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMGlobalToLocalBegin(), DMGlobalToLocalEnd(), DMLocalToGlobalBegin(), DMCreateLocalVector(), DMRestoreLocalVector(), VecStrideMax(), VecStrideMin(), VecStrideNorm(), DMClearGlobalVectors(), DMGetNamedGlobalVector(), DMGetNamedLocalVector()
External Links
- PETSc Manual:
DM/DMGetGlobalVector
PETSc.LibPETSc.DMGetISColoringType — Method
ctype::ISColoringType = DMGetISColoringType(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the type of coloring, IS_COLORING_GLOBAL or IS_COLORING_LOCAL that is created by the DM
Logically Collective
Input Parameter:
dm- theDMcontext
Output Parameter:
ctype- the matrix type
Level: intermediate
See also: DM, DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMCreateMatrix(), DMCreateMassMatrix(), DMSetMatrixPreallocateOnly(), MatType, DMGetMatType(), ISColoringType, IS_COLORING_GLOBAL, IS_COLORING_LOCAL
External Links
- PETSc Manual:
DM/DMGetISColoringType
PETSc.LibPETSc.DMGetLabel — Method
label::DMLabel = DMGetLabel(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)Return the label of a given name, or NULL, from a DM
Not Collective
Input Parameters:
dm- TheDMobjectname- The label name
Output Parameter:
label- TheDMLabel, orNULLif the label is absent
Default labels in a DMPLEX:
"depth"- Holds the depth (co-dimension) of each mesh point"celltype"- Holds the topological type of each cell"ghost"- If the DM is distributed with overlap, this marks the cells and faces in the overlap"Cell Sets"- Mirrors the cell sets defined by GMsh and ExodusII"Face Sets"- Mirrors the face sets defined by GMsh and ExodusII"Vertex Sets"- Mirrors the vertex sets defined by GMsh
Level: intermediate
See also: DM, DMLabel, DMHasLabel(), DMGetLabelByNum(), DMAddLabel(), DMCreateLabel(), DMPlexGetDepthLabel(), DMPlexGetCellType()
External Links
- PETSc Manual:
DM/DMGetLabel
PETSc.LibPETSc.DMGetLabelByNum — Method
label::DMLabel = DMGetLabelByNum(petsclib::PetscLibType, dm::AbstractPetscDM, n::PetscInt)Return the nth label on a DM
Not Collective
Input Parameters:
dm- TheDMobjectn- the label number
Output Parameter:
label- the label
Level: intermediate
See also: DM, DMLabel, DMAddLabel(), DMGetLabelValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMGetLabelByNum
PETSc.LibPETSc.DMGetLabelIdIS — Method
ids::IS = DMGetLabelIdIS(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)Get the DMLabelGetValueIS() from a DMLabel in the DM
Not Collective
Input Parameters:
dm- TheDMobjectname- The label name
Output Parameter:
ids- The integer ids, orNULLif the label does not exist
Level: beginner
See also: DM, DMLabelGetValueIS(), DMGetLabelSize()
External Links
- PETSc Manual:
DM/DMGetLabelIdIS
PETSc.LibPETSc.DMGetLabelName — Method
name::String = DMGetLabelName(petsclib::PetscLibType, dm::AbstractPetscDM, n::PetscInt)Return the name of nth label
Not Collective
Input Parameters:
dm- TheDMobjectn- the label number
Output Parameter:
name- the label name
Level: intermediate
See also: DM, DMLabel, DMGetLabelByNum(), DMGetLabel(), DMGetLabelValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMGetLabelName
PETSc.LibPETSc.DMGetLabelOutput — Method
output::PetscBool = DMGetLabelOutput(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)Get the output flag for a given label
Not Collective
Input Parameters:
dm- TheDMobjectname- The label name
Output Parameter:
output- The flag for output
Level: developer
See also: DM, DMLabel, DMSetLabelOutput(), DMCreateLabel(), DMHasLabel(), DMGetLabelValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMGetLabelOutput
PETSc.LibPETSc.DMGetLabelSize — Method
size::PetscInt = DMGetLabelSize(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)Get the value of DMLabelGetNumValues() of a DMLabel in the DM
Not Collective
Input Parameters:
dm- TheDMobjectname- The label name
Output Parameter:
size- The number of different integer ids, or 0 if the label does not exist
Level: beginner
See also: DM, DMLabelGetNumValues(), DMSetLabelValue(), DMGetLabel()
External Links
- PETSc Manual:
DM/DMGetLabelSize
PETSc.LibPETSc.DMGetLabelValue — Method
value::PetscInt = DMGetLabelValue(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, point::PetscInt)Get the value in a DMLabel for the given point, with -1 as the default
Not Collective
Input Parameters:
dm- TheDMobjectname- The label namepoint- The mesh point
Output Parameter:
value- The label value for this point, or -1 if the point is not in the label
Level: beginner
See also: DM, DMLabelGetValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMGetLabelValue
PETSc.LibPETSc.DMGetLocalBoundingBox — Method
DMGetLocalBoundingBox(petsclib::PetscLibType, dm::AbstractPetscDM, lmin::Vector{PetscReal}, lmax::Vector{PetscReal})Returns the bounding box for the piece of the DM on this process.
Not Collective
Input Parameter:
dm- theDM
Output Parameters:
lmin- local minimum coordinates (length coord dim, optional)lmax- local maximum coordinates (length coord dim, optional)
Level: beginner
See also: DM, DMGetCoordinates(), DMGetCoordinatesLocal(), DMGetBoundingBox()
External Links
- PETSc Manual:
DM/DMGetLocalBoundingBox
PETSc.LibPETSc.DMGetLocalSection — Method
section::PetscSection = DMGetLocalSection(petsclib::PetscLibType, dm::AbstractPetscDM)Get the PetscSection encoding the local data layout for the DM.
Input Parameter:
dm- TheDM
Output Parameter:
section- ThePetscSection
Options Database Key:
-dm_petscsection_view- View the section created by theDM
Level: intermediate
See also: DM, DMSetLocalSection(), DMGetGlobalSection()
External Links
- PETSc Manual:
DM/DMGetLocalSection
PETSc.LibPETSc.DMGetLocalToGlobalMapping — Method
ltog::ISLocalToGlobalMapping = DMGetLocalToGlobalMapping(petsclib::PetscLibType, dm::AbstractPetscDM)Accesses the local-to-global mapping in a DM.
Collective
Input Parameter:
dm- theDMthat provides the mapping
Output Parameter:
ltog- the mapping
Level: advanced
See also: DM, DMCreateLocalVector(), DMCreateGlobalVector(), VecSetLocalToGlobalMapping(), MatSetLocalToGlobalMapping(), DMCreateMatrix()
External Links
- PETSc Manual:
DM/DMGetLocalToGlobalMapping
PETSc.LibPETSc.DMGetLocalVector — Method
g::PetscVec = DMGetLocalVector(petsclib::PetscLibType, dm::AbstractPetscDM)Gets a PETSc vector that may be used with the DM local routines. This vector has spaces for the ghost values.
Not Collective
Input Parameter:
dm- theDM
Output Parameter:
g- the local vector
Level: beginner
See also: DM, DMCreateGlobalVector(), VecDuplicate(), VecDuplicateVecs(), DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMGlobalToLocalBegin(), DMGlobalToLocalEnd(), DMLocalToGlobalBegin(), DMCreateLocalVector(), DMRestoreLocalVector(), VecStrideMax(), VecStrideMin(), VecStrideNorm(), DMClearLocalVectors(), DMGetNamedGlobalVector(), DMGetNamedLocalVector()
External Links
- PETSc Manual:
DM/DMGetLocalVector
PETSc.LibPETSc.DMGetMatType — Method
ctype::String = DMGetMatType(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the type of matrix that would be created with DMCreateMatrix()
Logically Collective
Input Parameter:
dm- theDMcontext
Output Parameter:
ctype- the matrix type
Level: intermediate
See also: DM, DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMCreateMatrix(), DMCreateMassMatrix(), DMSetMatrixPreallocateOnly(), MatType, DMSetMatType()
External Links
- PETSc Manual:
DM/DMGetMatType
PETSc.LibPETSc.DMGetNamedGlobalVector — Method
X::PetscVec = DMGetNamedGlobalVector(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)get access to a named, persistent global vector
Collective
Input Parameters:
dm-DMto hold named vectorsname- unique name forX
Output Parameter:
X- namedVec
Level: developer
See also: DM, DMRestoreNamedGlobalVector(), DMHasNamedGlobalVector(), DMClearNamedGlobalVectors(), DMGetGlobalVector(), DMGetLocalVector()
External Links
- PETSc Manual:
DM/DMGetNamedGlobalVector
PETSc.LibPETSc.DMGetNamedLocalVector — Method
X::PetscVec = DMGetNamedLocalVector(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)get access to a named, persistent local vector
Not Collective
Input Parameters:
dm-DMto hold named vectorsname- unique name forX
Output Parameter:
X- namedVec
Level: developer
See also: DM, DMGetNamedGlobalVector(), DMRestoreNamedLocalVector(), DMHasNamedLocalVector(), DMClearNamedLocalVectors(), DMGetGlobalVector(), DMGetLocalVector()
External Links
- PETSc Manual:
DM/DMGetNamedLocalVector
PETSc.LibPETSc.DMGetNaturalSF — Method
sf::PetscSF = DMGetNaturalSF(petsclib::PetscLibType, dm::AbstractPetscDM)Get the PetscSF encoding the map back to the original mesh ordering
Input Parameter:
dm- TheDM
Output Parameter:
sf- ThePetscSF
Level: intermediate
See also: DM, DMSetNaturalSF(), DMSetUseNatural(), DMGetUseNatural(), DMPlexCreateGlobalToNaturalSF(), DMPlexDistribute()
External Links
- PETSc Manual:
DM/DMGetNaturalSF
PETSc.LibPETSc.DMGetNearNullSpaceConstructor — Method
DMGetNearNullSpaceConstructor(petsclib::PetscLibType, dm::AbstractPetscDM, field::PetscInt, noname::Ptr{Cvoid})Return the callback function which constructs the near-nullspace for a given field, defined with DMAddField()
Not Collective; No Fortran Support
Input Parameters:
dm- TheDMfield- The field number for the nullspace
Output Parameter:
nullsp- A callback to create the near-nullspace
Calling sequence of nullsp:
dm- The presentDMorigField- The field number given above, in the originalDMfield- The field number in dmnullSpace- The nullspace for the given field
Level: intermediate
See also: DM, DMAddField(), DMGetField(), DMSetNearNullSpaceConstructor(), DMSetNullSpaceConstructor(), DMGetNullSpaceConstructor(), DMCreateSubDM(), MatNullSpace, DMCreateSuperDM()
External Links
- PETSc Manual:
DM/DMGetNearNullSpaceConstructor
PETSc.LibPETSc.DMGetNeighbors — Method
nranks::PetscInt,ranks::Vector{PetscMPIInt} = DMGetNeighbors(petsclib::PetscLibType, dm::AbstractPetscDM)Gets an array containing the MPI ranks of all the processes neighbors
Not Collective
Input Parameter:
dm- TheDM
Output Parameters:
nranks- the number of neighboursranks- the neighbors ranks
Level: beginner
See also: DM, DMDAGetNeighbors(), PetscSFGetRootRanks()
External Links
- PETSc Manual:
DM/DMGetNeighbors
PETSc.LibPETSc.DMGetNullSpaceConstructor — Method
DMGetNullSpaceConstructor(petsclib::PetscLibType, dm::AbstractPetscDM, field::PetscInt, noname::Ptr{Cvoid})Return the callback function which constructs the nullspace for a given field, defined with DMAddField()
Not Collective; No Fortran Support
Input Parameters:
dm- TheDMfield- The field number for the nullspace
Output Parameter:
nullsp- A callback to create the nullspace
Calling sequence of nullsp:
dm- The present DMorigField- The field number given above, in the original DMfield- The field number in dmnullSpace- The nullspace for the given field
Level: intermediate
See also: DM, DMAddField(), DMGetField(), DMSetNullSpaceConstructor(), DMSetNearNullSpaceConstructor(), DMGetNearNullSpaceConstructor(), DMCreateSubDM(), DMCreateSuperDM()
External Links
- PETSc Manual:
DM/DMGetNullSpaceConstructor
PETSc.LibPETSc.DMGetNumAuxiliaryVec — Method
numAux::PetscInt = DMGetNumAuxiliaryVec(petsclib::PetscLibType, dm::AbstractPetscDM)Get the number of auxiliary vectors associated with this DM
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
numAux- The number of auxiliary data vectors
Level: advanced
See also: DM, DMClearAuxiliaryVec(), DMSetAuxiliaryVec(), DMGetAuxiliaryLabels(), DMGetAuxiliaryVec()
External Links
- PETSc Manual:
DM/DMGetNumAuxiliaryVec
PETSc.LibPETSc.DMGetNumDS — Method
Nds::PetscInt = DMGetNumDS(petsclib::PetscLibType, dm::AbstractPetscDM)Get the number of discrete systems in the DM
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
Nds- The number ofPetscDSobjects
Level: intermediate
See also: DM, DMGetDS(), DMGetCellDS()
External Links
- PETSc Manual:
DM/DMGetNumDS
PETSc.LibPETSc.DMGetNumFields — Method
numFields::PetscInt = DMGetNumFields(petsclib::PetscLibType, dm::AbstractPetscDM)Get the number of fields in the DM
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
numFields- The number of fields
Level: intermediate
See also: DM, DMSetNumFields(), DMSetField()
External Links
- PETSc Manual:
DM/DMGetNumFields
PETSc.LibPETSc.DMGetNumLabels — Method
numLabels::PetscInt = DMGetNumLabels(petsclib::PetscLibType, dm::AbstractPetscDM)Return the number of labels defined by on the DM
Not Collective
Input Parameter:
dm- TheDMobject
Output Parameter:
numLabels- the number of Labels
Level: intermediate
See also: DM, DMLabel, DMGetLabelByNum(), DMGetLabelName(), DMGetLabelValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMGetNumLabels
PETSc.LibPETSc.DMGetOptionsPrefix — Method
prefix::String = DMGetOptionsPrefix(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the prefix used for searching for all DM options in the options database.
Not Collective
Input Parameter:
dm- theDMcontext
Output Parameter:
prefix- pointer to the prefix string used is returned
Level: advanced
See also: DM, DMSetOptionsPrefix(), DMAppendOptionsPrefix(), DMSetFromOptions()
External Links
- PETSc Manual:
DM/DMGetOptionsPrefix
PETSc.LibPETSc.DMGetOutputDM — Method
odm::PetscDM = DMGetOutputDM(petsclib::PetscLibType, dm::AbstractPetscDM)Retrieve the DM associated with the layout for output
Collective
Input Parameter:
dm- The originalDM
Output Parameter:
odm- TheDMwhich provides the layout for output
Level: intermediate
See also: DM, VecView(), DMGetGlobalSection(), DMCreateGlobalVector(), PetscSectionHasConstraints(), DMSetGlobalSection()
External Links
- PETSc Manual:
DM/DMGetOutputDM
PETSc.LibPETSc.DMGetOutputSequenceLength — Method
len::PetscInt = DMGetOutputSequenceLength(petsclib::PetscLibType, dm::AbstractPetscDM, viewer::PetscViewer, name::String)Retrieve the number of sequence values from a PetscViewer
Input Parameters:
dm- The originalDMviewer- ThePetscViewerto get it fromname- The sequence name
Output Parameter:
len- The length of the output sequence
Level: intermediate
See also: DM, DMGetOutputSequenceNumber(), DMSetOutputSequenceNumber(), VecView()
External Links
- PETSc Manual:
DM/DMGetOutputSequenceLength
PETSc.LibPETSc.DMGetOutputSequenceNumber — Method
num::PetscInt,val::PetscReal = DMGetOutputSequenceNumber(petsclib::PetscLibType, dm::AbstractPetscDM)Retrieve the sequence number/value for output
Input Parameter:
dm- The originalDM
Output Parameters:
num- The output sequence numberval- The output sequence value
Level: intermediate
See also: DM, VecView()
External Links
- PETSc Manual:
DM/DMGetOutputSequenceNumber
PETSc.LibPETSc.DMGetPeriodicity — Method
maxCell::Ptr{PetscReal},Lstart::Ptr{PetscReal},L::Ptr{PetscReal} = DMGetPeriodicity(petsclib::PetscLibType, dm::AbstractPetscDM)Get the description of mesh periodicity
Not collective
Input Parameter:
dm- TheDMobject
Output Parameters:
maxCell- Over distances greater than this, we can assume a point has crossed over to another sheet, when trying to localize cell coordinatesLstart- If we assume the mesh is a torus, this is the start of each coordinate, orNULLfor 0.0L- If we assume the mesh is a torus, this is the length of each coordinate, otherwise it is < 0.0
Level: developer
See also: DM
External Links
- PETSc Manual:
DM/DMGetPeriodicity
PETSc.LibPETSc.DMGetPointSF — Method
sf::PetscSF = DMGetPointSF(petsclib::PetscLibType, dm::AbstractPetscDM)Get the PetscSF encoding the parallel section point overlap for the DM.
Not collective but the resulting PetscSF is collective
Input Parameter:
dm- TheDM
Output Parameter:
sf- ThePetscSF
Level: intermediate
See also: DM, DMSetPointSF(), DMGetSectionSF(), DMSetSectionSF(), DMCreateSectionSF()
External Links
- PETSc Manual:
DM/DMGetPointSF
PETSc.LibPETSc.DMGetRefineLevel — Method
level::PetscInt = DMGetRefineLevel(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the number of refinements that have generated this DM from some initial DM.
Not Collective
Input Parameter:
dm- theDMobject
Output Parameter:
level- number of refinements
Level: developer
See also: DM, DMRefine(), DMCoarsen(), DMGetCoarsenLevel(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation()
External Links
- PETSc Manual:
DM/DMGetRefineLevel
PETSc.LibPETSc.DMGetRegionDS — Method
fields::IS,ds::PetscDS,dsIn::PetscDS = DMGetRegionDS(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel)Get the PetscDS for a given mesh region, defined by a DMLabel
Not Collective
Input Parameters:
dm- TheDMlabel- TheDMLabeldefining the mesh region, orNULLfor the entire mesh
Output Parameters:
fields- TheIScontaining theDMfield numbers for the fields in thisPetscDS, orNULLds- ThePetscDSdefined on the given region, orNULLdsIn- ThePetscDSfor input in the given region, orNULL
Level: advanced
See also: DM, DMGetRegionNumDS(), DMSetRegionDS(), DMGetDS(), DMGetCellDS()
External Links
- PETSc Manual:
DM/DMGetRegionDS
PETSc.LibPETSc.DMGetRegionNumDS — Method
label::DMLabel,fields::IS,ds::PetscDS,dsIn::PetscDS = DMGetRegionNumDS(petsclib::PetscLibType, dm::AbstractPetscDM, num::PetscInt)Get the PetscDS for a given mesh region, defined by the region number
Not Collective
Input Parameters:
dm- TheDMnum- The region number, in [0, Nds)
Output Parameters:
label- The region label, orNULLfields- TheIScontaining theDMfield numbers for the fields in thisPetscDS, orNULLds- ThePetscDSdefined on the given region, orNULLdsIn- ThePetscDSfor input in the given region, orNULL
Level: advanced
See also: DM, DMGetRegionDS(), DMSetRegionDS(), DMGetDS(), DMGetCellDS()
External Links
- PETSc Manual:
DM/DMGetRegionNumDS
PETSc.LibPETSc.DMGetSectionSF — Method
sf::PetscSF = DMGetSectionSF(petsclib::PetscLibType, dm::AbstractPetscDM)Get the PetscSF encoding the parallel dof overlap for the DM. If it has not been set, it is created from the default PetscSection layouts in the DM.
Input Parameter:
dm- TheDM
Output Parameter:
sf- ThePetscSF
Level: intermediate
See also: DM, DMSetSectionSF(), DMCreateSectionSF()
External Links
- PETSc Manual:
DM/DMGetSectionSF
PETSc.LibPETSc.DMGetSparseLocalize — Method
sparse::PetscBool = DMGetSparseLocalize(petsclib::PetscLibType, dm::AbstractPetscDM)Check if the DM coordinates should be localized only for cells near the periodic boundary.
Not collective
Input Parameter:
dm- TheDM
Output Parameter:
sparse-PETSC_TRUEif only cells near the periodic boundary are localized
Level: intermediate
See also: DMSetSparseLocalize(), DMLocalizeCoordinates(), DMSetPeriodicity()
External Links
- PETSc Manual:
DM/DMGetSparseLocalize
PETSc.LibPETSc.DMGetStratumIS — Method
points::IS = DMGetStratumIS(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, value::PetscInt)Get the points in a label stratum
Not Collective
Input Parameters:
dm- TheDMobjectname- The label namevalue- The stratum value
Output Parameter:
points- The stratum points, orNULLif the label does not exist or does not have that value
Level: beginner
See also: DM, DMLabelGetStratumIS(), DMGetStratumSize()
External Links
- PETSc Manual:
DM/DMGetStratumIS
PETSc.LibPETSc.DMGetStratumSize — Method
size::PetscInt = DMGetStratumSize(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, value::PetscInt)Get the number of points in a label stratum
Not Collective
Input Parameters:
dm- TheDMobjectname- The label name of the stratumvalue- The stratum value
Output Parameter:
size- The number of points, also called the stratum size
Level: beginner
See also: DM, DMLabelGetStratumSize(), DMGetLabelSize(), DMGetLabelIds()
External Links
- PETSc Manual:
DM/DMGetStratumSize
PETSc.LibPETSc.DMGetType — Method
type::String = DMGetType(petsclib::PetscLibType, dm::AbstractPetscDM)Gets the DM type name (as a string) from the DM.
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
type- TheDMTypename
Level: intermediate
See also: DM, DMType, DMDA, DMPLEX, DMSetType(), DMCreate(), PetscObjectTypeCompare(), PetscObjectTypeCompareAny()
External Links
- PETSc Manual:
DM/DMGetType
PETSc.LibPETSc.DMGetUseNatural — Method
useNatural::PetscBool = DMGetUseNatural(petsclib::PetscLibType, dm::AbstractPetscDM)Get the flag for creating a mapping to the natural order when a DM is (re)distributed in parallel
Not Collective
Input Parameter:
dm- TheDM
Output Parameter:
useNatural-PETSC_TRUEto build the mapping to a natural order during distribution
Level: beginner
See also: DM, DMSetUseNatural(), DMCreate()
External Links
- PETSc Manual:
DM/DMGetUseNatural
PETSc.LibPETSc.DMGetVecType — Method
ctype::String = DMGetVecType(petsclib::PetscLibType, da::AbstractPetscDM)Gets the type of vector created with DMCreateLocalVector() and DMCreateGlobalVector()
Logically Collective
Input Parameter:
da- initial distributed array
Output Parameter:
ctype- the vector type
Level: intermediate
See also: DM, DMCreate(), DMDestroy(), DMDAInterpolationType, VecType, DMSetMatType(), DMGetMatType(), DMSetVecType()
External Links
- PETSc Manual:
DM/DMGetVecType
PETSc.LibPETSc.DMGlobalToLocal — Method
DMGlobalToLocal(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec, mode::InsertMode, l::AbstractPetscVec)update local vectors from global vector
Neighbor-wise Collective
Input Parameters:
dm- theDMobjectg- the global vectormode-INSERT_VALUESorADD_VALUESl- the local vector
Level: beginner
See also: DM, DMGlobalToLocalHookAdd(), DMCoarsen(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMLocalToGlobalBegin(), DMLocalToGlobal(), DMLocalToGlobalEnd(), DMGlobalToLocalBegin(), DMGlobalToLocalEnd()
External Links
- PETSc Manual:
DM/DMGlobalToLocal
PETSc.LibPETSc.DMGlobalToLocalBegin — Method
DMGlobalToLocalBegin(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec, mode::InsertMode, l::AbstractPetscVec)Begins updating local vectors from global vector
Neighbor-wise Collective
Input Parameters:
dm- theDMobjectg- the global vectormode-INSERT_VALUESorADD_VALUESl- the local vector
Level: intermediate
See also: DM, DMCoarsen(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMGlobalToLocal(), DMGlobalToLocalEnd(), DMLocalToGlobalBegin(), DMLocalToGlobal(), DMLocalToGlobalEnd()
External Links
- PETSc Manual:
DM/DMGlobalToLocalBegin
PETSc.LibPETSc.DMGlobalToLocalBeginDefaultShell — Method
DMGlobalToLocalBeginDefaultShell(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec, mode::InsertMode, l::AbstractPetscVec)Uses the GlobalToLocal VecScatter context set by the user to begin a global to local scatter
Collective
Input Parameters:
dm-DMSHELLg- global vectormode-InsertModel- local vector
Level: advanced
See also: DM, DMSHELL, DMGlobalToLocalEndDefaultShell()
External Links
- PETSc Manual:
DM/DMGlobalToLocalBeginDefaultShell
PETSc.LibPETSc.DMGlobalToLocalEnd — Method
DMGlobalToLocalEnd(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec, mode::InsertMode, l::AbstractPetscVec)Ends updating local vectors from global vector
Neighbor-wise Collective
Input Parameters:
dm- theDMobjectg- the global vectormode-INSERT_VALUESorADD_VALUESl- the local vector
Level: intermediate
See also: DM, DMCoarsen(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMGlobalToLocal(), DMLocalToGlobalBegin(), DMLocalToGlobal(), DMLocalToGlobalEnd()
External Links
- PETSc Manual:
DM/DMGlobalToLocalEnd
PETSc.LibPETSc.DMGlobalToLocalEndDefaultShell — Method
DMGlobalToLocalEndDefaultShell(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec, mode::InsertMode, l::AbstractPetscVec)Uses the GlobalToLocal VecScatter context set by the user to end a global to local scatter Collective
Input Parameters:
dm-DMSHELLg- global vectormode-InsertModel- local vector
Level: advanced
See also: DM, DMSHELL, DMGlobalToLocalBeginDefaultShell()
External Links
- PETSc Manual:
DM/DMGlobalToLocalEndDefaultShell
PETSc.LibPETSc.DMGlobalToLocalHookAdd — Method
DMGlobalToLocalHookAdd(petsclib::PetscLibType, dm::AbstractPetscDM, beginhook::external, endhook::external, ctx::Ptr{Cvoid})adds a callback to be run when DMGlobalToLocal() is called
Logically Collective
Input Parameters:
dm- theDMbeginhook- function to run at the beginning ofDMGlobalToLocalBegin()endhook- function to run afterDMGlobalToLocalEnd()has completedctx- [optional] context for provide data for the hooks (may beNULL)
Calling sequence of beginhook:
dm- globalDMg- global vectormode- model- local vectorctx- optional function context
Calling sequence of endhook:
dm- globalDMg- global vectormode- model- local vectorctx- optional function context
Level: advanced
See also: DM, DMGlobalToLocal(), DMRefineHookAdd(), SNESFASGetInterpolation(), SNESFASGetInjection(), PetscObjectCompose(), PetscContainerCreate()
External Links
- PETSc Manual:
DM/DMGlobalToLocalHookAdd
PETSc.LibPETSc.DMGlobalToLocalSolve — Method
DMGlobalToLocalSolve(petsclib::PetscLibType, dm::AbstractPetscDM, x::AbstractPetscVec, y::AbstractPetscVec)Solve for the global vector that is mapped to a given local vector by DMGlobalToLocalBegin()/DMGlobalToLocalEnd() with mode INSERT_VALUES.
Collective
Input Parameters:
dm- TheDMobjectx- The local vectory- The global vector: the input value of this variable is used as an initial guess
Output Parameter:
y- The least-squares solution
Level: advanced
See also: DM, DMGlobalToLocalBegin(), DMGlobalToLocalEnd(), DMLocalToGlobalBegin(), DMLocalToGlobalEnd(), DMPlexGetAnchors(), DMPlexSetAnchors()
External Links
- PETSc Manual:
DM/DMGlobalToLocalSolve
PETSc.LibPETSc.DMHasBasisTransform — Method
flg::PetscBool = DMHasBasisTransform(petsclib::PetscLibType, dm::AbstractPetscDM)Whether the DM employs a basis transformation from functions in global vectors to functions in local vectors
Input Parameter:
dm- TheDM
Output Parameter:
flg-PETSC_TRUEif a basis transformation should be done
Level: developer
See also: DM, DMPlexGlobalToLocalBasis(), DMPlexLocalToGlobalBasis(), DMPlexCreateBasisRotation()
External Links
- PETSc Manual:
DM/DMHasBasisTransform
PETSc.LibPETSc.DMHasBound — Method
hasBound::PetscBool = DMHasBound(petsclib::PetscLibType, dm::AbstractPetscDM)Determine whether a bound condition was specified
Logically collective
Input Parameter:
dm- TheDM, with aPetscDSthat matches the problem being constrained
Output Parameter:
hasBound- Flag indicating if a bound condition was specified
Level: intermediate
See also: DM, DSAddBoundary(), PetscDSAddBoundary()
External Links
- PETSc Manual:
DM/DMHasBound
PETSc.LibPETSc.DMHasColoring — Method
flg::PetscBool = DMHasColoring(petsclib::PetscLibType, dm::AbstractPetscDM)does the DM object have a method of providing a coloring?
Not Collective
Input Parameter:
dm- the DM object
Output Parameter:
flg-PETSC_TRUEif theDMhas facilities forDMCreateColoring().
Level: developer
See also: DM, DMCreateColoring()
External Links
- PETSc Manual:
DM/DMHasColoring
PETSc.LibPETSc.DMHasCreateInjection — Method
flg::PetscBool = DMHasCreateInjection(petsclib::PetscLibType, dm::AbstractPetscDM)does the DM object have a method of providing an injection?
Not Collective
Input Parameter:
dm- theDMobject
Output Parameter:
flg-PETSC_TRUEif theDMhas facilities forDMCreateInjection().
Level: developer
See also: DM, DMCreateInjection(), DMHasCreateRestriction(), DMHasCreateInterpolation()
External Links
- PETSc Manual:
DM/DMHasCreateInjection
PETSc.LibPETSc.DMHasCreateRestriction — Method
flg::PetscBool = DMHasCreateRestriction(petsclib::PetscLibType, dm::AbstractPetscDM)does the DM object have a method of providing a restriction?
Not Collective
Input Parameter:
dm- theDMobject
Output Parameter:
flg-PETSC_TRUEif theDMhas facilities forDMCreateRestriction().
Level: developer
See also: DM, DMCreateRestriction(), DMHasCreateInterpolation(), DMHasCreateInjection()
External Links
- PETSc Manual:
DM/DMHasCreateRestriction
PETSc.LibPETSc.DMHasLabel — Method
hasLabel::PetscBool = DMHasLabel(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)Determine whether the DM has a label of a given name
Not Collective
Input Parameters:
dm- TheDMobjectname- The label name
Output Parameter:
hasLabel-PETSC_TRUEif the label is present
Level: intermediate
See also: DM, DMLabel, DMGetLabel(), DMGetLabelByNum(), DMCreateLabel(), DMGetLabelValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMHasLabel
PETSc.LibPETSc.DMHasNamedGlobalVector — Method
exists::PetscBool = DMHasNamedGlobalVector(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)check for a named, persistent global vector created with DMGetNamedGlobalVector()
Not Collective
Input Parameters:
dm-DMto hold named vectorsname- unique name forVec
Output Parameter:
exists- true if the vector was previously created
Level: developer
See also: DM, DMGetNamedGlobalVector(), DMRestoreNamedLocalVector(), DMClearNamedGlobalVectors()
External Links
- PETSc Manual:
DM/DMHasNamedGlobalVector
PETSc.LibPETSc.DMHasNamedLocalVector — Method
exists::PetscBool = DMHasNamedLocalVector(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)check for a named, persistent local vector created with DMGetNamedLocalVector()
Not Collective
Input Parameters:
dm-DMto hold named vectorsname- unique name forVec
Output Parameter:
exists- true if the vector was previously created
Level: developer
See also: DM, DMGetNamedGlobalVector(), DMRestoreNamedLocalVector(), DMClearNamedLocalVectors()
External Links
- PETSc Manual:
DM/DMHasNamedLocalVector
PETSc.LibPETSc.DMHasVariableBounds — Method
flg::PetscBool = DMHasVariableBounds(petsclib::PetscLibType, dm::AbstractPetscDM)does the DM object have a variable bounds function?
Not Collective
Input Parameter:
dm- theDMobject to destroy
Output Parameter:
flg-PETSC_TRUEif the variable bounds function exists
Level: developer
See also: DM, DMComputeVariableBounds(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMGetApplicationContext()
External Links
- PETSc Manual:
DM/DMHasVariableBounds
PETSc.LibPETSc.DMInitializePackage — Method
DMInitializePackage(petsclib::PetscLibType)This function initializes everything in the DM package. It is called from PetscDLLibraryRegister_petscdm() when using dynamic libraries, and on the first call to DMCreate() or similar routines when using shared or static libraries.
Level: developer
See also: PetscInitialize()
External Links
- PETSc Manual:
DM/DMInitializePackage
PETSc.LibPETSc.DMInterpolate — Method
DMInterpolate(petsclib::PetscLibType, coarse::AbstractPetscDM, interp::AbstractPetscMat, fine::AbstractPetscDM)interpolates user-defined problem data attached to a DM to a finer DM by running hooks registered by DMRefineHookAdd()
Collective if any hooks are
Input Parameters:
coarse- coarserDMto use as a baseinterp- interpolation matrix, apply usingMatInterpolate()fine- finerDMto update
Level: developer
See also: DM, DMRefineHookAdd(), MatInterpolate()
External Links
- PETSc Manual:
DM/DMInterpolate
PETSc.LibPETSc.DMInterpolateSolution — Method
DMInterpolateSolution(petsclib::PetscLibType, coarse::AbstractPetscDM, fine::AbstractPetscDM, interp::AbstractPetscMat, coarseSol::AbstractPetscVec, fineSol::AbstractPetscVec)Interpolates a solution from a coarse mesh to a fine mesh.
Collective
Input Parameters:
coarse- coarseDMfine- fineDMinterp- (optional) the matrix computed byDMCreateInterpolation(). Implementations may not need this, but if it
is available it can avoid some recomputation. If it is provided, MatInterpolate() will be used if the coarse DM does not have a specialized implementation.
coarseSol- solution on the coarse mesh
Output Parameter:
fineSol- the interpolation of coarseSol to the fine mesh
Level: developer
See also: DM, DMInterpolate(), DMCreateInterpolation()
External Links
- PETSc Manual:
DM/DMInterpolateSolution
PETSc.LibPETSc.DMInterpolationAddPoints — Method
DMInterpolationAddPoints(petsclib::PetscLibType, ctx::DMInterpolationInfo, n::PetscInt, points::Vector{PetscReal})Add points at which we will interpolate the fields
Not Collective
Input Parameters:
ctx- the contextn- the number of pointspoints- the coordinates for each point, an array of sizen* dim
Level: intermediate
See also: DM, DMInterpolationInfo, DMInterpolationSetDim(), DMInterpolationEvaluate(), DMInterpolationCreate()
External Links
- PETSc Manual:
DM/DMInterpolationAddPoints
PETSc.LibPETSc.DMInterpolationCreate — Method
ctx::DMInterpolationInfo = DMInterpolationCreate(petsclib::PetscLibType, comm::MPI_Comm)Creates a DMInterpolationInfo context
Collective
Input Parameter:
comm- the communicator
Output Parameter:
ctx- the context
Level: beginner
See also: DM, DMInterpolationInfo, DMInterpolationEvaluate(), DMInterpolationAddPoints(), DMInterpolationDestroy()
External Links
- PETSc Manual:
DM/DMInterpolationCreate
PETSc.LibPETSc.DMInterpolationDestroy — Method
DMInterpolationDestroy(petsclib::PetscLibType, ctx::Union{DMInterpolationInfo, Ref{DMInterpolationInfo}})Destroys a DMInterpolationInfo context
Collective
Input Parameter:
ctx- the context
Level: beginner
See also: DM, DMInterpolationInfo, DMInterpolationEvaluate(), DMInterpolationAddPoints(), DMInterpolationCreate()
External Links
- PETSc Manual:
DM/DMInterpolationDestroy
PETSc.LibPETSc.DMInterpolationEvaluate — Method
DMInterpolationEvaluate(petsclib::PetscLibType, ctx::DMInterpolationInfo, dm::AbstractPetscDM, x::AbstractPetscVec, v::AbstractPetscVec)Using the input from dm and x, calculates interpolated field values at the interpolation points.
Input Parameters:
ctx- TheDMInterpolationInfocontext obtained withDMInterpolationCreate()dm- TheDMx- The local vector containing the field to be interpolated, can be created withDMCreateGlobalVector()
Output Parameter:
v- The vector containing the interpolated values, obtained withDMInterpolationGetVector()
Level: beginner
See also: DM, DMInterpolationInfo, DMInterpolationGetVector(), DMInterpolationAddPoints(), DMInterpolationCreate(), DMInterpolationGetCoordinates()
External Links
- PETSc Manual:
DM/DMInterpolationEvaluate
PETSc.LibPETSc.DMInterpolationGetCoordinates — Method
coordinates::PetscVec = DMInterpolationGetCoordinates(petsclib::PetscLibType, ctx::DMInterpolationInfo)Gets a Vec with the coordinates of each interpolation point
Collective
Input Parameter:
ctx- the context
Output Parameter:
coordinates- the coordinates of interpolation points
Level: intermediate
See also: DM, DMInterpolationInfo, DMInterpolationEvaluate(), DMInterpolationAddPoints(), DMInterpolationCreate()
External Links
- PETSc Manual:
DM/DMInterpolationGetCoordinates
PETSc.LibPETSc.DMInterpolationGetDim — Method
dim::PetscInt = DMInterpolationGetDim(petsclib::PetscLibType, ctx::DMInterpolationInfo)Gets the spatial dimension for the interpolation context
Not Collective
Input Parameter:
ctx- the context
Output Parameter:
dim- the spatial dimension
Level: intermediate
See also: DM, DMInterpolationInfo, DMInterpolationSetDim(), DMInterpolationEvaluate(), DMInterpolationAddPoints()
External Links
- PETSc Manual:
DM/DMInterpolationGetDim
PETSc.LibPETSc.DMInterpolationGetDof — Method
dof::PetscInt = DMInterpolationGetDof(petsclib::PetscLibType, ctx::DMInterpolationInfo)Gets the number of fields interpolated at a point for the interpolation context
Not Collective
Input Parameter:
ctx- the context
Output Parameter:
dof- the number of fields
Level: intermediate
See also: DM, DMInterpolationInfo, DMInterpolationSetDof(), DMInterpolationEvaluate(), DMInterpolationAddPoints()
External Links
- PETSc Manual:
DM/DMInterpolationGetDof
PETSc.LibPETSc.DMInterpolationGetVector — Method
v::PetscVec = DMInterpolationGetVector(petsclib::PetscLibType, ctx::DMInterpolationInfo)Gets a Vec which can hold all the interpolated field values
Collective
Input Parameter:
ctx- the context
Output Parameter:
v- a vector capable of holding the interpolated field values
Level: intermediate
See also: DM, DMInterpolationInfo, DMInterpolationRestoreVector(), DMInterpolationEvaluate(), DMInterpolationAddPoints(), DMInterpolationCreate()
External Links
- PETSc Manual:
DM/DMInterpolationGetVector
PETSc.LibPETSc.DMInterpolationRestoreVector — Method
DMInterpolationRestoreVector(petsclib::PetscLibType, ctx::DMInterpolationInfo, v::AbstractPetscVec)Returns a Vec which can hold all the interpolated field values
Collective
Input Parameters:
ctx- the contextv- a vector capable of holding the interpolated field values
Level: intermediate
See also: DM, DMInterpolationInfo, DMInterpolationGetVector(), DMInterpolationEvaluate(), DMInterpolationAddPoints(), DMInterpolationCreate()
External Links
- PETSc Manual:
DM/DMInterpolationRestoreVector
PETSc.LibPETSc.DMInterpolationSetDim — Method
DMInterpolationSetDim(petsclib::PetscLibType, ctx::DMInterpolationInfo, dim::PetscInt)Sets the spatial dimension for the interpolation context
Not Collective
Input Parameters:
ctx- the contextdim- the spatial dimension
Level: intermediate
See also: DM, DMInterpolationInfo, DMInterpolationGetDim(), DMInterpolationEvaluate(), DMInterpolationAddPoints()
External Links
- PETSc Manual:
DM/DMInterpolationSetDim
PETSc.LibPETSc.DMInterpolationSetDof — Method
DMInterpolationSetDof(petsclib::PetscLibType, ctx::DMInterpolationInfo, dof::PetscInt)Sets the number of fields interpolated at a point for the interpolation context
Not Collective
Input Parameters:
ctx- the contextdof- the number of fields
Level: intermediate
See also: DM, DMInterpolationInfo, DMInterpolationGetDof(), DMInterpolationEvaluate(), DMInterpolationAddPoints()
External Links
- PETSc Manual:
DM/DMInterpolationSetDof
PETSc.LibPETSc.DMInterpolationSetUp — Method
DMInterpolationSetUp(petsclib::PetscLibType, ctx::DMInterpolationInfo, dm::AbstractPetscDM, redundantPoints::PetscBool, ignoreOutsideDomain::PetscBool)Compute spatial indices for point location during interpolation
Collective
Input Parameters:
ctx- the contextdm- theDMfor the function space used for interpolationredundantPoints- IfPETSC_TRUE, all processes are passing in the same array of points. Otherwise, points need to be communicated among processes.ignoreOutsideDomain- IfPETSC_TRUE, ignore points outside the domain, otherwise return an error
Level: intermediate
See also: DM, DMInterpolationInfo, DMInterpolationEvaluate(), DMInterpolationAddPoints(), DMInterpolationCreate()
External Links
- PETSc Manual:
DM/DMInterpolationSetUp
PETSc.LibPETSc.DMIsBoundaryPoint — Method
isBd::PetscBool = DMIsBoundaryPoint(petsclib::PetscLibType, dm::AbstractPetscDM, point::PetscInt)Determine whether a mesh point lies on a DM boundary
Not Collective
Input Parameters:
dm- theDMobjectpoint- the mesh point number
Output Parameter:
isBd-PETSC_TRUEifpointbelongs to any boundary label registered on theDM
Level: developer
See also: DM, DMLabel, DMAddBoundary(), PetscDSGetBoundary()
External Links
- PETSc Manual:
DM/DMIsBoundaryPoint
PETSc.LibPETSc.DMIsForest — Method
isForest::PetscBool = DMIsForest(petsclib::PetscLibType, dm::AbstractPetscDM)Check whether a DM uses the DMFOREST interface for hierarchically-refined meshes
Not Collective
Input Parameter:
dm- the DM object
Output Parameter:
isForest- whether dm is a subtype of DMFOREST
Level: intermediate
See also: DMFOREST, DMForestRegisterType()
External Links
- PETSc Manual:
DMForest/DMIsForest
PETSc.LibPETSc.DMKSPGetComputeInitialGuess — Method
func::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMKSPGetComputeInitialGuess(petsclib::PetscLibType, dm::AbstractPetscDM)get KSP initial guess evaluation function
Not Collective
Input Parameter:
dm-DMused with aKSP
Output Parameters:
func- initial guess evaluation function, for calling sequence seeKSPComputeInitialGuessFnctx- context for right-hand side evaluation
Level: advanced
See also: DMKSP, DM, KSP, DMKSPSetContext(), KSPSetComputeRHS(), DMKSPSetComputeRHS(), KSPComputeInitialGuessFn
External Links
- PETSc Manual:
KSP/DMKSPGetComputeInitialGuess
PETSc.LibPETSc.DMKSPGetComputeOperators — Method
func::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMKSPGetComputeOperators(petsclib::PetscLibType, dm::AbstractPetscDM)get KSP matrix evaluation function
Not Collective
Input Parameter:
dm-DMused with aKSP
Output Parameters:
func- matrix evaluation function, for calling sequence seeKSPComputeOperatorsFnctx- context for matrix evaluation
Level: developer
See also: DMKSP, DM, KSP, DMKSPSetContext(), KSPSetComputeOperators(), DMKSPSetComputeOperators(), KSPComputeOperatorsFn
External Links
- PETSc Manual:
KSP/DMKSPGetComputeOperators
PETSc.LibPETSc.DMKSPGetComputeRHS — Method
func::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMKSPGetComputeRHS(petsclib::PetscLibType, dm::AbstractPetscDM)get KSP right-hand side evaluation function
Not Collective
Input Parameter:
dm-DMto be used withKSP
Output Parameters:
func- right-hand side evaluation function, for calling sequence seeKSPComputeRHSFnctx- context for right-hand side evaluation
Level: advanced
See also: DMKSP, DM, KSP, DMKSPSetContext(), KSPSetComputeRHS(), DMKSPSetComputeRHS(), KSPComputeRHSFn
External Links
- PETSc Manual:
KSP/DMKSPGetComputeRHS
PETSc.LibPETSc.DMKSPSetComputeInitialGuess — Method
DMKSPSetComputeInitialGuess(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set KSP initial guess evaluation function
Not Collective
Input Parameters:
dm-DMto be used withKSPfunc- initial guess evaluation function, for calling sequence seeKSPComputeInitialGuessFnctx- context for initial guess evaluation
Level: developer
See also: DMKSP, DM, KSP, DMKSPSetContext(), DMKSPGetComputeRHS(), KSPComputeInitialGuessFn
External Links
- PETSc Manual:
KSP/DMKSPSetComputeInitialGuess
PETSc.LibPETSc.DMKSPSetComputeOperators — Method
DMKSPSetComputeOperators(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set KSP matrix evaluation function
Not Collective
Input Parameters:
dm-DMto be used withKSPfunc- matrix evaluation function, for calling sequence seeKSPComputeOperatorsFnctx- context for matrix evaluation
Level: developer
See also: DMKSP, DM, KSP, DMKSPSetContext(), DMKSPGetComputeOperators(), KSPSetOperators(), KSPComputeOperatorsFn
External Links
- PETSc Manual:
KSP/DMKSPSetComputeOperators
PETSc.LibPETSc.DMKSPSetComputeRHS — Method
DMKSPSetComputeRHS(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set KSP right-hand side evaluation function
Not Collective
Input Parameters:
dm-DMused with aKSPfunc- right-hand side evaluation function, for calling sequence seeKSPComputeRHSFnctx- context for right-hand side evaluation
Level: developer
See also: DMKSP, DM, KSP, DMKSPSetContext(), DMKSPGetComputeRHS()
External Links
- PETSc Manual:
KSP/DMKSPSetComputeRHS
PETSc.LibPETSc.DMLoad — Method
DMLoad(petsclib::PetscLibType, newdm::AbstractPetscDM, viewer::PetscViewer)Loads a DM that has been stored in binary with DMView().
Collective
Input Parameters:
newdm- the newly loadedDM, this needs to have been created withDMCreate()or
some related function before a call to DMLoad().
viewer- binary file viewer, obtained fromPetscViewerBinaryOpen()or
PETSCVIEWERHDF5 file viewer, obtained from PetscViewerHDF5Open()
Level: intermediate
See also: DM, PetscViewerBinaryOpen(), DMView(), MatLoad(), VecLoad()
External Links
- PETSc Manual:
DM/DMLoad
PETSc.LibPETSc.DMLocalToGlobal — Method
DMLocalToGlobal(petsclib::PetscLibType, dm::AbstractPetscDM, l::AbstractPetscVec, mode::InsertMode, g::AbstractPetscVec)updates global vectors from local vectors
Neighbor-wise Collective
Input Parameters:
dm- theDMobjectl- the local vectormode- ifINSERT_VALUESthen no parallel communication is used, ifADD_VALUESthen all ghost points from the same base point accumulate into that base point.g- the global vector
Level: beginner
See also: DM, DMLocalToGlobalBegin(), DMLocalToGlobalEnd(), DMCoarsen(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMGlobalToLocal(), DMGlobalToLocalEnd(), DMGlobalToLocalBegin(), DMLocalToGlobalHookAdd(), DMGlobaToLocallHookAdd()
External Links
- PETSc Manual:
DM/DMLocalToGlobal
PETSc.LibPETSc.DMLocalToGlobalBegin — Method
DMLocalToGlobalBegin(petsclib::PetscLibType, dm::AbstractPetscDM, l::AbstractPetscVec, mode::InsertMode, g::AbstractPetscVec)begins updating global vectors from local vectors
Neighbor-wise Collective
Input Parameters:
dm- theDMobjectl- the local vectormode- ifINSERT_VALUESthen no parallel communication is used, ifADD_VALUESthen all ghost points from the same base point accumulate into that base point.g- the global vector
Level: intermediate
See also: DM, DMLocalToGlobal(), DMLocalToGlobalEnd(), DMCoarsen(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMGlobalToLocal(), DMGlobalToLocalEnd(), DMGlobalToLocalBegin()
External Links
- PETSc Manual:
DM/DMLocalToGlobalBegin
PETSc.LibPETSc.DMLocalToGlobalBeginDefaultShell — Method
DMLocalToGlobalBeginDefaultShell(petsclib::PetscLibType, dm::AbstractPetscDM, l::AbstractPetscVec, mode::InsertMode, g::AbstractPetscVec)Uses the LocalToGlobal VecScatter context set by the user to begin a local to global scatter Collective
Input Parameters:
dm-DMSHELLl- local vectormode-InsertModeg- global vector
Level: advanced
See also: DM, DMSHELL, DMLocalToGlobalEndDefaultShell()
External Links
- PETSc Manual:
DM/DMLocalToGlobalBeginDefaultShell
PETSc.LibPETSc.DMLocalToGlobalEnd — Method
DMLocalToGlobalEnd(petsclib::PetscLibType, dm::AbstractPetscDM, l::AbstractPetscVec, mode::InsertMode, g::AbstractPetscVec)updates global vectors from local vectors
Neighbor-wise Collective
Input Parameters:
dm- theDMobjectl- the local vectormode-INSERT_VALUESorADD_VALUESg- the global vector
Level: intermediate
See also: DM, DMLocalToGlobalBegin(), DMCoarsen(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMGlobalToLocalEnd()
External Links
- PETSc Manual:
DM/DMLocalToGlobalEnd
PETSc.LibPETSc.DMLocalToGlobalEndDefaultShell — Method
DMLocalToGlobalEndDefaultShell(petsclib::PetscLibType, dm::AbstractPetscDM, l::AbstractPetscVec, mode::InsertMode, g::AbstractPetscVec)Uses the LocalToGlobal VecScatter context set by the user to end a local to global scatter Collective
Input Parameters:
dm-DMSHELLl- local vectormode-InsertModeg- global vector
Level: advanced
See also: DM, DMSHELL, DMLocalToGlobalBeginDefaultShell()
External Links
- PETSc Manual:
DM/DMLocalToGlobalEndDefaultShell
PETSc.LibPETSc.DMLocalToGlobalHookAdd — Method
DMLocalToGlobalHookAdd(petsclib::PetscLibType, dm::AbstractPetscDM, beginhook::external, endhook::external, ctx::Ptr{Cvoid})adds a callback to be run when a local to global is called
Logically Collective
Input Parameters:
dm- theDMbeginhook- function to run at the beginning ofDMLocalToGlobalBegin()endhook- function to run afterDMLocalToGlobalEnd()has completedctx- [optional] context for provide data for the hooks (may beNULL)
Calling sequence of beginhook:
global- globalDMl- local vectormode- modeg- global vectorctx- optional function context
Calling sequence of endhook:
global- globalDMl- local vectormode- modeg- global vectorctx- optional function context
Level: advanced
See also: DM, DMLocalToGlobal(), DMRefineHookAdd(), DMGlobalToLocalHookAdd(), SNESFASGetInterpolation(), SNESFASGetInjection(), PetscObjectCompose(), PetscContainerCreate()
External Links
- PETSc Manual:
DM/DMLocalToGlobalHookAdd
PETSc.LibPETSc.DMLocalToLocalBegin — Method
DMLocalToLocalBegin(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec, mode::InsertMode, l::AbstractPetscVec)Begins the process of mapping values from a local vector (that include ghost points that contain irrelevant values) to another local vector where the ghost points in the second are set correctly from values on other MPI ranks.
Neighbor-wise Collective
Input Parameters:
dm- theDMobjectg- the original local vectormode- one ofINSERT_VALUESorADD_VALUES
Output Parameter:
l- the local vector with correct ghost values
Level: intermediate
See also: DM, DMLocalToLocalEnd(), DMCoarsen(), DMDestroy(), DMView(), DMCreateLocalVector(), DMCreateGlobalVector(), DMCreateInterpolation(), DMGlobalToLocalEnd(), DMLocalToGlobalBegin()
External Links
- PETSc Manual:
DM/DMLocalToLocalBegin
PETSc.LibPETSc.DMLocalToLocalBeginDefaultShell — Method
DMLocalToLocalBeginDefaultShell(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec, mode::InsertMode, l::AbstractPetscVec)Uses the LocalToLocal VecScatter context set by the user to begin a local to local scatter Collective
Input Parameters:
dm-DMSHELLg- the original local vectormode-InsertMode
Output Parameter:
l- the local vector with correct ghost values
Level: advanced
See also: DM, DMSHELL, DMLocalToLocalEndDefaultShell()
External Links
- PETSc Manual:
DM/DMLocalToLocalBeginDefaultShell
PETSc.LibPETSc.DMLocalToLocalEnd — Method
DMLocalToLocalEnd(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec, mode::InsertMode, l::AbstractPetscVec)Maps from a local vector to another local vector where the ghost points in the second are set correctly. Must be preceded by DMLocalToLocalBegin().
Neighbor-wise Collective
Input Parameters:
dm- theDMobjectg- the original local vectormode- one ofINSERT_VALUESorADD_VALUES
Output Parameter:
l- the local vector with correct ghost values
Level: intermediate
See also: DM, DMLocalToLocalBegin(), DMCoarsen(), DMDestroy(), DMView(), DMCreateLocalVector(), DMCreateGlobalVector(), DMCreateInterpolation(), DMGlobalToLocalEnd(), DMLocalToGlobalBegin()
External Links
- PETSc Manual:
DM/DMLocalToLocalEnd
PETSc.LibPETSc.DMLocalToLocalEndDefaultShell — Method
DMLocalToLocalEndDefaultShell(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec, mode::InsertMode, l::AbstractPetscVec)Uses the LocalToLocal VecScatter context set by the user to end a local to local scatter Collective
Input Parameters:
dm-DMSHELLg- the original local vectormode-InsertMode
Output Parameter:
l- the local vector with correct ghost values
Level: advanced
See also: DM, DMSHELL, DMLocalToLocalBeginDefaultShell()
External Links
- PETSc Manual:
DM/DMLocalToLocalEndDefaultShell
PETSc.LibPETSc.DMLocalizeCoordinate — Method
DMLocalizeCoordinate(petsclib::PetscLibType, dm::AbstractPetscDM, in::Vector{PetscScalar}, endpoint::PetscBool, out::Vector{PetscScalar})If a mesh is periodic (a torus with lengths Li, some of which can be infinite), project the coordinate onto [0, Li) in each dimension.
Input Parameters:
dm- TheDMin- The input coordinate point (dim numbers)endpoint- Include the endpoint L_i
Output Parameter:
out- The localized coordinate point (dim numbers)
Level: developer
See also: DM, DMLocalizeCoordinates(), DMLocalizeAddCoordinate()
External Links
- PETSc Manual:
DM/DMLocalizeCoordinate
PETSc.LibPETSc.DMLocalizeCoordinates — Method
DMLocalizeCoordinates(petsclib::PetscLibType, dm::AbstractPetscDM)If a mesh is periodic, create local coordinates for cells having periodic faces
Collective
Input Parameter:
dm- TheDM
Level: developer
See also: DM, DMSetPeriodicity(), DMLocalizeCoordinate(), DMLocalizeAddCoordinate()
External Links
- PETSc Manual:
DM/DMLocalizeCoordinates
PETSc.LibPETSc.DMLocatePoints — Method
DMLocatePoints(petsclib::PetscLibType, dm::AbstractPetscDM, v::AbstractPetscVec, ltype::DMPoCintLocationType, cellSF::PetscSF)Locate the points in v in the mesh and return a PetscSF of the containing cells
Collective
Input Parameters:
dm- TheDMltype- The type of point location, e.g.DM_POINTLOCATION_NONEorDM_POINTLOCATION_NEAREST
Input/Output Parameters:
v- TheVecof points, on output contains the nearest mesh points to the given points ifDM_POINTLOCATION_NEARESTis usedcellSF- Points to eitherNULL, or aPetscSFwith guesses for which cells contain each point;
on output, the PetscSF containing the MPI ranks and local indices of the containing points
Level: developer
See also: DM, DMSetCoordinates(), DMSetCoordinatesLocal(), DMGetCoordinates(), DMGetCoordinatesLocal(), DMPointLocationType
External Links
- PETSc Manual:
DM/DMLocatePoints
PETSc.LibPETSc.DMMoabCheckBoundaryVertices — Method
isbdvtx::PetscBool = DMMoabCheckBoundaryVertices(petsclib::PetscLibType, dm::AbstractPetscDM, nconn::PetscInt, cnt::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabCheckBoundaryVertices
PETSc.LibPETSc.DMMoabCreate — Method
dmb::PetscDM = DMMoabCreate(petsclib::PetscLibType, comm::MPI_Comm)External Links
- PETSc Manual:
DM/DMMoabCreate
PETSc.LibPETSc.DMMoabCreateBoxMesh — Method
bounds::PetscReal,dm::PetscDM = DMMoabCreateBoxMesh(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, useSimplex::PetscBool, nele::PetscInt, nghost::PetscInt)External Links
- PETSc Manual:
DM/DMMoabCreateBoxMesh
PETSc.LibPETSc.DMMoabCreateElement — Method
conn::moab_EntityHandle,oelem::moab_EntityHandle = DMMoabCreateElement(petsclib::PetscLibType, dm::AbstractPetscDM, type::moab_EntityType, nverts::PetscInt)External Links
- PETSc Manual:
DM/DMMoabCreateElement
PETSc.LibPETSc.DMMoabCreateMoab — Method
mbiface::moab_Interface,ltog_tag::moab_Tag,range::moab_Range,dmb::PetscDM = DMMoabCreateMoab(petsclib::PetscLibType, comm::MPI_Comm)External Links
- PETSc Manual:
DM/DMMoabCreateMoab
PETSc.LibPETSc.DMMoabCreateSubmesh — Method
newdm::PetscDM = DMMoabCreateSubmesh(petsclib::PetscLibType, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabCreateSubmesh
PETSc.LibPETSc.DMMoabCreateVector — Method
range::moab_Range,vec::PetscVec = DMMoabCreateVector(petsclib::PetscLibType, dm::AbstractPetscDM, tag::moab_Tag, is_global_vec::PetscBool, destroy_tag::PetscBool)External Links
- PETSc Manual:
DM/DMMoabCreateVector
PETSc.LibPETSc.DMMoabCreateVertices — Method
coords::PetscReal,overts::moab_Range = DMMoabCreateVertices(petsclib::PetscLibType, dm::AbstractPetscDM, nverts::PetscInt)External Links
- PETSc Manual:
DM/DMMoabCreateVertices
PETSc.LibPETSc.DMMoabFEMComputeBasis — Method
coordinates::PetscReal,phypts::PetscReal,jacobian_quadrature_weight_product::PetscReal,fe_basis::PetscReal = DMMoabFEMComputeBasis(petsclib::PetscLibType, dim::PetscInt, nverts::PetscInt, quadrature::PetscQuadrature, fe_basis_derivatives::PetscReal)External Links
- PETSc Manual:
DM/DMMoabFEMComputeBasis
PETSc.LibPETSc.DMMoabFEMCreateQuadratureDefault — Method
quadrature::PetscQuadrature = DMMoabFEMCreateQuadratureDefault(petsclib::PetscLibType, dim::PetscInt, nverts::PetscInt)External Links
- PETSc Manual:
DM/DMMoabFEMCreateQuadratureDefault
PETSc.LibPETSc.DMMoabGenerateHierarchy — Method
ldegrees::PetscInt = DMMoabGenerateHierarchy(petsclib::PetscLibType, dm::AbstractPetscDM, nlevels::PetscInt)External Links
- PETSc Manual:
DM/DMMoabGenerateHierarchy
PETSc.LibPETSc.DMMoabGetAllVertices — Method
DMMoabGetAllVertices(petsclib::PetscLibType, dm::AbstractPetscDM, loc::moab_Range)External Links
- PETSc Manual:
DM/DMMoabGetAllVertices
PETSc.LibPETSc.DMMoabGetBlockSize — Method
bs::PetscInt = DMMoabGetBlockSize(petsclib::PetscLibType, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabGetBlockSize
PETSc.LibPETSc.DMMoabGetBoundaryMarkers — Method
DMMoabGetBoundaryMarkers(petsclib::PetscLibType, dm::AbstractPetscDM, bdvtx::moab_Range, bdelems::moab_Range, bdfaces::moab_Range)External Links
- PETSc Manual:
DM/DMMoabGetBoundaryMarkers
PETSc.LibPETSc.DMMoabGetDimension — Method
dim::PetscInt = DMMoabGetDimension(petsclib::PetscLibType, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabGetDimension
PETSc.LibPETSc.DMMoabGetDofs — Method
dof::PetscInt = DMMoabGetDofs(petsclib::PetscLibType, dm::AbstractPetscDM, npoints::PetscInt, points::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabGetDofs
PETSc.LibPETSc.DMMoabGetDofsBlocked — Method
dof::PetscInt = DMMoabGetDofsBlocked(petsclib::PetscLibType, dm::AbstractPetscDM, npoints::PetscInt, points::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabGetDofsBlocked
PETSc.LibPETSc.DMMoabGetDofsBlockedLocal — Method
dof::PetscInt = DMMoabGetDofsBlockedLocal(petsclib::PetscLibType, dm::AbstractPetscDM, npoints::PetscInt, points::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabGetDofsBlockedLocal
PETSc.LibPETSc.DMMoabGetDofsLocal — Method
dof::PetscInt = DMMoabGetDofsLocal(petsclib::PetscLibType, dm::AbstractPetscDM, npoints::PetscInt, points::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabGetDofsLocal
PETSc.LibPETSc.DMMoabGetElementConnectivity — Method
nconn::PetscInt = DMMoabGetElementConnectivity(petsclib::PetscLibType, dm::AbstractPetscDM, ehandle::moab_EntityHandle, conn::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabGetElementConnectivity
PETSc.LibPETSc.DMMoabGetFieldDof — Method
dof::PetscInt = DMMoabGetFieldDof(petsclib::PetscLibType, dm::AbstractPetscDM, point::moab_EntityHandle, field::PetscInt)External Links
- PETSc Manual:
DM/DMMoabGetFieldDof
PETSc.LibPETSc.DMMoabGetFieldDofs — Method
dof::PetscInt = DMMoabGetFieldDofs(petsclib::PetscLibType, dm::AbstractPetscDM, npoints::PetscInt, points::moab_EntityHandle, field::PetscInt)External Links
- PETSc Manual:
DM/DMMoabGetFieldDofs
PETSc.LibPETSc.DMMoabGetFieldDofsLocal — Method
dof::PetscInt = DMMoabGetFieldDofsLocal(petsclib::PetscLibType, dm::AbstractPetscDM, npoints::PetscInt, points::moab_EntityHandle, field::PetscInt)External Links
- PETSc Manual:
DM/DMMoabGetFieldDofsLocal
PETSc.LibPETSc.DMMoabGetFieldName — Method
DMMoabGetFieldName(petsclib::PetscLibType, dm::AbstractPetscDM, field::PetscInt, fieldName::String)External Links
- PETSc Manual:
DM/DMMoabGetFieldName
PETSc.LibPETSc.DMMoabGetHierarchyLevel — Method
nlevel::PetscInt = DMMoabGetHierarchyLevel(petsclib::PetscLibType, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabGetHierarchyLevel
PETSc.LibPETSc.DMMoabGetInterface — Method
DMMoabGetInterface(petsclib::PetscLibType, dm::AbstractPetscDM, mbiface::moab_Interface)External Links
- PETSc Manual:
DM/DMMoabGetInterface
PETSc.LibPETSc.DMMoabGetLocalElements — Method
DMMoabGetLocalElements(petsclib::PetscLibType, dm::AbstractPetscDM, range::moab_Range)External Links
- PETSc Manual:
DM/DMMoabGetLocalElements
PETSc.LibPETSc.DMMoabGetLocalSize — Method
nel::PetscInt,neg::PetscInt,nvl::PetscInt,nvg::PetscInt = DMMoabGetLocalSize(petsclib::PetscLibType, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabGetLocalSize
PETSc.LibPETSc.DMMoabGetLocalToGlobalTag — Method
DMMoabGetLocalToGlobalTag(petsclib::PetscLibType, dm::AbstractPetscDM, ltog_tag::moab_Tag)External Links
- PETSc Manual:
DM/DMMoabGetLocalToGlobalTag
PETSc.LibPETSc.DMMoabGetLocalVertices — Method
DMMoabGetLocalVertices(petsclib::PetscLibType, dm::AbstractPetscDM, owned::moab_Range, ghost::moab_Range)External Links
- PETSc Manual:
DM/DMMoabGetLocalVertices
PETSc.LibPETSc.DMMoabGetMaterialBlock — Method
mat::PetscInt = DMMoabGetMaterialBlock(petsclib::PetscLibType, dm::AbstractPetscDM, ehandle::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabGetMaterialBlock
PETSc.LibPETSc.DMMoabGetOffset — Method
offset::PetscInt = DMMoabGetOffset(petsclib::PetscLibType, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabGetOffset
PETSc.LibPETSc.DMMoabGetParallelComm — Method
DMMoabGetParallelComm(petsclib::PetscLibType, dm::AbstractPetscDM, pcomm::moab_ParallelComm)External Links
- PETSc Manual:
DM/DMMoabGetParallelComm
PETSc.LibPETSc.DMMoabGetSize — Method
neg::PetscInt,nvg::PetscInt = DMMoabGetSize(petsclib::PetscLibType, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabGetSize
PETSc.LibPETSc.DMMoabGetVecRange — Method
DMMoabGetVecRange(petsclib::PetscLibType, vec::AbstractPetscVec, range::moab_Range)External Links
- PETSc Manual:
DM/DMMoabGetVecRange
PETSc.LibPETSc.DMMoabGetVecTag — Method
DMMoabGetVecTag(petsclib::PetscLibType, vec::AbstractPetscVec, tag::moab_Tag)External Links
- PETSc Manual:
DM/DMMoabGetVecTag
PETSc.LibPETSc.DMMoabGetVertexConnectivity — Method
nconn::PetscInt = DMMoabGetVertexConnectivity(petsclib::PetscLibType, dm::AbstractPetscDM, vhandle::moab_EntityHandle, conn::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabGetVertexConnectivity
PETSc.LibPETSc.DMMoabGetVertexCoordinates — Method
vpos::PetscReal = DMMoabGetVertexCoordinates(petsclib::PetscLibType, dm::AbstractPetscDM, nconn::PetscInt, conn::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabGetVertexCoordinates
PETSc.LibPETSc.DMMoabGetVertexDofsBlocked — Method
DMMoabGetVertexDofsBlocked(petsclib::PetscLibType, dm::AbstractPetscDM, dof::PetscInt)External Links
- PETSc Manual:
DM/DMMoabGetVertexDofsBlocked
PETSc.LibPETSc.DMMoabGetVertexDofsBlockedLocal — Method
DMMoabGetVertexDofsBlockedLocal(petsclib::PetscLibType, dm::AbstractPetscDM, dof::PetscInt)External Links
- PETSc Manual:
DM/DMMoabGetVertexDofsBlockedLocal
PETSc.LibPETSc.DMMoabIsEntityOnBoundary — Method
ent_on_boundary::PetscBool = DMMoabIsEntityOnBoundary(petsclib::PetscLibType, dm::AbstractPetscDM, ent::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabIsEntityOnBoundary
PETSc.LibPETSc.DMMoabLoadFromFile — Method
DMMoabLoadFromFile(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, nghost::PetscInt, filename::String, usrreadopts::String, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabLoadFromFile
PETSc.LibPETSc.DMMoabOutput — Method
DMMoabOutput(petsclib::PetscLibType, dm::AbstractPetscDM, filename::String, usrwriteopts::String)External Links
- PETSc Manual:
DM/DMMoabOutput
PETSc.LibPETSc.DMMoabPToRMapping — Method
coordinates::PetscReal,xphy::PetscReal,natparam::PetscReal,phi::PetscReal = DMMoabPToRMapping(petsclib::PetscLibType, dim::PetscInt, nverts::PetscInt)External Links
- PETSc Manual:
DM/DMMoabPToRMapping
PETSc.LibPETSc.DMMoabRenumberMeshEntities — Method
DMMoabRenumberMeshEntities(petsclib::PetscLibType, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabRenumberMeshEntities
PETSc.LibPETSc.DMMoabRestoreVertexConnectivity — Method
DMMoabRestoreVertexConnectivity(petsclib::PetscLibType, dm::AbstractPetscDM, ehandle::moab_EntityHandle, nconn::PetscInt, conn::moab_EntityHandle)External Links
- PETSc Manual:
DM/DMMoabRestoreVertexConnectivity
PETSc.LibPETSc.DMMoabSetBlockFills — Method
dfill::PetscInt,ofill::PetscInt = DMMoabSetBlockFills(petsclib::PetscLibType, dm::AbstractPetscDM)External Links
- PETSc Manual:
DM/DMMoabSetBlockFills
PETSc.LibPETSc.DMMoabSetBlockSize — Method
DMMoabSetBlockSize(petsclib::PetscLibType, dm::AbstractPetscDM, bs::PetscInt)External Links
- PETSc Manual:
DM/DMMoabSetBlockSize
PETSc.LibPETSc.DMMoabSetFieldName — Method
DMMoabSetFieldName(petsclib::PetscLibType, dm::AbstractPetscDM, field::PetscInt, fieldName::String)External Links
- PETSc Manual:
DM/DMMoabSetFieldName
PETSc.LibPETSc.DMMoabSetFieldNames — Method
DMMoabSetFieldNames(petsclib::PetscLibType, dm::AbstractPetscDM, numFields::PetscInt, fields::String)External Links
- PETSc Manual:
DM/DMMoabSetFieldNames
PETSc.LibPETSc.DMMoabSetFieldVector — Method
DMMoabSetFieldVector(petsclib::PetscLibType, dm::AbstractPetscDM, ifield::PetscInt, fvec::AbstractPetscVec)External Links
- PETSc Manual:
DM/DMMoabSetFieldVector
PETSc.LibPETSc.DMMoabSetGlobalFieldVector — Method
DMMoabSetGlobalFieldVector(petsclib::PetscLibType, dm::AbstractPetscDM, fvec::AbstractPetscVec)External Links
- PETSc Manual:
DM/DMMoabSetGlobalFieldVector
PETSc.LibPETSc.DMMoabSetInterface — Method
DMMoabSetInterface(petsclib::PetscLibType, dm::AbstractPetscDM, mbiface::moab_Interface)External Links
- PETSc Manual:
DM/DMMoabSetInterface
PETSc.LibPETSc.DMMoabSetLocalElements — Method
DMMoabSetLocalElements(petsclib::PetscLibType, dm::AbstractPetscDM, range::moab_Range)External Links
- PETSc Manual:
DM/DMMoabSetLocalElements
PETSc.LibPETSc.DMMoabSetLocalToGlobalTag — Method
DMMoabSetLocalToGlobalTag(petsclib::PetscLibType, dm::AbstractPetscDM, ltogtag::moab_Tag)External Links
- PETSc Manual:
DM/DMMoabSetLocalToGlobalTag
PETSc.LibPETSc.DMMoabSetLocalVertices — Method
DMMoabSetLocalVertices(petsclib::PetscLibType, dm::AbstractPetscDM, range::moab_Range)External Links
- PETSc Manual:
DM/DMMoabSetLocalVertices
PETSc.LibPETSc.DMMoabVecGetArray — Method
DMMoabVecGetArray(petsclib::PetscLibType, dm::AbstractPetscDM, vec::AbstractPetscVec, array::Ptr{Cvoid})External Links
- PETSc Manual:
DM/DMMoabVecGetArray
PETSc.LibPETSc.DMMoabVecGetArrayRead — Method
DMMoabVecGetArrayRead(petsclib::PetscLibType, dm::AbstractPetscDM, vec::AbstractPetscVec, array::Ptr{Cvoid})External Links
- PETSc Manual:
DM/DMMoabVecGetArrayRead
PETSc.LibPETSc.DMMoabVecRestoreArray — Method
DMMoabVecRestoreArray(petsclib::PetscLibType, dm::AbstractPetscDM, vec::AbstractPetscVec, array::Ptr{Cvoid})External Links
- PETSc Manual:
DM/DMMoabVecRestoreArray
PETSc.LibPETSc.DMMoabVecRestoreArrayRead — Method
DMMoabVecRestoreArrayRead(petsclib::PetscLibType, dm::AbstractPetscDM, vec::AbstractPetscVec, array::Ptr{Cvoid})External Links
- PETSc Manual:
DM/DMMoabVecRestoreArrayRead
PETSc.LibPETSc.DMMonitor — Method
DMMonitor(petsclib::PetscLibType, dm::AbstractPetscDM)runs the user provided monitor routines, if they exist
Collective
Input Parameter:
dm- TheDM
Level: developer
See also: DM, DMMonitorSet(), DMMonitorSetFromOptions()
External Links
- PETSc Manual:
DM/DMMonitor
PETSc.LibPETSc.DMMonitorCancel — Method
DMMonitorCancel(petsclib::PetscLibType, dm::AbstractPetscDM)Clears all the monitor functions for a DM object.
Logically Collective
Input Parameter:
dm- the DM
Options Database Key:
-dm_monitor_cancel- cancels all monitors that have been hardwired
into a code by calls to DMonitorSet(), but does not cancel those set via the options database
Level: intermediate
See also: DM, DMMonitorSet(), DMMonitorSetFromOptions(), DMMonitor()
External Links
- PETSc Manual:
DM/DMMonitorCancel
PETSc.LibPETSc.DMMonitorSet — Method
DMMonitorSet(petsclib::PetscLibType, dm::AbstractPetscDM, f::external, mctx::Ptr{Cvoid}, monitordestroy::Ptr{Cvoid})Sets an additional monitor function that is to be used after a solve to monitor discretization performance.
Logically Collective
Input Parameters:
dm- theDMf- the monitor functionmctx- [optional] context for private data for the monitor routine (useNULLif no context is desired)monitordestroy- [optional] routine that frees monitor context (may beNULL), seePetscCtxDestroyFnfor the calling sequence
Options Database Key:
-dm_monitor_cancel- cancels all monitors that have been hardwired into a code by calls toDMMonitorSet(), but
does not cancel those set via the options database.
Level: intermediate
See also: DM, DMMonitorCancel(), DMMonitorSetFromOptions(), DMMonitor(), PetscCtxDestroyFn
External Links
- PETSc Manual:
DM/DMMonitorSet
PETSc.LibPETSc.DMMonitorSetFromOptions — Method
flg::PetscBool = DMMonitorSetFromOptions(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, help::String, manual::String, monitor::external, monitorsetup::external)Sets a monitor function and viewer appropriate for the type indicated by the user
Collective
Input Parameters:
dm-DMobject you wish to monitorname- the monitor type one is seekinghelp- message indicating what monitoring is donemanual- manual page for the monitormonitor- the monitor function, this must use aPetscViewerFormatas its contextmonitorsetup- a function that is called once ONLY if the user selected this monitor that may set additional features of theDMorPetscViewerobjects
Output Parameter:
flg- Flag set if the monitor was created
Calling sequence of monitor:
dm- theDMto be monitoredctx- monitor context
Calling sequence of monitorsetup:
dm- theDMto be monitoredvf- thePetscViewerand format to be used by the monitor
Level: developer
See also: DM, PetscOptionsCreateViewer(), PetscOptionsGetReal(), PetscOptionsHasName(), PetscOptionsGetString(), PetscOptionsGetIntArray(), PetscOptionsGetRealArray(), PetscOptionsBool(), PetscOptionsInt(), PetscOptionsString(), PetscOptionsReal(), PetscOptionsName(), PetscOptionsBegin(), PetscOptionsEnd(), PetscOptionsHeadBegin(), PetscOptionsStringArray(), PetscOptionsRealArray(), PetscOptionsScalar(), PetscOptionsBoolGroupBegin(), PetscOptionsBoolGroup(), PetscOptionsBoolGroupEnd(), PetscOptionsFList(), PetscOptionsEList(), DMMonitor(), DMMonitorSet()
External Links
- PETSc Manual:
DM/DMMonitorSetFromOptions
PETSc.LibPETSc.DMOutputSequenceLoad — Method
val::PetscReal = DMOutputSequenceLoad(petsclib::PetscLibType, dm::AbstractPetscDM, viewer::PetscViewer, name::String, num::PetscInt)Retrieve the sequence value from a PetscViewer
Input Parameters:
dm- The originalDMviewer- ThePetscViewerto get it fromname- The sequence namenum- The output sequence number
Output Parameter:
val- The output sequence value
Level: intermediate
See also: DM, DMGetOutputSequenceNumber(), DMSetOutputSequenceNumber(), VecView()
External Links
- PETSc Manual:
DM/DMOutputSequenceLoad
PETSc.LibPETSc.DMPatchCreate — Method
mesh::PetscDM = DMPatchCreate(petsclib::PetscLibType, comm::MPI_Comm)Creates a DMPatch object, which is a collections of DMs called patches.
Collective
Input Parameter:
comm- The communicator for the DMPatch object
Output Parameter:
mesh- The DMPatch object
See also: DMPatchZoom()
External Links
- PETSc Manual:
DMPatch/DMPatchCreate
PETSc.LibPETSc.DMPatchCreateGrid — Method
dm::PetscDM = DMPatchCreateGrid(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, patchSize::MatStencil, commSize::MatStencil, gridSize::MatStencil)Create a DMPATCH whose coarse DM is a structured DMDA of the requested global size, with the given patch and process-grid sizes
Collective
Input Parameters:
comm- the MPI communicatordim- the spatial dimension (1, 2, or 3); unused dimensions ofgridSizeandpatchSizeare forced to 1patchSize-MatStencilgiving the size of each patch in cellscommSize-MatStencilgiving the process grid used per patch (seeDMPatchSetCommSize())gridSize-MatStencilgiving the global cell count of the underlyingDMDAin each dimension
Output Parameter:
dm- the newly createdDMPATCH
Level: developer
See also: DMPATCH, DMPatchCreate(), DMPatchSetPatchSize(), DMPatchSetCommSize(), DMDA, MatStencil
External Links
- PETSc Manual:
DMPatch/DMPatchCreateGrid
PETSc.LibPETSc.DMPatchGetCoarse — Method
dmCoarse::PetscDM = DMPatchGetCoarse(petsclib::PetscLibType, dm::AbstractPetscDM)Get the coarse DM associated with a DMPATCH
Not Collective
Input Parameter:
dm- theDMPATCH
Output Parameter:
dmCoarse- the coarseDM
Level: intermediate
See also: DMPATCH, DMPatchCreate(), DMPatchZoom()
External Links
- PETSc Manual:
DMPatch/DMPatchGetCoarse
PETSc.LibPETSc.DMPatchGetCommSize — Method
commSize::MatStencil = DMPatchGetCommSize(petsclib::PetscLibType, dm::AbstractPetscDM)Get the process grid used for each patch of a DMPATCH
Not Collective
Input Parameter:
dm- theDMPATCH
Output Parameter:
commSize- aMatStencilwhosei,j,kfields hold the number of processes used per patch in each dimension
Level: intermediate
See also: DMPATCH, DMPatchSetCommSize(), DMPatchGetPatchSize(), MatStencil
External Links
- PETSc Manual:
DMPatch/DMPatchGetCommSize
PETSc.LibPETSc.DMPatchGetPatchSize — Method
patchSize::MatStencil = DMPatchGetPatchSize(petsclib::PetscLibType, dm::AbstractPetscDM)Get the size of a single patch of a DMPATCH, in grid cells
Not Collective
Input Parameter:
dm- theDMPATCH
Output Parameter:
patchSize- aMatStencilwhosei,j,k,cfields hold the patch extent in each dimension
Level: intermediate
See also: DMPATCH, DMPatchSetPatchSize(), DMPatchGetCommSize(), MatStencil
External Links
- PETSc Manual:
DMPatch/DMPatchGetPatchSize
PETSc.LibPETSc.DMPatchSetCommSize — Method
DMPatchSetCommSize(petsclib::PetscLibType, dm::AbstractPetscDM, commSize::MatStencil)Set the process grid used for each patch of a DMPATCH
Logically Collective
Input Parameters:
dm- theDMPATCHcommSize- aMatStencilwhosei,j,kfields hold the number of processes to use per patch in each dimension
Level: intermediate
See also: DMPATCH, DMPatchGetCommSize(), DMPatchSetPatchSize(), MatStencil
External Links
- PETSc Manual:
DMPatch/DMPatchSetCommSize
PETSc.LibPETSc.DMPatchSetPatchSize — Method
DMPatchSetPatchSize(petsclib::PetscLibType, dm::AbstractPetscDM, patchSize::MatStencil)Set the size of a single patch of a DMPATCH, in grid cells
Logically Collective
Input Parameters:
dm- theDMPATCHpatchSize- aMatStencilwhosei,j,k,cfields hold the patch extent in each dimension
Level: intermediate
See also: DMPATCH, DMPatchGetPatchSize(), DMPatchSetCommSize(), MatStencil
External Links
- PETSc Manual:
DMPatch/DMPatchSetPatchSize
PETSc.LibPETSc.DMPatchSolve — Method
DMPatchSolve(petsclib::PetscLibType, dm::AbstractPetscDM)Iterate over all patches of a DMPATCH, zooming the coarse DM onto each patch and scattering data between the coarse and zoomed representations
Collective
Input Parameter:
dm- theDMPATCH
Level: developer
See also: DMPATCH, DMPatchZoom(), DMPatchGetCoarse(), DMPatchGetPatchSize(), DMPatchGetCommSize()
External Links
- PETSc Manual:
DMPatch/DMPatchSolve
PETSc.LibPETSc.DMPatchZoom — Method
dmz::PetscDM,sfz::PetscSF,sfzr::PetscSF = DMPatchZoom(petsclib::PetscLibType, dm::AbstractPetscDM, lower::MatStencil, upper::MatStencil, commz::MPI_Comm)Create patches of a DMDA on subsets of processes, indicated by commz
Collective
Input Parameters:
dm- theDMlower- the lower left corner of the requested patchupper- the upper right corner of the requested patchcommz- the new communicator for the patch,MPI_COMM_NULLindicates that the given rank will not own a patch
Output Parameters:
dmz- the patchDMsfz- thePetscSFmapping the patch+halo to the zoomed version (optional)sfzr- thePetscSFmapping the patch to the restricted zoomed version
Level: intermediate
See also: DMPatchSolve(), DMDACreatePatchIS()
External Links
- PETSc Manual:
DMPatch/DMPatchZoom
PETSc.LibPETSc.DMPolytopeGetOrientation — Method
ornt::PetscInt = DMPolytopeGetOrientation(petsclib::PetscLibType, ct::DMPolytopeType, sourceCone::Vector{PetscInt}, targetCone::Vector{PetscInt})Determine an orientation (transformation) that takes the source face arrangement to the target face arrangement
Not Collective
Input Parameters:
ct- TheDMPolytopeTypesourceCone- The source arrangement of facestargetCone- The target arrangement of faces
Output Parameter:
ornt- The orientation (transformation) which will take the source arrangement to the target arrangement
Level: advanced
See also: DM, DMPolytopeType, DMPolytopeMatchOrientation(), DMPolytopeGetVertexOrientation(), DMPolytopeMatchVertexOrientation()
External Links
- PETSc Manual:
DM/DMPolytopeGetOrientation
PETSc.LibPETSc.DMPolytopeGetVertexOrientation — Method
ornt::PetscInt = DMPolytopeGetVertexOrientation(petsclib::PetscLibType, ct::DMPolytopeType, sourceCone::Vector{PetscInt}, targetCone::Vector{PetscInt})Determine an orientation (transformation) that takes the source vertex arrangement to the target vertex arrangement
Not Collective
Input Parameters:
ct- TheDMPolytopeTypesourceCone- The source arrangement of verticestargetCone- The target arrangement of vertices
Output Parameter:
ornt- The orientation (transformation) which will take the source arrangement to the target arrangement
Level: advanced
See also: DM, DMPolytopeType, DMPolytopeMatchVertexOrientation(), DMPolytopeGetOrientation()
External Links
- PETSc Manual:
DM/DMPolytopeGetVertexOrientation
PETSc.LibPETSc.DMPolytopeInCellTest — Method
inside::PetscBool = DMPolytopeInCellTest(petsclib::PetscLibType, ct::DMPolytopeType, point::Vector{PetscReal})Check whether a point lies inside the reference cell of given type
Not Collective
Input Parameters:
ct- TheDMPolytopeTypepoint- Coordinates of the point
Output Parameter:
inside- Flag indicating whether the point is inside the reference cell of given type
Level: advanced
See also: DM, DMPolytopeType, DMLocatePoints()
External Links
- PETSc Manual:
DM/DMPolytopeInCellTest
PETSc.LibPETSc.DMPolytopeMatchOrientation — Method
ornt::PetscInt,found::PetscBool = DMPolytopeMatchOrientation(petsclib::PetscLibType, ct::DMPolytopeType, sourceCone::Vector{PetscInt}, targetCone::Vector{PetscInt})Determine an orientation (transformation) that takes the source face arrangement to the target face arrangement
Not Collective
Input Parameters:
ct- TheDMPolytopeTypesourceCone- The source arrangement of facestargetCone- The target arrangement of faces
Output Parameters:
ornt- The orientation (transformation) which will take the source arrangement to the target arrangementfound- Flag indicating that a suitable orientation was found
Level: advanced
See also: DM, DMPolytopeGetOrientation(), DMPolytopeMatchVertexOrientation(), DMPolytopeGetVertexOrientation()
External Links
- PETSc Manual:
DM/DMPolytopeMatchOrientation
PETSc.LibPETSc.DMPolytopeMatchVertexOrientation — Method
ornt::PetscInt,found::PetscBool = DMPolytopeMatchVertexOrientation(petsclib::PetscLibType, ct::DMPolytopeType, sourceVert::Vector{PetscInt}, targetVert::Vector{PetscInt})Determine an orientation (transformation) that takes the source vertex arrangement to the target vertex arrangement
Not Collective
Input Parameters:
ct- TheDMPolytopeTypesourceVert- The source arrangement of verticestargetVert- The target arrangement of vertices
Output Parameters:
ornt- The orientation (transformation) which will take the source arrangement to the target arrangementfound- Flag indicating that a suitable orientation was found
Level: advanced
See also: DM, DMPolytopeType, DMPolytopeGetOrientation(), DMPolytopeMatchOrientation(), DMPolytopeTypeGetNumVertices(), DMPolytopeTypeGetVertexArrangement()
External Links
- PETSc Manual:
DM/DMPolytopeMatchVertexOrientation
PETSc.LibPETSc.DMPrintCellIndices — Method
DMPrintCellIndices(petsclib::PetscLibType, c::PetscInt, name::String, len::PetscInt, x::Vector{PetscInt})Print an integer array of per-cell indices to PETSC_COMM_SELF
Not Collective
Input Parameters:
c- the cell numbername- the label to print with the cell (typically the element or field name)len- the length ofxx- the array of integer indices
Level: developer
See also: DM, DMPrintCellVector(), DMPrintCellVectorReal(), DMPrintCellMatrix(), DMPrintLocalVec()
External Links
- PETSc Manual:
DM/DMPrintCellIndices
PETSc.LibPETSc.DMPrintCellMatrix — Method
DMPrintCellMatrix(petsclib::PetscLibType, c::PetscInt, name::String, rows::PetscInt, cols::PetscInt, A::Vector{PetscScalar})Print a scalar array representing a per-cell matrix to PETSC_COMM_SELF
Not Collective
Input Parameters:
c- the cell numbername- the label to print with the cell (typically the element or field name)rows- number of rows in the matrixcols- number of columns in the matrixA- the row-major array ofPetscScalarmatrix entries
Level: developer
See also: DM, DMPrintCellIndices(), DMPrintCellVector(), DMPrintCellVectorReal(), DMPrintLocalVec()
External Links
- PETSc Manual:
DM/DMPrintCellMatrix
PETSc.LibPETSc.DMPrintCellVector — Method
DMPrintCellVector(petsclib::PetscLibType, c::PetscInt, name::String, len::PetscInt, x::Vector{PetscScalar})Print a scalar array representing a per-cell vector to PETSC_COMM_SELF
Not Collective
Input Parameters:
c- the cell numbername- the label to print with the cell (typically the element or field name)len- the length ofxx- the array ofPetscScalarvalues
Level: developer
See also: DM, DMPrintCellIndices(), DMPrintCellVectorReal(), DMPrintCellMatrix(), DMPrintLocalVec()
External Links
- PETSc Manual:
DM/DMPrintCellVector
PETSc.LibPETSc.DMPrintCellVectorReal — Method
DMPrintCellVectorReal(petsclib::PetscLibType, c::PetscInt, name::String, len::PetscInt, x::Vector{PetscReal})Print a real array representing a per-cell vector to PETSC_COMM_SELF
Not Collective
Input Parameters:
c- the cell numbername- the label to print with the cell (typically the element or field name)len- the length ofxx- the array ofPetscRealvalues
Level: developer
See also: DM, DMPrintCellIndices(), DMPrintCellVector(), DMPrintCellMatrix(), DMPrintLocalVec()
External Links
- PETSc Manual:
DM/DMPrintCellVectorReal
PETSc.LibPETSc.DMPrintLocalVec — Method
DMPrintLocalVec(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, tol::PetscReal, X::AbstractPetscVec)Print a Vec associated with a DM, filtering out very small entries
Collective
Input Parameters:
dm- theDMproviding the communicatorname- a label printed before the vector valuestol- tolerance below which entries are filtered to zero usingVecFilter()X- theVecto print
Level: developer
See also: DM, DMPrintCellIndices(), DMPrintCellVector(), DMPrintCellVectorReal(), DMPrintCellMatrix(), VecFilter()
External Links
- PETSc Manual:
DM/DMPrintLocalVec
PETSc.LibPETSc.DMProjectBdFieldLabelLocal — Method
DMProjectBdFieldLabelLocal(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, localU::AbstractPetscVec, noname::Ptr{Cvoid})This projects the given function of the input fields into the function space provided, putting the coefficients in a local vector, calculating only over the portion of the domain boundary specified by the label.
Not Collective
Input Parameters:
dm- TheDMtime- The timelabel- TheDMLabelmarking the portion of the domain boundary to outputnumIds- The number of label ids to useids- The label ids to use for markingNc- The number of components to set in the output, orPETSC_DETERMINEfor all componentscomps- The components to set in the output, orNULLfor all componentslocalU- The input field vectorfuncs- The functions to evaluate, one per fieldmode- The insertion mode for values
Output Parameter:
localX- The output vector
Calling sequence of funcs:
dim- The spatial dimensionNf- The number of input fieldsNfAux- The number of input auxiliary fieldsuOff- The offset of each field in u[]uOff_x- The offset of each field in u_x[]u- The field values at this point in spaceu_t- The field time derivative at this point in space (orNULL)u_x- The field derivatives at this point in spaceaOff- The offset of each auxiliary field in u[]aOff_x- The offset of each auxiliary field in u_x[]a- The auxiliary field values at this point in spacea_t- The auxiliary field time derivative at this point in space (orNULL)a_x- The auxiliary field derivatives at this point in spacet- The current timex- The coordinates of this pointn- The face normalnumConstants- The number of constantsconstants- The value of each constantf- The value of the function at this point in space
Level: intermediate
See also: DM, DMProjectField(), DMProjectFieldLabelLocal(), DMProjectFunction(), DMComputeL2Diff()
External Links
- PETSc Manual:
DM/DMProjectBdFieldLabelLocal
PETSc.LibPETSc.DMProjectField — Method
DMProjectField(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, U::AbstractPetscVec, funcs::Ptr{Ptr{Cvoid}}, mode::InsertMode, X::AbstractPetscVec)This projects a given function of the input fields into the function space provided by a DM, putting the coefficients in a global vector.
Collective
Input Parameters:
dm- TheDMtime- The timeU- The input field vectorfuncs- The functions to evaluate, one per field, seePetscPointFnmode- The insertion mode for values
Output Parameter:
X- The output vector
Level: advanced
See also: DM, PetscPointFn, DMProjectFieldLocal(), DMProjectFieldLabelLocal(), DMProjectFunction(), DMComputeL2Diff()
External Links
- PETSc Manual:
DM/DMProjectField
PETSc.LibPETSc.DMProjectFieldLabel — Method
DMProjectFieldLabel(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, U::AbstractPetscVec, noname::Ptr{Cvoid})This projects the given function of the input fields into the function space provided, putting the coefficients in a global vector, calculating only over the portion of the domain specified by the label.
Not Collective
Input Parameters:
dm- TheDMtime- The timelabel- TheDMLabelmarking the portion of the domain to outputnumIds- The number of label ids to useids- The label ids to use for markingNc- The number of components to set in the output, orPETSC_DETERMINEfor all componentscomps- The components to set in the output, orNULLfor all componentsU- The input field vectorfuncs- The functions to evaluate, one per fieldmode- The insertion mode for values
Output Parameter:
X- The output vector
Calling sequence of funcs:
dim- The spatial dimensionNf- The number of input fieldsNfAux- The number of input auxiliary fieldsuOff- The offset of each field in u[]uOff_x- The offset of each field in u_x[]u- The field values at this point in spaceu_t- The field time derivative at this point in space (orNULL)u_x- The field derivatives at this point in spaceaOff- The offset of each auxiliary field in u[]aOff_x- The offset of each auxiliary field in u_x[]a- The auxiliary field values at this point in spacea_t- The auxiliary field time derivative at this point in space (orNULL)a_x- The auxiliary field derivatives at this point in spacet- The current timex- The coordinates of this pointnumConstants- The number of constantsconstants- The value of each constantf- The value of the function at this point in space
Level: intermediate
See also: DM, DMProjectField(), DMProjectFieldLabelLocal(), DMProjectFunction(), DMComputeL2Diff()
External Links
- PETSc Manual:
DM/DMProjectFieldLabel
PETSc.LibPETSc.DMProjectFieldLabelLocal — Method
DMProjectFieldLabelLocal(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, localU::AbstractPetscVec, noname::Ptr{Cvoid})This projects the given function of the input fields into the function space provided, putting the coefficients in a local vector, calculating only over the portion of the domain specified by the label.
Not Collective
Input Parameters:
dm- TheDMtime- The timelabel- TheDMLabelmarking the portion of the domain to outputnumIds- The number of label ids to useids- The label ids to use for markingNc- The number of components to set in the output, orPETSC_DETERMINEfor all componentscomps- The components to set in the output, orNULLfor all componentslocalU- The input field vectorfuncs- The functions to evaluate, one per fieldmode- The insertion mode for values
Output Parameter:
localX- The output vector
Calling sequence of funcs:
dim- The spatial dimensionNf- The number of input fieldsNfAux- The number of input auxiliary fieldsuOff- The offset of each field in u[]uOff_x- The offset of each field in u_x[]u- The field values at this point in spaceu_t- The field time derivative at this point in space (orNULL)u_x- The field derivatives at this point in spaceaOff- The offset of each auxiliary field in u[]aOff_x- The offset of each auxiliary field in u_x[]a- The auxiliary field values at this point in spacea_t- The auxiliary field time derivative at this point in space (orNULL)a_x- The auxiliary field derivatives at this point in spacet- The current timex- The coordinates of this pointnumConstants- The number of constantsconstants- The value of each constantf- The value of the function at this point in space
Level: intermediate
See also: DM, DMProjectField(), DMProjectFieldLabel(), DMProjectFunction(), DMComputeL2Diff()
External Links
- PETSc Manual:
DM/DMProjectFieldLabelLocal
PETSc.LibPETSc.DMProjectFieldLocal — Method
DMProjectFieldLocal(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, localU::AbstractPetscVec, noname::Ptr{Cvoid})This projects the given function of the input fields into the function space provided by the DM, putting the coefficients in a local vector.
Not Collective
Input Parameters:
dm- TheDMtime- The timelocalU- The input field vector; may beNULLif projection is defined purely by coordinatesfuncs- The functions to evaluate, one per fieldmode- The insertion mode for values
Output Parameter:
localX- The output vector
Calling sequence of funcs:
dim- The spatial dimensionNf- The number of input fieldsNfAux- The number of input auxiliary fieldsuOff- The offset of each field in u[]uOff_x- The offset of each field in u_x[]u- The field values at this point in spaceu_t- The field time derivative at this point in space (orNULL)u_x- The field derivatives at this point in spaceaOff- The offset of each auxiliary field in u[]aOff_x- The offset of each auxiliary field in u_x[]a- The auxiliary field values at this point in spacea_t- The auxiliary field time derivative at this point in space (orNULL)a_x- The auxiliary field derivatives at this point in spacet- The current timex- The coordinates of this pointnumConstants- The number of constantsconstants- The value of each constantf- The value of the function at this point in space
Level: intermediate
See also: DM, DMProjectField(), DMProjectFieldLabelLocal(), DMProjectFunction(), DMComputeL2Diff()
External Links
- PETSc Manual:
DM/DMProjectFieldLocal
PETSc.LibPETSc.DMProjectFunction — Method
DMProjectFunction(petsclib, dm, time, funcs, ctxs, mode, X)Project the pointwise functions funcs (one Ptr{Cvoid} per field, matching PetscSimplePointFn signature) into the global vector X. ctxs is a matching Vector{Ptr{Cvoid}} of context pointers (use C_NULL entries for no context).
PETSc.LibPETSc.DMProjectFunctionLabel — Method
DMProjectFunctionLabel(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, noname::Ptr{Cvoid})This projects the given function into the function space provided by the DM, putting the coefficients in a global vector, setting values only for points in the given label.
Collective
Input Parameters:
dm- TheDMtime- The timenumIds- The number of idsids- The idsNc- The number of componentscomps- The componentslabel- TheDMLabelselecting the portion of the mesh for projectionfuncs- The coordinate functions to evaluate, one per fieldctxs- Optional array of contexts to pass to each coordinate function. ctxs may be null.mode- The insertion mode for values
Output Parameter:
X- vector
Calling sequence of funcs:
dim- The spatial dimensiontime- The current timestepx- The coordinatesNc- The number of componentsu- The output field valuesctx- optional function context
Level: developer
See also: DM, DMProjectFunction(), DMProjectFunctionLocal(), DMProjectFunctionLabelLocal(), DMComputeL2Diff()
External Links
- PETSc Manual:
DM/DMProjectFunctionLabel
PETSc.LibPETSc.DMProjectFunctionLabelLocal — Method
DMProjectFunctionLabelLocal(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, label::DMLabel, numIds::PetscInt, ids::Vector{PetscInt}, Nc::PetscInt, comps::Vector{PetscInt}, noname::Ptr{Cvoid})This projects the given function into the function space provided by the DM, putting the coefficients in a local vector, setting values only for points in the given label.
Not Collective
Input Parameters:
dm- TheDMtime- The timelabel- TheDMLabelselecting the portion of the mesh for projectionnumIds- The number of idsids- The idsNc- The number of componentscomps- The componentsfuncs- The coordinate functions to evaluate, one per fieldctxs- Optional array of contexts to pass to each coordinate function. ctxs itself may be null.mode- The insertion mode for values
Output Parameter:
localX- vector
Calling sequence of funcs:
dim- The spatial dimensiontime- The current timex- The coordinatesNc- The number of componentsu- The output field valuesctx- optional function context
Level: developer
See also: DM, DMProjectFunction(), DMProjectFunctionLocal(), DMProjectFunctionLabel(), DMComputeL2Diff()
External Links
- PETSc Manual:
DM/DMProjectFunctionLabelLocal
PETSc.LibPETSc.DMProjectFunctionLocal — Method
DMProjectFunctionLocal(petsclib::PetscLibType, dm::AbstractPetscDM, time::PetscReal, noname::Ptr{Cvoid})This projects the given function into the function space provided by a DM, putting the coefficients in a local vector.
Not Collective
Input Parameters:
dm- TheDMtime- The timefuncs- The coordinate functions to evaluate, one per fieldctxs- Optional array of contexts to pass to each coordinate function. ctxs itself may be null.mode- The insertion mode for values
Output Parameter:
localX- vector
Calling sequence of funcs:
dim- The spatial dimensiontime- The current timestepx- The coordinatesNc- The number of componentsu- The output field valuesctx- optional function context
Level: developer
See also: DM, DMProjectFunction(), DMProjectFunctionLabel(), DMComputeL2Diff()
External Links
- PETSc Manual:
DM/DMProjectFunctionLocal
PETSc.LibPETSc.DMRefine — Method
dmf::PetscDM = DMRefine(petsclib::PetscLibType, dm::AbstractPetscDM, comm::MPI_Comm)Refines a DM object using a standard nonadaptive refinement of the underlying mesh
Collective
Input Parameters:
dm- theDMobjectcomm- the communicator to contain the newDMobject (orMPI_COMM_NULL)
Output Parameter:
dmf- the refinedDM, orNULL
Options Database Key:
-dm_plex_cell_refiner strategy- chooses the refinement strategy, e.g. regular, tohex
Level: developer
See also: DM, DMCoarsen(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateDomainDecomposition(), DMRefineHookAdd(), DMRefineHookRemove()
External Links
- PETSc Manual:
DM/DMRefine
PETSc.LibPETSc.DMRefineHierarchy — Method
DMRefineHierarchy(petsclib::PetscLibType, dm::AbstractPetscDM, nlevels::PetscInt, dmf::Vector{<:AbstractPetscDM})Refines a DM object, all levels at once
Collective
Input Parameters:
dm- theDMobjectnlevels- the number of levels of refinement
Output Parameter:
dmf- the refinedDMhierarchy
Level: developer
See also: DM, DMCoarsen(), DMCoarsenHierarchy(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation()
External Links
- PETSc Manual:
DM/DMRefineHierarchy
PETSc.LibPETSc.DMRefineHookAdd — Method
DMRefineHookAdd(petsclib::PetscLibType, coarse::AbstractPetscDM, refinehook::external, interphook::external, ctx::Ptr{Cvoid})adds a callback to be run when interpolating a nonlinear problem to a finer grid
Logically Collective; No Fortran Support
Input Parameters:
coarse-DMon which to run a hook when interpolating to a finer levelrefinehook- function to run when setting up the finer levelinterphook- function to run to update data on finer levels (once perSNESSolve())ctx- [optional] context for provide data for the hooks (may beNULL)
Calling sequence of refinehook:
coarse- coarse levelDMfine- fine levelDMto interpolate problem toctx- optional function context
Calling sequence of interphook:
coarse- coarse levelDMinterp- matrix interpolating a coarse-level solution to the finer gridfine- fine levelDMto updatectx- optional function context
Level: advanced
See also: DM, DMCoarsenHookAdd(), DMInterpolate(), SNESFASGetInterpolation(), SNESFASGetInjection(), PetscObjectCompose(), PetscContainerCreate()
External Links
- PETSc Manual:
DM/DMRefineHookAdd
PETSc.LibPETSc.DMRefineHookRemove — Method
DMRefineHookRemove(petsclib::PetscLibType, coarse::AbstractPetscDM, refinehook::external, interphook::external, ctx::Ptr{Cvoid})remove a callback from the list of hooks, that have been set with DMRefineHookAdd(), to be run when interpolating a nonlinear problem to a finer grid
Logically Collective; No Fortran Support
Input Parameters:
coarse- theDMon which to run a hook when restricting to a coarser levelrefinehook- function to run when setting up a finer levelinterphook- function to run to update data on finer levelsctx- [optional] application context for provide data for the hooks (may beNULL)
Calling sequence of refinehook:
coarse- the coarseDMfine- the fineDMctx- context for the function
Calling sequence of interphook:
coarse- the coarseDMinterp- the interpolationMatfrom coarse to finefine- the fineDMctx- context for the function
Level: advanced
See also: DM, DMRefineHookAdd(), DMCoarsenHookRemove(), DMInterpolate(), SNESFASGetInterpolation(), SNESFASGetInjection(), PetscObjectCompose(), PetscContainerCreate()
External Links
- PETSc Manual:
DM/DMRefineHookRemove
PETSc.LibPETSc.DMRegister — Method
DMRegister(petsclib::PetscLibType, sname::String, fnc::external)Adds a new DM type implementation
Not Collective, No Fortran Support
Input Parameters:
sname- The name of a new user-defined creation routinefunction- The creation routine itself
Calling sequence of function:
dm- the newDMthat is being created
Level: advanced
See also: DM, DMType, DMSetType(), DMRegisterAll(), DMRegisterDestroy()
External Links
- PETSc Manual:
DM/DMRegister
PETSc.LibPETSc.DMRemoveLabel — Method
label::DMLabel = DMRemoveLabel(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)Remove the label given by name from this DM
Not Collective
Input Parameters:
dm- TheDMobjectname- The label name
Output Parameter:
label- TheDMLabel, orNULLif the label is absent. Pass inNULLto callDMLabelDestroy()on the label, otherwise the
caller is responsible for calling DMLabelDestroy().
Level: developer
See also: DM, DMLabel, DMCreateLabel(), DMHasLabel(), DMGetLabel(), DMGetLabelValue(), DMSetLabelValue(), DMLabelDestroy(), DMRemoveLabelBySelf()
External Links
- PETSc Manual:
DM/DMRemoveLabel
PETSc.LibPETSc.DMRemoveLabelBySelf — Method
DMRemoveLabelBySelf(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel, failNotFound::PetscBool)Remove the label from this DM
Not Collective
Input Parameters:
dm- TheDMobjectlabel- TheDMLabelto be removed from theDMfailNotFound- Should it fail if the label is not found in theDM?
Level: developer
See also: DM, DMLabel, DMCreateLabel(), DMHasLabel(), DMGetLabel(), DMGetLabelValue(), DMSetLabelValue(), DMLabelDestroy(), DMRemoveLabel()
External Links
- PETSc Manual:
DM/DMRemoveLabelBySelf
PETSc.LibPETSc.DMReorderSectionGetDefault — Method
reorder::DMReorderDefaultFlag = DMReorderSectionGetDefault(petsclib::PetscLibType, dm::AbstractPetscDM)Get flag indicating whether the local section should be reordered by default
Not collective
Input Parameter:
dm- The DM
Output Parameter:
reorder- Flag for reordering
Level: intermediate
See also: DMReorderSetDefault()
External Links
- PETSc Manual:
DM/DMReorderSectionGetDefault
PETSc.LibPETSc.DMReorderSectionGetType — Method
reorder::String = DMReorderSectionGetType(petsclib::PetscLibType, dm::AbstractPetscDM)Get the reordering type for the local section
Not collective
Input Parameter:
dm- The DM
Output Parameter:
reorder- The reordering method
Level: intermediate
See also: DMReorderSetDefault(), DMReorderSectionGetDefault()
External Links
- PETSc Manual:
DM/DMReorderSectionGetType
PETSc.LibPETSc.DMReorderSectionSetDefault — Method
DMReorderSectionSetDefault(petsclib::PetscLibType, dm::AbstractPetscDM, reorder::DMReorderDefaultFlag)Set flag indicating whether the local section should be reordered by default
Logically collective
Input Parameters:
dm- The DMreorder- Flag for reordering
Level: intermediate
See also: DMReorderSectionGetDefault()
External Links
- PETSc Manual:
DM/DMReorderSectionSetDefault
PETSc.LibPETSc.DMReorderSectionSetType — Method
DMReorderSectionSetType(petsclib::PetscLibType, dm::AbstractPetscDM, reorder::String)Set the type of local section reordering
Logically collective
Input Parameters:
dm- The DMreorder- The reordering method
Level: intermediate
See also: DMReorderSectionGetType(), DMReorderSectionSetDefault()
External Links
- PETSc Manual:
DM/DMReorderSectionSetType
PETSc.LibPETSc.DMRestoreGlobalVector — Method
DMRestoreGlobalVector(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec)Returns a PETSc vector that obtained from DMGetGlobalVector(). Do not use with vector obtained via DMCreateGlobalVector().
Not Collective
Input Parameters:
dm- theDMg- the global vector
Level: beginner
See also: DM, DMCreateGlobalVector(), VecDuplicate(), VecDuplicateVecs(), DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMGlobalToGlobalBegin(), DMGlobalToGlobalEnd(), DMGlobalToGlobal(), DMCreateLocalVector(), DMGetGlobalVector(), DMClearGlobalVectors()
External Links
- PETSc Manual:
DM/DMRestoreGlobalVector
PETSc.LibPETSc.DMRestoreLocalVector — Method
DMRestoreLocalVector(petsclib::PetscLibType, dm::AbstractPetscDM, g::AbstractPetscVec)Returns a PETSc vector that was obtained from DMGetLocalVector(). Do not use with vector obtained via DMCreateLocalVector().
Not Collective
Input Parameters:
dm- theDMg- the local vector
Level: beginner
See also: DM, DMCreateGlobalVector(), VecDuplicate(), VecDuplicateVecs(), DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMGlobalToLocalBegin(), DMGlobalToLocalEnd(), DMLocalToGlobalBegin(), DMCreateLocalVector(), DMGetLocalVector(), DMClearLocalVectors()
External Links
- PETSc Manual:
DM/DMRestoreLocalVector
PETSc.LibPETSc.DMRestoreNamedGlobalVector — Method
DMRestoreNamedGlobalVector(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, X::AbstractPetscVec)restore access to a named, persistent global vector
Collective
Input Parameters:
dm-DMon whichXwas gottenname- name under whichXwas gottenX-Vecto restore
Level: developer
See also: DM, DMGetNamedGlobalVector(), DMClearNamedGlobalVectors()
External Links
- PETSc Manual:
DM/DMRestoreNamedGlobalVector
PETSc.LibPETSc.DMRestoreNamedLocalVector — Method
DMRestoreNamedLocalVector(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, X::AbstractPetscVec)restore access to a named, persistent local vector obtained with DMGetNamedLocalVector()
Not Collective
Input Parameters:
dm-DMon whichXwas gottenname- name under whichXwas gottenX-Vecto restore
Level: developer
See also: DM, DMRestoreNamedGlobalVector(), DMGetNamedLocalVector(), DMClearNamedLocalVectors()
External Links
- PETSc Manual:
DM/DMRestoreNamedLocalVector
PETSc.LibPETSc.DMRestrict — Method
DMRestrict(petsclib::PetscLibType, fine::AbstractPetscDM, restrct::AbstractPetscMat, rscale::AbstractPetscVec, inject::AbstractPetscMat, coarse::AbstractPetscDM)restricts user-defined problem data to a coarser DM by running hooks registered by DMCoarsenHookAdd()
Collective if any hooks are
Input Parameters:
fine- finerDMfrom which the data is obtainedrestrct- restriction matrix, apply usingMatRestrict(), usually the transpose of the interpolationrscale- scaling vector for restrictioninject- injection matrix, also useMatRestrict()coarse- coarserDMto update
Level: developer
See also: DM, DMCoarsenHookAdd(), MatRestrict(), DMInterpolate(), DMRefineHookAdd()
External Links
- PETSc Manual:
DM/DMRestrict
PETSc.LibPETSc.DMSNESCheckDiscretization — Method
DMSNESCheckDiscretization(petsclib::PetscLibType, snes::AbstractSNES, dm::AbstractPetscDM, t::PetscReal, u::AbstractPetscVec, tol::PetscReal, error::Vector{PetscReal})Check the discretization error of the exact solution
Input Parameters:
snes- theSNESobjectdm- theDMt- the timeu- aDMvectortol- A tolerance for the check, or -1 to print the results instead
Output Parameter:
error- An array which holds the discretization error in each field, orNULL
Level: developer
See also: PetscDSSetExactSolution(), DNSNESCheckFromOptions(), DMSNESCheckResidual(), DMSNESCheckJacobian()
External Links
- PETSc Manual:
SNES/DMSNESCheckDiscretization
PETSc.LibPETSc.DMSNESCheckFromOptions — Method
DMSNESCheckFromOptions(petsclib::PetscLibType, snes::AbstractSNES, u::AbstractPetscVec)Check the residual and Jacobian functions using the exact solution by outputting some diagnostic information
Input Parameters:
snes- theSNESobjectu- representativeSNESvector
Level: developer
See also: SNES, DM
External Links
- PETSc Manual:
SNES/DMSNESCheckFromOptions
PETSc.LibPETSc.DMSNESCheckJacobian — Method
isLinear::PetscBool,convRate::PetscReal = DMSNESCheckJacobian(petsclib::PetscLibType, snes::AbstractSNES, dm::AbstractPetscDM, u::AbstractPetscVec, tol::PetscReal)Check the Jacobian of the exact solution against the residual using the Taylor Test
Input Parameters:
snes- theSNESobjectdm- theDMu- aDMvectortol- A tolerance for the check, or -1 to print the results instead
Output Parameters:
isLinear- Flag indicaing that the function looks linear, orNULLconvRate- The rate of convergence of the linear model, orNULL
Level: developer
See also: DNSNESCheckFromOptions(), DMSNESCheckDiscretization(), DMSNESCheckResidual()
External Links
- PETSc Manual:
SNES/DMSNESCheckJacobian
PETSc.LibPETSc.DMSNESCheckResidual — Method
residual::PetscReal = DMSNESCheckResidual(petsclib::PetscLibType, snes::AbstractSNES, dm::AbstractPetscDM, u::AbstractPetscVec, tol::PetscReal)Check the residual of the exact solution
Input Parameters:
snes- theSNESobjectdm- theDMu- aDMvectortol- A tolerance for the check, or -1 to print the results instead
Output Parameter:
residual- The residual norm of the exact solution, orNULL
Level: developer
See also: DNSNESCheckFromOptions(), DMSNESCheckDiscretization(), DMSNESCheckJacobian()
External Links
- PETSc Manual:
SNES/DMSNESCheckResidual
PETSc.LibPETSc.DMSNESComputeJacobianAction — Method
DMSNESComputeJacobianAction(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, Y::AbstractPetscVec, F::AbstractPetscVec, ctx::Ptr{Cvoid})Compute the action of the Jacobian J(X) on Y
Input Parameters:
dm- TheDMX- Local solution vectorY- Local input vectorctx- The application context
Output Parameter:
F- local output vector
Level: developer
See also: DM, DMSNESCreateJacobianMF(), DMPlexSNESComputeResidualFEM()
External Links
- PETSc Manual:
SNES/DMSNESComputeJacobianAction
PETSc.LibPETSc.DMSNESCreateJacobianMF — Method
J::PetscMat = DMSNESCreateJacobianMF(petsclib::PetscLibType, dm::AbstractPetscDM, X::AbstractPetscVec, ctx::Ptr{Cvoid})Create a Mat which computes the action of the Jacobian matrix-free
Collective
Input Parameters:
dm- TheDMX- The evaluation point for the Jacobianctx- An application context, orNULL
Output Parameter:
J- TheMat
Level: advanced
See also: DM, SNES, DMSNESComputeJacobianAction()
External Links
- PETSc Manual:
SNES/DMSNESCreateJacobianMF
PETSc.LibPETSc.DMSNESGetBoundaryLocal — Method
DMSNESGetBoundaryLocal(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})get the local boundary value function set with DMSNESSetBoundaryLocal().
Not Collective
Input Parameter:
dm-DMwith the associated callback
Output Parameters:
func- local boundary value evaluationctx- context for local boundary value evaluation
Calling sequence of func:
dm- theDMcontextX- ghosted solution vector, appropriate locations (such as essential boundary condition nodes) should be filledctx- option context passed inDMSNESSetBoundaryLocal()
Level: intermediate
See also: DMSNESSetFunctionLocal(), DMSNESSetBoundaryLocal(), DMSNESSetJacobianLocal()
External Links
- PETSc Manual:
SNES/DMSNESGetBoundaryLocal
PETSc.LibPETSc.DMSNESGetFunction — Method
f::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMSNESGetFunction(petsclib::PetscLibType, dm::AbstractPetscDM)get SNES residual evaluation function from a DMSNES object
Not Collective
Input Parameter:
dm-DMto be used withSNES
Output Parameters:
f- residual evaluation function; seeSNESFunctionFnfor calling sequencectx- context for residual evaluation
Level: developer
See also: DMSNES, DMSNESSetContext(), DMSNESSetFunction(), SNESSetFunction(), SNESFunctionFn
External Links
- PETSc Manual:
SNES/DMSNESGetFunction
PETSc.LibPETSc.DMSNESGetFunctionLocal — Method
DMSNESGetFunctionLocal(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})get the local residual evaluation function information set with DMSNESSetFunctionLocal().
Not Collective
Input Parameter:
dm-DMwith the associated callback
Output Parameters:
func- local residual evaluationctx- context for local residual evaluation
Calling sequence of func:
dm-DMfor the functionx- vector to state at which to evaluate residualf- vector to hold the function evaluationctx- optional context passed above
Level: beginner
See also: DMSNESSetFunction(), DMSNESSetFunctionLocal(), DMSNESSetJacobianLocal()
External Links
- PETSc Manual:
SNES/DMSNESGetFunctionLocal
PETSc.LibPETSc.DMSNESGetJacobian — Method
J::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMSNESGetJacobian(petsclib::PetscLibType, dm::AbstractPetscDM)get SNES Jacobian evaluation function from a DMSNES object
Not Collective
Input Parameter:
dm-DMto be used withSNES
Output Parameters:
J- Jacobian evaluation function; for all calling sequence seeSNESJacobianFnctx- context for residual evaluation
Level: developer
See also: DMSNES, DMSNESSetContext(), SNESSetFunction(), DMSNESSetJacobian(), SNESJacobianFn
External Links
- PETSc Manual:
SNES/DMSNESGetJacobian
PETSc.LibPETSc.DMSNESGetJacobianLocal — Method
DMSNESGetJacobianLocal(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})the local Jacobian evaluation function set with DMSNESSetJacobianLocal().
Logically Collective
Input Parameter:
dm-DMwith the associated callback
Output Parameters:
func- local Jacobian evaluationctx- context for local Jacobian evaluation
Calling sequence of func:
dm- theDMcontextX- current solution vector (ghosted or not?)J- the JacobianJp- approximate Jacobian used to compute the preconditioner, oftenJctx- a user provided context
Level: beginner
See also: DMSNESSetJacobianLocal(), DMSNESSetJacobian()
External Links
- PETSc Manual:
SNES/DMSNESGetJacobianLocal
PETSc.LibPETSc.DMSNESGetNGS — Method
DMSNESGetNGS(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})get SNES Gauss-Seidel relaxation function from a DMSNES object
Not Collective
Input Parameter:
dm-DMto be used withSNES
Output Parameters:
f- relaxation function which performs Gauss-Seidel sweeps, seeSNESSetNGS()ctx- context for residual evaluation
Level: developer
See also: DMSNES, DMSNESSetContext(), SNESGetNGS(), DMSNESGetJacobian(), DMSNESGetFunction()
External Links
- PETSc Manual:
SNES/DMSNESGetNGS
PETSc.LibPETSc.DMSNESGetObjective — Method
obj::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMSNESGetObjective(petsclib::PetscLibType, dm::AbstractPetscDM)Returns the objective function set with DMSNESSetObjective()
Not Collective
Input Parameter:
dm-DMto be used withSNES
Output Parameters:
obj- objective evaluation routine (orNULL); seeSNESObjectiveFnfor the calling sequencectx- the function context (orNULL)
Level: developer
See also: DMSNES, DMSNESSetContext(), DMSNESSetObjective(), SNESSetFunction(), SNESObjectiveFn
External Links
- PETSc Manual:
SNES/DMSNESGetObjective
PETSc.LibPETSc.DMSNESGetObjectiveLocal — Method
DMSNESGetObjectiveLocal(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})get the local objective evaluation function information set with DMSNESSetObjectiveLocal().
Not Collective
Input Parameter:
dm-DMwith the associated callback
Output Parameters:
func- local objective evaluationctx- context for local residual evaluation
Calling sequence of func:
dm- theDMx- the location where the objective function is to be evaluatedobj- the value of the objective functionctx- optional context for the local objective function evaluation
Level: beginner
See also: DMSNESSetObjective(), DMSNESSetObjectiveLocal(), DMSNESSetFunctionLocal()
External Links
- PETSc Manual:
SNES/DMSNESGetObjectiveLocal
PETSc.LibPETSc.DMSNESGetPicard — Method
b::Ptr{Cvoid},J::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMSNESGetPicard(petsclib::PetscLibType, dm::AbstractPetscDM)get SNES Picard iteration evaluation functions from a DMSNES object
Not Collective
Input Parameter:
dm-DMto be used withSNES
Output Parameters:
b- RHS evaluation function; seeSNESFunctionFnfor calling sequenceJ- Jacobian evaluation function; seeSNESJacobianFnfor calling sequencectx- context for residual and matrix evaluation
Level: developer
See also: DMSNES, DMSNESSetContext(), SNESSetFunction(), DMSNESSetJacobian(), SNESFunctionFn, SNESJacobianFn
External Links
- PETSc Manual:
SNES/DMSNESGetPicard
PETSc.LibPETSc.DMSNESSetBoundaryLocal — Method
DMSNESSetBoundaryLocal(petsclib::PetscLibType, dm::AbstractPetscDM, func::external, ctx::Ptr{Cvoid})set a function to insert, for example, essential boundary conditions into a ghosted solution vector
Logically Collective
Input Parameters:
dm-DMto associate callback withfunc- local boundary value evaluationctx- optional context for local boundary value evaluation
Calling sequence of func:
dm- theDMcontextX- ghosted solution vector, appropriate locations (such as essential boundary condition nodes) should be filledctx- option context passed inDMSNESSetBoundaryLocal()
Level: advanced
See also: DMSNESSetObjectiveLocal(), DMSNESSetFunctionLocal(), DMSNESSetJacobianLocal()
External Links
- PETSc Manual:
SNES/DMSNESSetBoundaryLocal
PETSc.LibPETSc.DMSNESSetFunction — Method
DMSNESSetFunction(petsclib::PetscLibType, dm::AbstractPetscDM, f::Ptr{Cvoid}, ctx::Ptr{Cvoid})set SNES residual evaluation function
Not Collective
Input Parameters:
dm- DM to be used withSNESf- residual evaluation function; seeSNESFunctionFnfor calling sequencectx- context for residual evaluation
Level: developer
See also: DMSNES, DMSNESSetContext(), SNESSetFunction(), DMSNESSetJacobian(), SNESFunctionFn
External Links
- PETSc Manual:
SNES/DMSNESSetFunction
PETSc.LibPETSc.DMSNESSetFunctionContextDestroy — Method
DMSNESSetFunctionContextDestroy(petsclib::PetscLibType, dm::AbstractPetscDM, f::Ptr{Cvoid})set SNES residual evaluation context destroy function
Not Collective
Input Parameters:
dm-DMto be used withSNESf- residual evaluation context destroy function, seePetscCtxDestroyFnfor its calling sequence
Level: developer
See also: DMSNES, DMSNESSetFunction(), SNESSetFunction(), PetscCtxDestroyFn
External Links
- PETSc Manual:
SNES/DMSNESSetFunctionContextDestroy
PETSc.LibPETSc.DMSNESSetFunctionLocal — Method
DMSNESSetFunctionLocal(petsclib::PetscLibType, dm::AbstractPetscDM, func::external, ctx::Ptr{Cvoid})set a local residual evaluation function. This function is called with local vector containing the local vector information PLUS ghost point information. It should compute a result for all local elements and DMSNES will automatically accumulate the overlapping values.
Logically Collective
Input Parameters:
dm-DMto associate callback withfunc- local residual evaluationctx- optional context for local residual evaluation
Calling sequence of func:
dm-DMfor the functionx- vector to state at which to evaluate residualf- vector to hold the function evaluationctx- optional context passed above
Level: advanced
See also: DMSNESSetFunction(), DMSNESSetJacobianLocal()
External Links
- PETSc Manual:
SNES/DMSNESSetFunctionLocal
PETSc.LibPETSc.DMSNESSetJacobian — Method
DMSNESSetJacobian(petsclib::PetscLibType, dm::AbstractPetscDM, J::Ptr{Cvoid}, ctx::Ptr{Cvoid})set SNES Jacobian evaluation function into a DMSNES object
Not Collective
Input Parameters:
dm-DMto be used withSNESJ- Jacobian evaluation function, seeSNESJacobianFnctx- context for Jacobian evaluation
Level: developer
See also: DMSNES, DMSNESSetContext(), SNESSetFunction(), DMSNESGetJacobian(), SNESSetJacobian(), SNESJacobianFn
External Links
- PETSc Manual:
SNES/DMSNESSetJacobian
PETSc.LibPETSc.DMSNESSetJacobianContextDestroy — Method
DMSNESSetJacobianContextDestroy(petsclib::PetscLibType, dm::AbstractPetscDM, f::Ptr{Cvoid})set SNES Jacobian evaluation context destroy function into a DMSNES object
Not Collective
Input Parameters:
dm-DMto be used withSNESf- Jacobian evaluation context destroy function, seePetscCtxDestroyFnfor its calling sequence
Level: developer
See also: DMSNES, DMSNESSetJacobian()
External Links
- PETSc Manual:
SNES/DMSNESSetJacobianContextDestroy
PETSc.LibPETSc.DMSNESSetJacobianLocal — Method
DMSNESSetJacobianLocal(petsclib::PetscLibType, dm::AbstractPetscDM, func::external, ctx::Ptr{Cvoid})set a local Jacobian evaluation function
Logically Collective
Input Parameters:
dm-DMto associate callback withfunc- local Jacobian evaluationctx- optional context for local Jacobian evaluation
Calling sequence of func:
dm- theDMcontextX- current solution vector (ghosted or not?)J- the JacobianJp- approximate Jacobian used to compute the preconditioner, oftenJctx- a user provided context
Level: advanced
See also: DMSNESSetObjectiveLocal(), DMSNESSetFunctionLocal(), DMSNESSetBoundaryLocal()
External Links
- PETSc Manual:
SNES/DMSNESSetJacobianLocal
PETSc.LibPETSc.DMSNESSetMFFunction — Method
DMSNESSetMFFunction(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set SNES residual evaluation function used in applying the matrix-free Jacobian with -snes_mf_operator
Logically Collective
Input Parameters:
dm-DMto be used withSNESfunc- residual evaluation function; seeSNESFunctionFnfor calling sequencectx- optional function context
Level: developer
See also: DMSNES, DMSNESSetContext(), SNESSetFunction(), DMSNESSetJacobian(), DMSNESSetFunction(), SNESFunctionFn
External Links
- PETSc Manual:
SNES/DMSNESSetMFFunction
PETSc.LibPETSc.DMSNESSetNGS — Method
DMSNESSetNGS(petsclib::PetscLibType, dm::AbstractPetscDM, f::external, ctx::Ptr{Cvoid})set SNES Gauss-Seidel relaxation function into a DMSNES object
Not Collective
Input Parameters:
dm-DMto be used withSNESf- relaxation function, seeSNESGSFunctionctx- context for residual evaluation
Level: developer
See also: DMSNES, DMSNESSetContext(), SNESSetFunction(), DMSNESSetJacobian(), DMSNESSetFunction(), SNESGSFunction
External Links
- PETSc Manual:
SNES/DMSNESSetNGS
PETSc.LibPETSc.DMSNESSetObjective — Method
DMSNESSetObjective(petsclib::PetscLibType, dm::AbstractPetscDM, obj::Ptr{Cvoid}, ctx::Ptr{Cvoid})Sets the objective function minimized by some of the SNES linesearch methods into a DMSNES object, used instead of the 2-norm of the residual
Not Collective
Input Parameters:
dm-DMto be used withSNESobj- objective evaluation routine; seeSNESObjectiveFnfor the calling sequencectx- [optional] user-defined context for private data for the objective evaluation routine (may beNULL)
Level: developer
See also: DMSNES, DMSNESSetContext(), SNESGetObjective(), DMSNESSetFunction(), SNESObjectiveFn
External Links
- PETSc Manual:
SNES/DMSNESSetObjective
PETSc.LibPETSc.DMSNESSetObjectiveLocal — Method
DMSNESSetObjectiveLocal(petsclib::PetscLibType, dm::AbstractPetscDM, func::external, ctx::Ptr{Cvoid})set a local objective evaluation function. This function is called with local vector containing the local vector information PLUS ghost point information. It should compute a result for all local elements and DMSNES will automatically accumulate the overlapping values.
Logically Collective
Input Parameters:
dm-DMto associate callback withfunc- local objective evaluationctx- optional context for local objective function evaluation
Calling sequence of func:
dm- theDMx- the location where the objective is to be evaluatedobj- the value of the objective functionctx- optional context for the local objective function evaluation
Level: advanced
See also: DMSNESSetFunctionLocal(), DMSNESSetJacobianLocal()
External Links
- PETSc Manual:
SNES/DMSNESSetObjectiveLocal
PETSc.LibPETSc.DMSNESSetPicard — Method
DMSNESSetPicard(petsclib::PetscLibType, dm::AbstractPetscDM, b::Ptr{Cvoid}, J::Ptr{Cvoid}, ctx::Ptr{Cvoid})set SNES Picard iteration matrix and RHS evaluation functions into a DMSNES object
Not Collective
Input Parameters:
dm-DMto be used withSNESb- RHS evaluation function; seeSNESFunctionFnfor calling sequenceJ- Picard matrix evaluation function; seeSNESJacobianFnfor calling sequencectx- context for residual and matrix evaluation
Level: developer
See also: DMSNES, SNESSetPicard(), DMSNESSetFunction(), DMSNESSetJacobian(), SNESFunctionFn, SNESJacobianFn
External Links
- PETSc Manual:
SNES/DMSNESSetPicard
PETSc.LibPETSc.DMSetAdjacency — Method
DMSetAdjacency(petsclib::PetscLibType, dm::AbstractPetscDM, f::PetscInt, useCone::PetscBool, useClosure::PetscBool)Set the flags for determining variable influence
Not Collective
Input Parameters:
dm- TheDMobjectf- The field numberuseCone- Flag for variable influence starting with the cone operationuseClosure- Flag for variable influence using transitive closure
Level: developer
See also: DM, DMGetAdjacency(), DMGetField(), DMSetField()
External Links
- PETSc Manual:
DM/DMSetAdjacency
PETSc.LibPETSc.DMSetApplicationContext — Method
DMSetApplicationContext(petsclib::PetscLibType, dm::AbstractPetscDM, ctx::Ptr{Cvoid})Set an application context into a DM object
Not Collective
Input Parameters:
dm- theDMobjectctx- the application context
Level: intermediate
See also: DM, DMGetApplicationContext(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix()
External Links
- PETSc Manual:
DM/DMSetApplicationContext
PETSc.LibPETSc.DMSetApplicationContextDestroy — Method
DMSetApplicationContextDestroy(petsclib::PetscLibType, dm::AbstractPetscDM, destroy::Ptr{Cvoid})Sets a user function that will be called to destroy the application context when the DM is destroyed
Logically Collective if the function is collective
Input Parameters:
dm- theDMobjectdestroy- the destroy function, seePetscCtxDestroyFnfor the calling sequence
Level: intermediate
See also: DM, DMSetApplicationContext(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMGetApplicationContext(), PetscCtxDestroyFn
External Links
- PETSc Manual:
DM/DMSetApplicationContextDestroy
PETSc.LibPETSc.DMSetAuxiliaryVec — Method
DMSetAuxiliaryVec(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel, value::PetscInt, part::PetscInt, aux::AbstractPetscVec)Set an auxiliary vector for region specified by the given label and value, and equation part
Not Collective because auxiliary vectors are not parallel
Input Parameters:
dm- TheDMlabel- TheDMLabelvalue- The label value indicating the regionpart- The equation part, or 0 if unusedaux- TheVecholding auxiliary field data
Level: advanced
See also: DM, DMClearAuxiliaryVec(), DMGetAuxiliaryVec(), DMGetAuxiliaryLabels(), DMCopyAuxiliaryVec()
External Links
- PETSc Manual:
DM/DMSetAuxiliaryVec
PETSc.LibPETSc.DMSetBasicAdjacency — Method
DMSetBasicAdjacency(petsclib::PetscLibType, dm::AbstractPetscDM, useCone::PetscBool, useClosure::PetscBool)Set the flags for determining variable influence, using either the default or field 0 if it is defined
Not Collective
Input Parameters:
dm- TheDMobjectuseCone- Flag for variable influence starting with the cone operationuseClosure- Flag for variable influence using transitive closure
Level: developer
See also: DM, DMGetBasicAdjacency(), DMGetField(), DMSetField()
External Links
- PETSc Manual:
DM/DMSetBasicAdjacency
PETSc.LibPETSc.DMSetBlockingType — Method
DMSetBlockingType(petsclib::PetscLibType, dm::AbstractPetscDM, btype::DMBlockingType)set the blocking granularity to be used for variable block size DMCreateMatrix() is called
Logically Collective
Input Parameters:
dm- theDMbtype- block by topological point or field node
Options Database Key:
-dm_blocking_type (topological_point|field_node)- use topological point blocking or field node blocking
Level: advanced
See also: DM, DMCreateMatrix(), MatSetVariableBlockSizes()
External Links
- PETSc Manual:
DM/DMSetBlockingType
PETSc.LibPETSc.DMSetCellCoordinateDM — Method
DMSetCellCoordinateDM(petsclib::PetscLibType, dm::AbstractPetscDM, cdm::AbstractPetscDM)Sets the DM that prescribes cellwise coordinate layout and scatters between global and local cellwise coordinates
Logically Collective
Input Parameters:
dm- theDMcdm- cellwise coordinateDM
Level: intermediate
See also: DMGetCellCoordinateDM(), DMSetCellCoordinates(), DMSetCellCoordinatesLocal(), DMGetCellCoordinates(), DMGetCellCoordinatesLocal(), DMSetCoordinateDM(), DMGetCoordinateDM()
External Links
- PETSc Manual:
DM/DMSetCellCoordinateDM
PETSc.LibPETSc.DMSetCellCoordinateField — Method
DMSetCellCoordinateField(petsclib::PetscLibType, dm::AbstractPetscDM, field::DMField)Set the DMField representation of the discontinuous per-cell mesh coordinates
Logically Collective
Input Parameters:
dm- theDMfield- theDMFielddescribing the cell coordinates
Level: advanced
See also: DM, DMField, DMSetCoordinateField(), DMGetCellCoordinateDM(), DMSetCellCoordinates()
External Links
- PETSc Manual:
DM/DMSetCellCoordinateField
PETSc.LibPETSc.DMSetCellCoordinateSection — Method
DMSetCellCoordinateSection(petsclib::PetscLibType, dm::AbstractPetscDM, dim::PetscInt, section::PetscSection)Set the PetscSection of cellwise coordinate values over the mesh.
Not Collective
Input Parameters:
dm- TheDMobjectdim- The embedding dimension, orPETSC_DETERMINEsection- ThePetscSectionobject for a cellwise layout
Level: intermediate
See also: DM, DMGetCoordinateDim(), DMSetCoordinateSection(), DMGetCellCoordinateSection(), DMGetCoordinateSection(), DMGetCellCoordinateDM(), DMGetLocalSection(), DMSetLocalSection()
External Links
- PETSc Manual:
DM/DMSetCellCoordinateSection
PETSc.LibPETSc.DMSetCellCoordinates — Method
DMSetCellCoordinates(petsclib::PetscLibType, dm::AbstractPetscDM, c::AbstractPetscVec)Sets into the DM a global vector that holds the cellwise coordinates
Collective
Input Parameters:
dm- theDMc- cellwise coordinate vector
Level: intermediate
See also: DM, DMGetCoordinates(), DMSetCellCoordinatesLocal(), DMGetCellCoordinates(), DMGetCellCoordinatesLocal(), DMGetCellCoordinateDM()
External Links
- PETSc Manual:
DM/DMSetCellCoordinates
PETSc.LibPETSc.DMSetCellCoordinatesLocal — Method
DMSetCellCoordinatesLocal(petsclib::PetscLibType, dm::AbstractPetscDM, c::AbstractPetscVec)Sets into the DM a local vector including ghost points that holds the cellwise coordinates
Not Collective
Input Parameters:
dm- theDMc- cellwise coordinate vector
Level: intermediate
See also: DM, DMGetCellCoordinatesLocal(), DMSetCellCoordinates(), DMGetCellCoordinates(), DMGetCellCoordinateDM()
External Links
- PETSc Manual:
DM/DMSetCellCoordinatesLocal
PETSc.LibPETSc.DMSetCoarseDM — Method
DMSetCoarseDM(petsclib::PetscLibType, dm::AbstractPetscDM, cdm::AbstractPetscDM)Set the coarse DM from which this DM was obtained by refinement
Input Parameters:
dm- TheDMobjectcdm- The coarseDM
Level: intermediate
See also: DM, DMGetCoarseDM(), DMCoarsen(), DMSetRefine(), DMSetFineDM()
External Links
- PETSc Manual:
DM/DMSetCoarseDM
PETSc.LibPETSc.DMSetCoarsenLevel — Method
DMSetCoarsenLevel(petsclib::PetscLibType, dm::AbstractPetscDM, level::PetscInt)Sets the number of coarsenings that have generated this DM.
Collective
Input Parameters:
dm- theDMobjectlevel- number of coarsenings
Level: developer
See also: DM, DMCoarsen(), DMGetCoarsenLevel(), DMGetRefineLevel(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation()
External Links
- PETSc Manual:
DM/DMSetCoarsenLevel
PETSc.LibPETSc.DMSetCoordinateDM — Method
DMSetCoordinateDM(petsclib::PetscLibType, dm::AbstractPetscDM, cdm::AbstractPetscDM)Sets the DM that prescribes coordinate layout and scatters between global and local coordinates
Logically Collective
Input Parameters:
dm- theDMcdm- coordinateDM
Level: intermediate
See also: DM, DMGetCoordinateDM(), DMSetCoordinates(), DMGetCellCoordinateDM(), DMSetCoordinatesLocal(), DMGetCoordinates(), DMGetCoordinatesLocal(), DMGSetCellCoordinateDM()
External Links
- PETSc Manual:
DM/DMSetCoordinateDM
PETSc.LibPETSc.DMSetCoordinateDim — Method
DMSetCoordinateDim(petsclib::PetscLibType, dm::AbstractPetscDM, dim::PetscInt)Set the dimension of the embedding space for coordinate values.
Not Collective
Input Parameters:
dm- TheDMobjectdim- The embedding dimension
Level: intermediate
See also: DM, DMGetCoordinateDim(), DMSetCoordinateSection(), DMGetCoordinateSection(), DMGetLocalSection(), DMSetLocalSection()
External Links
- PETSc Manual:
DM/DMSetCoordinateDim
PETSc.LibPETSc.DMSetCoordinateDisc — Method
DMSetCoordinateDisc(petsclib::PetscLibType, dm::AbstractPetscDM, disc::PetscFE, localized::PetscBool, project::PetscBool)Set a coordinate space
Input Parameters:
dm- TheDMobjectdisc- The new coordinate discretization orNULLto ensure a coordinate discretization existslocalized- Set a localized (DG) coordinate spaceproject- Project coordinates to new discretization
Level: intermediate
See also: DM, PetscFE, DMGetCoordinateField()
External Links
- PETSc Manual:
DM/DMSetCoordinateDisc
PETSc.LibPETSc.DMSetCoordinateField — Method
DMSetCoordinateField(petsclib::PetscLibType, dm::AbstractPetscDM, field::DMField)Set the DMField representation of the mesh coordinates
Logically Collective
Input Parameters:
dm- theDMfield- theDMFielddescribing the coordinates
Level: advanced
See also: DM, DMField, DMGetCoordinateField(), DMSetCoordinateDM(), DMSetCoordinates()
External Links
- PETSc Manual:
DM/DMSetCoordinateField
PETSc.LibPETSc.DMSetCoordinateSection — Method
DMSetCoordinateSection(petsclib::PetscLibType, dm::AbstractPetscDM, dim::PetscInt, section::PetscSection)Set the PetscSection of coordinate values over the mesh.
Not Collective
Input Parameters:
dm- TheDMobjectdim- The embedding dimension, orPETSC_DETERMINEsection- ThePetscSectionobject
Level: intermediate
See also: DM, DMGetCoordinateDim(), DMGetCoordinateSection(), DMGetLocalSection(), DMSetLocalSection()
External Links
- PETSc Manual:
DM/DMSetCoordinateSection
PETSc.LibPETSc.DMSetCoordinates — Method
DMSetCoordinates(petsclib::PetscLibType, dm::AbstractPetscDM, c::AbstractPetscVec)Sets into the DM a global vector that holds the coordinates
Logically Collective
Input Parameters:
dm- theDMc- coordinate vector
Level: intermediate
See also: DM, DMSetCoordinatesLocal(), DMGetCoordinates(), DMGetCoordinatesLocal(), DMGetCoordinateDM(), DMDASetUniformCoordinates()
External Links
- PETSc Manual:
DM/DMSetCoordinates
PETSc.LibPETSc.DMSetCoordinatesLocal — Method
DMSetCoordinatesLocal(petsclib::PetscLibType, dm::AbstractPetscDM, c::AbstractPetscVec)Sets into the DM a local vector, including ghost points, that holds the coordinates
Not Collective
Input Parameters:
dm- theDMc- coordinate vector
Level: intermediate
See also: DM, DMGetCoordinatesLocal(), DMSetCoordinates(), DMGetCoordinates(), DMGetCoordinateDM()
External Links
- PETSc Manual:
DM/DMSetCoordinatesLocal
PETSc.LibPETSc.DMSetDefaultConstraints — Method
DMSetDefaultConstraints(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection, mat::AbstractPetscMat, bias::AbstractPetscVec)Set the PetscSection and Mat that specify the local constraint interpolation.
Collective
Input Parameters:
dm- TheDMsection- ThePetscSectiondescribing the range of the constraint matrix: relates rows of the constraint matrix to dofs of the default section. Must have a local communicator (PETSC_COMM_SELFor derivative).mat- TheMatthat interpolates local constraints: its width should be the layout size of the default section:NULLindicates no constraints. Must have a local communicator (PETSC_COMM_SELFor derivative).bias- A bias vector to be added to constrained values in the local vector.NULLindicates no bias. Must have a local communicator (PETSC_COMM_SELFor derivative).
Level: advanced
See also: DM, DMGetDefaultConstraints()
External Links
- PETSc Manual:
DM/DMSetDefaultConstraints
PETSc.LibPETSc.DMSetDimension — Method
DMSetDimension(petsclib::PetscLibType, dm::AbstractPetscDM, dim::PetscInt)Set the topological dimension of the DM
Collective
Input Parameters:
dm- TheDMdim- The topological dimension
Level: beginner
See also: DM, DMGetDimension(), DMCreate()
External Links
- PETSc Manual:
DM/DMSetDimension
PETSc.LibPETSc.DMSetField — Method
DMSetField(petsclib::PetscLibType, dm::AbstractPetscDM, f::PetscInt, label::DMLabel, disc)Set the discretization object for a given DM field. Usually one would call DMAddField() which automatically handles the field numbering.
Logically Collective
Input Parameters:
dm- TheDMf- The field numberlabel- The label indicating the support of the field, orNULLfor the entire meshdisc- The discretization object
Level: intermediate
See also: DM, DMAddField(), DMGetField()
External Links
- PETSc Manual:
DM/DMSetField
PETSc.LibPETSc.DMSetFieldAvoidTensor — Method
DMSetFieldAvoidTensor(petsclib::PetscLibType, dm::AbstractPetscDM, f::PetscInt, avoidTensor::PetscBool)Set flag to avoid defining the field on tensor cells
Logically Collective
Input Parameters:
dm- TheDMf- The field indexavoidTensor-PETSC_TRUEto skip defining the field on tensor cells
Level: intermediate
See also: DM, DMGetFieldAvoidTensor(), DMSetField(), DMGetField()
External Links
- PETSc Manual:
DM/DMSetFieldAvoidTensor
PETSc.LibPETSc.DMSetFineDM — Method
DMSetFineDM(petsclib::PetscLibType, dm::AbstractPetscDM, fdm::AbstractPetscDM)Set the fine mesh from which this was obtained by coarsening
Input Parameters:
dm- TheDMobjectfdm- The fineDM
Level: developer
See also: DM, DMGetFineDM(), DMCoarsen(), DMRefine()
External Links
- PETSc Manual:
DM/DMSetFineDM
PETSc.LibPETSc.DMSetFromOptions — Method
DMSetFromOptions(petsclib::PetscLibType, dm::AbstractPetscDM)sets parameters in a DM from the options database
Collective
Input Parameter:
dm- theDMobject to set options for
Options Database Keys:
-dm_preallocate_only (true|false)- Only preallocate the matrix forDMCreateMatrix()andDMCreateMassMatrix(), but do not fill it with zeros-dm_vec_type type- type of vector to create insideDM-dm_mat_type type- type of matrix to create insideDM-dm_is_coloring_type (global|local)- seeISColoringType-dm_bind_below n- bind (force execution on CPU) forVecandMatobjects with local size (number of vector entries or matrix rows) below n; currently only supported forDMDA-dm_plex_option_phases ph0_, ph1_, ...- List of prefixes for option processing phases-dm_plex_filename str- File containing a mesh-dm_plex_boundary_filename str- File containing a mesh boundary-dm_plex_name str- Name of the mesh in the file-dm_plex_shape shape- The domain shape, such asBOX,SPHERE, etc.-dm_plex_cell ct- Cell shape-dm_plex_reference_cell_domain (true|false)- Use a reference cell domain-dm_plex_dim dim- Set the topological dimension-dm_plex_simplex (true|false)-PETSC_TRUEfor simplex elements,PETSC_FALSEfor tensor elements-dm_plex_interpolate (true|false)-PETSC_TRUEturns on topological interpolation (creating edges and faces)-dm_plex_orient (true|false)-PETSC_TRUEturns on topological orientation (flipping edges and faces)-dm_plex_scale sc- Scale factor for mesh coordinates-dm_coord_remap (true|false)- Map coordinates using a function-dm_plex_coordinate_dim dim- Change the coordinate dimension of a mesh (usually given with cdm_ prefix)-dm_coord_map mapname- Select a builtin coordinate map-dm_coord_map_params p0,p1,p2,...- Set coordinate mapping parameters-dm_plex_box_faces m,n,p- Number of faces along each dimension-dm_plex_box_lower x,y,z- Specify lower-left-bottom coordinates for the box-dm_plex_box_upper x,y,z- Specify upper-right-top coordinates for the box-dm_plex_box_bd bx,by,bz- Specify theDMBoundaryTypefor each direction-dm_plex_sphere_radius r- The sphere radius-dm_plex_ball_radius r- Radius of the ball-dm_plex_cylinder_bd bz- Boundary type in the z direction-dm_plex_cylinder_num_wedges n- Number of wedges around the cylinder-dm_plex_reorder order- Reorder the mesh using the specified algorithm-dm_refine_pre n- The number of refinements before distribution-dm_refine_uniform_pre (true|false)- Flag for uniform refinement before distribution-dm_refine_volume_limit_pre v- The maximum cell volume after refinement before distribution-dm_refine n- The number of refinements after distribution-dm_extrude l- Activate extrusion and specify the number of layers to extrude-dm_plex_save_transform (true|false)- Save theDMPlexTransformthat produced this mesh-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_normal n0,...,nd- Specify the extrusion direction-dm_plex_transform_extrude_thicknesses t0,...,tl- Specify thickness of each layer-dm_plex_create_fv_ghost_cells- Flag to create finite volume ghost cells on the boundary-dm_plex_fv_ghost_cells_label name- Label name for ghost cells boundary-dm_distribute (true|false)- Flag to redistribute a mesh among processes-dm_distribute_overlap n- The size of the overlap halo-dm_plex_adj_cone (true|false)- Set adjacency direction-dm_plex_adj_closure (true|false)- Set adjacency size-dm_plex_use_ceed (true|false)- Use LibCEED as the FEM backend-dm_plex_check_symmetry (true|false)- Check that the adjacency information in the mesh is symmetric -DMPlexCheckSymmetry()-dm_plex_check_skeleton (true|false)- Check that each cell has the correct number of vertices (only for homogeneous simplex or tensor meshes) -DMPlexCheckSkeleton()-dm_plex_check_faces (true|false)- Check that the faces of each cell give a vertex order this is consistent with what we expect from the cell type -DMPlexCheckFaces()-dm_plex_check_geometry (true|false)- Check that cells have positive volume -DMPlexCheckGeometry()-dm_plex_check_pointsf (true|false)- Check some necessary conditions forPointSF-DMPlexCheckPointSF()-dm_plex_check_interface_cones (true|false)- Check points on inter-partition interfaces have conforming order of cone points -DMPlexCheckInterfaceCones()-dm_plex_check_all (true|false)- Perform all the checks above
Level: intermediate
See also: DM, DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMPlexCheckSymmetry(), DMPlexCheckSkeleton(), DMPlexCheckFaces(), DMPlexCheckGeometry(), DMPlexCheckPointSF(), DMPlexCheckInterfaceCones(), DMSetOptionsPrefix(), DMType, DMPLEX, DMDA, DMSetUp()
External Links
- PETSc Manual:
DM/DMSetFromOptions
PETSc.LibPETSc.DMSetGlobalSection — Method
DMSetGlobalSection(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection)Set the PetscSection encoding the global data layout for the DM.
Input Parameters:
dm- TheDMsection- The PetscSection, orNULL
Level: intermediate
See also: DM, DMGetGlobalSection(), DMSetLocalSection()
External Links
- PETSc Manual:
DM/DMSetGlobalSection
PETSc.LibPETSc.DMSetISColoringType — Method
DMSetISColoringType(petsclib::PetscLibType, dm::AbstractPetscDM, ctype::ISColoringType)Sets the type of coloring, IS_COLORING_GLOBAL or IS_COLORING_LOCAL that is created by the DM
Logically Collective
Input Parameters:
dm- theDMcontextctype- the matrix type
Options Database Key:
-dm_is_coloring_type (global|local)- seeISColoringType
Level: intermediate
See also: DM, DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMCreateMatrix(), DMCreateMassMatrix(), DMSetMatrixPreallocateOnly(), MatType, DMGetMatType(), DMGetISColoringType(), ISColoringType, IS_COLORING_GLOBAL, IS_COLORING_LOCAL
External Links
- PETSc Manual:
DM/DMSetISColoringType
PETSc.LibPETSc.DMSetLabel — Method
DMSetLabel(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel)Replaces the label of a given name, or ignores it if the name is not present
Not Collective
Input Parameters:
dm- TheDMobjectlabel- TheDMLabel, having the same name, to substitute
Default labels in a DMPLEX:
"depth"- Holds the depth (co-dimension) of each mesh point"celltype"- Holds the topological type of each cell"ghost"- If the DM is distributed with overlap, this marks the cells and faces in the overlap"Cell Sets"- Mirrors the cell sets defined by GMsh and ExodusII"Face Sets"- Mirrors the face sets defined by GMsh and ExodusII"Vertex Sets"- Mirrors the vertex sets defined by GMsh
Level: intermediate
See also: DM, DMLabel, DMCreateLabel(), DMHasLabel(), DMPlexGetDepthLabel(), DMPlexGetCellType()
External Links
- PETSc Manual:
DM/DMSetLabel
PETSc.LibPETSc.DMSetLabelOutput — Method
DMSetLabelOutput(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, output::PetscBool)Set if a given label should be saved to a PetscViewer in calls to DMView()
Not Collective
Input Parameters:
dm- TheDMobjectname- The label nameoutput-PETSC_TRUEto save the label to the viewer
Level: developer
See also: DM, DMLabel, DMGetOutputFlag(), DMGetLabelOutput(), DMCreateLabel(), DMHasLabel(), DMGetLabelValue(), DMSetLabelValue(), DMGetStratumIS()
External Links
- PETSc Manual:
DM/DMSetLabelOutput
PETSc.LibPETSc.DMSetLabelValue — Method
DMSetLabelValue(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, point::PetscInt, value::PetscInt)Add a point to a DMLabel with given value
Not Collective
Input Parameters:
dm- TheDMobjectname- The label namepoint- The mesh pointvalue- The label value for this point
Output Parameter:
Level: beginner
See also: DM, DMLabelSetValue(), DMGetStratumIS(), DMClearLabelValue()
External Links
- PETSc Manual:
DM/DMSetLabelValue
PETSc.LibPETSc.DMSetLocalSection — Method
DMSetLocalSection(petsclib::PetscLibType, dm::AbstractPetscDM, section::PetscSection)Set the PetscSection encoding the local data layout for the DM.
Input Parameters:
dm- TheDMsection- ThePetscSection
Level: intermediate
See also: DM, PetscSection, DMGetLocalSection(), DMSetGlobalSection()
External Links
- PETSc Manual:
DM/DMSetLocalSection
PETSc.LibPETSc.DMSetMatType — Method
DMSetMatType(petsclib::PetscLibType, dm::AbstractPetscDM, ctype::String)Sets the type of matrix created with DMCreateMatrix()
Logically Collective
Input Parameters:
dm- theDMcontextctype- the matrix type, for exampleMATMPIAIJ
Options Database Key:
-dm_mat_type ctype- the type of the matrix to create, seeMatType
Level: intermediate
See also: DM, MatType, DMDACreate1d(), DMDACreate2d(), DMDACreate3d(), DMCreateMatrix(), DMCreateMassMatrix(), DMSetMatrixPreallocateOnly(), DMGetMatType(), DMCreateGlobalVector(), DMCreateLocalVector()
External Links
- PETSc Manual:
DM/DMSetMatType
PETSc.LibPETSc.DMSetMatrixPreallocateOnly — Method
DMSetMatrixPreallocateOnly(petsclib::PetscLibType, dm::AbstractPetscDM, only::PetscBool)When DMCreateMatrix() is called the matrix will be properly preallocated but the nonzero structure and zero values will not be set.
Logically Collective
Input Parameters:
dm- theDMonly-PETSC_TRUEif only want preallocation
Options Database Key:
-dm_preallocate_only- Only preallocate the matrix forDMCreateMatrix(),DMCreateMassMatrix(), but do not fill it with zeros
Level: developer
See also: DM, DMCreateMatrix(), DMCreateMassMatrix(), DMSetMatrixStructureOnly(), DMSetMatrixPreallocateSkip()
External Links
- PETSc Manual:
DM/DMSetMatrixPreallocateOnly
PETSc.LibPETSc.DMSetMatrixPreallocateSkip — Method
DMSetMatrixPreallocateSkip(petsclib::PetscLibType, dm::AbstractPetscDM, skip::PetscBool)When DMCreateMatrix() is called the matrix sizes and ISLocalToGlobalMapping will be properly set, but the data structures to store values in the matrices will not be preallocated.
Logically Collective
Input Parameters:
dm- theDMskip-PETSC_TRUEto skip preallocation
Level: developer
See also: DM, DMCreateMatrix(), DMSetMatrixStructureOnly(), DMSetMatrixPreallocateOnly()
External Links
- PETSc Manual:
DM/DMSetMatrixPreallocateSkip
PETSc.LibPETSc.DMSetMatrixStructureOnly — Method
DMSetMatrixStructureOnly(petsclib::PetscLibType, dm::AbstractPetscDM, only::PetscBool)When DMCreateMatrix() is called, the matrix nonzero structure will be created but the array for numerical values will not be allocated.
Logically Collective
Input Parameters:
dm- theDMonly-PETSC_TRUEif you only want matrix nonzero structure
Level: developer
See also: DM, DMCreateMatrix(), DMSetMatrixPreallocateOnly(), DMSetMatrixPreallocateSkip()
External Links
- PETSc Manual:
DM/DMSetMatrixStructureOnly
PETSc.LibPETSc.DMSetNaturalSF — Method
DMSetNaturalSF(petsclib::PetscLibType, dm::AbstractPetscDM, sf::PetscSF)Set the PetscSF encoding the map back to the original mesh ordering
Input Parameters:
dm- The DMsf- The PetscSF
Level: intermediate
See also: DM, DMGetNaturalSF(), DMSetUseNatural(), DMGetUseNatural(), DMPlexCreateGlobalToNaturalSF(), DMPlexDistribute()
External Links
- PETSc Manual:
DM/DMSetNaturalSF
PETSc.LibPETSc.DMSetNearNullSpaceConstructor — Method
DMSetNearNullSpaceConstructor(petsclib::PetscLibType, dm::AbstractPetscDM, field::PetscInt, nullsp::external)Provide a callback function which constructs the near-nullspace for a given field, defined with DMAddField()
Logically Collective; No Fortran Support
Input Parameters:
dm- TheDMfield- The field number for the nullspacenullsp- A callback to create the near-nullspace
Calling sequence of nullsp:
dm- The presentDMorigField- The field number given above, in the originalDMfield- The field number in dmnullSpace- The nullspace for the given field
Level: intermediate
See also: DM, DMAddField(), DMGetNearNullSpaceConstructor(), DMSetNullSpaceConstructor(), DMGetNullSpaceConstructor(), DMCreateSubDM(), DMCreateSuperDM(), MatNullSpace
External Links
- PETSc Manual:
DM/DMSetNearNullSpaceConstructor
PETSc.LibPETSc.DMSetNullSpaceConstructor — Method
DMSetNullSpaceConstructor(petsclib::PetscLibType, dm::AbstractPetscDM, field::PetscInt, nullsp::external)Provide a callback function which constructs the nullspace for a given field, defined with DMAddField(), when function spaces are joined or split, such as in DMCreateSubDM()
Logically Collective; No Fortran Support
Input Parameters:
dm- TheDMfield- The field number for the nullspacenullsp- A callback to create the nullspace
Calling sequence of nullsp:
dm- The presentDMorigField- The field number given above, in the originalDMfield- The field number in dmnullSpace- The nullspace for the given field
Level: intermediate
See also: DM, DMAddField(), DMGetNullSpaceConstructor(), DMSetNearNullSpaceConstructor(), DMGetNearNullSpaceConstructor(), DMCreateSubDM(), DMCreateSuperDM()
External Links
- PETSc Manual:
DM/DMSetNullSpaceConstructor
PETSc.LibPETSc.DMSetNumFields — Method
DMSetNumFields(petsclib::PetscLibType, dm::AbstractPetscDM, numFields::PetscInt)Set the number of fields in the DM
Logically Collective
Input Parameters:
dm- TheDMnumFields- The number of fields
Level: intermediate
See also: DM, DMGetNumFields(), DMSetField()
External Links
- PETSc Manual:
DM/DMSetNumFields
PETSc.LibPETSc.DMSetOptionsPrefix — Method
DMSetOptionsPrefix(petsclib::PetscLibType, dm::AbstractPetscDM, prefix::String)Sets the prefix prepended to all option names when searching through the options database
Logically Collective
Input Parameters:
dm- theDMcontextprefix- the prefix to prepend
Level: advanced
See also: DM, PetscObjectSetOptionsPrefix(), DMSetFromOptions()
External Links
- PETSc Manual:
DM/DMSetOptionsPrefix
PETSc.LibPETSc.DMSetOutputSequenceNumber — Method
DMSetOutputSequenceNumber(petsclib::PetscLibType, dm::AbstractPetscDM, num::PetscInt, val::PetscReal)Set the sequence number/value for output
Input Parameters:
dm- The originalDMnum- The output sequence numberval- The output sequence value
Level: intermediate
See also: DM, VecView()
External Links
- PETSc Manual:
DM/DMSetOutputSequenceNumber
PETSc.LibPETSc.DMSetPeriodicity — Method
DMSetPeriodicity(petsclib::PetscLibType, dm::AbstractPetscDM, maxCell::Vector{PetscReal}, Lstart::Vector{PetscReal}, L::Vector{PetscReal})Set the description of mesh periodicity
Logically Collective
Input Parameters:
dm- TheDMobjectmaxCell- Over distances greater than this, we can assume a point has crossed over to another sheet, when trying to localize cell coordinates. PassNULLto remove such information.Lstart- If we assume the mesh is a torus, this is the start of each coordinate, orNULLfor 0.0L- If we assume the mesh is a torus, this is the length of each coordinate, otherwise it is < 0.0
Level: developer
See also: DM, DMGetPeriodicity()
External Links
- PETSc Manual:
DM/DMSetPeriodicity
PETSc.LibPETSc.DMSetPointSF — Method
DMSetPointSF(petsclib::PetscLibType, dm::AbstractPetscDM, sf::PetscSF)Set the PetscSF encoding the parallel section point overlap for the DM.
Collective
Input Parameters:
dm- TheDMsf- ThePetscSF
Level: intermediate
See also: DM, DMGetPointSF(), DMGetSectionSF(), DMSetSectionSF(), DMCreateSectionSF()
External Links
- PETSc Manual:
DM/DMSetPointSF
PETSc.LibPETSc.DMSetRefineLevel — Method
DMSetRefineLevel(petsclib::PetscLibType, dm::AbstractPetscDM, level::PetscInt)Sets the number of refinements that have generated this DM.
Not Collective
Input Parameters:
dm- theDMobjectlevel- number of refinements
Level: advanced
See also: DM, DMGetRefineLevel(), DMCoarsen(), DMGetCoarsenLevel(), DMDestroy(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation()
External Links
- PETSc Manual:
DM/DMSetRefineLevel
PETSc.LibPETSc.DMSetRegionDS — Method
DMSetRegionDS(petsclib::PetscLibType, dm::AbstractPetscDM, label::DMLabel, fields::AbstractIS, ds::PetscDS, dsIn::PetscDS)Set the PetscDS for a given mesh region, defined by a DMLabel
Collective
Input Parameters:
dm- TheDMlabel- TheDMLabeldefining the mesh region, orNULLfor the entire meshfields- TheIScontaining theDMfield numbers for the fields in thisPetscDS, orNULLfor all fieldsds- ThePetscDSdefined on the given regiondsIn- ThePetscDSfor input on the given cell, orNULLif it is the samePetscDS
Level: advanced
See also: DM, DMGetRegionDS(), DMSetRegionNumDS(), DMGetDS(), DMGetCellDS()
External Links
- PETSc Manual:
DM/DMSetRegionDS
PETSc.LibPETSc.DMSetRegionNumDS — Method
DMSetRegionNumDS(petsclib::PetscLibType, dm::AbstractPetscDM, num::PetscInt, label::DMLabel, fields::AbstractIS, ds::PetscDS, dsIn::PetscDS)Set the PetscDS for a given mesh region, defined by the region number
Not Collective
Input Parameters:
dm- TheDMnum- The region number, in [0, Nds)label- The region label, orNULLfields- TheIScontaining theDMfield numbers for the fields in thisPetscDS, orNULLto prevent settingds- ThePetscDSdefined on the given region, orNULLto prevent settingdsIn- ThePetscDSfor input on the given cell, orNULLif it is the samePetscDS
Level: advanced
See also: DM, DMGetRegionDS(), DMSetRegionDS(), DMGetDS(), DMGetCellDS()
External Links
- PETSc Manual:
DM/DMSetRegionNumDS
PETSc.LibPETSc.DMSetSectionSF — Method
DMSetSectionSF(petsclib::PetscLibType, dm::AbstractPetscDM, sf::PetscSF)Set the PetscSF encoding the parallel dof overlap for the DM
Input Parameters:
dm- TheDMsf- ThePetscSF
Level: intermediate
See also: DM, DMGetSectionSF(), DMCreateSectionSF()
External Links
- PETSc Manual:
DM/DMSetSectionSF
PETSc.LibPETSc.DMSetSnapToGeomModel — Method
DMSetSnapToGeomModel(petsclib::PetscLibType, dm::AbstractPetscDM, name::String)Choose a geometry model for this DM.
Not Collective
Input Parameters:
dm- TheDMobjectname- A geometry model name, orNULLfor the default
Level: intermediate
See also: DM, DMPLEX, DMRefine(), DMPlexCreate(), DMSnapToGeomModel()
External Links
- PETSc Manual:
DM/DMSetSnapToGeomModel
PETSc.LibPETSc.DMSetSparseLocalize — Method
DMSetSparseLocalize(petsclib::PetscLibType, dm::AbstractPetscDM, sparse::PetscBool)Set the flag indicating that DM coordinates should be localized only for cells near the periodic boundary.
Collective
Input Parameters:
dm- TheDMsparse-PETSC_TRUEif only cells near the periodic boundary are localized
Level: intermediate
See also: DMGetSparseLocalize(), DMLocalizeCoordinates(), DMSetPeriodicity()
External Links
- PETSc Manual:
DM/DMSetSparseLocalize
PETSc.LibPETSc.DMSetStratumIS — Method
DMSetStratumIS(petsclib::PetscLibType, dm::AbstractPetscDM, name::String, value::PetscInt, points::AbstractIS)Set the points in a label stratum
Not Collective
Input Parameters:
dm- TheDMobjectname- The label namevalue- The stratum valuepoints- The stratum points
Level: beginner
See also: DM, DMLabel, DMClearLabelStratum(), DMLabelClearStratum(), DMLabelSetStratumIS(), DMGetStratumSize()
External Links
- PETSc Manual:
DM/DMSetStratumIS
PETSc.LibPETSc.DMSetType — Method
DMSetType(petsclib::PetscLibType, dm::AbstractPetscDM, method::String)Builds a DM, for a particular DM implementation.
Collective
Input Parameters:
dm- TheDMobjectmethod- The name of theDMType, for exampleDMDA,DMPLEX
Options Database Key:
-dm_type type- Sets theDMtype; use -help for a list of available types
Level: intermediate
See also: DM, DMType, DMDA, DMPLEX, DMGetType(), DMCreate(), DMDACreate2d()
External Links
- PETSc Manual:
DM/DMSetType
PETSc.LibPETSc.DMSetUp — Method
DMSetUp(petsclib::PetscLibType, dm::AbstractPetscDM)sets up the data structures inside a DM object
Collective
Input Parameter:
dm- theDMobject to setup
Level: intermediate
See also: DM, DMCreate(), DMSetType(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix()
External Links
- PETSc Manual:
DM/DMSetUp
PETSc.LibPETSc.DMSetUseNatural — Method
DMSetUseNatural(petsclib::PetscLibType, dm::AbstractPetscDM, useNatural::PetscBool)Set the flag for creating a mapping to the natural order when a DM is (re)distributed in parallel
Collective
Input Parameters:
dm- TheDMuseNatural-PETSC_TRUEto build the mapping to a natural order during distribution
Level: beginner
See also: DM, DMGetUseNatural(), DMCreate(), DMPlexDistribute(), DMCreateSubDM(), DMCreateSuperDM()
External Links
- PETSc Manual:
DM/DMSetUseNatural
PETSc.LibPETSc.DMSetVI — Method
DMSetVI(petsclib::PetscLibType, dm::AbstractPetscDM, inactive::AbstractIS)Marks a DM as associated with a VI problem. This causes the interpolation/restriction operators to be restricted to only those variables NOT associated with active constraints.
Logically Collective
Input Parameters:
dm- theDMobjectinactive- anISindicating which points are currently not active
Level: intermediate
See also: SNES, SNESVINEWTONRSLS, SNESVIGetInactiveSet()
External Links
- PETSc Manual:
SNES/DMSetVI
PETSc.LibPETSc.DMSetVariableBounds — Method
DMSetVariableBounds(petsclib::PetscLibType, dm::AbstractPetscDM, f::external)sets a function to compute the lower and upper bound vectors for SNESVI.
Logically Collective
Input Parameters:
dm- theDMobjectf- the function that computes variable bounds used bySNESVI(useNULLto cancel a previous function that was set)
Calling sequence of f:
dm- theDMlower- the vector to hold the lower boundsupper- the vector to hold the upper bounds
Level: intermediate
See also: DM, DMComputeVariableBounds(), DMHasVariableBounds(), DMView(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMGetApplicationContext(), DMSetJacobian()
External Links
- PETSc Manual:
DM/DMSetVariableBounds
PETSc.LibPETSc.DMSetVecType — Method
DMSetVecType(petsclib::PetscLibType, dm::AbstractPetscDM, ctype::String)Sets the type of vector to be created with DMCreateLocalVector() and DMCreateGlobalVector()
Logically Collective
Input Parameters:
dm- initial distributed arrayctype- the vector type, for exampleVECSTANDARD,VECCUDA, orVECVIENNACL
Options Database Key:
-dm_vec_type ctype- the type of vector to create
Level: intermediate
See also: DM, DMCreate(), DMDestroy(), DMDAInterpolationType, VecType, DMGetVecType(), DMSetMatType(), DMGetMatType(), VECSTANDARD, VECCUDA, VECVIENNACL, DMCreateLocalVector(), DMCreateGlobalVector()
External Links
- PETSc Manual:
DM/DMSetVecType
PETSc.LibPETSc.DMSlicedCreate — Method
dm::PetscDM = DMSlicedCreate(petsclib::PetscLibType, comm::MPI_Comm, bs::PetscInt, nlocal::PetscInt, Nghosts::PetscInt, ghosts::Vector{PetscInt}, d_nnz::Vector{PetscInt}, o_nnz::Vector{PetscInt})Creates a DM object, used to manage data for a unstructured problem
Collective
Input Parameters:
comm- the processors that will share the global vectorbs- the block sizenlocal- number of vector entries on this processNghosts- number of ghost points needed on this processghosts- global indices of all ghost points for this processd_nnz- matrix preallocation information representing coupling within this processo_nnz- matrix preallocation information representing coupling between this process and other processes
Output Parameter:
dm- the slice object
Level: advanced
See also: DM, DMSLICED, DMDestroy(), DMCreateGlobalVector(), DMSetType(), DMSlicedSetGhosts(), DMSlicedSetPreallocation(), VecGhostUpdateBegin(), VecGhostUpdateEnd(), VecGhostGetLocalForm(), VecGhostRestoreLocalForm()
External Links
- PETSc Manual:
DM/DMSlicedCreate
PETSc.LibPETSc.DMSlicedSetBlockFills — Method
DMSlicedSetBlockFills(petsclib::PetscLibType, dm::AbstractPetscDM, dfill::Vector{PetscInt}, ofill::Vector{PetscInt})Sets the fill pattern in each block for a multi-component problem of the matrix returned by DMSlicedGetMatrix().
Logically Collective
Input Parameters:
dm- theDMobjectdfill- the fill pattern in the diagonal block (may beNULL, means use dense block)ofill- the fill pattern in the off-diagonal blocks
Level: advanced
See also: DM, DMSLICED, DMSlicedGetMatrix(), DMDASetBlockFills()
External Links
- PETSc Manual:
DM/DMSlicedSetBlockFills
PETSc.LibPETSc.DMSlicedSetGhosts — Method
DMSlicedSetGhosts(petsclib::PetscLibType, dm::AbstractPetscDM, bs::PetscInt, nlocal::PetscInt, Nghosts::PetscInt, ghosts::Vector{PetscInt})Sets the global indices of other processes elements that will be ghosts on this process
Not Collective
Input Parameters:
dm- theDMSLICEDobjectbs- block sizenlocal- number of local (owned, non-ghost) blocksNghosts- number of ghost blocks on this processghosts- global indices of each ghost block
Level: advanced
See also: DM, DMSLICED, DMDestroy(), DMCreateGlobalVector()
External Links
- PETSc Manual:
DM/DMSlicedSetGhosts
PETSc.LibPETSc.DMSlicedSetPreallocation — Method
DMSlicedSetPreallocation(petsclib::PetscLibType, dm::AbstractPetscDM, d_nz::PetscInt, d_nnz::Vector{PetscInt}, o_nz::PetscInt, o_nnz::Vector{PetscInt})sets the matrix memory preallocation for matrices computed by DMSLICED
Not Collective
Input Parameters:
dm- theDMobjectd_nz- number of block nonzeros per block row in diagonal portion of local
submatrix (same for all local rows)
d_nnz- array containing the number of block nonzeros in the various block rows
of the in diagonal portion of the local (possibly different for each block row) or NULL.
o_nz- number of block nonzeros per block row in the off-diagonal portion of local
submatrix (same for all local rows).
o_nnz- array containing the number of nonzeros in the various block rows of the
off-diagonal portion of the local submatrix (possibly different for each block row) or NULL.
Level: advanced
See also: DM, DMSLICED, DMDestroy(), DMCreateGlobalVector(), MatMPIAIJSetPreallocation(), MatMPIBAIJSetPreallocation(), DMSlicedGetMatrix(), DMSlicedSetBlockFills()
External Links
- PETSc Manual:
DM/DMSlicedSetPreallocation
PETSc.LibPETSc.DMSnapToGeomModel — Method
DMSnapToGeomModel(petsclib::PetscLibType, dm::AbstractPetscDM, p::PetscInt, dE::PetscInt, mcoords::Vector{PetscScalar}, gcoords::Vector{PetscScalar})Given a coordinate point 'mcoords' on the mesh point 'p', return the closest coordinate point 'gcoords' on the geometry model associated with that point.
Not Collective
Input Parameters:
dm- TheDMPLEXobjectp- The mesh pointdE- The coordinate dimensionmcoords- A coordinate point lying on the mesh point
Output Parameter:
gcoords- The closest coordinate point on the geometry model associated with 'p' to the given point
Level: intermediate
See also: DM, DMPLEX, DMRefine(), DMPlexCreate(), DMPlexSetRefinementUniform()
External Links
- PETSc Manual:
DM/DMSnapToGeomModel
PETSc.LibPETSc.DMSubDomainHookAdd — Method
DMSubDomainHookAdd(petsclib::PetscLibType, glob::AbstractPetscDM, ddhook::external, restricthook::external, ctx::Ptr{Cvoid})adds a callback to be run when restricting a problem to subdomain DMs with DMCreateDomainDecomposition()
Logically Collective; No Fortran Support
Input Parameters:
global- globalDMddhook- function to run to pass data to the decompositionDMupon its creationrestricthook- function to run to update data on block solve (at the beginning of the block solve)ctx- [optional] application context for provide data for the hooks (may beNULL)
Calling sequence of ddhook:
global- globalDMblock- subdomainDMctx- optional application function context
Calling sequence of restricthook:
global- globalDMout- scatter to the outer (with ghost and overlap points) sub vectorin- scatter to sub vector values only owned locallyblock- subdomainDMctx- optional application function context
Level: advanced
See also: DM, DMSubDomainHookRemove(), DMRefineHookAdd(), SNESFASGetInterpolation(), SNESFASGetInjection(), PetscObjectCompose(), PetscContainerCreate(), DMCreateDomainDecomposition()
External Links
- PETSc Manual:
DM/DMSubDomainHookAdd
PETSc.LibPETSc.DMSubDomainHookRemove — Method
DMSubDomainHookRemove(petsclib::PetscLibType, glob::AbstractPetscDM, ddhook::external, restricthook::external, ctx::Ptr{Cvoid})remove a callback from the list to be run when restricting a problem to subdomain DMs with DMCreateDomainDecomposition()
Logically Collective; No Fortran Support
Input Parameters:
global- globalDMddhook- function to run to pass data to the decompositionDMupon its creationrestricthook- function to run to update data on block solve (at the beginning of the block solve)ctx- [optional] application context for provide data for the hooks (may beNULL)
Calling sequence of ddhook:
dm- globalDMblock- subdomainDMctx- optional application function context
Calling sequence of restricthook:
dm- globalDMoscatter- scatter to the outer (with ghost and overlap points) sub vectorgscatter- scatter to sub vector values only owned locallyblock- subdomainDMctx- optional application function context
Level: advanced
See also: DM, DMSubDomainHookAdd(), SNESFASGetInterpolation(), SNESFASGetInjection(), PetscObjectCompose(), PetscContainerCreate(), DMCreateDomainDecomposition()
External Links
- PETSc Manual:
DM/DMSubDomainHookRemove
PETSc.LibPETSc.DMSubDomainRestrict — Method
DMSubDomainRestrict(petsclib::PetscLibType, glob::AbstractPetscDM, oscatter::VecScatter, gscatter::VecScatter, subdm::AbstractPetscDM)restricts user-defined problem data to a subdomain DM by running hooks registered by DMSubDomainHookAdd()
Collective if any hooks are
Input Parameters:
global- The globalDMto use as a baseoscatter- The scatter from domain global vector filling subdomain global vector with overlapgscatter- The scatter from domain global vector filling subdomain local vector with ghostssubdm- The subdomainDMto update
Level: developer
See also: DM, DMCoarsenHookAdd(), MatRestrict(), DMCreateDomainDecomposition()
External Links
- PETSc Manual:
DM/DMSubDomainRestrict
PETSc.LibPETSc.DMTSCheckFromOptions — Method
DMTSCheckFromOptions(petsclib::PetscLibType, ts::AbstractTS, u::AbstractPetscVec)Check the residual and Jacobian functions using the exact solution by outputting some diagnostic information based on values in the options database
Input Parameters:
ts- theTSobjectu- representativeTSvector
Level: developer
See also: DMTS
External Links
- PETSc Manual:
TS/DMTSCheckFromOptions
PETSc.LibPETSc.DMTSCheckJacobian — Method
isLinear::PetscBool,convRate::PetscReal = DMTSCheckJacobian(petsclib::PetscLibType, ts::AbstractTS, dm::AbstractPetscDM, t::PetscReal, u::AbstractPetscVec, u_t::AbstractPetscVec, tol::PetscReal)Check the Jacobian of the exact solution against the residual using the Taylor Test
Input Parameters:
ts- theTSobjectdm- theDMt- the timeu- aDMvectoru_t- aDMvectortol- A tolerance for the check, or -1 to print the results instead
Output Parameters:
isLinear- Flag indicating that the function looks linear, orNULLconvRate- The rate of convergence of the linear model, orNULL
Level: developer
See also: DNTSCheckFromOptions(), DMTSCheckResidual(), DNSNESCheckFromOptions(), DMSNESCheckDiscretization(), DMSNESCheckResidual()
External Links
- PETSc Manual:
TS/DMTSCheckJacobian
PETSc.LibPETSc.DMTSCheckResidual — Method
residual::PetscReal = DMTSCheckResidual(petsclib::PetscLibType, ts::AbstractTS, dm::AbstractPetscDM, t::PetscReal, u::AbstractPetscVec, u_t::AbstractPetscVec, tol::PetscReal)Check the residual of the exact solution
Input Parameters:
ts- theTSobjectdm- theDMt- the timeu- aDMvectoru_t- aDMvectortol- A tolerance for the check, or -1 to print the results instead
Output Parameter:
residual- The residual norm of the exact solution, orNULL
Level: developer
See also: DM, DMTSCheckFromOptions(), DMTSCheckJacobian(), DNSNESCheckFromOptions(), DMSNESCheckDiscretization(), DMSNESCheckJacobian()
External Links
- PETSc Manual:
TS/DMTSCheckResidual
PETSc.LibPETSc.DMTSCreateRHSMassMatrix — Method
DMTSCreateRHSMassMatrix(petsclib::PetscLibType, dm::AbstractPetscDM)This creates the mass matrix associated with the given DM, and a solver to invert it, and stores them in the DM context.
Collective
Input Parameter:
dm-DMproviding the mass matrix
Level: developer
See also: DM, DMTSCreateRHSMassMatrixLumped(), DMTSDestroyRHSMassMatrix(), DMCreateMassMatrix(), DMTS
External Links
- PETSc Manual:
TS/DMTSCreateRHSMassMatrix
PETSc.LibPETSc.DMTSCreateRHSMassMatrixLumped — Method
DMTSCreateRHSMassMatrixLumped(petsclib::PetscLibType, dm::AbstractPetscDM)This creates the lumped mass matrix associated with the given DM, and a solver to invert it, and stores them in the DM context.
Collective
Input Parameter:
dm-DMproviding the mass matrix
Level: developer
See also: DM, DMTSCreateRHSMassMatrix(), DMTSDestroyRHSMassMatrix(), DMCreateMassMatrix(), DMTS
External Links
- PETSc Manual:
TS/DMTSCreateRHSMassMatrixLumped
PETSc.LibPETSc.DMTSDestroyRHSMassMatrix — Method
DMTSDestroyRHSMassMatrix(petsclib::PetscLibType, dm::AbstractPetscDM)Destroys the mass matrix and solver stored in the DM context, if they exist.
Logically Collective
Input Parameter:
dm-DMproviding the mass matrix
Level: developer
See also: DM, DMTSCreateRHSMassMatrixLumped(), DMCreateMassMatrix(), DMTS
External Links
- PETSc Manual:
TS/DMTSDestroyRHSMassMatrix
PETSc.LibPETSc.DMTSGetForcingFunction — Method
f::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMTSGetForcingFunction(petsclib::PetscLibType, dm::AbstractPetscDM)get TS forcing function evaluation function from a DMTS
Not Collective
Input Parameter:
dm-DMto be used withTS
Output Parameters:
f- forcing function evaluation function; seeTSForcingFnfor the calling sequencectx- context for solution evaluation
Level: developer
See also: DMTS, TS, DM, TSSetForcingFunction(), TSForcingFn
External Links
- PETSc Manual:
TS/DMTSGetForcingFunction
PETSc.LibPETSc.DMTSGetI2Function — Method
fun::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMTSGetI2Function(petsclib::PetscLibType, dm::AbstractPetscDM)get TS implicit residual evaluation function for 2nd order systems from a DMTS
Not Collective
Input Parameter:
dm-DMto be used withTS
Output Parameters:
fun- function evaluation function, for calling sequence seeTSSetI2Function()ctx- context for residual evaluation
Level: developer
See also: DMTS, DM, TS, DMTSSetI2Function(), TSGetI2Function()
External Links
- PETSc Manual:
TS/DMTSGetI2Function
PETSc.LibPETSc.DMTSGetI2Jacobian — Method
jac::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMTSGetI2Jacobian(petsclib::PetscLibType, dm::AbstractPetscDM)get TS implicit Jacobian evaluation function for 2nd order systems from a DMTS
Not Collective
Input Parameter:
dm-DMto be used withTS
Output Parameters:
jac- Jacobian evaluation function, for calling sequence seeTSI2JacobianFnctx- context for Jacobian evaluation
Level: developer
See also: DMTS, DM, TS, DMTSSetI2Jacobian(), TSGetI2Jacobian(), TSI2JacobianFn
External Links
- PETSc Manual:
TS/DMTSGetI2Jacobian
PETSc.LibPETSc.DMTSGetIFunction — Method
func::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMTSGetIFunction(petsclib::PetscLibType, dm::AbstractPetscDM)get TS implicit residual evaluation function from a DMTS
Not Collective
Input Parameter:
dm-DMto be used withTS
Output Parameters:
func- function evaluation function, for calling sequence seeTSIFunctionFnctx- context for residual evaluation
Level: developer
See also: DMTS, TS, DM, DMTSSetIFunction(), TSIFunctionFn
External Links
- PETSc Manual:
TS/DMTSGetIFunction
PETSc.LibPETSc.DMTSGetIFunctionLocal — Method
DMTSGetIFunctionLocal(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})get the local implicit function evaluation function. This function is called with local vector containing the local vector information PLUS ghost point information. It should compute a result for all local elements and DM will automatically accumulate the overlapping values.
Logically Collective
Input Parameter:
dm-DMto associate callback with
Output Parameters:
func- local function evaluationctx- context for function evaluation
Calling sequence of func:
dm- theDMt- the current timeu- the current solutionudot- the derivative ofuF- output, the computed implicit functionctx- the application context for the function
Level: beginner
See also: DM, DMTSSetIFunctionLocal(), DMTSSetIFunction(), DMTSSetIJacobianLocal()
External Links
- PETSc Manual:
TS/DMTSGetIFunctionLocal
PETSc.LibPETSc.DMTSGetIJacobian — Method
func::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMTSGetIJacobian(petsclib::PetscLibType, dm::AbstractPetscDM)get TS Jacobian evaluation function from a DMTS
Not Collective
Input Parameter:
dm-DMto be used withTS
Output Parameters:
func- Jacobian evaluation function, for calling sequence seeTSIJacobianFnctx- context for residual evaluation
Level: developer
See also: DMTS, DM, TS, DMTSSetIJacobian(), TSIJacobianFn
External Links
- PETSc Manual:
TS/DMTSGetIJacobian
PETSc.LibPETSc.DMTSGetIJacobianLocal — Method
DMTSGetIJacobianLocal(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})get a local Jacobian evaluation function
Logically Collective
Input Parameter:
dm-DMto associate callback with
Output Parameters:
func- local Jacobian evaluationctx- optional context for local Jacobian evaluation
Calling sequence of func:
dm- theDMt- the current timeu- the current solutionudot- the derivative ofushift- the shift factoring arising from the implicit time-stepJ- output, the JacobianJpre- output, matrix from which to compute the preconditioner forJ, often the same asJctx- the application context for the function
Level: beginner
See also: DM, DMTSSetIJacobianLocal(), DMTSSetIFunctionLocal(), DMTSSetIJacobian(), DMTSSetIFunction()
External Links
- PETSc Manual:
TS/DMTSGetIJacobianLocal
PETSc.LibPETSc.DMTSGetRHSFunction — Method
func::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMTSGetRHSFunction(petsclib::PetscLibType, dm::AbstractPetscDM)get TS explicit residual evaluation function from a DMTS
Not Collective
Input Parameter:
dm-DMto be used withTS
Output Parameters:
func- residual evaluation function, for calling sequence seeTSRHSFunctionFnctx- context for residual evaluation
Level: developer
See also: DMTS, DM, TS, TSRHSFunctionFn, TSGetRHSFunction()
External Links
- PETSc Manual:
TS/DMTSGetRHSFunction
PETSc.LibPETSc.DMTSGetRHSFunctionLocal — Method
DMTSGetRHSFunctionLocal(petsclib::PetscLibType, dm::AbstractPetscDM, noname::Ptr{Cvoid})get a local rhs function evaluation function. This function is called with local vector containing the local vector information PLUS ghost point information. It should compute a result for all local elements and DM will automatically accumulate the overlapping values.
Logically Collective
Input Parameter:
dm-DMto associate callback with
Output Parameters:
func- local function evaluationctx- context for function evaluation
Calling sequence of func:
dm- theDMt- the current timeu- the current solutionudot- output, the evaluated right hand sidectx- the application context for the function
Level: beginner
See also: DM, DMTSSetRHSFunctionLocal(), DMTSSetRHSFunction(), DMTSSetIFunction(), DMTSSetIJacobianLocal()
External Links
- PETSc Manual:
TS/DMTSGetRHSFunctionLocal
PETSc.LibPETSc.DMTSGetRHSJacobian — Method
func::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMTSGetRHSJacobian(petsclib::PetscLibType, dm::AbstractPetscDM)get TS Jacobian evaluation function from a DMTS
Not Collective
Input Parameter:
dm-DMto be used withTS
Output Parameters:
func- Jacobian evaluation function, for calling sequence seeTSRHSJacobianFnctx- context for residual evaluation
Level: developer
See also: DMTS, DM, TS, DMTSSetRHSJacobian(), TSRHSJacobianFn
External Links
- PETSc Manual:
TS/DMTSGetRHSJacobian
PETSc.LibPETSc.DMTSGetSolutionFunction — Method
func::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMTSGetSolutionFunction(petsclib::PetscLibType, dm::AbstractPetscDM)gets the TS solution evaluation function from a DMTS
Not Collective
Input Parameter:
dm-DMto be used withTS
Output Parameters:
func- solution function evaluation function, for calling sequence seeTSSolutionFnctx- context for solution evaluation
Level: developer
See also: DMTS, TS, DM, DMTSSetSolutionFunction(), TSSolutionFn
External Links
- PETSc Manual:
TS/DMTSGetSolutionFunction
PETSc.LibPETSc.DMTSGetTransientVariable — Method
tvar::Ptr{Cvoid},ctx::Ptr{Cvoid} = DMTSGetTransientVariable(petsclib::PetscLibType, dm::AbstractPetscDM)gets function to transform from state to transient variables set with DMTSSetTransientVariable() from a TSDM
Logically Collective
Input Parameter:
dm-DMto be used withTS
Output Parameters:
tvar- a function that transforms to transient variables, seeTSTransientVariableFnfor the calling sequencectx- a context for tvar
Level: developer
See also: DMTS, DM, DMTSSetTransientVariable(), DMTSGetIFunction(), DMTSGetIJacobian(), TSTransientVariableFn
External Links
- PETSc Manual:
TS/DMTSGetTransientVariable
PETSc.LibPETSc.DMTSSetBoundaryLocal — Method
DMTSSetBoundaryLocal(petsclib::PetscLibType, dm::AbstractPetscDM, func::external, ctx::Ptr{Cvoid})set the function for essential boundary data for a local implicit function evaluation.
Logically Collective
Input Parameters:
dm-DMto associate callback withfunc- local function evaluationctx- context for function evaluation
Calling sequence of func:
dm- theDMt- the current timeu- the current solutionf- output, the computed right hand side functionctx- the application context for the function
Level: intermediate
See also: DM, TS, DMTSSetIFunction(), DMTSSetIJacobianLocal()
External Links
- PETSc Manual:
TS/DMTSSetBoundaryLocal
PETSc.LibPETSc.DMTSSetForcingFunction — Method
DMTSSetForcingFunction(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set TS forcing function evaluation function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSfunc- forcing function evaluation routine, for calling sequence seeTSForcingFnctx- context for solution evaluation
Level: developer
See also: DMTS, DM, TS, TSForcingFn, TSSetForcingFunction(), DMTSGetForcingFunction()
External Links
- PETSc Manual:
TS/DMTSSetForcingFunction
PETSc.LibPETSc.DMTSSetI2Function — Method
DMTSSetI2Function(petsclib::PetscLibType, dm::AbstractPetscDM, fun::Ptr{Cvoid}, ctx::Ptr{Cvoid})set TS implicit function evaluation function for 2nd order systems into a TSDM
Not Collective
Input Parameters:
dm-DMto be used withTSfun- function evaluation routinectx- context for residual evaluation
Level: developer
See also: DMTS, DM, TS, TSSetI2Function()
External Links
- PETSc Manual:
TS/DMTSSetI2Function
PETSc.LibPETSc.DMTSSetI2FunctionContextDestroy — Method
DMTSSetI2FunctionContextDestroy(petsclib::PetscLibType, dm::AbstractPetscDM, f::Ptr{Cvoid})set TS implicit evaluation for 2nd order systems context destroy into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSf- implicit evaluation context destroy function, seePetscCtxDestroyFnfor its calling sequence
Level: developer
See also: DMTS, TSSetI2FunctionContextDestroy(), DMTSSetI2Function(), TSSetI2Function()
External Links
- PETSc Manual:
TS/DMTSSetI2FunctionContextDestroy
PETSc.LibPETSc.DMTSSetI2Jacobian — Method
DMTSSetI2Jacobian(petsclib::PetscLibType, dm::AbstractPetscDM, jac::Ptr{Cvoid}, ctx::Ptr{Cvoid})set TS implicit Jacobian evaluation function for 2nd order systems from a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSjac- Jacobian evaluation routinectx- context for Jacobian evaluation
Level: developer
See also: DMTS, DM, TS, TSI2JacobianFn, TSSetI2Jacobian()
External Links
- PETSc Manual:
TS/DMTSSetI2Jacobian
PETSc.LibPETSc.DMTSSetI2JacobianContextDestroy — Method
DMTSSetI2JacobianContextDestroy(petsclib::PetscLibType, dm::AbstractPetscDM, f::Ptr{Cvoid})set TS implicit Jacobian evaluation for 2nd order systems context destroy function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSf- implicit Jacobian evaluation context destroy function, seePetscCtxDestroyFnfor its calling sequence
Level: developer
See also: DMTS, DM, TS, TSSetI2JacobianContextDestroy(), DMTSSetI2Jacobian(), TSSetI2Jacobian()
External Links
- PETSc Manual:
TS/DMTSSetI2JacobianContextDestroy
PETSc.LibPETSc.DMTSSetIFunction — Method
DMTSSetIFunction(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set TS implicit function evaluation function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSfunc- function evaluating f(t,u,u_t)ctx- context for residual evaluation
Level: developer
See also: DMTS, TS, DM, TSIFunctionFn
External Links
- PETSc Manual:
TS/DMTSSetIFunction
PETSc.LibPETSc.DMTSSetIFunctionContextDestroy — Method
DMTSSetIFunctionContextDestroy(petsclib::PetscLibType, dm::AbstractPetscDM, f::Ptr{Cvoid})set TS implicit evaluation context destroy function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSf- implicit evaluation context destroy function, seePetscCtxDestroyFnfor its calling sequence
Level: developer
See also: DMTS, DM, TS, DMTSSetIFunction(), TSSetIFunction(), PetscCtxDestroyFn
External Links
- PETSc Manual:
TS/DMTSSetIFunctionContextDestroy
PETSc.LibPETSc.DMTSSetIFunctionLocal — Method
DMTSSetIFunctionLocal(petsclib::PetscLibType, dm::AbstractPetscDM, func::external, ctx::Ptr{Cvoid})set a local implicit function evaluation function. This function is called with local vector containing the local vector information PLUS ghost point information. It should compute a result for all local elements and DM will automatically accumulate the overlapping values.
Logically Collective
Input Parameters:
dm-DMto associate callback withfunc- local function evaluationctx- context for function evaluation
Calling sequence of func:
dm- theDMt- the current timeu- the current solutionudot- the derivative ofuF- output, the computed implicit functionctx- the application context for the function
Level: beginner
See also: DM, DMTSGetIFunctionLocal(), DMTSSetIFunction(), DMTSSetIJacobianLocal()
External Links
- PETSc Manual:
TS/DMTSSetIFunctionLocal
PETSc.LibPETSc.DMTSSetIFunctionSerialize — Method
DMTSSetIFunctionSerialize(petsclib::PetscLibType, dm::AbstractPetscDM, view::external, load::external)sets functions used to view and load a TSIFunctionFn context
Not Collective
Input Parameters:
dm-DMto be used withTSview- viewer functionload- loading function
Level: developer
See also: DMTS, DM, TS
External Links
- PETSc Manual:
TS/DMTSSetIFunctionSerialize
PETSc.LibPETSc.DMTSSetIJacobian — Method
DMTSSetIJacobian(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set TS Jacobian evaluation function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSfunc- Jacobian evaluation routine, seeTSIJacobianFnfor the calling sequencectx- context for residual evaluation
Level: developer
See also: DMTS, TS, DM, TSIJacobianFn, DMTSGetIJacobian(), TSSetIJacobian()
External Links
- PETSc Manual:
TS/DMTSSetIJacobian
PETSc.LibPETSc.DMTSSetIJacobianContextDestroy — Method
DMTSSetIJacobianContextDestroy(petsclib::PetscLibType, dm::AbstractPetscDM, f::Ptr{Cvoid})set TS Jacobian evaluation context destroy function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSf- Jacobian evaluation context destroy function, seePetscCtxDestroyFnfor its calling sequence
Level: developer
See also: DMTS, TSSetIJacobianContextDestroy(), TSSetI2JacobianContextDestroy(), DMTSSetIJacobian(), TSSetIJacobian()
External Links
- PETSc Manual:
TS/DMTSSetIJacobianContextDestroy
PETSc.LibPETSc.DMTSSetIJacobianLocal — Method
DMTSSetIJacobianLocal(petsclib::PetscLibType, dm::AbstractPetscDM, func::external, ctx::Ptr{Cvoid})set a local Jacobian evaluation function
Logically Collective
Input Parameters:
dm-DMto associate callback withfunc- local Jacobian evaluationctx- optional context for local Jacobian evaluation
Calling sequence of func:
dm- theDMt- the current timeu- the current solutionudot- the derivative ofushift- the shift factoring arising from the implicit time-stepJ- output, the JacobianJpre- output, matrix from which to compute the preconditioner forJ, often the same asJctx- the application context for the function
Level: beginner
See also: DM, DMTSGetIJacobianLocal(), DMTSSetIFunctionLocal(), DMTSSetIJacobian(), DMTSSetIFunction()
External Links
- PETSc Manual:
TS/DMTSSetIJacobianLocal
PETSc.LibPETSc.DMTSSetIJacobianSerialize — Method
DMTSSetIJacobianSerialize(petsclib::PetscLibType, dm::AbstractPetscDM, view::external, load::external)sets functions used to view and load a TSIJacobianFn context
Not Collective
Input Parameters:
dm-DMto be used withTSview- viewer functionload- loading function
Level: developer
See also: DMTS, DM, TS
External Links
- PETSc Manual:
TS/DMTSSetIJacobianSerialize
PETSc.LibPETSc.DMTSSetRHSFunction — Method
DMTSSetRHSFunction(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set TS explicit residual evaluation function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSfunc- RHS function evaluation routine, seeTSRHSFunctionFnfor the calling sequencectx- context for residual evaluation
Level: developer
See also: DMTS, DM, TS, TSRHSFunctionFn
External Links
- PETSc Manual:
TS/DMTSSetRHSFunction
PETSc.LibPETSc.DMTSSetRHSFunctionContextDestroy — Method
DMTSSetRHSFunctionContextDestroy(petsclib::PetscLibType, dm::AbstractPetscDM, f::Ptr{Cvoid})set TS explicit residual evaluation context destroy function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSf- explicit evaluation context destroy function, seePetscCtxDestroyFnfor its calling sequence
Level: developer
See also: DMTS, TSSetRHSFunctionContextDestroy(), DMTSSetRHSFunction(), TSSetRHSFunction()
External Links
- PETSc Manual:
TS/DMTSSetRHSFunctionContextDestroy
PETSc.LibPETSc.DMTSSetRHSFunctionLocal — Method
DMTSSetRHSFunctionLocal(petsclib::PetscLibType, dm::AbstractPetscDM, func::external, ctx::Ptr{Cvoid})set a local rhs function evaluation function. This function is called with local vector containing the local vector information PLUS ghost point information. It should compute a result for all local elements and DM will automatically accumulate the overlapping values.
Logically Collective
Input Parameters:
dm-DMto associate callback withfunc- local function evaluationctx- context for function evaluation
Calling sequence of func:
dm- theDMt- the current timeu- the current solutionf- output, the evaluated right hand sidectx- the application context for the function
Level: beginner
See also: DM, DMTSGetRHSFunctionLocal(), DMTSSetRHSFunction(), DMTSSetIFunction(), DMTSSetIJacobianLocal()
External Links
- PETSc Manual:
TS/DMTSSetRHSFunctionLocal
PETSc.LibPETSc.DMTSSetRHSJacobian — Method
DMTSSetRHSJacobian(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set TS Jacobian evaluation function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSfunc- Jacobian evaluation routine, for calling sequence seeTSIJacobianFnctx- context for residual evaluation
Level: developer
See also: DMTS, TSRHSJacobianFn, DMTSGetRHSJacobian(), TSSetRHSJacobian()
External Links
- PETSc Manual:
TS/DMTSSetRHSJacobian
PETSc.LibPETSc.DMTSSetRHSJacobianContextDestroy — Method
DMTSSetRHSJacobianContextDestroy(petsclib::PetscLibType, dm::AbstractPetscDM, f::Ptr{Cvoid})set TS Jacobian evaluation context destroy function from a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSf- Jacobian evaluation context destroy function, seePetscCtxDestroyFnfor its calling sequence
Level: developer
See also: DMTS, TS, TSSetRHSJacobianContextDestroy(), DMTSSetRHSJacobian(), TSSetRHSJacobian()
External Links
- PETSc Manual:
TS/DMTSSetRHSJacobianContextDestroy
PETSc.LibPETSc.DMTSSetSolutionFunction — Method
DMTSSetSolutionFunction(petsclib::PetscLibType, dm::AbstractPetscDM, func::Ptr{Cvoid}, ctx::Ptr{Cvoid})set TS solution evaluation function into a DMTS
Not Collective
Input Parameters:
dm-DMto be used withTSfunc- solution function evaluation routine, for calling sequence seeTSSolutionFnctx- context for solution evaluation
Level: developer
See also: DMTS, DM, TS, DMTSGetSolutionFunction(), TSSolutionFn
External Links
- PETSc Manual:
TS/DMTSSetSolutionFunction
PETSc.LibPETSc.DMTSSetTransientVariable — Method
DMTSSetTransientVariable(petsclib::PetscLibType, dm::AbstractPetscDM, tvar::Ptr{Cvoid}, ctx::Ptr{Cvoid})sets function to transform from state to transient variables into a DMTS
Logically Collective
Input Parameters:
dm-DMto be used withTStvar- a function that transforms to transient variables, seeTSTransientVariableFnfor the calling sequencectx- a context for tvar
Level: developer
See also: DMTS, TS, TSBDF, TSSetTransientVariable(), DMTSGetTransientVariable(), DMTSSetIFunction(), DMTSSetIJacobian(), TSTransientVariableFn
External Links
- PETSc Manual:
TS/DMTSSetTransientVariable
PETSc.LibPETSc.DMUseTensorOrder — Method
DMUseTensorOrder(petsclib::PetscLibType, dm::AbstractPetscDM, tensor::PetscBool)Use a tensor product closure ordering for the default section
Input Parameters:
dm- The DMtensor- Flag for tensor order
Level: developer
See also: DMPlexSetClosurePermutationTensor(), PetscSectionResetClosurePermutation()
External Links
- PETSc Manual:
DM/DMUseTensorOrder
PETSc.LibPETSc.DMView — Method
DMView(petsclib::PetscLibType, dm::AbstractPetscDM, v::PetscViewer)Views a DM. Depending on the PetscViewer and its PetscViewerFormat it may print some ASCII information about the DM to the screen or a file or save the DM in a binary file to be loaded later or create a visualization of the DM
Collective
Input Parameters:
dm- theDMobject to viewv- the viewer
Options Database Keys:
-view_pyvista_warp f- Warps the mesh by the active scalar with factor f-view_pyvista_clip xl,xu,yl,yu,zl,zu- Defines the clipping box-dm_view_draw_line_color color- Specify the X-window color for cell borders-dm_view_draw_cell_color color- Specify the X-window color for cells-dm_view_draw_affine (true|false)- Flag to ignore high-order edges
Level: beginner
See also: DM, PetscViewer, PetscViewerFormat, PetscViewerSetFormat(), DMDestroy(), DMCreateGlobalVector(), DMCreateInterpolation(), DMCreateColoring(), DMCreateMatrix(), DMCreateMassMatrix(), DMLoad(), PetscObjectSetName()
External Links
- PETSc Manual:
DM/DMView
PETSc.LibPETSc.DMViewFromOptions — Method
DMViewFromOptions(petsclib::PetscLibType, dm::AbstractPetscDM, obj, name::String)View a DM in a particular way based on a request in the options database
Collective
Input Parameters:
dm- theDMobjectobj- optional object that provides the prefix for the options database (ifNULLthen the prefix inobjis used)name- option string that is used to activate viewing
Options Database Key:
-name [viewertype][:...]- option name and values. SeePetscObjectViewFromOptions()for the possible arguments
Level: intermediate
See also: DM, DMView(), PetscObjectViewFromOptions(), DMCreate()
External Links
- PETSc Manual:
DM/DMViewFromOptions
PETSc.LibPETSc.DMAdaptorAdapt — Method
adm::PetscDM,ax::PetscVec = DMAdaptorAdapt(petsclib::PetscLibType, adaptor::DMAdaptor, x::AbstractPetscVec, strategy::DMAdaptationStrategy)Creates a new DM that is adapted to the problem
Not Collective
Input Parameters:
adaptor- TheDMAdaptorobjectx- The global approximate solutionstrategy- The adaptation strategy, seeDMAdaptationStrategy
Output Parameters:
adm- The adaptedDMax- The adapted solution
Options Database Keys:
-snes_adapt (initial|sequential|multigrid)- adaption strategy, seeDMAdaptationStrategy-adapt_gradient_view- View the Clement interpolant of the solution gradient-adapt_hessian_view- View the Clement interpolant of the solution Hessian-adapt_metric_view- View the metric tensor for adaptive mesh refinement
Level: intermediate
See also: DMAdaptor, DMAdaptationStrategy, DMAdaptorSetSolver(), DMAdaptorCreate()
External Links
- PETSc Manual:
DM/DMAdaptorAdapt
PETSc.LibPETSc.DMAdaptorCreate — Method
adaptor::DMAdaptor = DMAdaptorCreate(petsclib::PetscLibType, comm::MPI_Comm)Create a DMAdaptor object. Its purpose is to construct a adaptation DMLabel or metric Vec that can be used to modify the DM.
Collective
Input Parameter:
comm- The communicator for theDMAdaptorobject
Output Parameter:
adaptor- TheDMAdaptorobject
Level: beginner
See also: DM, DMAdaptor, DMAdaptorDestroy(), DMAdaptorAdapt(), PetscConvEst, PetscConvEstCreate()
External Links
- PETSc Manual:
DM/DMAdaptorCreate
PETSc.LibPETSc.DMAdaptorDestroy — Method
DMAdaptorDestroy(petsclib::PetscLibType, adaptor::Union{DMAdaptor, Ref{DMAdaptor}})Destroys a DMAdaptor object
Collective
Input Parameter:
adaptor- TheDMAdaptorobject
Level: beginner
See also: DM, DMAdaptor, DMAdaptorCreate(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorDestroy
PETSc.LibPETSc.DMAdaptorGetCriterion — Method
criterion::DMAdaptationCriterion = DMAdaptorGetCriterion(petsclib::PetscLibType, adaptor::DMAdaptor)Get the adaptation criterion
Not Collective
Input Parameter:
adaptor- theDMAdaptor
Output Parameter:
criterion- the criterion for adaptation
Level: advanced
See also: DMAdaptor, DMAdaptorSetCriterion(), DMAdaptationCriterion
External Links
- PETSc Manual:
DM/DMAdaptorGetCriterion
PETSc.LibPETSc.DMAdaptorGetMixedSetupFunction — Method
DMAdaptorGetMixedSetupFunction(petsclib::PetscLibType, adaptor::DMAdaptor, noname::Ptr{Cvoid})Get the function setting up the mixed problem, if it exists
Not Collective
Input Parameter:
adaptor- theDMAdaptor
Output Parameter:
setupFunc- the function setting up the mixed problem, orNULL
Level: advanced
See also: DMAdaptor, DMAdaptorSetMixedSetupFunction(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorGetMixedSetupFunction
PETSc.LibPETSc.DMAdaptorGetSequenceLength — Method
num::PetscInt = DMAdaptorGetSequenceLength(petsclib::PetscLibType, adaptor::DMAdaptor)Gets the number of sequential adaptations used by an adapter
Not Collective
Input Parameter:
adaptor- TheDMAdaptorobject
Output Parameter:
num- The number of adaptations
Level: intermediate
See also: DMAdaptor, DMAdaptorSetSequenceLength(), DMAdaptorCreate(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorGetSequenceLength
PETSc.LibPETSc.DMAdaptorGetSolver — Method
snes::SNES = DMAdaptorGetSolver(petsclib::PetscLibType, adaptor::DMAdaptor)Gets the solver used to produce discrete solutions
Not Collective
Input Parameter:
adaptor- TheDMAdaptorobject
Output Parameter:
snes- The solver
Level: intermediate
See also: DM, DMAdaptor, DMAdaptorSetSolver(), DMAdaptorCreate(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorGetSolver
PETSc.LibPETSc.DMAdaptorGetTransferFunction — Method
DMAdaptorGetTransferFunction(petsclib::PetscLibType, adaptor::DMAdaptor, noname::Ptr{Cvoid})Get the callback used by a DMAdaptor to transfer a solution vector from an old DM to the adapted DM
Not Collective
Input Parameter:
adaptor- theDMAdaptorobject
Output Parameter:
tfunc- pointer to the transfer callback
Calling sequence of tfunc:
adaptor- theDMAdaptorobjectdm- the currentDMxin- the current solutionnewdm- the adaptedDMxout- the transferred solution onnewdmctx- application context, set withDMSetApplicationContext()
Level: developer
See also: DMAdaptor, DMAdaptorSetTransferFunction(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorGetTransferFunction
PETSc.LibPETSc.DMAdaptorGetType — Method
type::String = DMAdaptorGetType(petsclib::PetscLibType, adaptor::DMAdaptor)Gets the type name (as a string) from the adaptor.
Not Collective
Input Parameter:
adaptor- TheDMAdaptor
Output Parameter:
type- TheDMAdaptorTypename
Level: intermediate
See also: DM, DMPLEX, DMAdaptor, DMAdaptorType, DMAdaptorSetType(), DMAdaptorCreate()
External Links
- PETSc Manual:
DM/DMAdaptorGetType
PETSc.LibPETSc.DMAdaptorMonitor — Method
DMAdaptorMonitor(petsclib::PetscLibType, adaptor::DMAdaptor, it::PetscInt, odm::AbstractPetscDM, adm::AbstractPetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::AbstractPetscVec)runs the user provided monitor routines, if they exist
Collective
Input Parameters:
adaptor- theDMAdaptorit- iteration numberodm- the originalDMadm- the adaptedDMNf- the number of fieldsenorms- the 2-norm error values for each fielderror-Vecof cellwise errors
Level: developer
See also: DMAdaptorMonitorSet()
External Links
- PETSc Manual:
DM/DMAdaptorMonitor
PETSc.LibPETSc.DMAdaptorMonitorCancel — Method
DMAdaptorMonitorCancel(petsclib::PetscLibType, adaptor::DMAdaptor)Clears all monitors for a DMAdaptor object.
Logically Collective
Input Parameter:
adaptor- theDMAdaptor
Options Database Key:
-dm_adaptor_monitor_cancel- Cancels all monitors that have been hardwired into a code by calls toDMAdaptorMonitorSet(), but does not cancel those set via the options database.
Level: intermediate
See also: DMAdaptorMonitorError(), DMAdaptorMonitorSet(), DMAdaptor
External Links
- PETSc Manual:
DM/DMAdaptorMonitorCancel
PETSc.LibPETSc.DMAdaptorMonitorError — Method
DMAdaptorMonitorError(petsclib::PetscLibType, adaptor::DMAdaptor, n::PetscInt, odm::AbstractPetscDM, adm::AbstractPetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::AbstractPetscVec, vf::Vector{PetscViewerAndFormat})Prints the error norm at each iteration of an adaptation loop.
Collective
Input Parameters:
adaptor- theDMAdaptorn- iteration numberodm- the originalDMadm- the adaptedDMNf- number of fieldsenorms- 2-norm error values for each field (may be estimated).error-Vecof cellwise errorsvf- The viewer context
Options Database Key:
-adaptor_monitor_error- ActivatesDMAdaptorMonitorError()
Level: intermediate
See also: DMAdaptor, DMAdaptorMonitorSet(), DMAdaptorMonitorErrorDraw(), DMAdaptorMonitorErrorDrawLG()
External Links
- PETSc Manual:
DM/DMAdaptorMonitorError
PETSc.LibPETSc.DMAdaptorMonitorErrorDraw — Method
DMAdaptorMonitorErrorDraw(petsclib::PetscLibType, adaptor::DMAdaptor, n::PetscInt, odm::AbstractPetscDM, adm::AbstractPetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::AbstractPetscVec, vf::Vector{PetscViewerAndFormat})Plots the error at each iteration of an iterative solver.
Collective
Input Parameters:
adaptor- theDMAdaptorn- iteration numberodm- the originalDMadm- the adaptedDMNf- number of fieldsenorms- 2-norm error values for each field (may be estimated).error-Vecof cellwise errorsvf- The viewer context
Options Database Key:
-adaptor_monitor_error draw- ActivatesDMAdaptorMonitorErrorDraw()
Level: intermediate
See also: PETSCVIEWERDRAW, DMAdaptor, DMAdaptorMonitorSet(), DMAdaptorMonitorErrorDrawLG()
External Links
- PETSc Manual:
DM/DMAdaptorMonitorErrorDraw
PETSc.LibPETSc.DMAdaptorMonitorErrorDrawLG — Method
DMAdaptorMonitorErrorDrawLG(petsclib::PetscLibType, adaptor::DMAdaptor, n::PetscInt, odm::AbstractPetscDM, adm::AbstractPetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::AbstractPetscVec, vf::Vector{PetscViewerAndFormat})Plots the error norm at each iteration of an adaptive loop.
Collective
Input Parameters:
adaptor- theDMAdaptorn- iteration numberodm- the originalDMadm- the adaptedDMNf- number of fieldsenorms- 2-norm error values for each field (may be estimated).error-Vecof cellwise errorsvf- The viewer context, obtained viaDMAdaptorMonitorErrorDrawLGCreate()
Options Database Key:
-adaptor_error draw::draw_lg- ActivatesDMAdaptorMonitorErrorDrawLG()
Level: intermediate
See also: PETSCVIEWERDRAW, DMAdaptor, DMAdaptorMonitorSet(), DMAdaptorMonitorErrorDraw(), DMAdaptorMonitorError(), DMAdaptorMonitorTrueResidualDrawLGCreate()
External Links
- PETSc Manual:
DM/DMAdaptorMonitorErrorDrawLG
PETSc.LibPETSc.DMAdaptorMonitorErrorDrawLGCreate — Method
vf::Ptr{PetscViewerAndFormat} = DMAdaptorMonitorErrorDrawLGCreate(petsclib::PetscLibType, viewer::PetscViewer, format::PetscViewerFormat, ctx::Ptr{Cvoid})Creates the context for the error plotter DMAdaptorMonitorErrorDrawLG()
Collective
Input Parameters:
viewer- ThePetscViewerformat- The viewer formatctx- An optional application context
Output Parameter:
vf- The viewer context
Level: intermediate
See also: PETSCVIEWERDRAW, PetscViewerMonitorGLSetUp(), DMAdaptor, DMAdaptorMonitorSet(), DMAdaptorMonitorErrorDrawLG()
External Links
- PETSc Manual:
DM/DMAdaptorMonitorErrorDrawLGCreate
PETSc.LibPETSc.DMAdaptorMonitorRegister — Method
DMAdaptorMonitorRegister(petsclib::PetscLibType, name::String, vtype::String, format::PetscViewerFormat, monitor::external, create::external, destroy::external)Registers a mesh adaptation monitor routine that may be accessed with DMAdaptorMonitorSetFromOptions()
Not Collective
Input Parameters:
name- name of a new monitor routinevtype- APetscViewerTypefor the outputformat- APetscViewerFormatfor the outputmonitor- Monitor routinecreate- Creation routine, orNULLdestroy- Destruction routine, orNULL
Level: advanced
See also: DMAdaptor, DMAdaptorMonitorSet(), DMAdaptorMonitorRegisterAll(), DMAdaptorMonitorSetFromOptions()
External Links
- PETSc Manual:
DM/DMAdaptorMonitorRegister
PETSc.LibPETSc.DMAdaptorMonitorRegisterAll — Method
DMAdaptorMonitorRegisterAll(petsclib::PetscLibType)Registers all of the mesh adaptation monitors in the SNES package.
Not Collective
Level: advanced
See also: SNES, DM, DMAdaptorMonitorRegister(), DMAdaptorRegister()
External Links
- PETSc Manual:
DM/DMAdaptorMonitorRegisterAll
PETSc.LibPETSc.DMAdaptorMonitorRegisterDestroy — Method
DMAdaptorMonitorRegisterDestroy(petsclib::PetscLibType)This function destroys the registered monitors for DMAdaptor. It is called from PetscFinalize().
Not collective
Level: developer
See also: DM, DMPLEX, DMAdaptorMonitorRegisterAll(), DMAdaptor, PetscFinalize()
External Links
- PETSc Manual:
DM/DMAdaptorMonitorRegisterDestroy
PETSc.LibPETSc.DMAdaptorMonitorSet — Method
DMAdaptorMonitorSet(petsclib::PetscLibType, adaptor::DMAdaptor, monitor::external, ctx::Ptr{Cvoid}, monitordestroy::Ptr{Cvoid})Sets an ADDITIONAL function to be called at every iteration to monitor the error etc.
Logically Collective
Input Parameters:
adaptor- theDMAdaptormonitor- pointer to function (if this isNULL, it turns off monitoringctx- [optional] context for private data for the monitor routine (useNULLif no context is needed)monitordestroy- [optional] routine that frees monitor context (may beNULL), seePetscCtxDestroyFnfor its calling sequence
Calling sequence of monitor:
adaptor- theDMAdaptorit- iteration numberodm- the originalDMadm- the adaptedDMNf- number of fieldsenorms- (estimated) 2-norm of the error for each fielderror-Vecof cellwise errorsctx- optional monitoring context, as set byDMAdaptorMonitorSet()
Options Database Keys:
-adaptor_monitor_size- setsDMAdaptorMonitorSize()-adaptor_monitor_error- setsDMAdaptorMonitorError()-adaptor_monitor_error draw- setsDMAdaptorMonitorErrorDraw()and plots error-adaptor_monitor_error draw::draw_lg- setsDMAdaptorMonitorErrorDrawLG()and plots error-dm_adaptor_monitor_cancel- Cancels all monitors that have been hardwired into a code by calls toDMAdaptorMonitorSet(), but does not cancel those set via the options database.
Level: beginner
See also: DMAdaptorMonitorError(), DMAdaptor, PetscCtxDestroyFn
External Links
- PETSc Manual:
DM/DMAdaptorMonitorSet
PETSc.LibPETSc.DMAdaptorMonitorSetFromOptions — Method
DMAdaptorMonitorSetFromOptions(petsclib::PetscLibType, adaptor::DMAdaptor, opt::String, name::String, ctx::Ptr{Cvoid})Sets a monitor function and viewer appropriate for the type indicated by the user in the options database
Collective
Input Parameters:
adaptor-DMadaptorobject you wish to monitoropt- the command line option for this monitorname- the monitor type one is seekingctx- An optional application context for the monitor, orNULL
Level: developer
See also: DMAdaptorMonitorRegister(), DMAdaptorMonitorSet(), PetscOptionsGetViewer()
External Links
- PETSc Manual:
DM/DMAdaptorMonitorSetFromOptions
PETSc.LibPETSc.DMAdaptorMonitorSize — Method
DMAdaptorMonitorSize(petsclib::PetscLibType, adaptor::DMAdaptor, n::PetscInt, odm::AbstractPetscDM, adm::AbstractPetscDM, Nf::PetscInt, enorms::Vector{PetscReal}, error::AbstractPetscVec, vf::Vector{PetscViewerAndFormat})Prints the mesh sizes at each iteration of an adaptation loop.
Collective
Input Parameters:
adaptor- theDMAdaptorn- iteration numberodm- the originalDMadm- the adaptedDMNf- number of fieldsenorms- 2-norm error values for each field (may be estimated).error-Vecof cellwise errorsvf- The viewer context
Options Database Key:
-adaptor_monitor_size- ActivatesDMAdaptorMonitorSize()
Level: intermediate
See also: DMAdaptor, DMAdaptorMonitorSet(), DMAdaptorMonitorError(), DMAdaptorMonitorErrorDraw(), DMAdaptorMonitorErrorDrawLG()
External Links
- PETSc Manual:
DM/DMAdaptorMonitorSize
PETSc.LibPETSc.DMAdaptorRegister — Method
DMAdaptorRegister(petsclib::PetscLibType, name::String, noname::Ptr{Cvoid})Adds a new adaptor component implementation
Not Collective
Input Parameters:
name- The name of a new user-defined creation routinecreate_func- The creation routine
See also: DM, DMPLEX, DMAdaptor, DMAdaptorRegisterAll(), DMAdaptorRegisterDestroy()
External Links
- PETSc Manual:
DM/DMAdaptorRegister
PETSc.LibPETSc.DMAdaptorRegisterAll — Method
DMAdaptorRegisterAll(petsclib::PetscLibType)Registers all of the adaptor components in the DM package.
Not Collective
Level: advanced
See also: DM, DMPLEX, DMAdaptorType, DMRegisterAll(), DMAdaptorRegisterDestroy()
External Links
- PETSc Manual:
DM/DMAdaptorRegisterAll
PETSc.LibPETSc.DMAdaptorRegisterDestroy — Method
DMAdaptorRegisterDestroy(petsclib::PetscLibType)This function destroys the registered DMAdaptorType. It is called from PetscFinalize().
Not collective
Level: developer
See also: DM, DMPLEX, DMAdaptorRegisterAll(), DMAdaptorType, PetscFinalize()
External Links
- PETSc Manual:
DM/DMAdaptorRegisterDestroy
PETSc.LibPETSc.DMAdaptorSetCriterion — Method
DMAdaptorSetCriterion(petsclib::PetscLibType, adaptor::DMAdaptor, criterion::DMAdaptationCriterion)Set the adaptation criterion
Not Collective
Input Parameters:
adaptor- theDMAdaptorcriterion- the adaptation criterion
Level: advanced
See also: DMAdaptor, DMAdaptorGetCriterion(), DMAdaptationCriterion
External Links
- PETSc Manual:
DM/DMAdaptorSetCriterion
PETSc.LibPETSc.DMAdaptorSetFromOptions — Method
DMAdaptorSetFromOptions(petsclib::PetscLibType, adaptor::DMAdaptor)Sets properties of a DMAdaptor object from values in the options database
Collective
Input Parameter:
adaptor- TheDMAdaptorobject
Options Database Keys:
-adaptor_monitor_size- Monitor the mesh size-adaptor_monitor_error- Monitor the solution error-adaptor_sequence_num num- Number of adaptations to generate an optimal grid-adaptor_target_num num- Set the target number of vertices N_adapt, -1 for automatic determination-adaptor_refinement_factor r- Set r such that Nadapt = r^dim Norig-adaptor_mixed_setup_function func- Set the function func that sets up the mixed problem
Level: beginner
See also: DM, DMAdaptor, DMAdaptorCreate(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorSetFromOptions
PETSc.LibPETSc.DMAdaptorSetMixedSetupFunction — Method
DMAdaptorSetMixedSetupFunction(petsclib::PetscLibType, adaptor::DMAdaptor, setupFunc::external)Set the function setting up the mixed problem
Not Collective
Input Parameters:
adaptor- theDMAdaptorsetupFunc- the function setting up the mixed problem
Calling sequence of setupFunc:
adaptor- theDMAdaptordm- theDM
Level: advanced
See also: DMAdaptor, DMAdaptorGetMixedSetupFunction(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorSetMixedSetupFunction
PETSc.LibPETSc.DMAdaptorSetOptionsPrefix — Method
DMAdaptorSetOptionsPrefix(petsclib::PetscLibType, adaptor::DMAdaptor, prefix::String)Sets the prefix used for searching for all DMAdaptor options in the database.
Logically Collective
Input Parameters:
adaptor- theDMAdaptorprefix- the prefix to prepend to all option names
Level: advanced
See also: DMAdaptor, SNESSetOptionsPrefix(), DMAdaptorSetFromOptions()
External Links
- PETSc Manual:
DM/DMAdaptorSetOptionsPrefix
PETSc.LibPETSc.DMAdaptorSetSequenceLength — Method
DMAdaptorSetSequenceLength(petsclib::PetscLibType, adaptor::DMAdaptor, num::PetscInt)Sets the number of sequential adaptations
Not Collective
Input Parameters:
adaptor- TheDMAdaptorobjectnum- The number of adaptations
Level: intermediate
See also: DMAdaptorGetSequenceLength(), DMAdaptorCreate(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorSetSequenceLength
PETSc.LibPETSc.DMAdaptorSetSolver — Method
DMAdaptorSetSolver(petsclib::PetscLibType, adaptor::DMAdaptor, snes::AbstractSNES)Sets the solver used to produce discrete solutions
Not Collective
Input Parameters:
adaptor- TheDMAdaptorobjectsnes- The solver, this MUST have an attachedDM/PetscDS, so that the exact solution can be computed
Level: intermediate
See also: DMAdaptor, DMAdaptorGetSolver(), DMAdaptorCreate(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorSetSolver
PETSc.LibPETSc.DMAdaptorSetTransferFunction — Method
DMAdaptorSetTransferFunction(petsclib::PetscLibType, adaptor::DMAdaptor, tfunc::external)Set the callback used by a DMAdaptor to transfer a solution vector from an old DM to the adapted DM
Logically Collective
Input Parameters:
adaptor- theDMAdaptorobjecttfunc- the transfer callback
Calling sequence of tfunc:
adaptor- theDMAdaptorobjectdm- the currentDMxin- the current solutionnewdm- the adaptedDMxout- the transferred solution onnewdmctx- application context, set withDMSetApplicationContext()
Level: developer
See also: DMAdaptor, DMAdaptorGetTransferFunction(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorSetTransferFunction
PETSc.LibPETSc.DMAdaptorSetType — Method
DMAdaptorSetType(petsclib::PetscLibType, adaptor::DMAdaptor, method::String)Sets the particular implementation for a adaptor.
Collective
Input Parameters:
adaptor- TheDMAdaptormethod- The name of the adaptor type
Options Database Key:
-adaptor_type type- Sets the adaptor type; seeDMAdaptorType
Level: intermediate
See also: DM, DMPLEX, DMAdaptor, DMAdaptorType, DMAdaptorGetType(), DMAdaptorCreate()
External Links
- PETSc Manual:
DM/DMAdaptorSetType
PETSc.LibPETSc.DMAdaptorSetUp — Method
DMAdaptorSetUp(petsclib::PetscLibType, adaptor::DMAdaptor)After the solver is specified, creates data structures for controlling adaptivity
Collective
Input Parameter:
adaptor- TheDMAdaptorobject
Level: beginner
See also: DMAdaptor, DMAdaptorCreate(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorSetUp
PETSc.LibPETSc.DMAdaptorView — Method
DMAdaptorView(petsclib::PetscLibType, adaptor::DMAdaptor, viewer::PetscViewer)Views a DMAdaptor object
Collective
Input Parameters:
adaptor- TheDMAdaptorobjectviewer- ThePetscViewerobject
Level: beginner
See also: DM, DMAdaptor, DMAdaptorCreate(), DMAdaptorAdapt()
External Links
- PETSc Manual:
DM/DMAdaptorView
PETSc.LibPETSc.DMFieldCreateDA — Method
field::DMField = DMFieldCreateDA(petsclib::PetscLibType, dm::AbstractPetscDM, nc::PetscInt, cornerValues::Vector{PetscScalar})Create a DMField of type DMFIELDDA that represents a multilinear field on a DMDA given by its values at the corners of the reference element.
Collective
Input Parameters:
dm- theDMDAon which the field livesnc- the number of components of the fieldcornerValues- array of lengthnc * (1 << dim)holding the field values at each corner of the reference element, ordered by lexicographic corner index
Output Parameter:
field- the newly createdDMField
Level: intermediate
See also: DMField, DMFIELDDA, DMDA, DMFieldCreate(), DMFieldCreateDS(), DMFieldCreateShell()
External Links
- PETSc Manual:
DM/DMFieldCreateDA
PETSc.LibPETSc.DMFieldCreateDS — Method
field::DMField = DMFieldCreateDS(petsclib::PetscLibType, dm::AbstractPetscDM, fieldNum::PetscInt, vec::AbstractPetscVec)Create a DMField of type DMFIELDDS for a PetscDS field on a DM.
Collective
Input Parameters:
dm- theDMcarrying the discretizationfieldNum- the field number within theDM'sPetscDSvec- local vector holding the coefficients
Output Parameter:
field- the newly createdDMField
Level: intermediate
See also: DMField, DMFIELDDS, DMFieldCreateDSWithDG(), DMFieldCreate(), PetscDS
External Links
- PETSc Manual:
DM/DMFieldCreateDS
PETSc.LibPETSc.DMFieldCreateDSWithDG — Method
field::DMField = DMFieldCreateDSWithDG(petsclib::PetscLibType, dm::AbstractPetscDM, dmDG::AbstractPetscDM, fieldNum::PetscInt, vec::AbstractPetscVec, vecDG::AbstractPetscVec)Create a DMField of type DMFIELDDS for a PetscDS field, optionally paired with a matching discontinuous-Galerkin representation on a companion DM.
Collective
Input Parameters:
dm- theDMcarrying the primary (continuous) discretizationdmDG- optionalDMcarrying a matching discontinuous-Galerkin discretization, orNULLfieldNum- the field number within theDM'sPetscDSvec- local vector holding the coefficients ondmvecDG- local vector holding the coefficients ondmDG, orNULLifdmDGisNULL
Output Parameter:
field- the newly createdDMField
Level: intermediate
See also: DMField, DMFIELDDS, DMFieldCreateDS(), DMFieldCreate(), PetscDS, PetscFE
External Links
- PETSc Manual:
DM/DMFieldCreateDSWithDG
PETSc.LibPETSc.DMFieldCreateDefaultFaceQuadrature — Method
quad::PetscQuadrature = DMFieldCreateDefaultFaceQuadrature(petsclib::PetscLibType, field::DMField, pointIS::AbstractIS)Creates a quadrature sufficient to integrate the field on all faces of the selected cells via pullback onto the reference element
Not Collective
Input Parameters:
field- theDMFieldobjectpointIS- the index set of points over which we wish to integrate the field over faces
Output Parameter:
quad- aPetscQuadratureobject
Level: developer
See also: DMFieldCreateDefaultQuadrature(), DMField, PetscQuadrature, IS, DMFieldEvaluteFE(), DMFieldGetDegree()
External Links
- PETSc Manual:
DM/DMFieldCreateDefaultFaceQuadrature
PETSc.LibPETSc.DMFieldCreateDefaultQuadrature — Method
quad::PetscQuadrature = DMFieldCreateDefaultQuadrature(petsclib::PetscLibType, field::DMField, pointIS::AbstractIS)Creates a quadrature sufficient to integrate the field on the selected points via pullback onto the reference element
Not Collective
Input Parameters:
field- theDMFieldobjectpointIS- the index set of points over which we wish to integrate the field
Output Parameter:
quad- aPetscQuadratureobject
Level: developer
See also: DMFieldCreateDefaultFaceQuadrature(), DMField, PetscQuadrature, IS, DMFieldEvaluteFE(), DMFieldGetDegree()
External Links
- PETSc Manual:
DM/DMFieldCreateDefaultQuadrature
PETSc.LibPETSc.DMFieldCreateFEGeom — Method
geom::Ptr{PetscFEGeom} = DMFieldCreateFEGeom(petsclib::PetscLibType, field::DMField, pointIS::AbstractIS, quad::PetscQuadrature, mode::PetscFEGeomMode)Compute and create the geometric factors of a coordinate field
Not Collective
Input Parameters:
field- theDMFieldobjectpointIS- the index set of points over which we wish to integrate the fieldquad- the quadrature points at which to evaluate the geometric factorsmode- Type of geometry data to store
Output Parameter:
geom- the geometric factors
Level: developer
See also: DMField, PetscQuadrature, IS, PetscFEGeom, DMFieldEvaluateFE(), DMFieldCreateDefaulteQuadrature(), DMFieldGetDegree()
External Links
- PETSc Manual:
DM/DMFieldCreateFEGeom
PETSc.LibPETSc.DMFieldCreateShell — Method
field::DMField = DMFieldCreateShell(petsclib::PetscLibType, dm::AbstractPetscDM, numComponents::PetscInt, continuity::DMFieldContinuity, ctx::Ptr{Cvoid})Create a DMFIELDSHELL, a DMField whose evaluation is implemented entirely by user-supplied callbacks.
Collective
Input Parameters:
dm- theDMon which the field livesnumComponents- the number of components of the fieldcontinuity- the continuity of the field (e.g.DMFIELD_VERTEX)ctx- optional application context returned byDMFieldShellGetContext()
Output Parameter:
field- the newly createdDMFieldof typeDMFIELDSHELL
Level: intermediate
See also: DMField, DMFIELDSHELL, DMFieldShellGetContext(), DMFieldShellSetEvaluate(), DMFieldShellSetEvaluateFE(), DMFieldShellSetEvaluateFV(), DMFieldShellSetDestroy()
External Links
- PETSc Manual:
DM/DMFieldCreateShell
PETSc.LibPETSc.DMFieldDestroy — Method
DMFieldDestroy(petsclib::PetscLibType, field::Union{DMField, Ref{DMField}})destroy a DMField
Collective
Input Parameter:
field- address ofDMField
Level: advanced
See also: DMField, DMFieldCreate()
External Links
- PETSc Manual:
DM/DMFieldDestroy
PETSc.LibPETSc.DMFieldEvaluate — Method
B::Ptr{Cvoid},D::Ptr{Cvoid},H::Ptr{Cvoid} = DMFieldEvaluate(petsclib::PetscLibType, field::DMField, points::AbstractPetscVec, datatype::PetscDataType)Evaluate the field and its derivatives on a set of points
Collective
Input Parameters:
field- TheDMFieldobjectpoints- The points at which to evaluate the field. Should have size d x n,
where d is the coordinate dimension of the manifold and n is the number of points
datatype- The PetscDataType of the output arrays: eitherPETSC_REALorPETSC_SCALAR.
If the field is complex and datatype is PETSC_REAL, the real part of the field is returned.
Output Parameters:
B- pointer to data of size c * n * sizeof(datatype), where c is the number of components in the field.
If B is not NULL, the values of the field are written in this array, varying first by component, then by point.
D- pointer to data of size d * c * n * sizeof(datatype).
If D is not NULL, the values of the field's spatial derivatives are written in this array, varying first by the partial derivative component, then by field component, then by point.
H- pointer to data of size d * d * c * n * sizeof(datatype).
If H is not NULL, the values of the field's second spatial derivatives are written in this array, varying first by the second partial derivative component, then by field component, then by point.
Level: intermediate
See also: DMField, DMFieldGetDM(), DMFieldGetNumComponents(), DMFieldEvaluateFE(), DMFieldEvaluateFV(), PetscDataType
External Links
- PETSc Manual:
DM/DMFieldEvaluate
PETSc.LibPETSc.DMFieldEvaluateFE — Method
B::Ptr{Cvoid},D::Ptr{Cvoid},H::Ptr{Cvoid} = DMFieldEvaluateFE(petsclib::PetscLibType, field::DMField, cellIS::AbstractIS, points::PetscQuadrature, datatype::PetscDataType)Evaluate the field and its derivatives on a set of points mapped from quadrature points on a reference point. The derivatives are taken with respect to the reference coordinates.
Not Collective
Input Parameters:
field- TheDMFieldobjectcellIS- Index set for cells on which to evaluate the fieldpoints- The quadature containing the points in the reference cell at which to evaluate the field.datatype- The PetscDataType of the output arrays: eitherPETSC_REALorPETSC_SCALAR.
If the field is complex and datatype is PETSC_REAL, the real part of the field is returned.
Output Parameters:
B- pointer to data of size c * n * sizeof(datatype), where c is the number of components in the field.
If B is not NULL, the values of the field are written in this array, varying first by component, then by point.
D- pointer to data of size d * c * n * sizeof(datatype).
If D is not NULL, the values of the field's spatial derivatives are written in this array, varying first by the partial derivative component, then by field component, then by point.
H- pointer to data of size d * d * c * n * sizeof(datatype).
If H is not NULL, the values of the field's second spatial derivatives are written in this array, varying first by the second partial derivative component, then by field component, then by point.
Level: intermediate
See also: DMField, DM, DMFieldGetNumComponents(), DMFieldEvaluate(), DMFieldEvaluateFV()
External Links
- PETSc Manual:
DM/DMFieldEvaluateFE
PETSc.LibPETSc.DMFieldEvaluateFV — Method
B::Ptr{Cvoid},D::Ptr{Cvoid},H::Ptr{Cvoid} = DMFieldEvaluateFV(petsclib::PetscLibType, field::DMField, cellIS::AbstractIS, datatype::PetscDataType)Evaluate the mean of a field and its finite volume derivatives on a set of points.
Not Collective
Input Parameters:
field- TheDMFieldobjectcellIS- Index set for cells on which to evaluate the fielddatatype- The PetscDataType of the output arrays: eitherPETSC_REALorPETSC_SCALAR.
If the field is complex and datatype is PETSC_REAL, the real part of the field is returned.
Output Parameters:
B- pointer to data of size c * n * sizeof(datatype), where c is the number of components in the field.
If B is not NULL, the values of the field are written in this array, varying first by component, then by point.
D- pointer to data of size d * c * n * sizeof(datatype).
If D is not NULL, the values of the field's spatial derivatives are written in this array, varying first by the partial derivative component, then by field component, then by point.
H- pointer to data of size d * d * c * n * sizeof(datatype).
If H is not NULL, the values of the field's second spatial derivatives are written in this array, varying first by the second partial derivative component, then by field component, then by point.
Level: intermediate
See also: DMField, IS, DMFieldGetNumComponents(), DMFieldEvaluate(), DMFieldEvaluateFE(), PetscDataType
External Links
- PETSc Manual:
DM/DMFieldEvaluateFV
PETSc.LibPETSc.DMFieldFinalizePackage — Method
DMFieldFinalizePackage(petsclib::PetscLibType)Finalize DMField package, it is called from PetscFinalize()
Logically Collective
Level: developer
See also: DMFieldInitializePackage()
External Links
- PETSc Manual:
DM/DMFieldFinalizePackage
PETSc.LibPETSc.DMFieldGetDM — Method
dm::PetscDM = DMFieldGetDM(petsclib::PetscLibType, field::DMField)Returns the DM for the manifold over which the field is defined.
Not Collective
Input Parameter:
field- TheDMFieldobject
Output Parameter:
dm- TheDMobject
Level: intermediate
See also: DMField, DM, DMFieldEvaluate()
External Links
- PETSc Manual:
DM/DMFieldGetDM
PETSc.LibPETSc.DMFieldGetDegree — Method
minDegree::PetscInt,maxDegree::PetscInt = DMFieldGetDegree(petsclib::PetscLibType, field::DMField, cellIS::AbstractIS)Get the polynomial degree of a field when pulled back onto the reference element
Not Collective
Input Parameters:
field- theDMFieldobjectcellIS- the index set of points over which we want know the invariance
Output Parameters:
minDegree- the degree of the largest polynomial space contained in the field on each elementmaxDegree- the largest degree of the smallest polynomial space containing the field on any element
Level: intermediate
See also: DMField, IS, DMFieldEvaluateFE()
External Links
- PETSc Manual:
DM/DMFieldGetDegree
PETSc.LibPETSc.DMFieldGetNumComponents — Method
nc::PetscInt = DMFieldGetNumComponents(petsclib::PetscLibType, field::DMField)Returns the number of components in the field
Not Collective
Input Parameter:
field- TheDMFieldobject
Output Parameter:
nc- The number of field components
Level: intermediate
See also: DMField, DMFieldEvaluate()
External Links
- PETSc Manual:
DM/DMFieldGetNumComponents
PETSc.LibPETSc.DMFieldGetType — Method
type::String = DMFieldGetType(petsclib::PetscLibType, field::DMField)Gets the DMFieldType name (as a string) from the DMField.
Not Collective
Input Parameter:
field- TheDMFieldcontext
Output Parameter:
type- TheDMFieldTypename
Level: advanced
See also: DMField, DMFieldSetType(), DMFieldType, PetscObjectTypeCompare(), PetscObjectTypeCompareAny()
External Links
- PETSc Manual:
DM/DMFieldGetType
PETSc.LibPETSc.DMFieldInitializePackage — Method
DMFieldInitializePackage(petsclib::PetscLibType)Initialize DMField package
Logically Collective
Level: developer
See also: DMFieldFinalizePackage()
External Links
- PETSc Manual:
DM/DMFieldInitializePackage
PETSc.LibPETSc.DMFieldRegister — Method
DMFieldRegister(petsclib::PetscLibType, sname::String, fnc::external)Adds an implementation of the DMField object.
Not collective, No Fortran Support
Input Parameters:
sname- name of a new user-defined implementationfunction- routine to create method context
See also: DMField, DMFieldRegisterAll(), DMFieldRegisterDestroy()
External Links
- PETSc Manual:
DM/DMFieldRegister
PETSc.LibPETSc.DMFieldSetType — Method
DMFieldSetType(petsclib::PetscLibType, field::DMField, type::String)set the DMField implementation
Collective
Input Parameters:
field- theDMFieldcontexttype- a known method, seeDMFieldType
Level: advanced
See also: DMField, DMFieldGetType(), DMFieldType
External Links
- PETSc Manual:
DM/DMFieldSetType
PETSc.LibPETSc.DMFieldShellEvaluateFEDefault — Method
B::Ptr{Cvoid},D::Ptr{Cvoid},H::Ptr{Cvoid} = DMFieldShellEvaluateFEDefault(petsclib::PetscLibType, field::DMField, pointIS::AbstractIS, quad::PetscQuadrature, type::PetscDataType)Default finite-element evaluation for a DMFIELDSHELL that maps the quadrature points to real space using the coordinate DMField and then calls DMFieldEvaluate().
Not Collective
Input Parameters:
field- theDMFieldof typeDMFIELDSHELLpointIS- theISof mesh points at which to evaluatequad- the reference-element quadraturetype-PETSC_SCALARorPETSC_REAL
Output Parameters:
B- values at quadrature points, orNULLD- derivatives at quadrature points, orNULLH- Hessians at quadrature points, orNULL
Level: developer
See also: DMField, DMFIELDSHELL, DMFieldShellSetEvaluateFE(), DMFieldShellEvaluateFVDefault(), DMFieldEvaluate()
External Links
- PETSc Manual:
DM/DMFieldShellEvaluateFEDefault
PETSc.LibPETSc.DMFieldShellEvaluateFVDefault — Method
B::Ptr{Cvoid},D::Ptr{Cvoid},H::Ptr{Cvoid} = DMFieldShellEvaluateFVDefault(petsclib::PetscLibType, field::DMField, pointIS::AbstractIS, type::PetscDataType)Default finite-volume evaluation for a DMFIELDSHELL that samples at cell centroids using the coordinate DMField's default quadrature and calls DMFieldEvaluate().
Not Collective
Input Parameters:
field- theDMFieldof typeDMFIELDSHELLpointIS- theISof mesh cells at which to evaluatetype-PETSC_SCALARorPETSC_REAL
Output Parameters:
B- cell-averaged values, orNULLD- cell-averaged derivatives, orNULLH- cell-averaged Hessians, orNULL
Level: developer
See also: DMField, DMFIELDSHELL, DMFieldShellSetEvaluateFV(), DMFieldShellEvaluateFEDefault(), DMFieldEvaluate()
External Links
- PETSc Manual:
DM/DMFieldShellEvaluateFVDefault
PETSc.LibPETSc.DMFieldShellGetContext — Method
ctx::Ptr{Cvoid} = DMFieldShellGetContext(petsclib::PetscLibType, field::DMField)Retrieve the user-supplied context associated with a DMFIELDSHELL.
Not Collective
Input Parameter:
field- theDMFieldof typeDMFIELDSHELL
Output Parameter:
ctx- the context pointer that was passed toDMFieldCreateShell()
Level: intermediate
See also: DMField, DMFIELDSHELL, DMFieldCreateShell()
External Links
- PETSc Manual:
DM/DMFieldShellGetContext
PETSc.LibPETSc.DMFieldShellSetCreateDefaultQuadrature — Method
DMFieldShellSetCreateDefaultQuadrature(petsclib::PetscLibType, field::DMField, create::external)Register the routine that supplies a default PetscQuadrature sufficient to integrate a DMFIELDSHELL exactly over a set of mesh points.
Logically Collective
Input Parameters:
field- theDMFieldof typeDMFIELDSHELLcreate- callback that returns a newly createdPetscQuadraturefor the given pointIS
Calling sequence of create:
f- theDMFieldof typeDMFIELDSHELLis- theISof mesh points over which the field will be integratedquad- the newly createdPetscQuadrature
Level: intermediate
See also: DMField, DMFIELDSHELL, DMFieldCreateShell(), DMFieldCreateDefaultQuadrature()
External Links
- PETSc Manual:
DM/DMFieldShellSetCreateDefaultQuadrature
PETSc.LibPETSc.DMFieldShellSetDestroy — Method
DMFieldShellSetDestroy(petsclib::PetscLibType, field::DMField, destroy::external)Register a destroy callback that will be invoked when a DMFIELDSHELL is destroyed.
Logically Collective
Input Parameters:
field- theDMFieldof typeDMFIELDSHELLdestroy- the destroy routine, called before the shell's own data is freed
Calling sequence of destroy:
field- theDMFieldof typeDMFIELDSHELLbeing destroyed
Level: intermediate
See also: DMField, DMFIELDSHELL, DMFieldCreateShell(), DMFieldDestroy()
External Links
- PETSc Manual:
DM/DMFieldShellSetDestroy
PETSc.LibPETSc.DMFieldShellSetEvaluate — Method
DMFieldShellSetEvaluate(petsclib::PetscLibType, field::DMField, evaluate::external)Register the routine that evaluates a DMFIELDSHELL at an arbitrary set of real-space points supplied as a Vec of coordinates.
Logically Collective
Input Parameters:
field- theDMFieldof typeDMFIELDSHELLevaluate- the evaluation callback
Calling sequence of evaluate:
field- theDMFieldof typeDMFIELDSHELLu- the points at which to evaluate the field, as aVecof coordinates of size d x ndtype-PETSC_SCALARorPETSC_REALB- array of field values at each point, orNULLD- array of field spatial derivatives at each point, orNULLH- array of field spatial Hessians at each point, orNULL
Level: intermediate
See also: DMField, DMFIELDSHELL, DMFieldCreateShell(), DMFieldEvaluate(), DMFieldShellSetEvaluateFE(), DMFieldShellSetEvaluateFV()
External Links
- PETSc Manual:
DM/DMFieldShellSetEvaluate
PETSc.LibPETSc.DMFieldShellSetEvaluateFE — Method
DMFieldShellSetEvaluateFE(petsclib::PetscLibType, field::DMField, evaluateFE::external)Register the routine that evaluates a DMFIELDSHELL at finite-element quadrature points over a set of mesh points.
Logically Collective
Input Parameters:
field- theDMFieldof typeDMFIELDSHELLevaluateFE- the FE evaluation callback
Calling sequence of evaluateFE:
field- theDMFieldof typeDMFIELDSHELLis- theISof mesh cells on which to evaluate the fieldquad- the reference-cellPetscQuadraturesupplying the evaluation pointsdtype-PETSC_SCALARorPETSC_REALB- array of field values at each quadrature point, orNULLD- array of field reference derivatives at each quadrature point, orNULLH- array of field reference Hessians at each quadrature point, orNULL
Level: intermediate
See also: DMField, DMFIELDSHELL, DMFieldCreateShell(), DMFieldEvaluateFE(), DMFieldShellEvaluateFEDefault(), DMFieldShellSetEvaluateFV()
External Links
- PETSc Manual:
DM/DMFieldShellSetEvaluateFE
PETSc.LibPETSc.DMFieldShellSetEvaluateFV — Method
DMFieldShellSetEvaluateFV(petsclib::PetscLibType, field::DMField, evaluateFV::external)Register the routine that evaluates a DMFIELDSHELL as cell averages over a set of mesh cells.
Logically Collective
Input Parameters:
field- theDMFieldof typeDMFIELDSHELLevaluateFV- the FV evaluation callback
Calling sequence of evaluateFV:
field- theDMFieldof typeDMFIELDSHELLis- theISof mesh cells on which to evaluate the fielddtype-PETSC_SCALARorPETSC_REALB- array of cell-averaged field values, orNULLD- array of cell-averaged field derivatives, orNULLH- array of cell-averaged field Hessians, orNULL
Level: intermediate
See also: DMField, DMFIELDSHELL, DMFieldCreateShell(), DMFieldEvaluateFV(), DMFieldShellEvaluateFVDefault(), DMFieldShellSetEvaluateFE()
External Links
- PETSc Manual:
DM/DMFieldShellSetEvaluateFV
PETSc.LibPETSc.DMFieldShellSetGetDegree — Method
DMFieldShellSetGetDegree(petsclib::PetscLibType, field::DMField, getDegree::external)Register the routine that reports the polynomial degree bounds of a DMFIELDSHELL over a set of mesh points.
Logically Collective
Input Parameters:
field- theDMFieldof typeDMFIELDSHELLgetDegree- callback that returns the minimum and maximum polynomial degrees of the field over the given pointIS
Calling sequence of getDegree:
field- theDMFieldof typeDMFIELDSHELLis- theISof mesh points over which the degree bounds are requestedminDegree- the degree of the largest polynomial space contained in the field on each elementmaxDegree- the largest degree of the smallest polynomial space containing the field on any element
Level: intermediate
See also: DMField, DMFIELDSHELL, DMFieldCreateShell(), DMFieldGetDegree()
External Links
- PETSc Manual:
DM/DMFieldShellSetGetDegree
PETSc.LibPETSc.DMFieldView — Method
DMFieldView(petsclib::PetscLibType, field::DMField, viewer::PetscViewer)view a DMField
Collective
Input Parameters:
field-DMFieldviewer- viewer to display field, for examplePETSC_VIEWER_STDOUT_WORLD
Level: advanced
See also: DMField, DMFieldCreate()
External Links
- PETSc Manual:
DM/DMFieldView
PETSc.LibPETSc.DMLabelAddStrata — Method
DMLabelAddStrata(petsclib::PetscLibType, label::DMLabel, numStrata::PetscInt, stratumValues::Vector{PetscInt})Adds new stratum values in a DMLabel
Not Collective
Input Parameters:
label- TheDMLabelnumStrata- The number of stratum valuesstratumValues- The stratum values
Level: beginner
See also: DMLabel, DM, DMLabelCreate(), DMLabelDestroy()
External Links
- PETSc Manual:
DMLabel/DMLabelAddStrata
PETSc.LibPETSc.DMLabelAddStrataIS — Method
DMLabelAddStrataIS(petsclib::PetscLibType, label::DMLabel, valueIS::AbstractIS)Adds new stratum values in a DMLabel
Not Collective
Input Parameters:
label- TheDMLabelvalueIS- Index set with stratum values
Level: beginner
See also: DMLabel, DM, DMLabelCreate(), DMLabelDestroy()
External Links
- PETSc Manual:
DMLabel/DMLabelAddStrataIS
PETSc.LibPETSc.DMLabelAddStratum — Method
DMLabelAddStratum(petsclib::PetscLibType, label::DMLabel, value::PetscInt)Adds a new stratum value in a DMLabel
Input Parameters:
label- TheDMLabelvalue- The stratum value
Level: beginner
See also: DMLabel, DM, DMLabelCreate(), DMLabelDestroy()
External Links
- PETSc Manual:
DMLabel/DMLabelAddStratum
PETSc.LibPETSc.DMLabelClearStratum — Method
DMLabelClearStratum(petsclib::PetscLibType, label::DMLabel, value::PetscInt)Remove a stratum
Not Collective
Input Parameters:
label- theDMLabelvalue- the stratum value
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelClearStratum
PETSc.LibPETSc.DMLabelClearValue — Method
DMLabelClearValue(petsclib::PetscLibType, label::DMLabel, point::PetscInt, value::PetscInt)Clear the value a label assigns to a point
Not Collective
Input Parameters:
label- theDMLabelpoint- the pointvalue- The point value
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelClearValue
PETSc.LibPETSc.DMLabelCompare — Method
equal::PetscBool,message::String = DMLabelCompare(petsclib::PetscLibType, comm::MPI_Comm, l0::DMLabel, l1::DMLabel)Compare two DMLabel objects
Collective; No Fortran Support
Input Parameters:
comm- Comm over which to compare labelsl0- FirstDMLabell1- SecondDMLabel
Output Parameters:
equal- (Optional) Flag whether the two labels are equalmessage- (Optional) Message describing the difference
Level: intermediate
See also: DMLabel, DM, DMCompareLabels(), DMLabelGetNumValues(), DMLabelGetDefaultValue(), DMLabelGetNonEmptyStratumValuesIS(), DMLabelGetStratumIS()
External Links
- PETSc Manual:
DMLabel/DMLabelCompare
PETSc.LibPETSc.DMLabelComputeIndex — Method
DMLabelComputeIndex(petsclib::PetscLibType, label::DMLabel)Create an index structure for membership determination, automatically determining the bounds
Not Collective
Input Parameter:
label- TheDMLabel
Level: intermediate
See also: DMLabel, DM, DMLabelHasPoint(), DMLabelCreateIndex(), DMLabelDestroyIndex(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelComputeIndex
PETSc.LibPETSc.DMLabelConvertToSection — Method
section::PetscSection,is::IS = DMLabelConvertToSection(petsclib::PetscLibType, label::DMLabel)Make a PetscSection/IS pair that encodes the label
Not Collective
Input Parameter:
label- theDMLabel
Output Parameters:
section- the section giving offsets for each stratumis- AnIScontaining all the label points
Level: developer
See also: DMLabel, DM, DMLabelDistribute()
External Links
- PETSc Manual:
DMLabel/DMLabelConvertToSection
PETSc.LibPETSc.DMLabelCreate — Method
label::DMLabel = DMLabelCreate(petsclib::PetscLibType, comm::MPI_Comm, name::String)Create a DMLabel object, which is a multimap
Collective
Input Parameters:
comm- The communicator, usuallyPETSC_COMM_SELFname- The label name
Output Parameter:
label- TheDMLabel
Level: beginner
See also: DMLabel, DM, DMLabelDestroy()
External Links
- PETSc Manual:
DMLabel/DMLabelCreate
PETSc.LibPETSc.DMLabelCreateIndex — Method
DMLabelCreateIndex(petsclib::PetscLibType, label::DMLabel, pStart::PetscInt, pEnd::PetscInt)Create an index structure for membership determination
Not Collective
Input Parameters:
label- TheDMLabelpStart- The smallest pointpEnd- The largest point + 1
Level: intermediate
See also: DMLabel, DM, DMLabelHasPoint(), DMLabelComputeIndex(), DMLabelDestroyIndex(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelCreateIndex
PETSc.LibPETSc.DMLabelDestroy — Method
DMLabelDestroy(petsclib::PetscLibType, label::Union{DMLabel, Ref{DMLabel}})Destroys a DMLabel
Collective
Input Parameter:
label- TheDMLabel
Level: beginner
See also: DMLabel, DM, DMLabelReset(), DMLabelCreate()
External Links
- PETSc Manual:
DMLabel/DMLabelDestroy
PETSc.LibPETSc.DMLabelDestroyIndex — Method
DMLabelDestroyIndex(petsclib::PetscLibType, label::DMLabel)Destroy the index structure
Not Collective
Input Parameter:
label- theDMLabel
Level: intermediate
See also: DMLabel, DM, DMLabelHasPoint(), DMLabelCreateIndex(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelDestroyIndex
PETSc.LibPETSc.DMLabelDistribute — Method
labelNew::DMLabel = DMLabelDistribute(petsclib::PetscLibType, label::DMLabel, sf::PetscSF)Create a new label pushed forward over the PetscSF
Collective
Input Parameters:
label- theDMLabelsf- the map from old to new distribution
Output Parameter:
labelNew- the new redistributed label
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelDistribute
PETSc.LibPETSc.DMLabelDuplicate — Method
labelnew::DMLabel = DMLabelDuplicate(petsclib::PetscLibType, label::DMLabel)Duplicates a DMLabel
Collective
Input Parameter:
label- TheDMLabel
Output Parameter:
labelnew- new label
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelDestroy()
External Links
- PETSc Manual:
DMLabel/DMLabelDuplicate
PETSc.LibPETSc.DMLabelEphemeralGetLabel — Method
olabel::DMLabel = DMLabelEphemeralGetLabel(petsclib::PetscLibType, label::DMLabel)Get the base label for this ephemeral label
Not Collective
Input Parameter:
label- theDMLabel
Output Parameter:
olabel- the base label for this ephemeral label
Level: intermediate
See also: DMLabelEphemeralSetLabel(), DMLabelEphemeralGetTransform(), DMLabelSetType()
External Links
- PETSc Manual:
DMLabel/DMLabelEphemeralGetLabel
PETSc.LibPETSc.DMLabelEphemeralGetTransform — Method
tr::DMPlexTransform = DMLabelEphemeralGetTransform(petsclib::PetscLibType, label::DMLabel)Get the transform for this ephemeral label
Not Collective
Input Parameter:
label- theDMLabel
Output Parameter:
tr- the transform for this ephemeral label
Level: intermediate
See also: DMLabelEphemeralSetTransform(), DMLabelEphemeralGetLabel(), DMLabelSetType()
External Links
- PETSc Manual:
DMLabel/DMLabelEphemeralGetTransform
PETSc.LibPETSc.DMLabelEphemeralSetLabel — Method
DMLabelEphemeralSetLabel(petsclib::PetscLibType, label::DMLabel, olabel::DMLabel)Set the base label for this ephemeral label
Not Collective
Input Parameters:
label- theDMLabelolabel- the base label for this ephemeral label
Level: intermediate
See also: DMLabelEphemeralGetLabel(), DMLabelEphemeralSetTransform(), DMLabelSetType()
External Links
- PETSc Manual:
DMLabel/DMLabelEphemeralSetLabel
PETSc.LibPETSc.DMLabelEphemeralSetTransform — Method
DMLabelEphemeralSetTransform(petsclib::PetscLibType, label::DMLabel, tr::DMPlexTransform)Set the transform for this ephemeral label
Not Collective
Input Parameters:
label- theDMLabeltr- the transform for this ephemeral label
Level: intermediate
See also: DMLabelEphemeralGetTransform(), DMLabelEphemeralSetLabel(), DMLabelSetType()
External Links
- PETSc Manual:
DMLabel/DMLabelEphemeralSetTransform
PETSc.LibPETSc.DMLabelFilter — Method
DMLabelFilter(petsclib::PetscLibType, label::DMLabel, start::PetscInt, end_::PetscInt)Remove all points outside of [start, end)
Not Collective
Input Parameters:
label- theDMLabelstart- the first point keptend- one more than the last point kept
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelFilter
PETSc.LibPETSc.DMLabelGather — Method
labelNew::DMLabel = DMLabelGather(petsclib::PetscLibType, label::DMLabel, sf::PetscSF)Gather all label values from leafs into roots
Collective
Input Parameters:
label- theDMLabelsf- thePetscSFcommunication map
Output Parameter:
labelNew- the newDMLabelwith localised leaf values
Level: developer
See also: DMLabel, DM, DMLabelDistribute()
External Links
- PETSc Manual:
DMLabel/DMLabelGather
PETSc.LibPETSc.DMLabelGetBounds — Method
pStart::PetscInt,pEnd::PetscInt = DMLabelGetBounds(petsclib::PetscLibType, label::DMLabel)Return the smallest and largest point in the label
Not Collective
Input Parameter:
label- theDMLabel
Output Parameters:
pStart- The smallest pointpEnd- The largest point + 1
Level: intermediate
See also: DMLabel, DM, DMLabelHasPoint(), DMLabelCreateIndex(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetBounds
PETSc.LibPETSc.DMLabelGetDefaultValue — Method
defaultValue::PetscInt = DMLabelGetDefaultValue(petsclib::PetscLibType, label::DMLabel)Get the default value returned by DMLabelGetValue() if a point has not been explicitly given a value. When a label is created, it is initialized to -1.
Not Collective
Input Parameter:
label- aDMLabelobject
Output Parameter:
defaultValue- the default value
Level: beginner
See also: DMLabel, DM, DMLabelSetDefaultValue(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetDefaultValue
PETSc.LibPETSc.DMLabelGetNonEmptyStratumValuesIS — Method
values::IS = DMLabelGetNonEmptyStratumValuesIS(petsclib::PetscLibType, label::DMLabel)Get an IS of all values that the DMlabel takes
Not Collective
Input Parameter:
label- theDMLabel
Output Parameter:
values- the valueIS
Level: intermediate
See also: DMLabel, DM, DMLabelGetValueIS(), DMLabelGetValueISGlobal(), DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetNonEmptyStratumValuesIS
PETSc.LibPETSc.DMLabelGetNumValues — Method
numValues::PetscInt = DMLabelGetNumValues(petsclib::PetscLibType, label::DMLabel)Get the number of values that the DMLabel takes
Not Collective
Input Parameter:
label- theDMLabel
Output Parameter:
numValues- the number of values
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetNumValues
PETSc.LibPETSc.DMLabelGetStratumBounds — Method
start::PetscInt,end_::PetscInt = DMLabelGetStratumBounds(petsclib::PetscLibType, label::DMLabel, value::PetscInt)Get the largest and smallest point of a stratum
Not Collective
Input Parameters:
label- theDMLabelvalue- the stratum value
Output Parameters:
start- the smallest point in the stratumend- the largest point in the stratum
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetStratumBounds
PETSc.LibPETSc.DMLabelGetStratumIS — Method
points::IS = DMLabelGetStratumIS(petsclib::PetscLibType, label::DMLabel, value::PetscInt)Get an IS with the stratum points
Not Collective
Input Parameters:
label- theDMLabelvalue- the stratum value
Output Parameter:
points- The stratum points
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetStratumIS
PETSc.LibPETSc.DMLabelGetStratumPointIndex — Method
index::PetscInt = DMLabelGetStratumPointIndex(petsclib::PetscLibType, label::DMLabel, value::PetscInt, p::PetscInt)Get the index of a point in a given stratum
Not Collective
Input Parameters:
label- TheDMLabelvalue- The label valuep- A point with this value
Output Parameter:
index- The index of this point in the stratum, or -1 if the point is not in the stratum or the stratum does not exist
Level: intermediate
See also: DMLabel, DM, DMLabelGetValueIndex(), DMLabelGetStratumIS(), DMLabelCreate()
External Links
- PETSc Manual:
DMLabel/DMLabelGetStratumPointIndex
PETSc.LibPETSc.DMLabelGetStratumSize — Method
size::PetscInt = DMLabelGetStratumSize(petsclib::PetscLibType, label::DMLabel, value::PetscInt)Get the size of a stratum
Not Collective
Input Parameters:
label- theDMLabelvalue- the stratum value
Output Parameter:
size- The number of points in the stratum
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetStratumSize
PETSc.LibPETSc.DMLabelGetType — Method
type::String = DMLabelGetType(petsclib::PetscLibType, label::DMLabel)Gets the type name (as a string) from the label.
Not Collective
Input Parameter:
label- TheDMLabel
Output Parameter:
type- TheDMLabeltype name
Level: intermediate
See also: DMLabel, DM, DMLabelSetType(), DMLabelCreate()
External Links
- PETSc Manual:
DMLabel/DMLabelGetType
PETSc.LibPETSc.DMLabelGetValue — Method
value::PetscInt = DMLabelGetValue(petsclib::PetscLibType, label::DMLabel, point::PetscInt)Return the value a label assigns to a point, or the label's default value (which is initially -1, and can be changed with DMLabelSetDefaultValue())
Not Collective
Input Parameters:
label- theDMLabelpoint- the point
Output Parameter:
value- The point value, or the default value (-1 by default)
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelSetValue(), DMLabelClearValue(), DMLabelGetDefaultValue(), DMLabelSetDefaultValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetValue
PETSc.LibPETSc.DMLabelGetValueBounds — Method
minValue::PetscInt,maxValue::PetscInt = DMLabelGetValueBounds(petsclib::PetscLibType, label::DMLabel)Return the smallest and largest value in the label
Not Collective
Input Parameter:
label- theDMLabel
Output Parameters:
minValue- The smallest valuemaxValue- The largest value
Level: intermediate
See also: DMLabel, DM, DMLabelGetBounds(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetValueBounds
PETSc.LibPETSc.DMLabelGetValueIS — Method
values::IS = DMLabelGetValueIS(petsclib::PetscLibType, label::DMLabel)Get an IS of all values that the DMlabel takes
Not Collective
Input Parameter:
label- theDMLabel
Output Parameter:
values- the valueIS
Level: intermediate
See also: DMLabel, DM, DMLabelGetNonEmptyStratumValuesIS(), DMLabelGetValueISGlobal(), DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetValueIS
PETSc.LibPETSc.DMLabelGetValueISGlobal — Method
values::IS = DMLabelGetValueISGlobal(petsclib::PetscLibType, comm::MPI_Comm, label::DMLabel, get_nonempty::PetscBool)Get an IS of all values that the DMlabel takes across all ranks
Collective
Input Parameter:
comm- MPI communicator to collect valueslabel- theDMLabel, may beNULLfor ranks incommwhich do not have the correspondingDMLabelget_nonempty- whether to get nonempty stratum values (akin toDMLabelGetNonEmptyStratumValuesIS())
Output Parameter:
values- the valueIS
Level: intermediate
See also: DMLabel, DM, DMLabelGetValueIS(), DMLabelGetNonEmptyStratumValuesIS(), DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetValueISGlobal
PETSc.LibPETSc.DMLabelGetValueIndex — Method
index::PetscInt = DMLabelGetValueIndex(petsclib::PetscLibType, label::DMLabel, value::PetscInt)Get the index of a given value in the list of values for the DMlabel, or -1 if it is not present
Not Collective
Input Parameters:
label- theDMLabelvalue- the value
Output Parameter:
index- the index of value in the list of values
Level: intermediate
See also: DMLabel, DM, DMLabelGetValueIS(), DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelGetValueIndex
PETSc.LibPETSc.DMLabelHasPoint — Method
contains::PetscBool = DMLabelHasPoint(petsclib::PetscLibType, label::DMLabel, point::PetscInt)Determine whether a label assigns a value to a point
Not Collective
Input Parameters:
label- theDMLabelpoint- the point
Output Parameter:
contains- Flag indicating whether the label maps this point to a value
Level: developer
See also: DMLabel, DM, DMLabelCreateIndex(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelHasPoint
PETSc.LibPETSc.DMLabelHasStratum — Method
exists::PetscBool = DMLabelHasStratum(petsclib::PetscLibType, label::DMLabel, value::PetscInt)Determine whether points exist with the given value
Not Collective
Input Parameters:
label- theDMLabelvalue- the stratum value
Output Parameter:
exists- Flag saying whether points exist
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelHasStratum
PETSc.LibPETSc.DMLabelHasValue — Method
contains::PetscBool = DMLabelHasValue(petsclib::PetscLibType, label::DMLabel, value::PetscInt)Determine whether a label assigns the value to any point
Not Collective
Input Parameters:
label- theDMLabelvalue- the value
Output Parameter:
contains- Flag indicating whether the label maps this value to any point
Level: developer
See also: DMLabel, DM, DMLabelHasPoint(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelHasValue
PETSc.LibPETSc.DMLabelInsertIS — Method
DMLabelInsertIS(petsclib::PetscLibType, label::DMLabel, is::AbstractIS, value::PetscInt)Set all points in the IS to a value
Not Collective
Input Parameters:
label- theDMLabelis- the pointISvalue- The point value
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelInsertIS
PETSc.LibPETSc.DMLabelPermute — Method
labelNew::DMLabel = DMLabelPermute(petsclib::PetscLibType, label::DMLabel, permutation::AbstractIS)Create a new label with permuted points
Not Collective
Input Parameters:
label- theDMLabelpermutation- the point permutation
Output Parameter:
labelNew- the new label containing the permuted points
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelPermute
PETSc.LibPETSc.DMLabelPermuteValues — Method
DMLabelPermuteValues(petsclib::PetscLibType, label::DMLabel, permutation::AbstractIS)Permute the values in a label
Not collective
Input Parameters:
label- theDMLabelpermutation- the value permutation, permutation[old value] = new value
Output Parameter:
label- theDMLabelnow with permuted values
See also: DMLabelRewriteValues(), DMLabel, DM, DMLabelPermute(), DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelPermuteValues
PETSc.LibPETSc.DMLabelPropagateBegin — Method
DMLabelPropagateBegin(petsclib::PetscLibType, label::DMLabel, sf::PetscSF)Setup a cycle of label propagation
Collective
Input Parameters:
label- TheDMLabelto propagate across processessf- ThePetscSFdescribing parallel layout of the label points
Level: intermediate
See also: DMLabel, DM, DMLabelPropagateEnd(), DMLabelPropagatePush()
External Links
- PETSc Manual:
DMLabel/DMLabelPropagateBegin
PETSc.LibPETSc.DMLabelPropagateEnd — Method
DMLabelPropagateEnd(petsclib::PetscLibType, label::DMLabel, pointSF::PetscSF)Tear down a cycle of label propagation
Collective
Input Parameters:
label- TheDMLabelto propagate across processespointSF- ThePetscSFdescribing parallel layout of the label points
Level: intermediate
See also: DMLabel, DM, DMLabelPropagateBegin(), DMLabelPropagatePush()
External Links
- PETSc Manual:
DMLabel/DMLabelPropagateEnd
PETSc.LibPETSc.DMLabelPropagatePush — Method
DMLabelPropagatePush(petsclib::PetscLibType, label::DMLabel, pointSF::PetscSF, markPoint::external, ctx::Ptr{Cvoid})Tear down a cycle of label propagation
Collective
Input Parameters:
label- TheDMLabelto propagate across processespointSF- ThePetscSFdescribing parallel layout of the label pointsmarkPoint- An optional callback that is called when a point is marked, orNULLctx- An optional application context for the callback, orNULL
Calling sequence of markPoint:
label- TheDMLabelp- The point being markedval- The label value forpctx- An optional application context
Level: intermediate
See also: DMLabel, DM, DMLabelPropagateBegin(), DMLabelPropagateEnd()
External Links
- PETSc Manual:
DMLabel/DMLabelPropagatePush
PETSc.LibPETSc.DMLabelRegister — Method
DMLabelRegister(petsclib::PetscLibType, name::String, noname::Ptr{Cvoid})Adds a new label component implementation
Not Collective
Input Parameters:
name- The name of a new user-defined creation routinecreate_func- The creation routine itself
See also: DMLabel, DM, DMLabelType, DMLabelRegisterAll(), DMLabelRegisterDestroy()
External Links
- PETSc Manual:
DMLabel/DMLabelRegister
PETSc.LibPETSc.DMLabelRegisterAll — Method
DMLabelRegisterAll(petsclib::PetscLibType)Registers all of the DMLabel implementations in the DM package.
Not Collective
Level: advanced
See also: DMLabel, DM, DMRegisterAll(), DMLabelRegisterDestroy()
External Links
- PETSc Manual:
DMLabel/DMLabelRegisterAll
PETSc.LibPETSc.DMLabelRegisterDestroy — Method
DMLabelRegisterDestroy(petsclib::PetscLibType)This function destroys the DMLabel registry. It is called from PetscFinalize().
Level: developer
See also: DMLabel, DM, PetscInitialize()
External Links
- PETSc Manual:
DMLabel/DMLabelRegisterDestroy
PETSc.LibPETSc.DMLabelReset — Method
DMLabelReset(petsclib::PetscLibType, label::DMLabel)Destroys internal data structures in a DMLabel
Not Collective
Input Parameter:
label- TheDMLabel
Level: beginner
See also: DMLabel, DM, DMLabelDestroy(), DMLabelCreate()
External Links
- PETSc Manual:
DMLabel/DMLabelReset
PETSc.LibPETSc.DMLabelRewriteValues — Method
DMLabelRewriteValues(petsclib::PetscLibType, label::DMLabel, permutation::AbstractIS)Permute the values in a label, but some may be omitted
Not collective
Input Parameters:
label- theDMLabelpermutation- the value permutation, permutation[old value] = new value, but some maybe omitted
Output Parameter:
label- theDMLabelnow with permuted values
See also: DMLabelPermuteValues(), DMLabel, DM, DMLabelPermute(), DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelRewriteValues
PETSc.LibPETSc.DMLabelSetDefaultValue — Method
DMLabelSetDefaultValue(petsclib::PetscLibType, label::DMLabel, defaultValue::PetscInt)Set the default value returned by DMLabelGetValue() if a point has not been explicitly given a value. When a label is created, it is initialized to -1.
Not Collective
Input Parameter:
label- aDMLabelobject
Output Parameter:
defaultValue- the default value
Level: beginner
See also: DMLabel, DM, DMLabelGetDefaultValue(), DMLabelGetValue(), DMLabelSetValue()
External Links
- PETSc Manual:
DMLabel/DMLabelSetDefaultValue
PETSc.LibPETSc.DMLabelSetStratumBounds — Method
DMLabelSetStratumBounds(petsclib::PetscLibType, label::DMLabel, value::PetscInt, pStart::PetscInt, pEnd::PetscInt)Efficiently give a contiguous set of points a given label value
Not Collective
Input Parameters:
label- TheDMLabelvalue- The label value for all pointspStart- The first pointpEnd- A point beyond all marked points
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelSetStratumIS(), DMLabelGetStratumIS()
External Links
- PETSc Manual:
DMLabel/DMLabelSetStratumBounds
PETSc.LibPETSc.DMLabelSetStratumIS — Method
DMLabelSetStratumIS(petsclib::PetscLibType, label::DMLabel, value::PetscInt, is::AbstractIS)Set the stratum points using an IS
Not Collective
Input Parameters:
label- theDMLabelvalue- the stratum valueis- The stratum points
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelSetStratumIS
PETSc.LibPETSc.DMLabelSetType — Method
DMLabelSetType(petsclib::PetscLibType, label::DMLabel, method::String)Sets the particular implementation for a label.
Collective
Input Parameters:
label- The labelmethod- The name of the label type
Options Database Key:
-dm_label_type type- Sets the label type; seeDMLabelType
Level: intermediate
See also: DMLabel, DM, DMLabelGetType(), DMLabelCreate(), DMLabelType
External Links
- PETSc Manual:
DMLabel/DMLabelSetType
PETSc.LibPETSc.DMLabelSetUp — Method
DMLabelSetUp(petsclib::PetscLibType, label::DMLabel)SetUp a DMLabel object
Collective
Input Parameters:
label- TheDMLabel
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelDestroy()
External Links
- PETSc Manual:
DMLabel/DMLabelSetUp
PETSc.LibPETSc.DMLabelSetValue — Method
DMLabelSetValue(petsclib::PetscLibType, label::DMLabel, point::PetscInt, value::PetscInt)Set the value a label assigns to a point. If the value is the same as the label's default value (which is initially -1, and can be changed with DMLabelSetDefaultValue() to something different), then this function will do nothing.
Not Collective
Input Parameters:
label- theDMLabelpoint- the pointvalue- The point value
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelGetValue(), DMLabelClearValue(), DMLabelGetDefaultValue(), DMLabelSetDefaultValue()
External Links
- PETSc Manual:
DMLabel/DMLabelSetValue
PETSc.LibPETSc.DMLabelStratumHasPoint — Method
contains::PetscBool = DMLabelStratumHasPoint(petsclib::PetscLibType, label::DMLabel, value::PetscInt, point::PetscInt)Return true if the stratum contains a point
Not Collective
Input Parameters:
label- theDMLabelvalue- the stratum valuepoint- the point
Output Parameter:
contains- true if the stratum contains the point
Level: intermediate
See also: DMLabel, DM, DMLabelCreate(), DMLabelSetValue(), DMLabelClearValue()
External Links
- PETSc Manual:
DMLabel/DMLabelStratumHasPoint
PETSc.LibPETSc.DMLabelView — Method
DMLabelView(petsclib::PetscLibType, label::DMLabel, viewer::PetscViewer)View the label
Collective
Input Parameters:
label- TheDMLabelviewer- ThePetscViewer
Level: intermediate
See also: DMLabel, PetscViewer, DM, DMLabelCreate(), DMLabelDestroy()
External Links
- PETSc Manual:
DMLabel/DMLabelView
PETSc.LibPETSc.DMLabelViewFromOptions — Method
DMLabelViewFromOptions(petsclib::PetscLibType, label::DMLabel, obj, name::String)View a DMLabel in a particular way based on a request in the options database
Collective
Input Parameters:
label- theDMLabelobjectobj- optional object that provides the prefix for the options database (ifNULLthen the prefix inobjis used)name- option string that is used to activate viewing
Options Database Key:
-name [viewertype][:...]- option name and values. SeePetscObjectViewFromOptions()for the possible arguments
Level: intermediate
See also: DMLabel, DMLabelView(), PetscObjectViewFromOptions(), DMLabelCreate()
External Links
- PETSc Manual:
DMLabel/DMLabelViewFromOptions