Discretization (PetscFE, PetscDS, PetscSpace, PetscDualSpace, PetscFV) - Low-level Interface

These classes describe finite-element and finite-volume discretizations on a DMPlex:

  • PetscSpace: the approximation space (polynomials of a given degree, tensor/sum spaces)
  • PetscDualSpace: the dual space that defines the degrees of freedom (Lagrange nodes, ...)
  • PetscFE: a finite element = space + dual space + quadrature; attached to a DM field
  • PetscDS: the discrete system: residual/Jacobian point functions, boundary conditions and constants for all fields of a DM (see DMPlex for the Julia callback helpers)
  • PetscFV and PetscLimiter: finite-volume discretizations and slope limiters
  • PetscConvEst: convergence-rate estimation by mesh refinement

Basic Usage

using PETSc, MPI
MPI.Init()
petsclib = PETSc.getlib()
PETSc.initialize(petsclib)

dim, ncomp, simplex = 2, 1, LibPETSc.PETSC_TRUE
# P2 Lagrange element with a quadrature order chosen by PETSc (qorder = -1 -> PETSC_DETERMINE)
fe = LibPETSc.PetscFECreateLagrange(petsclib, MPI.COMM_SELF, dim, ncomp, simplex, 2, -1)
LibPETSc.PetscObjectSetName(petsclib, fe, "velocity")

nb = LibPETSc.PetscFEGetDimension(petsclib, fe)          # basis functions per cell
sp = LibPETSc.PetscFEGetBasisSpace(petsclib, fe)         # owned by the FE
deg = LibPETSc.PetscSpaceGetDegree(petsclib, sp)         # (degree, maxdegree)

LibPETSc.PetscFEDestroy(petsclib, fe)
PETSc.finalize(petsclib)

Elements are attached to a DM with DMSetField / DMCreateDS; the high-level helpers PETSc.fe_create_default, PETSc.set_field! and PETSc.create_ds! on the DMPlex page wrap this workflow.

Function Reference

PetscFE

PETSc.LibPETSc.PetscFECompositeGetMapping — Method
numSubelements::PetscInt,v0::Ptr{PetscReal},jac::Ptr{PetscReal},invjac::Ptr{PetscReal} = PetscFECompositeGetMapping(petsclib::PetscLibType, fem::PetscFE)

Returns the mappings from the reference element to each subelement

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameters:

  • numSubelements - The number of sub elements
  • v0 - The affine transformation for each element, an array of length dim * Nc. Pass NULL to ignore.
  • jac - The Jacobian for each element, an array of length dim^2 * Nc. Pass NULL to ignore.
  • invjac - The inverse of the Jacobian, an array of length dim^2 * Nc. Pass NULL to ignore.

Level: intermediate

See also: PetscFE, PetscFECreate()

External Links

source
PETSc.LibPETSc.PetscFEComputeTabulation — Method
PetscFEComputeTabulation(petsclib::PetscLibType, fem::PetscFE, npoints::PetscInt, points::Vector{PetscReal}, K::PetscInt, T::PetscTabulation)

Tabulates the basis functions, and perhaps derivatives, at the points provided.

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • npoints - The number of tabulation points
  • points - The tabulation point coordinates
  • K - The number of derivatives calculated
  • T - An existing tabulation object with enough allocated space, created with PetscFECreateTabulation()

Output Parameter:

  • T - The basis function values and derivatives at tabulation points

Level: intermediate

See also: PetscTabulation, PetscFEGetCellTabulation(), PetscTabulationDestroy(), PetscFECreateTabulation()

External Links

source
PETSc.LibPETSc.PetscFECopyQuadrature — Method
PetscFECopyQuadrature(petsclib::PetscLibType, sfe::PetscFE, tfe::PetscFE)

Copy both volumetric and surface quadrature to a new PetscFE

Not Collective

Input Parameters:

  • sfe - The PetscFE source for the quadratures
  • tfe - The PetscFE target for the quadratures

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscQuadrature, PetscFECreate(), PetscFESetQuadrature(), PetscFESetFaceQuadrature()

External Links

source
PETSc.LibPETSc.PetscFECreate — Method
fem::PetscFE = PetscFECreate(petsclib::PetscLibType, comm::MPI_Comm)

Creates an empty PetscFE object. The type can then be set with PetscFESetType().

Collective

Input Parameter:

  • comm - The communicator for the PetscFE object

Output Parameter:

  • fem - The PetscFE object

Level: beginner

See also: PetscFE, PetscFEType, PetscFESetType(), PetscFECreateDefault(), PETSCFEGALERKIN

External Links

source
PETSc.LibPETSc.PetscFECreateBrokenElement — Method
dgfe::PetscFE = PetscFECreateBrokenElement(petsclib::PetscLibType, cgfe::PetscFE)

Create a discontinuous version of the input PetscFE

Collective

Input Parameters:

  • cgfe - The continuous PetscFE object

Output Parameter:

  • dgfe - The discontinuous PetscFE object

Level: advanced

See also: PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate(), PetscFECreateLagrange(), PetscFECreateLagrangeByCell(), PetscDualSpaceLagrangeSetContinuity()

External Links

source
PETSc.LibPETSc.PetscFECreateByCell — Method
fem::PetscFE = PetscFECreateByCell(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, ct::DMPolytopeType, prefix::String, qorder::PetscInt)

Create a PetscFE for basic FEM computation

Collective

Input Parameters:

  • comm - The MPI comm
  • dim - The spatial dimension
  • Nc - The number of components
  • ct - The celltype of the reference cell
  • prefix - The options prefix, or NULL
  • qorder - The quadrature order or PETSC_DETERMINE to use PetscSpace polynomial degree

Output Parameter:

  • fem - The PetscFE object

Level: beginner

See also: PetscFE, PetscFECreateDefault(), PetscFECreateLagrange(), PetscSpaceSetFromOptions(), PetscDualSpaceSetFromOptions(), PetscFESetFromOptions(), PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate(), DMPolytopeType

External Links

source
PETSc.LibPETSc.PetscFECreateCellGeometry — Method
cgeom::PetscFEGeom = PetscFECreateCellGeometry(petsclib::PetscLibType, fe::PetscFE, quad::PetscQuadrature)

Populates the arrays in a PetscFEGeom for a single reference cell of a PetscFE.

Not Collective

Input Parameters:

  • fe - the PetscFE whose dual-space DM provides the reference cell
  • quad - the quadrature at which to evaluate the geometry, or NULL to use the PetscFE's own quadrature

Output Parameter:

  • cgeom - the PetscFEGeom populated with reference-cell coordinates, Jacobians, inverse Jacobians, and their determinants

Level: developer

See also: PetscFE, PetscFEGeom, PetscFEDestroyCellGeometry(), PetscFEGetQuadrature(), DMPlexComputeCellGeometryFEM()

External Links

source
PETSc.LibPETSc.PetscFECreateDefault — Method
fem::PetscFE = PetscFECreateDefault(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, isSimplex::PetscBool, prefix::String, qorder::PetscInt)

Create a PetscFE for basic FEM computation

Collective

Input Parameters:

  • comm - The MPI comm
  • dim - The spatial dimension
  • Nc - The number of components
  • isSimplex - Flag for simplex reference cell, otherwise its a tensor product
  • prefix - The options prefix, or NULL
  • qorder - The quadrature order or PETSC_DETERMINE to use PetscSpace polynomial degree

Output Parameter:

  • fem - The PetscFE object

Level: beginner

See also: PetscFE, PetscFECreateLagrange(), PetscFECreateByCell(), PetscSpaceSetFromOptions(), PetscDualSpaceSetFromOptions(), PetscFESetFromOptions(), PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscFECreateFromSpaces — Method
fem::PetscFE = PetscFECreateFromSpaces(petsclib::PetscLibType, P::PetscSpace, Q::PetscDualSpace, M_q::PetscQuadrature, fq::PetscQuadrature)

Create a PetscFE from the basis and dual spaces

Collective

Input Parameters:

  • P - The basis space
  • Q - The dual space
  • q - The cell quadrature
  • fq - The face quadrature

Output Parameter:

  • fem - The PetscFE object

Level: beginner

See also: PetscFE, PetscSpace, PetscDualSpace, PetscQuadrature, PetscFECreateLagrangeByCell(), PetscFECreateDefault(), PetscFECreateByCell(), PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscFECreateHeightTrace — Method
trFE::PetscFE = PetscFECreateHeightTrace(petsclib::PetscLibType, fe::PetscFE, height::PetscInt)

Create the trace PetscFE for the first mesh point of the given height stratum.

Not Collective

Input Parameters:

  • fe - the PetscFE object
  • height - the height of the stratum whose first point is used to construct the trace element

Output Parameter:

  • trFE - the trace PetscFE, or NULL if the requested height stratum is empty

Level: developer

See also: PetscFE, PetscFECreatePointTrace(), PetscFEGetHeightSubspace(), DMPlexGetHeightStratum()

External Links

source
PETSc.LibPETSc.PetscFECreateLagrange — Method
fem::PetscFE = PetscFECreateLagrange(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, isSimplex::PetscBool, k::PetscInt, qorder::PetscInt)

Create a PetscFE for the basic Lagrange space of degree k

Collective

Input Parameters:

  • comm - The MPI comm
  • dim - The spatial dimension
  • Nc - The number of components
  • isSimplex - Flag for simplex reference cell, otherwise its a tensor product
  • k - The degree of the space
  • qorder - The quadrature order or PETSC_DETERMINE to use PetscSpace polynomial degree

Output Parameter:

  • fem - The PetscFE object

Level: beginner

See also: PetscFE, PetscFECreateLagrangeByCell(), PetscFECreateDefault(), PetscFECreateByCell(), PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscFECreateLagrangeByCell — Method
fem::PetscFE = PetscFECreateLagrangeByCell(petsclib::PetscLibType, comm::MPI_Comm, dim::PetscInt, Nc::PetscInt, ct::DMPolytopeType, k::PetscInt, qorder::PetscInt)

Create a PetscFE for the basic Lagrange space of degree k

Collective

Input Parameters:

  • comm - The MPI comm
  • dim - The spatial dimension
  • Nc - The number of components
  • ct - The celltype of the reference cell
  • k - The degree of the space
  • qorder - The quadrature order or PETSC_DETERMINE to use PetscSpace polynomial degree

Output Parameter:

  • fem - The PetscFE object

Level: beginner

See also: PetscFE, PetscFECreateLagrange(), PetscFECreateDefault(), PetscFECreateByCell(), PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate(), DMPolytopeType

External Links

source
PETSc.LibPETSc.PetscFECreateTabulation — Method
T::PetscTabulation = PetscFECreateTabulation(petsclib::PetscLibType, fem::PetscFE, nrepl::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, K::PetscInt)

Creates a PetscTabulation object to hold the basis functions, and perhaps derivatives, at the points provided.

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • nrepl - The number of replicas
  • npoints - The number of tabulation points in a replica
  • points - The tabulation point coordinates
  • K - The number of derivatives calculated

Output Parameter:

  • T - The PetscTabulation to hold the basis function values and derivatives at tabulation points

Level: intermediate

See also: PetscTabulation, PetscFEGetCellTabulation(), PetscTabulationDestroy(), PetscFEComputeTabulation()

External Links

source
PETSc.LibPETSc.PetscFECreateVector — Method
vector_fe::PetscFE = PetscFECreateVector(petsclib::PetscLibType, scalar_fe::PetscFE, num_copies::PetscInt, interleave_basis::PetscBool, interleave_components::PetscBool)

Create a vector-valued PetscFE from multiple copies of an underlying PetscFE.

Collective

Input Parameters:

  • scalar_fe - a PetscFE finite element
  • num_copies - a positive integer
  • interleave_basis - if PETSC_TRUE, the first num_copies basis vectors

of the output finite element will be copies of the first basis vector of scalar_fe, and so on for the other basis vectors; otherwise all of the first-copy basis vectors will come first, followed by all of the second-copy, and so on.

  • interleave_components - if PETSC_TRUE, the first num_copies components

of the output finite element will be copies of the first component of scalar_fe, and so on for the other components; otherwise all of the first-copy components will come first, followed by all of the second-copy, and so on.

Output Parameter:

  • vector_fe - a PetscFE of type PETSCFEVECTOR that represent a discretization space with num_copies copies of scalar_fe

Level: intermediate

See also: PetscFE, PetscFEType, PetscFECreate(), PetscFESetType(), PETSCFEBASIC, PETSCFEVECTOR

External Links

source
PETSc.LibPETSc.PetscFEDestroy — Method
PetscFEDestroy(petsclib::PetscLibType, fem::Union{PetscFE, Ref{PetscFE}})

Destroys a PetscFE object

Collective

Input Parameter:

  • fem - the PetscFE object to destroy

Level: beginner

See also: PetscFE, PetscFEView()

External Links

source
PETSc.LibPETSc.PetscFEDestroyCellGeometry — Method
PetscFEDestroyCellGeometry(petsclib::PetscLibType, fe::PetscFE, cgeom::Vector{PetscFEGeom})

Free the arrays inside a PetscFEGeom allocated by PetscFECreateCellGeometry().

Not Collective

Input Parameters:

  • fe - the PetscFE (unused, kept for API symmetry with PetscFECreateCellGeometry())
  • cgeom - the PetscFEGeom whose owned arrays should be freed

Level: developer

See also: PetscFE, PetscFEGeom, PetscFECreateCellGeometry()

External Links

source
PETSc.LibPETSc.PetscFEExpandFaceQuadrature — Method
efq::PetscQuadrature = PetscFEExpandFaceQuadrature(petsclib::PetscLibType, fe::PetscFE, fq::PetscQuadrature)

Expand a face quadrature into a cell quadrature by mapping the face quadrature points and weights through each face of the cell reference geometry.

Not Collective

Input Parameters:

  • fe - the PetscFE object whose cell geometry defines the faces
  • fq - the face quadrature to expand

Output Parameter:

  • efq - the expanded quadrature covering all faces of the cell

Level: developer

See also: PetscFE, PetscQuadrature, PetscFECreateFaceQuadrature(), PetscFEGetQuadrature()

External Links

source
PETSc.LibPETSc.PetscFEGeomComplete — Method
PetscFEGeomComplete(petsclib::PetscLibType, geom::Vector{PetscFEGeom})

Calculate derived quantities from a base geometry specification

Input Parameter:

  • geom - PetscFEGeom object

Level: intermediate

See also: PetscFEGeom, PetscFEGeomCreate()

External Links

source
PETSc.LibPETSc.PetscFEGeomCreate — Method
geom::Ptr{PetscFEGeom} = PetscFEGeomCreate(petsclib::PetscLibType, quad::PetscQuadrature, numCells::PetscInt, dimEmbed::PetscInt, mode::PetscFEGeomMode)

Create a PetscFEGeom object to manage geometry for a group of cells

Input Parameters:

  • quad - A PetscQuadrature determining the tabulation
  • numCells - The number of cells in the group
  • dimEmbed - The coordinate dimension
  • mode - Type of geometry data to store

Output Parameter:

  • geom - The PetscFEGeom object, which is a struct not a PetscObject

Level: beginner

See also: PetscFEGeom, PetscQuadrature, PetscFEGeomDestroy(), PetscFEGeomComplete()

External Links

source
PETSc.LibPETSc.PetscFEGeomGetCellPoint — Method
pgeom::PetscFEGeom = PetscFEGeomGetCellPoint(petsclib::PetscLibType, geom::Vector{PetscFEGeom}, c::PetscInt, p::PetscInt)

Get the cell geometry for cell c at point p as a PetscFEGeom

Input Parameters:

  • geom - PetscFEGeom object
  • c - The cell
  • p - The point

Output Parameter:

  • pgeom - The cell geometry of cell c at point p

Level: intermediate

See also: PetscFEGeom, PetscFEGeomMode, PetscFEGeomRestoreChunk(), PetscFEGeomCreate()

External Links

source
PETSc.LibPETSc.PetscFEGeomGetChunk — Method
chunkGeom::Ptr{PetscFEGeom} = PetscFEGeomGetChunk(petsclib::PetscLibType, geom::Vector{PetscFEGeom}, cStart::PetscInt, cEnd::PetscInt)

Get a chunk of cells in the group as a PetscFEGeom

Input Parameters:

  • geom - PetscFEGeom object
  • cStart - The first cell in the chunk
  • cEnd - The first cell not in the chunk

Output Parameter:

  • chunkGeom - an array of cells of length cEnd - cStart

Level: intermediate

See also: PetscFEGeom, PetscFEGeomRestoreChunk(), PetscFEGeomCreate()

External Links

source
PETSc.LibPETSc.PetscFEGeomGetPoint — Method
pgeom::PetscFEGeom = PetscFEGeomGetPoint(petsclib::PetscLibType, geom::Vector{PetscFEGeom}, c::PetscInt, p::PetscInt, pcoords::Vector{PetscReal})

Get the geometry for cell c at point p as a PetscFEGeom

Input Parameters:

  • geom - PetscFEGeom object
  • c - The cell
  • p - The point
  • pcoords - The reference coordinates of point p, or NULL

Output Parameter:

  • pgeom - The geometry of cell c at point p

Level: intermediate

See also: PetscFEGeom, PetscFEGeomRestoreChunk(), PetscFEGeomCreate()

External Links

source
PETSc.LibPETSc.PetscFEGeomRestoreChunk — Method
PetscFEGeomRestoreChunk(petsclib::PetscLibType, geom::Vector{PetscFEGeom}, cStart::PetscInt, cEnd::PetscInt, chunkGeom::PetscFEGeom)

Restore the chunk obtained with PetscFEGeomCreateChunk()

Input Parameters:

  • geom - PetscFEGeom object
  • cStart - The first cell in the chunk
  • cEnd - The first cell not in the chunk
  • chunkGeom - The chunk of cells

Level: intermediate

See also: PetscFEGeom, PetscFEGeomGetChunk(), PetscFEGeomCreate()

External Links

source
PETSc.LibPETSc.PetscFEGetBasisSpace — Method
sp::PetscSpace = PetscFEGetBasisSpace(petsclib::PetscLibType, fem::PetscFE)

Returns the PetscSpace used for the approximation of the solution for the PetscFE

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameter:

  • sp - The PetscSpace object

Level: intermediate

See also: PetscFE, PetscSpace, PetscFECreate()

External Links

source
PETSc.LibPETSc.PetscFEGetCellTabulation — Method
T::PetscTabulation = PetscFEGetCellTabulation(petsclib::PetscLibType, fem::PetscFE, k::PetscInt)

Returns the tabulation of the basis functions at the quadrature points on the reference cell

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • k - The highest derivative we need to tabulate, very often 1

Output Parameter:

  • T - The basis function values and derivatives at quadrature points

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscTabulation, PetscFECreateTabulation(), PetscTabulationDestroy()

External Links

source
PETSc.LibPETSc.PetscFEGetDimension — Method
dim::PetscInt = PetscFEGetDimension(petsclib::PetscLibType, fem::PetscFE)

Get the dimension of the finite element space on a cell

Not Collective

Input Parameter:

  • fem - The PetscFE

Output Parameter:

  • dim - The dimension

Level: intermediate

See also: PetscFE, PetscFECreate(), PetscSpaceGetDimension(), PetscDualSpaceGetDimension()

External Links

source
PETSc.LibPETSc.PetscFEGetDualSpace — Method
sp::PetscDualSpace = PetscFEGetDualSpace(petsclib::PetscLibType, fem::PetscFE)

Returns the PetscDualSpace used to define the inner product for a PetscFE

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameter:

  • sp - The PetscDualSpace object

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscFECreate()

External Links

source
PETSc.LibPETSc.PetscFEGetFaceCentroidTabulation — Method
Tc::PetscTabulation = PetscFEGetFaceCentroidTabulation(petsclib::PetscLibType, fem::PetscFE)

Returns the tabulation of the basis functions at the face centroid points

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameter:

  • Tc - The basis function values at face centroid points

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscTabulation, PetscFEGetFaceTabulation(), PetscFEGetCellTabulation(), PetscFECreateTabulation(), PetscTabulationDestroy()

External Links

source
PETSc.LibPETSc.PetscFEGetFaceQuadrature — Method
q::PetscQuadrature = PetscFEGetFaceQuadrature(petsclib::PetscLibType, fem::PetscFE)

Returns the PetscQuadrature used to calculate inner products on faces

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameter:

  • q - The PetscQuadrature object

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscQuadrature, PetscFECreate(), PetscFESetQuadrature(), PetscFESetFaceQuadrature()

External Links

source
PETSc.LibPETSc.PetscFEGetFaceTabulation — Method
Tf::PetscTabulation = PetscFEGetFaceTabulation(petsclib::PetscLibType, fem::PetscFE, k::PetscInt)

Returns the tabulation of the basis functions at the face quadrature points for each face of the reference cell

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • k - The highest derivative we need to tabulate, very often 1

Output Parameter:

  • Tf - The basis function values and derivatives at face quadrature points

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscTabulation, PetscFEGetCellTabulation(), PetscFECreateTabulation(), PetscTabulationDestroy()

External Links

source
PETSc.LibPETSc.PetscFEGetHeightSubspace — Method
subfe::PetscFE = PetscFEGetHeightSubspace(petsclib::PetscLibType, fe::PetscFE, height::PetscInt)

Get the subspace of this space for a mesh point of a given height

Input Parameters:

  • fe - The finite element space
  • height - The height of the DMPLEX point

Output Parameter:

  • subfe - The subspace of this PetscFE space

Level: advanced

See also: PetscFECreateDefault()

External Links

source
PETSc.LibPETSc.PetscFEGetNumComponents — Method
comp::PetscInt = PetscFEGetNumComponents(petsclib::PetscLibType, fem::PetscFE)

Returns the number of components in the element

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameter:

  • comp - The number of field components

Level: intermediate

See also: PetscFE, PetscFECreate(), PetscFEGetSpatialDimension()

External Links

source
PETSc.LibPETSc.PetscFEGetNumDof — Method
numDof::Vector{PetscInt} = PetscFEGetNumDof(petsclib::PetscLibType, fem::PetscFE)

Returns the number of dofs (dual basis vectors) associated to mesh points on the reference cell of a given dimension

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameter:

  • numDof - Array of length dim with the number of dofs in each dimension

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscFECreate()

External Links

source
PETSc.LibPETSc.PetscFEGetQuadrature — Method
q::PetscQuadrature = PetscFEGetQuadrature(petsclib::PetscLibType, fem::PetscFE)

Returns the PetscQuadrature used to calculate inner products

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameter:

  • q - The PetscQuadrature object

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscQuadrature, PetscFECreate()

External Links

source
PETSc.LibPETSc.PetscFEGetSpatialDimension — Method
dim::PetscInt = PetscFEGetSpatialDimension(petsclib::PetscLibType, fem::PetscFE)

Returns the spatial dimension of the element

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameter:

  • dim - The spatial dimension

Level: intermediate

See also: PetscFE, PetscFECreate()

External Links

source
PETSc.LibPETSc.PetscFEGetTileSizes — Method
blockSize::PetscInt,numBlocks::PetscInt,batchSize::PetscInt,numBatches::PetscInt = PetscFEGetTileSizes(petsclib::PetscLibType, fem::PetscFE)

Returns the tile sizes for evaluation

Not Collective

Input Parameter:

  • fem - The PetscFE object

Output Parameters:

  • blockSize - The number of elements in a block, pass NULL if not needed
  • numBlocks - The number of blocks in a batch, pass NULL if not needed
  • batchSize - The number of elements in a batch, pass NULL if not needed
  • numBatches - The number of batches in a chunk, pass NULL if not needed

Level: intermediate

See also: PetscFE, PetscFECreate(), PetscFESetTileSizes()

External Links

source
PETSc.LibPETSc.PetscFEGetType — Method
name::String = PetscFEGetType(petsclib::PetscLibType, fem::PetscFE)

Gets the PetscFEType (as a string) from the PetscFE object.

Not Collective

Input Parameter:

  • fem - The PetscFE

Output Parameter:

  • name - The PetscFEType name

Level: intermediate

See also: PetscFEType, PetscFE, PetscFESetType(), PetscFECreate()

External Links

source
PETSc.LibPETSc.PetscFEInitializePackage — Method
PetscFEInitializePackage(petsclib::PetscLibType)

This function initializes everything in the PetscFE package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to PetscSpaceCreate() when using static libraries.

Level: developer

See also: PetscInitialize()

External Links

source
PETSc.LibPETSc.PetscFEIntegrate — Method
PetscFEIntegrate(petsclib::PetscLibType, prob::PetscDS, field::PetscInt, Ne::PetscInt, cgeom::Vector{PetscFEGeom}, coefficients::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, integral::Vector{PetscScalar})

Produce the integral for the given field for a chunk of elements by quadrature integration

Not Collective

Input Parameters:

  • prob - The PetscDS specifying the discretizations and continuum functions
  • field - The field being integrated
  • Ne - The number of elements in the chunk
  • cgeom - The cell geometry for each cell in the chunk
  • coefficients - The array of FEM basis coefficients for the elements
  • probAux - The PetscDS specifying the auxiliary discretizations
  • coefficientsAux - The array of FEM auxiliary basis coefficients for the elements

Output Parameter:

  • integral - the integral for this field

Level: intermediate

See also: PetscFE, PetscDS, PetscFEIntegrateResidual(), PetscFEIntegrateBd()

External Links

source
PETSc.LibPETSc.PetscFEIntegrateBd — Method
PetscFEIntegrateBd(petsclib::PetscLibType, prob::PetscDS, field::PetscInt, noname::Ptr{Cvoid})

Produce the integral for the given field for a chunk of elements by quadrature integration

Not Collective

Input Parameters:

  • prob - The PetscDS specifying the discretizations and continuum functions
  • field - The field being integrated
  • obj_func - The function to be integrated
  • Ne - The number of elements in the chunk
  • geom - The face geometry for each face in the chunk
  • coefficients - The array of FEM basis coefficients for the elements
  • probAux - The PetscDS specifying the auxiliary discretizations
  • coefficientsAux - The array of FEM auxiliary basis coefficients for the elements

Output Parameter:

  • integral - the integral for this field

Level: intermediate

See also: PetscFE, PetscDS, PetscFEIntegrateResidual(), PetscFEIntegrate()

External Links

source
PETSc.LibPETSc.PetscFEIntegrateBdJacobian — Method
PetscFEIntegrateBdJacobian(petsclib::PetscLibType, ds::PetscDS, wf::PetscWeakForm, jtype::PetscFEJacobianType, key::PetscFormKey, Ne::PetscInt, fgeom::Vector{PetscFEGeom}, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, u_tshift::PetscReal, elemMat::Vector{PetscScalar})

Produce the boundary element Jacobian for a chunk of elements by quadrature integration

Not Collective

Input Parameters:

  • ds - The PetscDS specifying the discretizations and continuum functions
  • wf - The PetscWeakForm holding the pointwise functions
  • jtype - The type of matrix pointwise functions that should be used
  • key - The (label+value, fieldI*Nf + fieldJ) being integrated
  • Ne - The number of elements in the chunk
  • fgeom - The face geometry for each cell in the chunk
  • coefficients - The array of FEM basis coefficients for the elements for the Jacobian evaluation point
  • coefficients_t - The array of FEM basis time derivative coefficients for the elements
  • probAux - The PetscDS specifying the auxiliary discretizations
  • coefficientsAux - The array of FEM auxiliary basis coefficients for the elements
  • t - The time
  • u_tshift - A multiplier for the dF/du_t term (as opposed to the dF/du term)

Output Parameter:

  • elemMat - the element matrices for the Jacobian from each element

Level: intermediate

See also: PetscFEIntegrateJacobian(), PetscFEIntegrateResidual()

External Links

source
PETSc.LibPETSc.PetscFEIntegrateBdResidual — Method
PetscFEIntegrateBdResidual(petsclib::PetscLibType, ds::PetscDS, wf::PetscWeakForm, key::PetscFormKey, Ne::PetscInt, fgeom::Vector{PetscFEGeom}, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, elemVec::Vector{PetscScalar})

Produce the element residual vector for a chunk of elements by quadrature integration over a boundary

Not Collective

Input Parameters:

  • ds - The PetscDS specifying the discretizations and continuum functions
  • wf - The PetscWeakForm object holding the pointwise functions
  • key - The (label+value, field) being integrated
  • Ne - The number of elements in the chunk
  • fgeom - The face geometry for each cell in the chunk
  • coefficients - The array of FEM basis coefficients for the elements
  • coefficients_t - The array of FEM basis time derivative coefficients for the elements
  • probAux - The PetscDS specifying the auxiliary discretizations
  • coefficientsAux - The array of FEM auxiliary basis coefficients for the elements
  • t - The time

Output Parameter:

  • elemVec - the element residual vectors from each element

Level: intermediate

See also: PetscFEIntegrateResidual()

External Links

source
PETSc.LibPETSc.PetscFEIntegrateHybridJacobian — Method
PetscFEIntegrateHybridJacobian(petsclib::PetscLibType, ds::PetscDS, dsIn::PetscDS, jtype::PetscFEJacobianType, key::PetscFormKey, s::PetscInt, Ne::PetscInt, fgeom::Vector{PetscFEGeom}, cgeom::Vector{PetscFEGeom}, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, u_tshift::PetscReal, elemMat::Vector{PetscScalar})

Produce the boundary element Jacobian for a chunk of hybrid elements by quadrature integration

Not Collective

Input Parameters:

  • ds - The PetscDS specifying the discretizations and continuum functions for the output
  • dsIn - The PetscDS specifying the discretizations and continuum functions for the input
  • jtype - The type of matrix pointwise functions that should be used
  • key - The (label+value, fieldI*Nf + fieldJ) being integrated
  • s - The side of the cell being integrated, 0 for negative and 1 for positive
  • Ne - The number of elements in the chunk
  • fgeom - The face geometry for each cell in the chunk
  • cgeom - The cell geometry for each neighbor cell in the chunk
  • coefficients - The array of FEM basis coefficients for the elements for the Jacobian evaluation point
  • coefficients_t - The array of FEM basis time derivative coefficients for the elements
  • probAux - The PetscDS specifying the auxiliary discretizations
  • coefficientsAux - The array of FEM auxiliary basis coefficients for the elements
  • t - The time
  • u_tshift - A multiplier for the dF/du_t term (as opposed to the dF/du term)

Output Parameter:

  • elemMat - the element matrices for the Jacobian from each element

Level: developer

See also: PetscFEIntegrateJacobian(), PetscFEIntegrateResidual()

External Links

source
PETSc.LibPETSc.PetscFEIntegrateHybridResidual — Method
PetscFEIntegrateHybridResidual(petsclib::PetscLibType, ds::PetscDS, dsIn::PetscDS, key::PetscFormKey, s::PetscInt, Ne::PetscInt, fgeom::Vector{PetscFEGeom}, cgeom::Vector{PetscFEGeom}, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, elemVec::Vector{PetscScalar})

Produce the element residual vector for a chunk of hybrid element faces by quadrature integration

Not Collective

Input Parameters:

  • ds - The PetscDS specifying the discretizations and continuum functions
  • dsIn - The PetscDS specifying the discretizations and continuum functions for input
  • key - The (label+value, field) being integrated
  • s - The side of the cell being integrated, 0 for negative and 1 for positive
  • Ne - The number of elements in the chunk
  • fgeom - The face geometry for each cell in the chunk
  • cgeom - The cell geometry for each neighbor cell in the chunk
  • coefficients - The array of FEM basis coefficients for the elements
  • coefficients_t - The array of FEM basis time derivative coefficients for the elements
  • probAux - The PetscDS specifying the auxiliary discretizations
  • coefficientsAux - The array of FEM auxiliary basis coefficients for the elements
  • t - The time

Output Parameter:

  • elemVec - the element residual vectors from each element

Level: developer

See also: PetscFEIntegrateResidual()

External Links

source
PETSc.LibPETSc.PetscFEIntegrateJacobian — Method
PetscFEIntegrateJacobian(petsclib::PetscLibType, rds::PetscDS, cds::PetscDS, jtype::PetscFEJacobianType, key::PetscFormKey, Ne::PetscInt, cgeom::Vector{PetscFEGeom}, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, dsAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, u_tshift::PetscReal, elemMat::Vector{PetscScalar})

Produce the element Jacobian for a chunk of elements by quadrature integration

Not Collective

Input Parameters:

  • rds - The PetscDS specifying the row discretizations and continuum functions
  • cds - The PetscDS specifying the column discretizations
  • jtype - The type of matrix pointwise functions that should be used
  • key - The (label+value, fieldI*Nf + fieldJ) being integrated
  • Ne - The number of elements in the chunk
  • cgeom - The cell geometry for each cell in the chunk
  • coefficients - The array of FEM basis coefficients for the elements for the Jacobian evaluation point
  • coefficients_t - The array of FEM basis time derivative coefficients for the elements
  • dsAux - The PetscDS specifying the auxiliary discretizations
  • coefficientsAux - The array of FEM auxiliary basis coefficients for the elements
  • t - The time
  • u_tshift - A multiplier for the dF/du_t term (as opposed to the dF/du term)

Output Parameter:

  • elemMat - the element matrices for the Jacobian from each element

Level: intermediate

See also: PetscFEIntegrateResidual()

External Links

source
PETSc.LibPETSc.PetscFEIntegrateResidual — Method
PetscFEIntegrateResidual(petsclib::PetscLibType, ds::PetscDS, key::PetscFormKey, Ne::PetscInt, cgeom::Vector{PetscFEGeom}, coefficients::Vector{PetscScalar}, coefficients_t::Vector{PetscScalar}, probAux::PetscDS, coefficientsAux::Vector{PetscScalar}, t::PetscReal, elemVec::Vector{PetscScalar})

Produce the element residual vector for a chunk of elements by quadrature integration

Not Collective

Input Parameters:

  • ds - The PetscDS specifying the discretizations and continuum functions
  • key - The (label+value, field) being integrated
  • Ne - The number of elements in the chunk
  • cgeom - The cell geometry for each cell in the chunk
  • coefficients - The array of FEM basis coefficients for the elements
  • coefficients_t - The array of FEM basis time derivative coefficients for the elements
  • probAux - The PetscDS specifying the auxiliary discretizations
  • coefficientsAux - The array of FEM auxiliary basis coefficients for the elements
  • t - The time

Output Parameter:

  • elemVec - the element residual vectors from each element

Level: intermediate

See also: PetscFEIntegrateBdResidual()

External Links

source
PETSc.LibPETSc.PetscFELimitDegree — Method
newfe::PetscFE = PetscFELimitDegree(petsclib::PetscLibType, fe::PetscFE, minDegree::PetscInt, maxDegree::PetscInt)

Copy a PetscFE but limit the degree to be in the given range

Collective

Input Parameters:

  • fe - The PetscFE
  • minDegree - The minimum degree, or PETSC_DETERMINE for no limit
  • maxDegree - The maximum degree, or PETSC_DETERMINE for no limit

Output Parameter:

  • newfe - The PetscFE object

Level: advanced

See also: PetscFECreateLagrange(), PetscFECreateDefault(), PetscFECreateByCell(), PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscFEOpenCLGetRealType — Method
realType::PetscDataType = PetscFEOpenCLGetRealType(petsclib::PetscLibType, fem::PetscFE)

Get the scalar type for running on the OpenCL accelerator

Input Parameter:

  • fem - The PetscFE

Output Parameter:

  • realType - The scalar type

Level: developer

See also: PetscFE, PetscFEOpenCLSetRealType()

External Links

source
PETSc.LibPETSc.PetscFEOpenCLSetRealType — Method
PetscFEOpenCLSetRealType(petsclib::PetscLibType, fem::PetscFE, realType::PetscDataType)

Set the scalar type for running on the OpenCL accelerator

Input Parameters:

  • fem - The PetscFE
  • realType - The scalar type

Level: developer

See also: PetscFE, PetscFEOpenCLGetRealType()

External Links

source
PETSc.LibPETSc.PetscFEPushforward — Method
PetscFEPushforward(petsclib::PetscLibType, fe::PetscFE, fegeom::Vector{PetscFEGeom}, Nv::PetscInt, vals::Vector{PetscScalar})

Map the reference element function to real space

Input Parameters:

  • fe - The PetscFE
  • fegeom - The cell geometry
  • Nv - The number of function values
  • vals - The function values

Output Parameter:

  • vals - The transformed function values

Level: advanced

See also: PetscFE, PetscFEGeom, PetscDualSpace, PetscDualSpacePushforward()

External Links

source
PETSc.LibPETSc.PetscFEPushforwardGradient — Method
PetscFEPushforwardGradient(petsclib::PetscLibType, fe::PetscFE, fegeom::Vector{PetscFEGeom}, Nv::PetscInt, vals::Vector{PetscScalar})

Map the reference element function gradient to real space

Input Parameters:

  • fe - The PetscFE
  • fegeom - The cell geometry
  • Nv - The number of function gradient values
  • vals - The function gradient values

Output Parameter:

  • vals - The transformed function gradient values

Level: advanced

See also: PetscFE, PetscFEGeom, PetscDualSpace, PetscFEPushforward(), PetscDualSpacePushforwardGradient(), PetscDualSpacePushforward()

External Links

source
PETSc.LibPETSc.PetscFEPushforwardHessian — Method
PetscFEPushforwardHessian(petsclib::PetscLibType, fe::PetscFE, fegeom::Vector{PetscFEGeom}, Nv::PetscInt, vals::Vector{PetscScalar})

Map the reference element function Hessian to real space

Input Parameters:

  • fe - The PetscFE
  • fegeom - The cell geometry
  • Nv - The number of function Hessian values
  • vals - The function Hessian values

Output Parameter:

  • vals - The transformed function Hessian values

Level: advanced

See also: PetscFE, PetscFEGeom, PetscDualSpace, PetscFEPushforward(), PetscDualSpacePushforwardHessian(), PetscDualSpacePushforward()

External Links

source
PETSc.LibPETSc.PetscFERefine — Method
feRef::PetscFE = PetscFERefine(petsclib::PetscLibType, fe::PetscFE)

Create a "refined" PetscFE object that refines the reference cell into smaller copies.

Collective

Input Parameter:

  • fe - The initial PetscFE

Output Parameter:

  • feRef - The refined PetscFE

Level: advanced

See also: PetscFEType, PetscFECreate(), PetscFESetType()

External Links

source
PETSc.LibPETSc.PetscFERegister — Method
PetscFERegister(petsclib::PetscLibType, sname::String, fnc::external)

Adds a new PetscFEType

Not Collective, No Fortran Support

Input Parameters:

  • sname - The name of a new user-defined creation routine
  • function - The creation routine

See also: PetscFE, PetscFEType, PetscFERegisterAll(), PetscFERegisterDestroy()

External Links

source
PETSc.LibPETSc.PetscFESetBasisSpace — Method
PetscFESetBasisSpace(petsclib::PetscLibType, fem::PetscFE, sp::PetscSpace)

Sets the PetscSpace used for the approximation of the solution

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • sp - The PetscSpace object

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscFECreate(), PetscFESetDualSpace()

External Links

source
PETSc.LibPETSc.PetscFESetDualSpace — Method
PetscFESetDualSpace(petsclib::PetscLibType, fem::PetscFE, sp::PetscDualSpace)

Sets the PetscDualSpace used to define the inner product

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • sp - The PetscDualSpace object

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscFECreate(), PetscFESetBasisSpace()

External Links

source
PETSc.LibPETSc.PetscFESetFaceQuadrature — Method
PetscFESetFaceQuadrature(petsclib::PetscLibType, fem::PetscFE, q::PetscQuadrature)

Sets the PetscQuadrature used to calculate inner products on faces

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • q - The PetscQuadrature object

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscQuadrature, PetscFECreate(), PetscFESetQuadrature()

External Links

source
PETSc.LibPETSc.PetscFESetFromOptions — Method
PetscFESetFromOptions(petsclib::PetscLibType, fem::PetscFE)

sets parameters in a PetscFE from the options database

Collective

Input Parameter:

  • fem - the PetscFE object to set options for

Options Database Keys:

  • -petscfe_num_blocks nblocks - the number of cell blocks to integrate concurrently
  • -petscfe_num_batches nbatches - the number of cell batches to integrate serially

Level: intermediate

See also: PetscFE, PetscFEView()

External Links

source
PETSc.LibPETSc.PetscFESetName — Method
PetscFESetName(petsclib::PetscLibType, fe::PetscFE, name::String)

Names the PetscFE and its subobjects

Not Collective

Input Parameters:

  • fe - The PetscFE
  • name - The name

Level: intermediate

See also: PetscFECreate(), PetscSpaceCreate(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscFESetNumComponents — Method
PetscFESetNumComponents(petsclib::PetscLibType, fem::PetscFE, comp::PetscInt)

Sets the number of field components in the element

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • comp - The number of field components

Level: intermediate

See also: PetscFE, PetscFECreate(), PetscFEGetSpatialDimension(), PetscFEGetNumComponents()

External Links

source
PETSc.LibPETSc.PetscFESetQuadrature — Method
PetscFESetQuadrature(petsclib::PetscLibType, fem::PetscFE, q::PetscQuadrature)

Sets the PetscQuadrature used to calculate inner products

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • q - The PetscQuadrature object

Level: intermediate

See also: PetscFE, PetscSpace, PetscDualSpace, PetscQuadrature, PetscFECreate(), PetscFEGetFaceQuadrature()

External Links

source
PETSc.LibPETSc.PetscFESetTileSizes — Method
PetscFESetTileSizes(petsclib::PetscLibType, fem::PetscFE, blockSize::PetscInt, numBlocks::PetscInt, batchSize::PetscInt, numBatches::PetscInt)

Sets the tile sizes for evaluation

Not Collective

Input Parameters:

  • fem - The PetscFE object
  • blockSize - The number of elements in a block
  • numBlocks - The number of blocks in a batch
  • batchSize - The number of elements in a batch
  • numBatches - The number of batches in a chunk

Level: intermediate

See also: PetscFE, PetscFECreate(), PetscFEGetTileSizes()

External Links

source
PETSc.LibPETSc.PetscFESetType — Method
PetscFESetType(petsclib::PetscLibType, fem::PetscFE, name::String)

Builds a particular PetscFE

Collective

Input Parameters:

  • fem - The PetscFE object
  • name - The kind of FEM space

Options Database Key:

  • -petscfe_type (basic|opencl|composite|vector) - Sets the PetscFEType

Level: intermediate

See also: PetscFEType, PetscFE, PetscFEGetType(), PetscFECreate()

External Links

source
PETSc.LibPETSc.PetscFESetUp — Method
PetscFESetUp(petsclib::PetscLibType, fem::PetscFE)

Construct data structures for the PetscFE after the PetscFEType has been set

Collective

Input Parameter:

  • fem - the PetscFE object to setup

Level: intermediate

See also: PetscFE, PetscFEView(), PetscFEDestroy()

External Links

source
PETSc.LibPETSc.PetscFEView — Method
PetscFEView(petsclib::PetscLibType, fem::PetscFE, viewer::PetscViewer)

Views a PetscFE

Collective

Input Parameters:

  • fem - the PetscFE object to view
  • viewer - the viewer

Level: beginner

See also: PetscFE, PetscViewer, PetscFEDestroy(), PetscFEViewFromOptions()

External Links

source
PETSc.LibPETSc.PetscFEViewFromOptions — Method
PetscFEViewFromOptions(petsclib::PetscLibType, A::PetscFE, obj, name::String)

View a PetscFE based on values in the options database

Collective

Input Parameters:

  • A - the PetscFE object
  • obj - Optional object that provides the options prefix, pass NULL to use the options prefix of A
  • name - command line option name

Options Database Key:

  • -name [viewertype][:...] - option name and values. See PetscObjectViewFromOptions() for the possible arguments

Level: intermediate

See also: PetscFE, PetscFEView(), PetscObjectViewFromOptions(), PetscFECreate()

External Links

source
PETSc.LibPETSc.PetscQuadratureComputePermutations — Method
Np::PetscInt,perm::Vector{IS} = PetscQuadratureComputePermutations(petsclib::PetscLibType, quad::PetscQuadrature)

Compute permutations of quadrature points corresponding to domain orientations

Input Parameter:

  • quad - The PetscQuadrature

Output Parameters:

  • Np - The number of domain orientations
  • perm - An array of IS permutations, one for ech orientation,

Level: developer

See also: PetscQuadratureSetCellType(), PetscQuadrature

External Links

source
PETSc.LibPETSc.PetscQuadratureCreate — Method
q::PetscQuadrature = PetscQuadratureCreate(petsclib::PetscLibType, comm::MPI_Comm)

Create a PetscQuadrature object

Collective

Input Parameter:

  • comm - The communicator for the PetscQuadrature object

Output Parameter:

  • q - The PetscQuadrature object

Level: beginner

See also: PetscQuadrature, Petscquadraturedestroy(), PetscQuadratureGetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureDestroy — Method
PetscQuadratureDestroy(petsclib::PetscLibType, q::Union{PetscQuadrature, Ref{PetscQuadrature}})

Destroys a PetscQuadrature object

Collective

Input Parameter:

  • q - The PetscQuadrature object

Level: beginner

See also: PetscQuadrature, PetscQuadratureCreate(), PetscQuadratureGetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureDuplicate — Method
r::PetscQuadrature = PetscQuadratureDuplicate(petsclib::PetscLibType, q::PetscQuadrature)

Create a deep copy of the PetscQuadrature object

Collective

Input Parameter:

  • q - The PetscQuadrature object

Output Parameter:

  • r - The new PetscQuadrature object

Level: beginner

See also: PetscQuadrature, PetscQuadratureCreate(), PetscQuadratureDestroy(), PetscQuadratureGetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureEqual — Method
equal::PetscBool = PetscQuadratureEqual(petsclib::PetscLibType, A::PetscQuadrature, B::PetscQuadrature)

determine whether two quadratures are equivalent

Input Parameters:

  • A - A PetscQuadrature object
  • B - Another PetscQuadrature object

Output Parameter:

  • equal - PETSC_TRUE if the quadratures are the same

Level: intermediate

See also: PetscQuadrature, PetscQuadratureCreate()

External Links

source
PETSc.LibPETSc.PetscQuadratureExpandComposite — Method
qref::PetscQuadrature = PetscQuadratureExpandComposite(petsclib::PetscLibType, q::PetscQuadrature, numSubelements::PetscInt, v0::Vector{PetscReal}, jac::Vector{PetscReal})

Return a quadrature over the composite element, which has the original quadrature in each subelement

Not Collective; No Fortran Support

Input Parameters:

  • q - The original PetscQuadrature
  • numSubelements - The number of subelements the original element is divided into
  • v0 - An array of the initial points for each subelement
  • jac - An array of the Jacobian mappings from the reference to each subelement

Output Parameter:

  • qref - The dimension

Level: intermediate

See also: PetscQuadrature, PetscFECreate(), PetscSpaceGetDimension(), PetscDualSpaceGetDimension()

External Links

source
PETSc.LibPETSc.PetscQuadratureGetCellType — Method
ct::DMPolytopeType = PetscQuadratureGetCellType(petsclib::PetscLibType, q::PetscQuadrature)

Return the cell type of the integration domain

Not Collective

Input Parameter:

  • q - The PetscQuadrature object

Output Parameter:

  • ct - The cell type of the integration domain

Level: intermediate

See also: PetscQuadrature, PetscQuadratureSetCellType(), PetscQuadratureGetData(), PetscQuadratureSetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureGetData — Method
dim::PetscInt,Nc::PetscInt,npoints::PetscInt,points::Vector{PetscReal},weights::Vector{PetscReal} = PetscQuadratureGetData(petsclib::PetscLibType, q::PetscQuadrature)

Returns the data defining the PetscQuadrature

Not Collective

Input Parameter:

  • q - The PetscQuadrature object

Output Parameters:

  • dim - The spatial dimension
  • Nc - The number of components
  • npoints - The number of quadrature points
  • points - The coordinates of each quadrature point
  • weights - The weight of each quadrature point

Level: intermediate

See also: PetscQuadrature, PetscQuadratureCreate(), PetscQuadratureSetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureGetNumComponents — Method
Nc::PetscInt = PetscQuadratureGetNumComponents(petsclib::PetscLibType, q::PetscQuadrature)

Return the number of components for functions to be integrated

Not Collective

Input Parameter:

  • q - The PetscQuadrature object

Output Parameter:

  • Nc - The number of components

Level: intermediate

See also: PetscQuadrature, PetscQuadratureSetNumComponents(), PetscQuadratureGetData(), PetscQuadratureSetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureGetOrder — Method
order::PetscInt = PetscQuadratureGetOrder(petsclib::PetscLibType, q::PetscQuadrature)

Return the order of the method in the PetscQuadrature

Not Collective

Input Parameter:

  • q - The PetscQuadrature object

Output Parameter:

  • order - The order of the quadrature, i.e. the highest degree polynomial that is exactly integrated

Level: intermediate

See also: PetscQuadrature, PetscQuadratureSetOrder(), PetscQuadratureGetData(), PetscQuadratureSetData()

External Links

source
PETSc.LibPETSc.PetscQuadraturePushForward — Method
Jinvstarq::PetscQuadrature = PetscQuadraturePushForward(petsclib::PetscLibType, q::PetscQuadrature, imageDim::PetscInt, origin::Vector{PetscReal}, originImage::Vector{PetscReal}, J::Vector{PetscReal}, formDegree::PetscInt)

Push forward a quadrature functional under an affine transformation.

Collective

Input Parameters:

  • q - the quadrature functional
  • imageDim - the dimension of the image of the transformation
  • origin - a point in the original space
  • originImage - the image of the origin under the transformation
  • J - the Jacobian of the image: an [imageDim x dim] matrix in row major order
  • formDegree - transform the quadrature weights as k-forms of this form degree (if the number of components is a multiple of (dim choose formDegree),

it is assumed that they represent multiple k-forms) [see PetscDTAltVPullback() for interpretation of formDegree]

Output Parameter:

  • Jinvstarq - a quadrature rule where each point is the image of a point in the original quadrature rule, and where the k-form weights have

been pulled-back by the pseudoinverse of J to the k-form weights in the image space.

Level: intermediate

See also: PetscQuadrature, PetscDTAltVPullback(), PetscDTAltVPullbackMatrix()

External Links

source
PETSc.LibPETSc.PetscQuadratureSetCellType — Method
PetscQuadratureSetCellType(petsclib::PetscLibType, q::PetscQuadrature, ct::DMPolytopeType)

Set the cell type of the integration domain

Not Collective

Input Parameters:

  • q - The PetscQuadrature object
  • ct - The cell type of the integration domain

Level: intermediate

See also: PetscQuadrature, PetscQuadratureGetCellType(), PetscQuadratureGetData(), PetscQuadratureSetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureSetData — Method
PetscQuadratureSetData(petsclib::PetscLibType, q::PetscQuadrature, dim::PetscInt, Nc::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, weights::Vector{PetscReal})

Sets the data defining the quadrature

Not Collective

Input Parameters:

  • q - The PetscQuadrature object
  • dim - The spatial dimension
  • Nc - The number of components
  • npoints - The number of quadrature points
  • points - The coordinates of each quadrature point
  • weights - The weight of each quadrature point

Level: intermediate

See also: PetscQuadrature, PetscQuadratureCreate(), PetscQuadratureGetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureSetNumComponents — Method
PetscQuadratureSetNumComponents(petsclib::PetscLibType, q::PetscQuadrature, Nc::PetscInt)

Sets the number of components for functions to be integrated

Not Collective

Input Parameters:

  • q - The PetscQuadrature object
  • Nc - The number of components

Level: intermediate

See also: PetscQuadrature, PetscQuadratureGetNumComponents(), PetscQuadratureGetData(), PetscQuadratureSetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureSetOrder — Method
PetscQuadratureSetOrder(petsclib::PetscLibType, q::PetscQuadrature, order::PetscInt)

Set the order of the method in the PetscQuadrature

Not Collective

Input Parameters:

  • q - The PetscQuadrature object
  • order - The order of the quadrature, i.e. the highest degree polynomial that is exactly integrated

Level: intermediate

See also: PetscQuadrature, PetscQuadratureGetOrder(), PetscQuadratureGetData(), PetscQuadratureSetData()

External Links

source
PETSc.LibPETSc.PetscQuadratureView — Method
PetscQuadratureView(petsclib::PetscLibType, quad::PetscQuadrature, viewer::PetscViewer)

View a PetscQuadrature object

Collective

Input Parameters:

  • quad - The PetscQuadrature object
  • viewer - The PetscViewer object

Level: beginner

See also: PetscQuadrature, PetscViewer, PetscQuadratureCreate(), PetscQuadratureGetData()

External Links

source
PETSc.LibPETSc.PetscTabulationDestroy — Method
PetscTabulationDestroy(petsclib::PetscLibType, T::Union{PetscTabulation, Ref{PetscTabulation}})

Frees memory from the associated tabulation.

Not Collective

Input Parameter:

  • T - The tabulation

Level: intermediate

See also: PetscTabulation, PetscFECreateTabulation(), PetscFEGetCellTabulation()

External Links

source
PETSc.LibPETSc.PetscWeakFormAddBdJacobian — Method
PetscWeakFormAddBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external)

Append boundary Jacobian pointwise functions g0, g1, g2, and g3 to the lists for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • g0 - The g0 boundary Jacobian pointwise function to append; a NULL is ignored
  • g1 - The g1 boundary Jacobian pointwise function to append; a NULL is ignored
  • g2 - The g2 boundary Jacobian pointwise function to append; a NULL is ignored
  • g3 - The g3 boundary Jacobian pointwise function to append; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdJacobian(), PetscWeakFormGetBdJacobian(), PetscWeakFormAddJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormAddBdJacobianPreconditioner — Method
PetscWeakFormAddBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external)

Append boundary Jacobian preconditioner pointwise functions g0, g1, g2, and g3 to the lists for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • g0 - The g0 boundary Jacobian preconditioner pointwise function to append; a NULL is ignored
  • g1 - The g1 boundary Jacobian preconditioner pointwise function to append; a NULL is ignored
  • g2 - The g2 boundary Jacobian preconditioner pointwise function to append; a NULL is ignored
  • g3 - The g3 boundary Jacobian preconditioner pointwise function to append; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdJacobianPreconditioner(), PetscWeakFormGetBdJacobianPreconditioner(), PetscWeakFormAddBdJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormAddBdResidual — Method
PetscWeakFormAddBdResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, f0::external, f1::external)

Append boundary residual pointwise functions f0 and f1 to the lists for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The field number
  • part - The equation part, or 0 if unused
  • f0 - The f0 boundary residual pointwise function to append; a NULL is ignored
  • f1 - The f1 boundary residual pointwise function to append; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdResidual(), PetscWeakFormGetBdResidual(), PetscWeakFormAddResidual()

External Links

source
PETSc.LibPETSc.PetscWeakFormAddDynamicJacobian — Method
PetscWeakFormAddDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external)

Append dynamic Jacobian pointwise functions g0, g1, g2, and g3 to the lists for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • g0 - The g0 dynamic Jacobian pointwise function to append; a NULL is ignored
  • g1 - The g1 dynamic Jacobian pointwise function to append; a NULL is ignored
  • g2 - The g2 dynamic Jacobian pointwise function to append; a NULL is ignored
  • g3 - The g3 dynamic Jacobian pointwise function to append; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetDynamicJacobian(), PetscWeakFormGetDynamicJacobian(), PetscWeakFormAddJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormAddJacobian — Method
PetscWeakFormAddJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external)

Append Jacobian pointwise functions g0, g1, g2, and g3 to the lists for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • g0 - The g0 Jacobian pointwise function to append; a NULL is ignored
  • g1 - The g1 Jacobian pointwise function to append; a NULL is ignored
  • g2 - The g2 Jacobian pointwise function to append; a NULL is ignored
  • g3 - The g3 Jacobian pointwise function to append; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetJacobian(), PetscWeakFormGetJacobian(), PetscWeakFormSetIndexJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormAddJacobianPreconditioner — Method
PetscWeakFormAddJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, g0::external, g1::external, g2::external, g3::external)

Append Jacobian preconditioner pointwise functions g0, g1, g2, and g3 to the lists for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • g0 - The g0 Jacobian preconditioner pointwise function to append; a NULL is ignored
  • g1 - The g1 Jacobian preconditioner pointwise function to append; a NULL is ignored
  • g2 - The g2 Jacobian preconditioner pointwise function to append; a NULL is ignored
  • g3 - The g3 Jacobian preconditioner pointwise function to append; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetJacobianPreconditioner(), PetscWeakFormGetJacobianPreconditioner(), PetscWeakFormAddJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormAddObjective — Method
PetscWeakFormAddObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, obj::external)

Append an objective pointwise function to the list for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • obj - The objective pointwise function to append; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetObjective(), PetscWeakFormGetObjective(), PetscWeakFormSetIndexObjective()

External Links

source
PETSc.LibPETSc.PetscWeakFormAddResidual — Method
PetscWeakFormAddResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, f0::external, f1::external)

Append residual pointwise functions f0 and f1 to the lists for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • f0 - The f0 residual pointwise function to append; a NULL is ignored
  • f1 - The f1 residual pointwise function to append; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetResidual(), PetscWeakFormGetResidual(), PetscWeakFormSetIndexResidual(), PetscWeakFormAddBdResidual()

External Links

source
PETSc.LibPETSc.PetscWeakFormClear — Method
PetscWeakFormClear(petsclib::PetscLibType, wf::PetscWeakForm)

Clear all functions from the PetscWeakForm

Not Collective

Input Parameter:

  • wf - The original PetscWeakForm

Level: intermediate

See also: PetscWeakForm, PetscWeakFormCopy(), PetscWeakFormCreate(), PetscWeakFormDestroy()

External Links

source
PETSc.LibPETSc.PetscWeakFormClearIndex — Method
PetscWeakFormClearIndex(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, kind::PetscWeakFormKind, ind::PetscInt)

Clear the pointwise function at a given index for the given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • kind - The kind of weak form, see PetscWeakFormKind
  • ind - The index of the function to clear in the function list for this key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormKind, PetscWeakFormCreate()

External Links

source
PETSc.LibPETSc.PetscWeakFormCopy — Method
PetscWeakFormCopy(petsclib::PetscLibType, wf::PetscWeakForm, wfNew::PetscWeakForm)

Copy the pointwise functions to another PetscWeakForm

Not Collective

Input Parameter:

  • wf - The original PetscWeakForm

Output Parameter:

  • wfNew - The copy of the PetscWeakForm

Level: intermediate

See also: PetscWeakForm, PetscWeakFormCreate(), PetscWeakFormDestroy()

External Links

source
PETSc.LibPETSc.PetscWeakFormCreate — Method
wf::PetscWeakForm = PetscWeakFormCreate(petsclib::PetscLibType, comm::MPI_Comm)

Creates an empty PetscWeakForm object.

Collective

Input Parameter:

  • comm - The communicator for the PetscWeakForm object

Output Parameter:

  • wf - The PetscWeakForm object

Level: beginner

See also: PetscWeakForm, PetscDS, PetscWeakFormDestroy()

External Links

source
PETSc.LibPETSc.PetscWeakFormDestroy — Method
PetscWeakFormDestroy(petsclib::PetscLibType, wf::Union{PetscWeakForm, Ref{PetscWeakForm}})

Destroys a PetscWeakForm object

Collective

Input Parameter:

  • wf - the PetscWeakForm object to destroy

Level: developer

See also: PetscWeakForm, PetscWeakFormCreate(), PetscWeakFormView()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetBdJacobian — Method
n0::PetscInt = PetscWeakFormGetBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, noname::Ptr{Cvoid})

Retrieve the lists of boundary Jacobian pointwise functions g0, g1, g2, and g3 for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused

Output Parameters:

  • n0 - The number of g0 boundary pointwise functions registered for this key
  • g0 - The array of g0 boundary Jacobian pointwise functions
  • n1 - The number of g1 boundary pointwise functions registered for this key
  • g1 - The array of g1 boundary Jacobian pointwise functions
  • n2 - The number of g2 boundary pointwise functions registered for this key
  • g2 - The array of g2 boundary Jacobian pointwise functions
  • n3 - The number of g3 boundary pointwise functions registered for this key
  • g3 - The array of g3 boundary Jacobian pointwise functions

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdJacobian(), PetscWeakFormAddBdJacobian(), PetscWeakFormHasBdJacobian(), PetscWeakFormGetJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetBdJacobianPreconditioner — Method
n0::PetscInt = PetscWeakFormGetBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, noname::Ptr{Cvoid})

Retrieve the lists of boundary Jacobian preconditioner pointwise functions g0, g1, g2, and g3 for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused

Output Parameters:

  • n0 - The number of g0 boundary pointwise functions registered for this key
  • g0 - The array of g0 boundary Jacobian preconditioner pointwise functions
  • n1 - The number of g1 boundary pointwise functions registered for this key
  • g1 - The array of g1 boundary Jacobian preconditioner pointwise functions
  • n2 - The number of g2 boundary pointwise functions registered for this key
  • g2 - The array of g2 boundary Jacobian preconditioner pointwise functions
  • n3 - The number of g3 boundary pointwise functions registered for this key
  • g3 - The array of g3 boundary Jacobian preconditioner pointwise functions

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdJacobianPreconditioner(), PetscWeakFormAddBdJacobianPreconditioner(), PetscWeakFormHasBdJacobianPreconditioner(), PetscWeakFormGetBdJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetBdResidual — Method
n0::PetscInt = PetscWeakFormGetBdResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, noname::Ptr{Cvoid})

Retrieve the lists of boundary residual pointwise functions f0 and f1 for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The field number
  • part - The equation part, or 0 if unused

Output Parameters:

  • n0 - The number of f0 boundary pointwise functions registered for this key
  • f0 - The array of f0 boundary residual pointwise functions
  • n1 - The number of f1 boundary pointwise functions registered for this key
  • f1 - The array of f1 boundary residual pointwise functions

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdResidual(), PetscWeakFormAddBdResidual(), PetscWeakFormGetResidual()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetDynamicJacobian — Method
n0::PetscInt = PetscWeakFormGetDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, noname::Ptr{Cvoid})

Retrieve the lists of dynamic Jacobian pointwise functions g0, g1, g2, and g3 for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused

Output Parameters:

  • n0 - The number of g0 pointwise functions registered for this key
  • g0 - The array of g0 dynamic Jacobian pointwise functions
  • n1 - The number of g1 pointwise functions registered for this key
  • g1 - The array of g1 dynamic Jacobian pointwise functions
  • n2 - The number of g2 pointwise functions registered for this key
  • g2 - The array of g2 dynamic Jacobian pointwise functions
  • n3 - The number of g3 pointwise functions registered for this key
  • g3 - The array of g3 dynamic Jacobian pointwise functions

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetDynamicJacobian(), PetscWeakFormAddDynamicJacobian(), PetscWeakFormHasDynamicJacobian(), PetscWeakFormGetJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetIndexObjective — Method
PetscWeakFormGetIndexObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ind::PetscInt, noname::Ptr{Cvoid})

Retrieve a single objective pointwise function at the given index for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • ind - The index into the list of objective pointwise functions for this key

Output Parameter:

  • obj - The objective pointwise function at position ind, or NULL if no function is registered for this key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetIndexObjective(), PetscWeakFormGetObjective(), PetscWeakFormSetObjective(), PetscWeakFormAddObjective()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetJacobian — Method
n0::PetscInt = PetscWeakFormGetJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, noname::Ptr{Cvoid})

Retrieve the lists of Jacobian pointwise functions g0, g1, g2, and g3 for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused

Output Parameters:

  • n0 - The number of g0 pointwise functions registered for this key
  • g0 - The array of g0 Jacobian pointwise functions
  • n1 - The number of g1 pointwise functions registered for this key
  • g1 - The array of g1 Jacobian pointwise functions
  • n2 - The number of g2 pointwise functions registered for this key
  • g2 - The array of g2 Jacobian pointwise functions
  • n3 - The number of g3 pointwise functions registered for this key
  • g3 - The array of g3 Jacobian pointwise functions

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetJacobian(), PetscWeakFormAddJacobian(), PetscWeakFormHasJacobian(), PetscWeakFormGetJacobianPreconditioner()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetJacobianPreconditioner — Method
n0::PetscInt = PetscWeakFormGetJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, noname::Ptr{Cvoid})

Retrieve the lists of Jacobian preconditioner pointwise functions g0, g1, g2, and g3 for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused

Output Parameters:

  • n0 - The number of g0 pointwise functions registered for this key
  • g0 - The array of g0 Jacobian preconditioner pointwise functions
  • n1 - The number of g1 pointwise functions registered for this key
  • g1 - The array of g1 Jacobian preconditioner pointwise functions
  • n2 - The number of g2 pointwise functions registered for this key
  • g2 - The array of g2 Jacobian preconditioner pointwise functions
  • n3 - The number of g3 pointwise functions registered for this key
  • g3 - The array of g3 Jacobian preconditioner pointwise functions

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetJacobianPreconditioner(), PetscWeakFormAddJacobianPreconditioner(), PetscWeakFormHasJacobianPreconditioner(), PetscWeakFormGetJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetNumFields — Method
Nf::PetscInt = PetscWeakFormGetNumFields(petsclib::PetscLibType, wf::PetscWeakForm)

Returns the number of fields in a PetscWeakForm

Not Collective

Input Parameter:

  • wf - The PetscWeakForm object

Output Parameter:

  • Nf - The number of fields

Level: beginner

See also: PetscWeakForm, PetscWeakFormSetNumFields(), PetscWeakFormCreate()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetObjective — Method
n::PetscInt = PetscWeakFormGetObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, noname::Ptr{Cvoid})

Retrieve the list of objective pointwise functions for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused

Output Parameters:

  • n - The number of objective pointwise functions registered for this key
  • obj - The array of objective pointwise functions

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetObjective(), PetscWeakFormAddObjective(), PetscWeakFormSetIndexObjective(), PetscWeakFormGetIndexObjective()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetResidual — Method
n0::PetscInt = PetscWeakFormGetResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, noname::Ptr{Cvoid})

Retrieve the lists of residual pointwise functions f0 and f1 for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused

Output Parameters:

  • n0 - The number of f0 pointwise functions registered for this key
  • f0 - The array of f0 residual pointwise functions
  • n1 - The number of f1 pointwise functions registered for this key
  • f1 - The array of f1 residual pointwise functions

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetResidual(), PetscWeakFormAddResidual(), PetscWeakFormGetBdResidual()

External Links

source
PETSc.LibPETSc.PetscWeakFormGetRiemannSolver — Method
n::PetscInt = PetscWeakFormGetRiemannSolver(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, noname::Ptr{Cvoid})

Retrieve the list of Riemann solver pointwise functions for a given key from a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused

Output Parameters:

  • n - The number of Riemann solver pointwise functions registered for this key
  • r - The array of Riemann solver pointwise functions

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetRiemannSolver(), PetscWeakFormSetIndexRiemannSolver()

External Links

source
PETSc.LibPETSc.PetscWeakFormHasBdJacobian — Method
hasJac::PetscBool = PetscWeakFormHasBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm)

Returns whether the PetscWeakForm has any boundary Jacobian (g0, g1, g2, or g3) pointwise functions registered

Not Collective

Input Parameter:

  • wf - The PetscWeakForm

Output Parameter:

  • hasJac - PETSC_TRUE if any boundary Jacobian pointwise functions are registered, PETSC_FALSE otherwise

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdJacobian(), PetscWeakFormGetBdJacobian(), PetscWeakFormHasJacobian(), PetscWeakFormHasBdJacobianPreconditioner()

External Links

source
PETSc.LibPETSc.PetscWeakFormHasBdJacobianPreconditioner — Method
hasJacPre::PetscBool = PetscWeakFormHasBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm)

Returns whether the PetscWeakForm has any boundary Jacobian preconditioner (g0, g1, g2, or g3) pointwise functions registered

Not Collective

Input Parameter:

  • wf - The PetscWeakForm

Output Parameter:

  • hasJacPre - PETSC_TRUE if any boundary Jacobian preconditioner pointwise functions are registered, PETSC_FALSE otherwise

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdJacobianPreconditioner(), PetscWeakFormGetBdJacobianPreconditioner(), PetscWeakFormHasBdJacobian(), PetscWeakFormHasJacobianPreconditioner()

External Links

source
PETSc.LibPETSc.PetscWeakFormHasDynamicJacobian — Method
hasDynJac::PetscBool = PetscWeakFormHasDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm)

Returns whether the PetscWeakForm has any dynamic Jacobian (g0, g1, g2, or g3) pointwise functions registered

Not Collective

Input Parameter:

  • wf - The PetscWeakForm

Output Parameter:

  • hasDynJac - PETSC_TRUE if any dynamic Jacobian pointwise functions are registered, PETSC_FALSE otherwise

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetDynamicJacobian(), PetscWeakFormGetDynamicJacobian(), PetscWeakFormHasJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormHasJacobian — Method
hasJac::PetscBool = PetscWeakFormHasJacobian(petsclib::PetscLibType, wf::PetscWeakForm)

Returns whether the PetscWeakForm has any Jacobian (g0, g1, g2, or g3) pointwise functions registered

Not Collective

Input Parameter:

  • wf - The PetscWeakForm

Output Parameter:

  • hasJac - PETSC_TRUE if any Jacobian pointwise functions are registered, PETSC_FALSE otherwise

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetJacobian(), PetscWeakFormGetJacobian(), PetscWeakFormHasJacobianPreconditioner(), PetscWeakFormHasBdJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormHasJacobianPreconditioner — Method
hasJacPre::PetscBool = PetscWeakFormHasJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm)

Returns whether the PetscWeakForm has any Jacobian preconditioner (g0, g1, g2, or g3) pointwise functions registered

Not Collective

Input Parameter:

  • wf - The PetscWeakForm

Output Parameter:

  • hasJacPre - PETSC_TRUE if any Jacobian preconditioner pointwise functions are registered, PETSC_FALSE otherwise

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetJacobianPreconditioner(), PetscWeakFormGetJacobianPreconditioner(), PetscWeakFormHasJacobian(), PetscWeakFormHasBdJacobianPreconditioner()

External Links

source
PETSc.LibPETSc.PetscWeakFormReplaceLabel — Method
PetscWeakFormReplaceLabel(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel)

Change any key on a label of the same name to use the new label

Not Collective

Input Parameters:

  • wf - The original PetscWeakForm
  • label - The label to change keys for

Level: intermediate

See also: PetscWeakForm, DMLabel, PetscWeakFormRewriteKeys(), PetscWeakFormCreate(), PetscWeakFormDestroy()

External Links

source
PETSc.LibPETSc.PetscWeakFormRewriteKeys — Method
PetscWeakFormRewriteKeys(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, Nv::PetscInt, values::Vector{PetscInt})

Change any key on the given label to use the new set of label values

Not Collective

Input Parameters:

  • wf - The original PetscWeakForm
  • label - The label to change keys for
  • Nv - The number of new label values
  • values - The set of new values to relabel keys with

Level: intermediate

See also: PetscWeakForm, DMLabel, PetscWeakFormReplaceLabel(), PetscWeakFormCreate(), PetscWeakFormDestroy()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetBdJacobian — Method
PetscWeakFormSetBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, noname::Ptr{Cvoid})

Set the lists of boundary Jacobian pointwise functions g0, g1, g2, and g3 for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • n0 - The number of g0 boundary pointwise functions to set
  • g0 - The array of g0 boundary Jacobian pointwise functions, or NULL to clear the key
  • n1 - The number of g1 boundary pointwise functions to set
  • g1 - The array of g1 boundary Jacobian pointwise functions, or NULL to clear the key
  • n2 - The number of g2 boundary pointwise functions to set
  • g2 - The array of g2 boundary Jacobian pointwise functions, or NULL to clear the key
  • n3 - The number of g3 boundary pointwise functions to set
  • g3 - The array of g3 boundary Jacobian pointwise functions, or NULL to clear the key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetBdJacobian(), PetscWeakFormAddBdJacobian(), PetscWeakFormSetJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetBdJacobianPreconditioner — Method
PetscWeakFormSetBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, noname::Ptr{Cvoid})

Set the lists of boundary Jacobian preconditioner pointwise functions g0, g1, g2, and g3 for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • n0 - The number of g0 boundary pointwise functions to set
  • g0 - The array of g0 boundary Jacobian preconditioner pointwise functions, or NULL to clear the key
  • n1 - The number of g1 boundary pointwise functions to set
  • g1 - The array of g1 boundary Jacobian preconditioner pointwise functions, or NULL to clear the key
  • n2 - The number of g2 boundary pointwise functions to set
  • g2 - The array of g2 boundary Jacobian preconditioner pointwise functions, or NULL to clear the key
  • n3 - The number of g3 boundary pointwise functions to set
  • g3 - The array of g3 boundary Jacobian preconditioner pointwise functions, or NULL to clear the key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetBdJacobianPreconditioner(), PetscWeakFormAddBdJacobianPreconditioner(), PetscWeakFormSetBdJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetBdResidual — Method
PetscWeakFormSetBdResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n0::PetscInt, noname::Ptr{Cvoid})

Set the lists of boundary residual pointwise functions f0 and f1 for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The field number
  • part - The equation part, or 0 if unused
  • n0 - The number of f0 boundary pointwise functions to set
  • f0 - The array of f0 boundary residual pointwise functions, or NULL to clear the key
  • n1 - The number of f1 boundary pointwise functions to set
  • f1 - The array of f1 boundary residual pointwise functions, or NULL to clear the key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetBdResidual(), PetscWeakFormAddBdResidual(), PetscWeakFormSetResidual()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetDynamicJacobian — Method
PetscWeakFormSetDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, noname::Ptr{Cvoid})

Set the lists of dynamic Jacobian pointwise functions g0, g1, g2, and g3 for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • n0 - The number of g0 pointwise functions to set
  • g0 - The array of g0 dynamic Jacobian pointwise functions, or NULL to clear the key
  • n1 - The number of g1 pointwise functions to set
  • g1 - The array of g1 dynamic Jacobian pointwise functions, or NULL to clear the key
  • n2 - The number of g2 pointwise functions to set
  • g2 - The array of g2 dynamic Jacobian pointwise functions, or NULL to clear the key
  • n3 - The number of g3 pointwise functions to set
  • g3 - The array of g3 dynamic Jacobian pointwise functions, or NULL to clear the key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetDynamicJacobian(), PetscWeakFormAddDynamicJacobian(), PetscWeakFormSetJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetIndexBdJacobian — Method
PetscWeakFormSetIndexBdJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external)

Set the boundary Jacobian pointwise functions g0, g1, g2, and g3 at the given indices for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • i0 - The index at which to store g0 in the g0 list
  • g0 - The g0 boundary Jacobian pointwise function; a NULL is ignored
  • i1 - The index at which to store g1 in the g1 list
  • g1 - The g1 boundary Jacobian pointwise function; a NULL is ignored
  • i2 - The index at which to store g2 in the g2 list
  • g2 - The g2 boundary Jacobian pointwise function; a NULL is ignored
  • i3 - The index at which to store g3 in the g3 list
  • g3 - The g3 boundary Jacobian pointwise function; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdJacobian(), PetscWeakFormAddBdJacobian(), PetscWeakFormGetBdJacobian(), PetscWeakFormClearIndex()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetIndexBdJacobianPreconditioner — Method
PetscWeakFormSetIndexBdJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external)

Set the boundary Jacobian preconditioner pointwise functions g0, g1, g2, and g3 at the given indices for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • i0 - The index at which to store g0 in the g0 list
  • g0 - The g0 boundary Jacobian preconditioner pointwise function; a NULL is ignored
  • i1 - The index at which to store g1 in the g1 list
  • g1 - The g1 boundary Jacobian preconditioner pointwise function; a NULL is ignored
  • i2 - The index at which to store g2 in the g2 list
  • g2 - The g2 boundary Jacobian preconditioner pointwise function; a NULL is ignored
  • i3 - The index at which to store g3 in the g3 list
  • g3 - The g3 boundary Jacobian preconditioner pointwise function; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdJacobianPreconditioner(), PetscWeakFormAddBdJacobianPreconditioner(), PetscWeakFormGetBdJacobianPreconditioner(), PetscWeakFormClearIndex()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetIndexBdResidual — Method
PetscWeakFormSetIndexBdResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, i0::PetscInt, f0::external, i1::PetscInt, f1::external)

Set the boundary residual pointwise functions f0 and f1 at the given indices for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the boundary region, or NULL for the entire boundary
  • val - The label value selecting the boundary region
  • f - The field number
  • part - The equation part, or 0 if unused
  • i0 - The index at which to store f0 in the f0 list
  • f0 - The f0 boundary residual pointwise function; a NULL is ignored
  • i1 - The index at which to store f1 in the f1 list
  • f1 - The f1 boundary residual pointwise function; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetBdResidual(), PetscWeakFormAddBdResidual(), PetscWeakFormGetBdResidual(), PetscWeakFormClearIndex()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetIndexDynamicJacobian — Method
PetscWeakFormSetIndexDynamicJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external)

Set the dynamic Jacobian pointwise functions g0, g1, g2, and g3 at the given indices for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • i0 - The index at which to store g0 in the g0 list
  • g0 - The g0 dynamic Jacobian pointwise function; a NULL is ignored
  • i1 - The index at which to store g1 in the g1 list
  • g1 - The g1 dynamic Jacobian pointwise function; a NULL is ignored
  • i2 - The index at which to store g2 in the g2 list
  • g2 - The g2 dynamic Jacobian pointwise function; a NULL is ignored
  • i3 - The index at which to store g3 in the g3 list
  • g3 - The g3 dynamic Jacobian pointwise function; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetDynamicJacobian(), PetscWeakFormAddDynamicJacobian(), PetscWeakFormGetDynamicJacobian(), PetscWeakFormClearIndex()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetIndexJacobian — Method
PetscWeakFormSetIndexJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external)

Set the Jacobian pointwise functions g0, g1, g2, and g3 at the given indices for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • i0 - The index at which to store g0 in the g0 list
  • g0 - The g0 Jacobian pointwise function; a NULL is ignored
  • i1 - The index at which to store g1 in the g1 list
  • g1 - The g1 Jacobian pointwise function; a NULL is ignored
  • i2 - The index at which to store g2 in the g2 list
  • g2 - The g2 Jacobian pointwise function; a NULL is ignored
  • i3 - The index at which to store g3 in the g3 list
  • g3 - The g3 Jacobian pointwise function; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetJacobian(), PetscWeakFormAddJacobian(), PetscWeakFormGetJacobian(), PetscWeakFormClearIndex()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetIndexJacobianPreconditioner — Method
PetscWeakFormSetIndexJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, i0::PetscInt, g0::external, i1::PetscInt, g1::external, i2::PetscInt, g2::external, i3::PetscInt, g3::external)

Set the Jacobian preconditioner pointwise functions g0, g1, g2, and g3 at the given indices for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • i0 - The index at which to store g0 in the g0 list
  • g0 - The g0 Jacobian preconditioner pointwise function; a NULL is ignored
  • i1 - The index at which to store g1 in the g1 list
  • g1 - The g1 Jacobian preconditioner pointwise function; a NULL is ignored
  • i2 - The index at which to store g2 in the g2 list
  • g2 - The g2 Jacobian preconditioner pointwise function; a NULL is ignored
  • i3 - The index at which to store g3 in the g3 list
  • g3 - The g3 Jacobian preconditioner pointwise function; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetJacobianPreconditioner(), PetscWeakFormAddJacobianPreconditioner(), PetscWeakFormGetJacobianPreconditioner(), PetscWeakFormClearIndex()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetIndexObjective — Method
PetscWeakFormSetIndexObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, ind::PetscInt, obj::external)

Set a single objective pointwise function at the given index for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • ind - The index into the list of objective pointwise functions for this key
  • obj - The objective pointwise function to store at position ind; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetIndexObjective(), PetscWeakFormSetObjective(), PetscWeakFormAddObjective(), PetscWeakFormClearIndex()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetIndexResidual — Method
PetscWeakFormSetIndexResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, i0::PetscInt, f0::external, i1::PetscInt, f1::external)

Set the residual pointwise functions f0 and f1 at the given indices for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • i0 - The index at which to store f0 in the f0 list
  • f0 - The f0 residual pointwise function; a NULL is ignored
  • i1 - The index at which to store f1 in the f1 list
  • f1 - The f1 residual pointwise function; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetResidual(), PetscWeakFormAddResidual(), PetscWeakFormGetResidual(), PetscWeakFormClearIndex()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetIndexRiemannSolver — Method
PetscWeakFormSetIndexRiemannSolver(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, i::PetscInt, r::external)

Set a single Riemann solver pointwise function at the given index for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • i - The index into the list of Riemann solver pointwise functions for this key
  • r - The Riemann solver pointwise function to store at position i; a NULL is ignored

Level: intermediate

See also: PetscWeakForm, PetscWeakFormSetRiemannSolver(), PetscWeakFormGetRiemannSolver(), PetscWeakFormClearIndex()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetJacobian — Method
PetscWeakFormSetJacobian(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, noname::Ptr{Cvoid})

Set the lists of Jacobian pointwise functions g0, g1, g2, and g3 for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • n0 - The number of g0 pointwise functions to set
  • g0 - The array of g0 Jacobian pointwise functions, or NULL to clear the key
  • n1 - The number of g1 pointwise functions to set
  • g1 - The array of g1 Jacobian pointwise functions, or NULL to clear the key
  • n2 - The number of g2 pointwise functions to set
  • g2 - The array of g2 Jacobian pointwise functions, or NULL to clear the key
  • n3 - The number of g3 pointwise functions to set
  • g3 - The array of g3 Jacobian pointwise functions, or NULL to clear the key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetJacobian(), PetscWeakFormAddJacobian(), PetscWeakFormSetIndexJacobian(), PetscWeakFormSetJacobianPreconditioner()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetJacobianPreconditioner — Method
PetscWeakFormSetJacobianPreconditioner(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, g::PetscInt, part::PetscInt, n0::PetscInt, noname::Ptr{Cvoid})

Set the lists of Jacobian preconditioner pointwise functions g0, g1, g2, and g3 for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The test field number
  • g - The trial field number
  • part - The equation part, or 0 if unused
  • n0 - The number of g0 pointwise functions to set
  • g0 - The array of g0 Jacobian preconditioner pointwise functions, or NULL to clear the key
  • n1 - The number of g1 pointwise functions to set
  • g1 - The array of g1 Jacobian preconditioner pointwise functions, or NULL to clear the key
  • n2 - The number of g2 pointwise functions to set
  • g2 - The array of g2 Jacobian preconditioner pointwise functions, or NULL to clear the key
  • n3 - The number of g3 pointwise functions to set
  • g3 - The array of g3 Jacobian preconditioner pointwise functions, or NULL to clear the key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetJacobianPreconditioner(), PetscWeakFormAddJacobianPreconditioner(), PetscWeakFormSetJacobian()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetNumFields — Method
PetscWeakFormSetNumFields(petsclib::PetscLibType, wf::PetscWeakForm, Nf::PetscInt)

Sets the number of fields

Not Collective

Input Parameters:

  • wf - The PetscWeakForm object
  • Nf - The number of fields

Level: beginner

See also: PetscWeakForm, PetscWeakFormGetNumFields(), PetscWeakFormCreate()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetObjective — Method
PetscWeakFormSetObjective(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n::PetscInt, noname::Ptr{Cvoid})

Set the list of objective pointwise functions for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • n - The number of objective pointwise functions to set
  • obj - The array of objective pointwise functions, or NULL to clear the key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetObjective(), PetscWeakFormAddObjective(), PetscWeakFormSetIndexObjective()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetResidual — Method
PetscWeakFormSetResidual(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n0::PetscInt, noname::Ptr{Cvoid})

Set the lists of residual pointwise functions f0 and f1 for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • n0 - The number of f0 pointwise functions to set
  • f0 - The array of f0 residual pointwise functions, or NULL to clear the key
  • n1 - The number of f1 pointwise functions to set
  • f1 - The array of f1 residual pointwise functions, or NULL to clear the key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetResidual(), PetscWeakFormAddResidual(), PetscWeakFormSetIndexResidual()

External Links

source
PETSc.LibPETSc.PetscWeakFormSetRiemannSolver — Method
PetscWeakFormSetRiemannSolver(petsclib::PetscLibType, wf::PetscWeakForm, label::DMLabel, val::PetscInt, f::PetscInt, part::PetscInt, n::PetscInt, noname::Ptr{Cvoid})

Set the list of Riemann solver pointwise functions for a given key in a PetscWeakForm

Not Collective

Input Parameters:

  • wf - The PetscWeakForm
  • label - The label selecting the mesh region, or NULL for the entire domain
  • val - The label value selecting the mesh region
  • f - The field number
  • part - The equation part, or 0 if unused
  • n - The number of Riemann solver pointwise functions to set
  • r - The array of Riemann solver pointwise functions, or NULL to clear the key

Level: intermediate

See also: PetscWeakForm, PetscWeakFormGetRiemannSolver(), PetscWeakFormSetIndexRiemannSolver()

External Links

source
PETSc.LibPETSc.PetscWeakFormView — Method
PetscWeakFormView(petsclib::PetscLibType, wf::PetscWeakForm, v::PetscViewer)

Views a PetscWeakForm

Collective

Input Parameters:

  • wf - the PetscWeakForm object to view
  • v - the viewer

Level: developer

See also: PetscViewer, PetscWeakForm, PetscWeakFormDestroy(), PetscWeakFormCreate()

External Links

source

PetscDS

PETSc.LibPETSc.PetscDSAddBoundary — Method
bd::PetscInt = PetscDSAddBoundary(petsclib::PetscLibType, ds::PetscDS, 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 to the model.

Collective

Input Parameters:

  • ds - The PetscDS object
  • type - The type of condition, e.g. DM_BC_ESSENTIAL/DM_BC_ESSENTIAL_FIELD (Dirichlet), or DM_BC_NATURAL (Neumann)
  • name - The name for the boundary condition
  • label - The label defining constrained points
  • Nv - The number of DMLabel values for constrained points
  • values - An array of label values for constrained points
  • field - The field to constrain
  • Nc - The number of constrained field components (0 will constrain all fields)
  • comps - An array of constrained component numbers
  • bcFunc - A pointwise function giving boundary values
  • bcFunc_t - A pointwise function giving the time derivative of the boundary values, or NULL
  • ctx - An optional application context for bcFunc

Output Parameter:

  • bd - The boundary number

Options Database Keys:

  • -bc_NAME values - comma separated list of values for the boundary condition NAME
  • -bc_NAME_comp comps - comma separated list of components for the boundary condition NAME

Level: developer

See also: PetscDS, PetscWeakForm, DMLabel, DMBoundaryConditionType, PetscDSAddBoundaryByName(), PetscDSGetBoundary(), PetscDSSetResidual(), PetscDSSetBdResidual()

External Links

source
PETSc.LibPETSc.PetscDSAddBoundaryByName — Method
bd::PetscInt = PetscDSAddBoundaryByName(petsclib::PetscLibType, ds::PetscDS, type::DMBoundaryConditionType, name::String, lname::String, 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 to the model.

Collective

Input Parameters:

  • ds - The PetscDS object
  • type - The type of condition, e.g. DM_BC_ESSENTIAL/DM_BC_ESSENTIAL_FIELD (Dirichlet), or DM_BC_NATURAL (Neumann)
  • name - The boundary condition name
  • lname - The name of the label defining constrained points
  • Nv - The number of DMLabel values for constrained points
  • values - An array of label values for constrained points
  • field - The field to constrain
  • Nc - The number of constrained field components (0 will constrain all fields)
  • comps - An array of constrained component numbers
  • bcFunc - A pointwise function giving boundary values
  • bcFunc_t - A pointwise function giving the time derivative of the boundary values, or NULL
  • ctx - An optional application context for bcFunc

Output Parameter:

  • bd - The boundary number

Options Database Keys:

  • -bc_NAME values - comma separated list of values for the boundary condition NAME
  • -bc_NAME_comp comps - comma separated list of components for the boundary condition NAME

Calling Sequence of bcFunc and bcFunc_t: If the type is DM_BC_ESSENTIAL $void bcFunc(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt Nc, PetscScalar bcval[])$ If the type is DM_BC_ESSENTIAL_FIELD or other FIELD value, `` void bcFunc(PetscInt dim, PetscInt Nf, PetscInt NfAux, const PetscInt uOff[], const PetscInt uOffx[], const PetscScalar u[], const PetscScalar ut[], const PetscScalar ux[], const PetscInt aOff[], const PetscInt aOffx[], const PetscScalar a[], const PetscScalar at[], const PetscScalar a_x[], PetscReal time, const PetscReal x[], PetscScalar bcval[]) ``

  • dim - the coordinate dimension
  • Nf - the number of fields
  • uOff - the offset into u[] and u_t[] for each field
  • uOff_x - the offset into u_x[] for each field
  • u - each field evaluated at the current point
  • u_t - the time derivative of each field evaluated at the current point
  • u_x - the gradient of each field evaluated at the current point
  • aOff - the offset into a[] and a_t[] for each auxiliary field
  • aOff_x - the offset into a_x[] for each auxiliary field
  • a - each auxiliary field evaluated at the current point
  • a_t - the time derivative of each auxiliary field evaluated at the current point
  • a_x - the gradient of auxiliary each field evaluated at the current point
  • t - current time
  • x - coordinates of the current point
  • numConstants - number of constant parameters
  • constants - constant parameters
  • bcval - output values at the current point

Level: developer

See also: PetscDS, PetscWeakForm, DMLabel, DMBoundaryConditionType, PetscDSAddBoundary(), PetscDSGetBoundary(), PetscDSSetResidual(), PetscDSSetBdResidual()

External Links

source
PETSc.LibPETSc.PetscDSAddDiscretization — Method
PetscDSAddDiscretization(petsclib::PetscLibType, prob::PetscDS, disc)

Adds a discretization object

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • disc - The discretization object, this can be a PetscFE or PetscFV

Level: beginner

See also: PetscWeakForm, PetscFE, PetscFV, PetscDSGetDiscretization(), PetscDSSetDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSCopy — Method
PetscDSCopy(petsclib::PetscLibType, ds::PetscDS, minDegree::PetscInt, maxDegree::PetscInt, dmNew::AbstractPetscDM, dsNew::PetscDS)

Copy the contents of a PetscDS into another PetscDS on a new DM.

Collective

Input Parameters:

  • ds - the source PetscDS
  • minDegree - the minimum polynomial degree to consider when selecting discretizations, or PETSC_DETERMINE
  • maxDegree - the maximum polynomial degree to consider when selecting discretizations, or PETSC_DETERMINE
  • dmNew - the target DM used to resolve boundary condition labels for the copied boundaries

Output Parameter:

  • dsNew - the destination PetscDS

Level: developer

See also: PetscDS, PetscDSCopyEquations(), PetscDSCopyConstants(), PetscDSCopyExactSolutions(), PetscDSCopyBounds(), PetscDSCopyBoundary()

External Links

source
PETSc.LibPETSc.PetscDSCopyBoundary — Method
PetscDSCopyBoundary(petsclib::PetscLibType, ds::PetscDS, numFields::PetscInt, fields::Vector{PetscInt}, newds::PetscDS)

Copy all boundary condition objects to the new PetscDS

Not Collective

Input Parameters:

  • ds - The source PetscDS object
  • numFields - The number of selected fields, or PETSC_DEFAULT for all fields
  • fields - The selected fields, or NULL for all fields

Output Parameter:

  • newds - The target PetscDS, now with a copy of the boundary conditions

Level: intermediate

See also: PetscDS, DMBoundary, PetscDSCopyEquations(), PetscDSSetResidual(), PetscDSSetJacobian(), PetscDSSetRiemannSolver(), PetscDSSetBdResidual(), PetscDSSetBdJacobian(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSCopyBounds — Method
PetscDSCopyBounds(petsclib::PetscLibType, ds::PetscDS, newds::PetscDS)

Copy lower and upper solution bounds set with PetscDSSetLowerBound() and PetscDSSetLowerBound() to another PetscDS

Not Collective

Input Parameter:

  • ds - The PetscDS object

Output Parameter:

  • newds - The PetscDS copy

Level: intermediate

See also: PetscDS, PetscDSCopyBoundary(), PetscDSCopyEquations(), PetscDSCopyExactSolutions(), PetscDSSetResidual(), PetscDSSetJacobian(), PetscDSSetRiemannSolver(), PetscDSSetBdResidual(), PetscDSSetBdJacobian(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSCopyConstants — Method
PetscDSCopyConstants(petsclib::PetscLibType, prob::PetscDS, newprob::PetscDS)

Copy all constants set with PetscDSSetConstants() to another PetscDS

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • newprob - The PetscDS copy

Level: intermediate

See also: PetscDS, PetscDSCopyBoundary(), PetscDSCopyEquations(), PetscDSSetResidual(), PetscDSSetJacobian(), PetscDSSetRiemannSolver(), PetscDSSetBdResidual(), PetscDSSetBdJacobian(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSCopyEquations — Method
PetscDSCopyEquations(petsclib::PetscLibType, prob::PetscDS, newprob::PetscDS)

Copy all pointwise function pointers to another PetscDS

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • newprob - The PetscDS copy

Level: intermediate

See also: PetscDS, PetscDSCopyBoundary(), PetscDSSetResidual(), PetscDSSetJacobian(), PetscDSSetRiemannSolver(), PetscDSSetBdResidual(), PetscDSSetBdJacobian(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSCopyExactSolutions — Method
PetscDSCopyExactSolutions(petsclib::PetscLibType, ds::PetscDS, newds::PetscDS)

Copy all exact solutions set with PetscDSSetExactSolution() and PetscDSSetExactSolutionTimeDerivative() to another PetscDS

Not Collective

Input Parameter:

  • ds - The PetscDS object

Output Parameter:

  • newds - The PetscDS copy

Level: intermediate

See also: PetscDS, PetscDSCopyBoundary(), PetscDSCopyEquations(), PetscDSCopyBounds(), PetscDSSetResidual(), PetscDSSetJacobian(), PetscDSSetRiemannSolver(), PetscDSSetBdResidual(), PetscDSSetBdJacobian(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSCreate — Method
ds::PetscDS = PetscDSCreate(petsclib::PetscLibType, comm::MPI_Comm)

Creates an empty PetscDS object. The type can then be set with PetscDSSetType().

Collective

Input Parameter:

  • comm - The communicator for the PetscDS object

Output Parameter:

  • ds - The PetscDS object

Level: beginner

See also: PetscDS, PetscDSSetType(), PETSCDSBASIC, PetscDSType, PetscDSDestroy()

External Links

source
PETSc.LibPETSc.PetscDSDestroy — Method
PetscDSDestroy(petsclib::PetscLibType, ds::Union{PetscDS, Ref{PetscDS}})

Destroys a PetscDS object

Collective

Input Parameter:

  • ds - the PetscDS object to destroy

Level: developer

See also: PetscDSView()

External Links

source
PETSc.LibPETSc.PetscDSDestroyBoundary — Method
PetscDSDestroyBoundary(petsclib::PetscLibType, ds::PetscDS)

Remove all DMBoundary objects from the PetscDS

Not Collective

Input Parameter:

  • ds - The PetscDS object

Level: intermediate

See also: PetscDS, DMBoundary, PetscDSCopyBoundary(), PetscDSCopyEquations()

External Links

source
PETSc.LibPETSc.PetscDSGetBdJacobian — Method
g0::Ptr{Cvoid},g1::Ptr{Cvoid},g2::Ptr{Cvoid},g3::Ptr{Cvoid} = PetscDSGetBdJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt)

Get the pointwise boundary Jacobian function for given test and basis field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number

Output Parameters:

  • g0 - integrand for the test and basis function term, see PetscBdPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscBdPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscBdPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscBdPointJacFn

Level: intermediate

See also: PetscDS, PetscBdPointJacFn, PetscDSSetBdJacobian()

External Links

source
PETSc.LibPETSc.PetscDSGetBdJacobianPreconditioner — Method
g0::Ptr{Cvoid},g1::Ptr{Cvoid},g2::Ptr{Cvoid},g3::Ptr{Cvoid} = PetscDSGetBdJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt)

Get the pointwise boundary Jacobian function for given test and basis field that constructs the matrix used to construct the preconditioner

Not Collective; No Fortran Support

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number

Output Parameters:

  • g0 - integrand for the test and basis function term, see PetscBdPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscBdPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscBdPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscBdPointJacFn

Level: intermediate

See also: PetscDS, PetscBdPointJacFn, PetscDSSetBdJacobianPreconditioner()

External Links

source
PETSc.LibPETSc.PetscDSGetBdResidual — Method
f0::Ptr{Cvoid},f1::Ptr{Cvoid} = PetscDSGetBdResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Get the pointwise boundary residual function for a given test field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number

Output Parameters:

  • f0 - boundary integrand for the test function term, see PetscBdPointFn
  • f1 - boundary integrand for the test function gradient term, see PetscBdPointFn

Level: intermediate

See also: PetscDS, PetscBdPointFn, PetscDSSetBdResidual()

External Links

source
PETSc.LibPETSc.PetscDSGetBoundary — Method
Nv::PetscInt,values::Vector{PetscInt},field::PetscInt,Nc::PetscInt,comps::Vector{PetscInt} = PetscDSGetBoundary(petsclib::PetscLibType, ds::PetscDS, bd::PetscInt, wf::PetscWeakForm, type::DMBoundaryConditionType, name::String, label::DMLabel, func::PetscVoidFn, func_t::PetscVoidFn, ctx::Cvoid)

Gets a boundary condition from the model

Input Parameters:

  • ds - The PetscDS object
  • bd - The boundary condition number

Output Parameters:

  • wf - The PetscWeakForm holding the pointwise functions
  • type - The type of condition, e.g. DM_BC_ESSENTIAL/DM_BC_ESSENTIAL_FIELD (Dirichlet), or DM_BC_NATURAL (Neumann)
  • name - The boundary condition name
  • label - The label defining constrained points
  • Nv - The number of DMLabel ids for constrained points
  • values - An array of ids for constrained points
  • field - The field to constrain
  • Nc - The number of constrained field components
  • comps - An array of constrained component numbers
  • func - A pointwise function giving boundary values
  • func_t - A pointwise function giving the time derivative of the boundary values
  • ctx - An optional user context for bcFunc

Options Database Keys:

  • -bc_<boundary name> <num> - Overrides the boundary ids
  • -bc_<boundary name>_comp <num> - Overrides the boundary components

Level: developer

See also: PetscDS, PetscWeakForm, DMBoundaryConditionType, PetscDSAddBoundary(), DMLabel

External Links

source
PETSc.LibPETSc.PetscDSGetCohesive — Method
isCohesive::PetscBool = PetscDSGetCohesive(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Returns the flag indicating that a field is cohesive, meaning it is defined on the interior of a cohesive cell

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • f - The field index

Output Parameter:

  • isCohesive - The flag

Level: developer

See also: PetscDS, PetscDSSetCohesive(), PetscDSIsCohesive(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetComponentDerivativeOffsetsCohesive — Method
offsets::Vector{PetscInt} = PetscDSGetComponentDerivativeOffsetsCohesive(petsclib::PetscLibType, ds::PetscDS, s::PetscInt)

Returns the offset of each field derivative on an evaluation point

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • s - The cohesive side, 0 for negative, 1 for positive, 2 for cohesive

Output Parameter:

  • offsets - The offsets

Level: beginner

See also: PetscDS, PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetComponentOffset — Method
off::PetscInt = PetscDSGetComponentOffset(petsclib::PetscLibType, prob::PetscDS, f::PetscInt)

Returns the offset of the given field on an evaluation point

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • f - The field number

Output Parameter:

  • off - The offset

Level: beginner

See also: PetscDS, PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetComponentOffsets — Method
offsets::Vector{PetscInt} = PetscDSGetComponentOffsets(petsclib::PetscLibType, prob::PetscDS)

Returns the offset of each field on an evaluation point

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • offsets - The offsets

Level: beginner

See also: PetscDS, PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetComponentOffsetsCohesive — Method
offsets::Vector{PetscInt} = PetscDSGetComponentOffsetsCohesive(petsclib::PetscLibType, ds::PetscDS, s::PetscInt)

Returns the offset of each field on an evaluation point

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • s - The cohesive side, 0 for negative, 1 for positive, 2 for cohesive

Output Parameter:

  • offsets - The offsets

Level: beginner

See also: PetscDS, PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetComponents — Method
components::Vector{PetscInt} = PetscDSGetComponents(petsclib::PetscLibType, prob::PetscDS)

Returns the number of components for each field on an evaluation point

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • components - The number of components

Level: beginner

See also: PetscDS, PetscDSGetComponentOffsets(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetConstants — Method
numConstants::PetscInt,constants::Vector{PetscScalar} = PetscDSGetConstants(petsclib::PetscLibType, ds::PetscDS)

Returns the array of constants passed to point functions from a PetscDS object

Not Collective

Input Parameter:

  • ds - The PetscDS object

Output Parameters:

  • numConstants - The number of constants, or pass in NULL if not required
  • constants - The array of constants, NULL if there are none

Level: intermediate

See also: PetscDS, PetscDSSetConstants(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetContext — Method
PetscDSGetContext(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, ctx::Ptr{Cvoid})

Returns the context that was passed by PetscDSSetContext()

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The field number
  • ctx - the context

Level: intermediate

See also: PetscDS, PetscPointFn, PetscDSSetContext()

External Links

source
PETSc.LibPETSc.PetscDSGetCoordinateDimension — Method
dimEmbed::PetscInt = PetscDSGetCoordinateDimension(petsclib::PetscLibType, prob::PetscDS)

Returns the coordinate dimension of the PetscDS, meaning the dimension of the space into which the discretiaztions are embedded

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • dimEmbed - The coordinate dimension

Level: beginner

See also: PetscDS, PetscDSSetCoordinateDimension(), PetscDSGetSpatialDimension(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetDimensions — Method
dimensions::Vector{PetscInt} = PetscDSGetDimensions(petsclib::PetscLibType, prob::PetscDS)

Returns the size of the approximation space for each field on an evaluation point

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • dimensions - The number of dimensions

Level: beginner

See also: PetscDS, PetscDSGetComponentOffsets(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetDiscretization — Method
disc::PetscObject = PetscDSGetDiscretization(petsclib::PetscLibType, prob::PetscDS, f::PetscInt)

Returns the discretization object for the given field

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • f - The field number

Output Parameter:

  • disc - The discretization object, this can be a PetscFE or a PetscFV

Level: beginner

See also: PetscDS, PetscFE, PetscFV, PetscDSSetDiscretization(), PetscDSAddDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetDynamicJacobian — Method
g0::Ptr{Cvoid},g1::Ptr{Cvoid},g2::Ptr{Cvoid},g3::Ptr{Cvoid} = PetscDSGetDynamicJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt)

Get the pointwise dynamic Jacobian, dF/du_t, function for given test and basis field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number

Output Parameters:

  • g0 - integrand for the test and basis function term, see PetscPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscPointJacFn

Level: intermediate

See also: PetscDS, PetscDSSetJacobian(), PetscDSSetDynamicJacobian(), PetscPointJacFn

External Links

source
PETSc.LibPETSc.PetscDSGetEvaluationArrays — Method
u::Ptr{PetscScalar},u_t::Ptr{PetscScalar},u_x::Ptr{PetscScalar} = PetscDSGetEvaluationArrays(petsclib::PetscLibType, prob::PetscDS)

Get scratch arrays used to evaluate fields, time derivatives, and field gradients at quadrature points.

Not Collective

Input Parameter:

  • prob - the PetscDS

Output Parameters:

  • u - array for the field values, or NULL if not needed
  • u_t - array for the field time derivatives, or NULL if not needed
  • u_x - array for the field gradients, or NULL if not needed

Level: developer

See also: PetscDS, PetscDSGetWeakFormArrays(), PetscDSGetWorkspace()

External Links

source
PETSc.LibPETSc.PetscDSGetExactSolution — Method
sol::Ptr{Cvoid},ctx::Ptr{Cvoid} = PetscDSGetExactSolution(petsclib::PetscLibType, prob::PetscDS, f::PetscInt)

Get the pointwise exact solution function for a given test field

Not Collective

Input Parameters:

  • prob - The PetscDS
  • f - The test field number

Output Parameters:

  • sol - exact solution function for the test field, see PetscPointExactSolutionFn
  • ctx - exact solution context

Level: intermediate

See also: PetscDS, PetscPointExactSolutionFn, PetscDSSetExactSolution(), PetscDSGetExactSolutionTimeDerivative()

External Links

source
PETSc.LibPETSc.PetscDSGetExactSolutionTimeDerivative — Method
sol::Ptr{Cvoid},ctx::Ptr{Cvoid} = PetscDSGetExactSolutionTimeDerivative(petsclib::PetscLibType, prob::PetscDS, f::PetscInt)

Get the pointwise time derivative of the exact solution function for a given test field

Not Collective

Input Parameters:

  • prob - The PetscDS
  • f - The test field number

Output Parameters:

  • sol - time derivative of the exact solution for the test field, see PetscPointExactSolutionFn
  • ctx - the exact solution context

Level: intermediate

See also: PetscDS, PetscPointExactSolutionFn, PetscDSSetExactSolutionTimeDerivative(), PetscDSGetExactSolution()

External Links

source
PETSc.LibPETSc.PetscDSGetFaceTabulation — Method
Tf::Ptr{PetscTabulation} = PetscDSGetFaceTabulation(petsclib::PetscLibType, prob::PetscDS)

Return the basis tabulation at quadrature points on the faces

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • Tf - The basis function and derivative tabulation on each local face at quadrature points for each field

Level: intermediate

See also: PetscTabulation, PetscDS, PetscDSGetTabulation(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetFieldIndex — Method
f::PetscInt = PetscDSGetFieldIndex(petsclib::PetscLibType, prob::PetscDS, disc)

Returns the index of the given field

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • disc - The discretization object

Output Parameter:

  • f - The field number

Level: beginner

See also: PetscDS, PetscGetDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetFieldOffset — Method
off::PetscInt = PetscDSGetFieldOffset(petsclib::PetscLibType, prob::PetscDS, f::PetscInt)

Returns the offset of the given field in the full space basis

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • f - The field number

Output Parameter:

  • off - The offset

Level: beginner

See also: PetscDS, PetscDSGetFieldSize(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetFieldOffsetCohesive — Method
off::PetscInt = PetscDSGetFieldOffsetCohesive(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Returns the offset of the given field in the full space basis on a cohesive cell

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • f - The field number

Output Parameter:

  • off - The offset

Level: beginner

See also: PetscDS, PetscDSGetFieldSize(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetFieldSize — Method
size::PetscInt = PetscDSGetFieldSize(petsclib::PetscLibType, prob::PetscDS, f::PetscInt)

Returns the size of the given field in the full space basis

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • f - The field number

Output Parameter:

  • size - The size

Level: beginner

See also: PetscDS, PetscDSGetFieldOffset(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetForceQuad — Method
forceQuad::PetscBool = PetscDSGetForceQuad(petsclib::PetscLibType, ds::PetscDS)

Returns the flag to force matching quadratures among the field discretizations

Not collective

Input Parameter:

  • ds - The PetscDS object

Output Parameter:

  • forceQuad - The flag

Level: intermediate

See also: PetscDS, PetscDSSetForceQuad(), PetscDSGetDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetHeightSubspace — Method
subprob::PetscDS = PetscDSGetHeightSubspace(petsclib::PetscLibType, prob::PetscDS, height::PetscInt)

Get the PetscDS for the trace subspace at a given height in the mesh.

Not Collective

Input Parameters:

  • prob - the PetscDS
  • height - the height (0 for the ambient cell, 1 for faces, etc.)

Output Parameter:

  • subprob - the PetscDS for the trace subspace; prob itself is returned when height is 0

Level: developer

See also: PetscDS, PetscFE, PetscFEGetHeightSubspace(), PetscDSGetSpatialDimension()

External Links

source
PETSc.LibPETSc.PetscDSGetImplicit — Method
implicit::PetscBool = PetscDSGetImplicit(petsclib::PetscLibType, prob::PetscDS, f::PetscInt)

Returns the flag for implicit solve for this field. This is just a guide for TSARKIMEX

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • f - The field number

Output Parameter:

  • implicit - The flag indicating what kind of solve to use for this field

Level: developer

See also: TSARKIMEX, PetscDS, PetscDSSetImplicit(), PetscDSSetDiscretization(), PetscDSAddDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetJacobian — Method
g0::Ptr{Cvoid},g1::Ptr{Cvoid},g2::Ptr{Cvoid},g3::Ptr{Cvoid} = PetscDSGetJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt)

Get the pointwise Jacobian function for given test and basis field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number

Output Parameters:

  • g0 - integrand for the test and basis function term, see PetscPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscPointJacFn

Level: intermediate

See also: PetscDS, PetscDSSetJacobian(), PetscPointJacFn

External Links

source
PETSc.LibPETSc.PetscDSGetJacobianPreconditioner — Method
g0::Ptr{Cvoid},g1::Ptr{Cvoid},g2::Ptr{Cvoid},g3::Ptr{Cvoid} = PetscDSGetJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt)

Get the pointwise Jacobian function for given test and basis field that constructs the matrix used to compute the preconditioner. If this is missing, the system matrix is used to build the preconditioner.

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number

Output Parameters:

  • g0 - integrand for the test and basis function term, see PetscPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscPointJacFn

Level: intermediate

See also: PetscDS, PetscDSSetJacobianPreconditioner(), PetscDSGetJacobian(), PetscPointJacFn

External Links

source
PETSc.LibPETSc.PetscDSGetJetDegree — Method
k::PetscInt = PetscDSGetJetDegree(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Returns the highest derivative for this field equation, or the k-jet that the discretization needs to tabulate.

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • f - The field number

Output Parameter:

  • k - The highest derivative we need to tabulate

Level: developer

See also: PetscDS, PetscDSSetJetDegree(), PetscDSSetDiscretization(), PetscDSAddDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetLowerBound — Method
lb::Ptr{Cvoid},ctx::Ptr{Cvoid} = PetscDSGetLowerBound(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Get the pointwise lower bound function for a given field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The field number

Output Parameters:

  • lb - lower bound function for the field, see PetscPointBoundFn
  • ctx - lower bound context that was set with PetscDSSetLowerBound()

Level: intermediate

See also: PetscDS, PetscPointBoundFn, PetscDSSetLowerBound(), PetscDSGetUpperBound(), PetscDSGetExactSolution()

External Links

source
PETSc.LibPETSc.PetscDSGetNumBoundary — Method
numBd::PetscInt = PetscDSGetNumBoundary(petsclib::PetscLibType, ds::PetscDS)

Get the number of registered boundary conditions

Input Parameter:

  • ds - The PetscDS object

Output Parameter:

  • numBd - The number of boundary conditions

Level: intermediate

See also: PetscDS, PetscDSAddBoundary(), PetscDSGetBoundary()

External Links

source
PETSc.LibPETSc.PetscDSGetNumCohesive — Method
numCohesive::PetscInt = PetscDSGetNumCohesive(petsclib::PetscLibType, ds::PetscDS)

Returns the number of cohesive fields, meaning those defined on the interior of a cohesive cell

Not Collective

Input Parameter:

  • ds - The PetscDS object

Output Parameter:

  • numCohesive - The number of cohesive fields

Level: developer

See also: PetscDS, PetscDSSetCohesive(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetNumFields — Method
Nf::PetscInt = PetscDSGetNumFields(petsclib::PetscLibType, prob::PetscDS)

Returns the number of fields in the PetscDS

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • Nf - The number of fields

Level: beginner

See also: PetscDS, PetscDSGetSpatialDimension(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetObjective — Method
obj::Ptr{Cvoid} = PetscDSGetObjective(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Get the pointwise objective function for a given test field that was provided with PetscDSSetObjective()

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number

Output Parameter:

  • obj - integrand for the test function term, see PetscPointFn

Level: intermediate

See also: PetscPointFn, PetscDS, PetscDSSetObjective(), PetscDSGetResidual()

External Links

source
PETSc.LibPETSc.PetscDSGetQuadrature — Method
q::PetscQuadrature = PetscDSGetQuadrature(petsclib::PetscLibType, prob::PetscDS)

Returns the quadrature, which must agree for all fields in the PetscDS

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • q - The quadrature object

Level: intermediate

See also: PetscDS, PetscQuadrature, PetscDSSetImplicit(), PetscDSSetDiscretization(), PetscDSAddDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetRHSResidual — Method
f0::Ptr{Cvoid},f1::Ptr{Cvoid} = PetscDSGetRHSResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Get the pointwise RHS residual function for explicit timestepping for a given test field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number

Output Parameters:

  • f0 - integrand for the test function term, see PetscPointFn
  • f1 - integrand for the test function gradient term, see PetscPointFn

Level: intermediate

See also: PetscPointFn, PetscDS, PetscDSSetRHSResidual()

External Links

source
PETSc.LibPETSc.PetscDSGetResidual — Method
f0::Ptr{Cvoid},f1::Ptr{Cvoid} = PetscDSGetResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Get the pointwise residual function for a given test field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number

Output Parameters:

  • f0 - integrand for the test function term, see PetscPointFn
  • f1 - integrand for the test function gradient term, see PetscPointFn

Level: intermediate

See also: PetscPointFn, PetscDS, PetscDSSetResidual()

External Links

source
PETSc.LibPETSc.PetscDSGetRiemannSolver — Method
r::Ptr{Cvoid} = PetscDSGetRiemannSolver(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Returns the Riemann solver for the given field

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • f - The field number

Output Parameter:

  • r - Riemann solver, see PetscRiemannFn

Level: intermediate

See also: PetscDS, PetscRiemannFn, PetscDSSetRiemannSolver()

External Links

source
PETSc.LibPETSc.PetscDSGetSpatialDimension — Method
dim::PetscInt = PetscDSGetSpatialDimension(petsclib::PetscLibType, prob::PetscDS)

Returns the spatial dimension of the PetscDS, meaning the topological dimension of the discretizations

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • dim - The spatial dimension

Level: beginner

See also: PetscDS, PetscDSGetCoordinateDimension(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetTabulation — Method
T::Ptr{PetscTabulation} = PetscDSGetTabulation(petsclib::PetscLibType, prob::PetscDS)

Return the basis tabulation at quadrature points for the volume discretization

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • T - The basis function and derivatives tabulation at quadrature points for each field, see PetscTabulation for its details

Level: intermediate

See also: PetscDS, PetscTabulation, PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetTotalComponents — Method
Nc::PetscInt = PetscDSGetTotalComponents(petsclib::PetscLibType, prob::PetscDS)

Returns the total number of components in this system

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • Nc - The total number of components

Level: beginner

See also: PetscDS, PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetTotalDimension — Method
dim::PetscInt = PetscDSGetTotalDimension(petsclib::PetscLibType, prob::PetscDS)

Returns the total size of the approximation space for this system

Not Collective

Input Parameter:

  • prob - The PetscDS object

Output Parameter:

  • dim - The total problem dimension

Level: beginner

See also: PetscDS, PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetType — Method
name::String = PetscDSGetType(petsclib::PetscLibType, prob::PetscDS)

Gets the PetscDSType name (as a string) from the PetscDS

Not Collective; No Fortran Support

Input Parameter:

  • prob - The PetscDS

Output Parameter:

  • name - The PetscDSType name

Level: intermediate

See also: PetscDSType, PetscDS, PetscDSSetType(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetUpdate — Method
update::Ptr{Cvoid} = PetscDSGetUpdate(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Get the pointwise update function for a given field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The field number

Output Parameter:

  • update - update function, see PetscPointFn

Level: intermediate

See also: PetscDS, PetscPointFn, PetscDSSetUpdate(), PetscDSSetResidual()

External Links

source
PETSc.LibPETSc.PetscDSGetUpperBound — Method
ub::Ptr{Cvoid},ctx::Ptr{Cvoid} = PetscDSGetUpperBound(petsclib::PetscLibType, ds::PetscDS, f::PetscInt)

Get the pointwise upper bound function for a given field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The field number

Output Parameters:

  • ub - upper bound function for the field, see PetscPointBoundFn
  • ctx - upper bound context that was set with PetscDSSetUpperBound()

Level: intermediate

See also: PetscDS, PetscPointBoundFn, PetscDSSetUpperBound(), PetscDSGetLowerBound(), PetscDSGetExactSolution()

External Links

source
PETSc.LibPETSc.PetscDSGetWeakForm — Method
wf::PetscWeakForm = PetscDSGetWeakForm(petsclib::PetscLibType, ds::PetscDS)

Returns the weak form object from within the PetscDS

Not Collective

Input Parameter:

  • ds - The PetscDS object

Output Parameter:

  • wf - The weak form object

Level: beginner

See also: PetscWeakForm, PetscDSSetWeakForm(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSGetWorkspace — Method
x::Ptr{PetscReal},basisReal::Ptr{PetscScalar},basisDerReal::Ptr{PetscScalar},testReal::Ptr{PetscScalar},testDerReal::Ptr{PetscScalar} = PetscDSGetWorkspace(petsclib::PetscLibType, prob::PetscDS)

Get scratch storage used during discretization computations.

Not Collective

Input Parameter:

  • prob - the PetscDS

Output Parameters:

  • x - array for real-valued quadrature point coordinates, or NULL if not needed
  • basisReal - array for the real-valued basis function values, or NULL if not needed
  • basisDerReal - array for the real-valued basis function derivatives, or NULL if not needed
  • testReal - array for the real-valued test function values, or NULL if not needed
  • testDerReal - array for the real-valued test function derivatives, or NULL if not needed

Level: developer

See also: PetscDS, PetscDSGetEvaluationArrays(), PetscDSGetWeakFormArrays()

External Links

source
PETSc.LibPETSc.PetscDSHasBdJacobian — Method
hasBdJac::PetscBool = PetscDSHasBdJacobian(petsclib::PetscLibType, ds::PetscDS)

Indicates that boundary Jacobian functions have been set

Not Collective

Input Parameter:

  • ds - The PetscDS

Output Parameter:

  • hasBdJac - flag that pointwise function for the boundary Jacobian has been set

Level: intermediate

See also: PetscDS, PetscDSHasJacobian(), PetscDSSetBdJacobian(), PetscDSGetBdJacobian()

External Links

source
PETSc.LibPETSc.PetscDSHasBdJacobianPreconditioner — Method
hasBdJacPre::PetscBool = PetscDSHasBdJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS)

Signals that boundary Jacobian preconditioner functions have been set with PetscDSSetBdJacobianPreconditioner()

Not Collective

Input Parameter:

  • ds - The PetscDS

Output Parameter:

  • hasBdJacPre - flag that pointwise function for the boundary Jacobian matrix to construct the preconditioner has been set

Level: intermediate

See also: PetscDS, PetscDSHasJacobian(), PetscDSSetBdJacobian(), PetscDSGetBdJacobian()

External Links

source
PETSc.LibPETSc.PetscDSHasDynamicJacobian — Method
hasDynJac::PetscBool = PetscDSHasDynamicJacobian(petsclib::PetscLibType, ds::PetscDS)

Signals that a dynamic Jacobian, dF/du_t, has been set

Not Collective

Input Parameter:

  • ds - The PetscDS

Output Parameter:

  • hasDynJac - flag that pointwise function for dynamic Jacobian has been set

Level: intermediate

See also: PetscDS, PetscDSGetDynamicJacobian(), PetscDSSetDynamicJacobian(), PetscDSGetJacobian()

External Links

source
PETSc.LibPETSc.PetscDSHasJacobian — Method
hasJac::PetscBool = PetscDSHasJacobian(petsclib::PetscLibType, ds::PetscDS)

Checks that the Jacobian functions have been set

Not Collective

Input Parameter:

  • ds - The PetscDS

Output Parameter:

  • hasJac - flag that indicates the pointwise function for the Jacobian has been set

Level: intermediate

See also: PetscDS, PetscDSGetJacobianPreconditioner(), PetscDSSetJacobianPreconditioner(), PetscDSGetJacobian()

External Links

source
PETSc.LibPETSc.PetscDSHasJacobianPreconditioner — Method
hasJacPre::PetscBool = PetscDSHasJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS)

Checks if a Jacobian matrix for constructing a preconditioner has been set

Not Collective

Input Parameter:

  • ds - The PetscDS

Output Parameter:

  • hasJacPre - the flag

Level: intermediate

See also: PetscDS, PetscDSGetJacobianPreconditioner(), PetscDSSetJacobianPreconditioner(), PetscDSGetJacobian()

External Links

source
PETSc.LibPETSc.PetscDSInitializePackage — Method
PetscDSInitializePackage(petsclib::PetscLibType)

This function initializes everything in the PetscDS package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to PetscDSCreate() when using static libraries.

Level: developer

See also: PetscInitialize()

External Links

source
PETSc.LibPETSc.PetscDSIsCohesive — Method
isCohesive::PetscBool = PetscDSIsCohesive(petsclib::PetscLibType, ds::PetscDS)

Returns the flag indicating that this PetscDS is for a cohesive cell

Not Collective

Input Parameter:

  • ds - The PetscDS object

Output Parameter:

  • isCohesive - The flag

Level: developer

See also: PetscDS, PetscDSGetNumCohesive(), PetscDSGetCohesive(), PetscDSSetCohesive(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSPermuteQuadPoint — Method
qperm::PetscInt = PetscDSPermuteQuadPoint(petsclib::PetscLibType, ds::PetscDS, ornt::PetscInt, field::PetscInt, q::PetscInt)

Permute a quadrature point index according to a cell orientation.

Not Collective

Input Parameters:

  • ds - the PetscDS
  • ornt - the cell orientation, in [-Na, Na) where Na is half the number of arrangements for the cell type
  • field - the field number whose quadrature is used
  • q - the input quadrature point index in [0, Nq)

Output Parameter:

  • qperm - the permuted quadrature point index

Level: developer

See also: PetscDS, PetscQuadrature, PetscQuadratureComputePermutations(), DMPolytopeTypeGetNumArrangements()

External Links

source
PETSc.LibPETSc.PetscDSRegister — Method
PetscDSRegister(petsclib::PetscLibType, sname::String, fnc::external)

Adds a new PetscDS implementation

Not Collective; No Fortran Support

Input Parameters:

  • sname - The name of a new user-defined creation routine
  • function - The creation routine itself

See also: PetscDSType, PetscDS, PetscDSRegisterAll(), PetscDSRegisterDestroy()

External Links

source
PETSc.LibPETSc.PetscDSSelectDiscretizations — Method
PetscDSSelectDiscretizations(petsclib::PetscLibType, prob::PetscDS, numFields::PetscInt, fields::Vector{PetscInt}, minDegree::PetscInt, maxDegree::PetscInt, newprob::PetscDS)

Copy discretizations to the new PetscDS with different field layout

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • numFields - Number of new fields
  • fields - Old field number for each new field
  • minDegree - Minimum degree for a discretization, or PETSC_DETERMINE for no limit
  • maxDegree - Maximum degree for a discretization, or PETSC_DETERMINE for no limit

Output Parameter:

  • newprob - The PetscDS copy

Level: intermediate

See also: PetscDS, PetscDSSelectEquations(), PetscDSCopyBoundary(), PetscDSSetResidual(), PetscDSSetJacobian(), PetscDSSetRiemannSolver(), PetscDSSetBdResidual(), PetscDSSetBdJacobian(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSelectEquations — Method
PetscDSSelectEquations(petsclib::PetscLibType, prob::PetscDS, numFields::PetscInt, fields::Vector{PetscInt}, newprob::PetscDS)

Copy pointwise function pointers to the new PetscDS with different field layout

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • numFields - Number of new fields
  • fields - Old field number for each new field

Output Parameter:

  • newprob - The PetscDS copy

Level: intermediate

See also: PetscDS, PetscDSSelectDiscretizations(), PetscDSCopyBoundary(), PetscDSSetResidual(), PetscDSSetJacobian(), PetscDSSetRiemannSolver(), PetscDSSetBdResidual(), PetscDSSetBdJacobian(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetBdJacobian — Method
PetscDSSetBdJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::Ptr{Cvoid}, g1::Ptr{Cvoid}, g2::Ptr{Cvoid}, g3::Ptr{Cvoid})

Set the pointwise boundary Jacobian function for given test and basis field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number
  • g0 - integrand for the test and basis function term, see PetscBdPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscBdPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscBdPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscBdPointJacFn

Level: intermediate

See also: PetscDS, PetscBdPointJacFn, PetscDSGetBdJacobian()

External Links

source
PETSc.LibPETSc.PetscDSSetBdJacobianPreconditioner — Method
PetscDSSetBdJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::Ptr{Cvoid}, g1::Ptr{Cvoid}, g2::Ptr{Cvoid}, g3::Ptr{Cvoid})

Set the pointwise boundary Jacobian preconditioner function for given test and basis field that constructs the matrix used to construct the preconditioner

Not Collective; No Fortran Support

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number
  • g0 - integrand for the test and basis function term, see PetscBdPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscBdPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscBdPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscBdPointJacFn

Level: intermediate

See also: PetscDS, PetscBdPointJacFn, PetscDSGetBdJacobianPreconditioner()

External Links

source
PETSc.LibPETSc.PetscDSSetBdResidual — Method
PetscDSSetBdResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, f0::Ptr{Cvoid}, f1::Ptr{Cvoid})

Get the pointwise boundary residual function for a given test field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • f0 - boundary integrand for the test function term, see PetscBdPointFn
  • f1 - boundary integrand for the test function gradient term, see PetscBdPointFn

Level: intermediate

See also: PetscDS, PetscBdPointFn, PetscDSGetBdResidual()

External Links

source
PETSc.LibPETSc.PetscDSSetCellParameters — Method
PetscDSSetCellParameters(petsclib::PetscLibType, ds::PetscDS, volume::PetscReal)

Set the parameters for a particular cell

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • volume - The cell volume

Level: intermediate

See also: PetscDS, PetscDSSetConstants(), PetscDSGetConstants(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetCohesive — Method
PetscDSSetCohesive(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, isCohesive::PetscBool)

Set the flag indicating that a field is cohesive, meaning it is defined on the interior of a cohesive cell

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • f - The field index
  • isCohesive - The flag for a cohesive field

Level: developer

See also: PetscDS, PetscDSGetCohesive(), PetscDSIsCohesive(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetConstants — Method
PetscDSSetConstants(petsclib::PetscLibType, ds::PetscDS, numConstants::PetscInt, constants::Vector{PetscScalar})

Set the array of constants passed to point functions from a PetscDS

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • numConstants - The number of constants
  • constants - The array of constants, NULL if there are none

Level: intermediate

See also: PetscDS, PetscDSGetConstants(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetContext — Method
PetscDSSetContext(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, ctx::Ptr{Cvoid})

Sets the context that is passed back to some of the pointwise function callbacks used by this PetscDS

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The field number
  • ctx - the context

Level: intermediate

See also: PetscDS, PetscPointFn, PetscDSGetContext()

External Links

source
PETSc.LibPETSc.PetscDSSetCoordinateDimension — Method
PetscDSSetCoordinateDimension(petsclib::PetscLibType, prob::PetscDS, dimEmbed::PetscInt)

Set the coordinate dimension of the PetscDS, meaning the dimension of the space into which the discretiaztions are embedded

Logically Collective

Input Parameters:

  • prob - The PetscDS object
  • dimEmbed - The coordinate dimension

Level: beginner

See also: PetscDS, PetscDSGetCoordinateDimension(), PetscDSGetSpatialDimension(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetDiscretization — Method
PetscDSSetDiscretization(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, disc)

Sets the discretization object for the given field

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • f - The field number
  • disc - The discretization object, this can be a PetscFE or a PetscFV

Level: beginner

See also: PetscDS, PetscFE, PetscFV, PetscDSGetDiscretization(), PetscDSAddDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetDynamicJacobian — Method
PetscDSSetDynamicJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::Ptr{Cvoid}, g1::Ptr{Cvoid}, g2::Ptr{Cvoid}, g3::Ptr{Cvoid})

Set the pointwise dynamic Jacobian, dF/du_t, function for given test and basis fields

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number
  • g0 - integrand for the test and basis function term, see PetscPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscPointJacFn

Level: intermediate

See also: PetscDS, PetscDSGetDynamicJacobian(), PetscDSGetJacobian(), PetscPointJacFn

External Links

source
PETSc.LibPETSc.PetscDSSetExactSolution — Method
PetscDSSetExactSolution(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, sol::Ptr{Cvoid}, ctx::Ptr{Cvoid})

Set the pointwise exact solution function for a given test field

Not Collective

Input Parameters:

  • prob - The PetscDS
  • f - The test field number
  • sol - solution function for the test fields, see PetscPointExactSolutionFn
  • ctx - solution context or NULL

Level: intermediate

See also: PetscDS, PetscPointExactSolutionFn, PetscDSGetExactSolution()

External Links

source
PETSc.LibPETSc.PetscDSSetExactSolutionTimeDerivative — Method
PetscDSSetExactSolutionTimeDerivative(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, sol::Ptr{Cvoid}, ctx::Ptr{Cvoid})

Set the pointwise time derivative of the exact solution function for a given test field

Not Collective

Input Parameters:

  • prob - The PetscDS
  • f - The test field number
  • sol - time derivative of the solution function for the test fields, see PetscPointExactSolutionFn
  • ctx - the solution context or NULL

Level: intermediate

See also: PetscDS, PetscPointExactSolutionFn, PetscDSGetExactSolutionTimeDerivative(), PetscDSSetExactSolution()

External Links

source
PETSc.LibPETSc.PetscDSSetForceQuad — Method
PetscDSSetForceQuad(petsclib::PetscLibType, ds::PetscDS, forceQuad::PetscBool)

Set the flag to force matching quadratures among the field discretizations

Logically collective on ds

Input Parameters:

  • ds - The PetscDS object
  • forceQuad - The flag

Level: intermediate

See also: PetscDS, PetscDSGetForceQuad(), PetscDSGetDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetFromOptions — Method
PetscDSSetFromOptions(petsclib::PetscLibType, prob::PetscDS)

sets parameters in a PetscDS from the options database

Collective

Input Parameter:

  • prob - the PetscDS object to set options for

Options Database Keys:

  • -petscds_type type - Set the PetscDS type
  • -petscds_view - View the PetscDS
  • -petscds_jac_pre (true|false) - Turn formation of a separate Jacobian preconditioner on or off
  • -bc_NAME ids - comma separated list of label ids for the boundary condition NAME
  • -bc_NAME_comp comps - comma separated list of field components to constrain for the boundary condition NAME

Level: intermediate

See also: PetscDS, PetscDSView()

External Links

source
PETSc.LibPETSc.PetscDSSetImplicit — Method
PetscDSSetImplicit(petsclib::PetscLibType, prob::PetscDS, f::PetscInt, implicit::PetscBool)

Set the flag for implicit solve for this field. This is just a guide for TSARKIMEX

Not Collective

Input Parameters:

  • prob - The PetscDS object
  • f - The field number
  • implicit - The flag indicating what kind of solve to use for this field

Level: developer

See also: TSARKIMEX, PetscDSGetImplicit(), PetscDSSetDiscretization(), PetscDSAddDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetIntegrationParameters — Method
PetscDSSetIntegrationParameters(petsclib::PetscLibType, ds::PetscDS, fieldI::PetscInt, fieldJ::PetscInt)

Set the parameters for a particular integration

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • fieldI - The test field for a given point function, or PETSC_DETERMINE
  • fieldJ - The basis field for a given point function, or PETSC_DETERMINE

Level: intermediate

See also: PetscDS, PetscDSSetConstants(), PetscDSGetConstants(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetJacobian — Method
PetscDSSetJacobian(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::Ptr{Cvoid}, g1::Ptr{Cvoid}, g2::Ptr{Cvoid}, g3::Ptr{Cvoid})

Set the pointwise Jacobian function for given test and basis fields

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number
  • g0 - integrand for the test and basis function term, see PetscPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscPointJacFn

Level: intermediate

See also: PetscDS, PetscDSGetJacobian(), PetscPointJacFn

External Links

source
PETSc.LibPETSc.PetscDSSetJacobianPreconditioner — Method
PetscDSSetJacobianPreconditioner(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, g::PetscInt, g0::Ptr{Cvoid}, g1::Ptr{Cvoid}, g2::Ptr{Cvoid}, g3::Ptr{Cvoid})

Set the pointwise Jacobian function for given test and basis fields that constructs the matrix used to compute the preconditioner. If this is missing, the system matrix is used to build the preconditioner.

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • g - The field number
  • g0 - integrand for the test and basis function term, see PetscPointJacFn
  • g1 - integrand for the test function and basis function gradient term, see PetscPointJacFn
  • g2 - integrand for the test function gradient and basis function term, see PetscPointJacFn
  • g3 - integrand for the test function gradient and basis function gradient term, see PetscPointJacFn

Level: intermediate

See also: PetscDS, PetscDSGetJacobianPreconditioner(), PetscDSSetJacobian(), PetscPointJacFn

External Links

source
PETSc.LibPETSc.PetscDSSetJetDegree — Method
PetscDSSetJetDegree(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, k::PetscInt)

Set the highest derivative for this field equation, or the k-jet that the discretization needs to tabulate.

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • f - The field number
  • k - The highest derivative we need to tabulate

Level: developer

See also: PetscDS, PetscDSGetJetDegree(), PetscDSSetDiscretization(), PetscDSAddDiscretization(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetLowerBound — Method
PetscDSSetLowerBound(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, lb::Ptr{Cvoid}, ctx::Ptr{Cvoid})

Set the pointwise lower bound function for a given field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The field number
  • lb - lower bound function for the test fields, see PetscPointBoundFn
  • ctx - lower bound context or NULL which will be passed to lb

Level: intermediate

See also: PetscDS, PetscPointBoundFn, PetscDSGetLowerBound(), PetscDSGetUpperBound(), PetscDSGetExactSolution()

External Links

source
PETSc.LibPETSc.PetscDSSetObjective — Method
PetscDSSetObjective(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, obj::Ptr{Cvoid})

Set the pointwise objective function for a given test field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • obj - integrand for the test function term, see PetscPointFn

Level: intermediate

See also: PetscPointFn, PetscDS, PetscDSGetObjective(), PetscDSSetResidual()

External Links

source
PETSc.LibPETSc.PetscDSSetRHSResidual — Method
PetscDSSetRHSResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, f0::Ptr{Cvoid}, f1::Ptr{Cvoid})

Set the pointwise residual function for explicit timestepping for a given test field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • f0 - integrand for the test function term, see PetscPointFn
  • f1 - integrand for the test function gradient term, see PetscPointFn

Level: intermediate

See also: PetscDS, PetscDSGetResidual()

External Links

source
PETSc.LibPETSc.PetscDSSetResidual — Method
PetscDSSetResidual(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, f0::Ptr{Cvoid}, f1::Ptr{Cvoid})

Set the pointwise residual function for a given test field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The test field number
  • f0 - integrand for the test function term, see PetscPointFn
  • f1 - integrand for the test function gradient term, see PetscPointFn

Level: intermediate

See also: PetscPointFn, PetscDS, PetscDSGetResidual()

External Links

source
PETSc.LibPETSc.PetscDSSetRiemannSolver — Method
PetscDSSetRiemannSolver(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, r::Ptr{Cvoid})

Sets the Riemann solver for the given field

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • f - The field number
  • r - Riemann solver, see PetscRiemannFn

Level: intermediate

See also: PetscDS, PetscRiemannFn, PetscDSGetRiemannSolver()

External Links

source
PETSc.LibPETSc.PetscDSSetType — Method
PetscDSSetType(petsclib::PetscLibType, prob::PetscDS, name::String)

Builds a particular PetscDS

Collective; No Fortran Support

Input Parameters:

  • prob - The PetscDS object
  • name - The PetscDSType

Options Database Key:

  • -petscds_type type - Sets the PetscDS type; use -help for a list of available types

Level: intermediate

See also: PetscDSType, PetscDS, PetscDSGetType(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSSetUp — Method
PetscDSSetUp(petsclib::PetscLibType, prob::PetscDS)

Construct data structures for the PetscDS

Collective

Input Parameter:

  • prob - the PetscDS object to setup

Level: developer

See also: PetscDS, PetscDSView(), PetscDSDestroy()

External Links

source
PETSc.LibPETSc.PetscDSSetUpdate — Method
PetscDSSetUpdate(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, update::Ptr{Cvoid})

Set the pointwise update function for a given field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The field number
  • update - update function, see PetscPointFn

Level: intermediate

See also: PetscDS, PetscPointFn, PetscDSGetResidual()

External Links

source
PETSc.LibPETSc.PetscDSSetUpperBound — Method
PetscDSSetUpperBound(petsclib::PetscLibType, ds::PetscDS, f::PetscInt, ub::Ptr{Cvoid}, ctx::Ptr{Cvoid})

Set the pointwise upper bound function for a given field

Not Collective

Input Parameters:

  • ds - The PetscDS
  • f - The field number
  • ub - upper bound function for the test fields, see PetscPointBoundFn
  • ctx - context or NULL that will be passed to ub

Level: intermediate

See also: PetscDS, PetscPointBoundFn, PetscDSGetUpperBound(), PetscDSGetLowerBound(), PetscDSGetExactSolution()

External Links

source
PETSc.LibPETSc.PetscDSSetWeakForm — Method
PetscDSSetWeakForm(petsclib::PetscLibType, ds::PetscDS, wf::PetscWeakForm)

Sets the weak form object to be used by the PetscDS

Not Collective

Input Parameters:

  • ds - The PetscDS object
  • wf - The weak form object

Level: beginner

See also: PetscWeakForm, PetscDSGetWeakForm(), PetscDSGetNumFields(), PetscDSCreate()

External Links

source
PETSc.LibPETSc.PetscDSUpdateBoundary — Method
PetscDSUpdateBoundary(petsclib::PetscLibType, ds::PetscDS, bd::PetscInt, 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})

Change a boundary condition for the model.

Input Parameters:

  • ds - The PetscDS object
  • bd - The boundary condition number
  • type - The type of condition, e.g. DM_BC_ESSENTIAL/DM_BC_ESSENTIAL_FIELD (Dirichlet), or DM_BC_NATURAL (Neumann)
  • name - The boundary condition name
  • label - The label defining constrained points
  • Nv - The number of DMLabel ids for constrained points
  • values - An array of ids for constrained points
  • field - The field to constrain
  • Nc - The number of constrained field components
  • comps - An array of constrained component numbers
  • bcFunc - A pointwise function giving boundary values
  • bcFunc_t - A pointwise function giving the time derivative of the boundary values, or NULL
  • ctx - An optional application context for bcFunc

Level: developer

See also: PetscDS, PetscWeakForm, DMBoundaryConditionType, PetscDSAddBoundary(), PetscDSGetBoundary(), PetscDSGetNumBoundary(), DMLabel

External Links

source
PETSc.LibPETSc.PetscDSUpdateBoundaryLabels — Method
PetscDSUpdateBoundaryLabels(petsclib::PetscLibType, ds::PetscDS, dm::AbstractPetscDM)

Update DMLabel in each boundary condition using the label name and the input DM

Not Collective

Input Parameters:

  • ds - The source PetscDS object
  • dm - The DM holding labels

Level: intermediate

See also: PetscDS, DMBoundary, DM, PetscDSCopyBoundary(), PetscDSCreate(), DMGetLabel()

External Links

source
PETSc.LibPETSc.PetscDSUseJacobianPreconditioner — Method
PetscDSUseJacobianPreconditioner(petsclib::PetscLibType, prob::PetscDS, useJacPre::PetscBool)

Set whether to construct a Jacobian preconditioner

Not Collective

Input Parameters:

  • prob - The PetscDS
  • useJacPre - flag that enables construction of a Jacobian preconditioner

Level: intermediate

See also: PetscDS, PetscDSGetJacobianPreconditioner(), PetscDSSetJacobianPreconditioner(), PetscDSGetJacobian()

External Links

source
PETSc.LibPETSc.PetscDSView — Method
PetscDSView(petsclib::PetscLibType, prob::PetscDS, v::PetscViewer)

Views a PetscDS

Collective

Input Parameters:

  • prob - the PetscDS object to view
  • v - the viewer

Level: developer

See also: PetscDSType, PetscDS, PetscViewer, PetscDSDestroy(), PetscDSViewFromOptions()

External Links

source
PETSc.LibPETSc.PetscDSViewFromOptions — Method
PetscDSViewFromOptions(petsclib::PetscLibType, A::PetscDS, obj, name::String)

View a PetscDS based on values in the options database

Collective

Input Parameters:

  • A - the PetscDS object
  • obj - Optional object that provides the options prefix used in the search of the options database
  • name - command line option

Options Database Key:

  • -name [viewertype][:...] - option name and values. See PetscObjectViewFromOptions() for the possible arguments

Level: intermediate

See also: PetscDSType, PetscDS, PetscDSView(), PetscObjectViewFromOptions(), PetscDSCreate()

External Links

source

PetscSpace

PETSc.LibPETSc.PetscSpaceCreate — Method
sp::PetscSpace = PetscSpaceCreate(petsclib::PetscLibType, comm::MPI_Comm)

Creates an empty PetscSpace object. The type can then be set with PetscSpaceSetType().

Collective

Input Parameter:

  • comm - The communicator for the PetscSpace object

Output Parameter:

  • sp - The PetscSpace object

Level: beginner

See also: PetscSpace, PetscSpaceSetType(), PETSCSPACEPOLYNOMIAL

External Links

source
PETSc.LibPETSc.PetscSpaceCreateSubspace — Method
x::PetscReal,Jx::PetscReal,u::PetscReal,Ju::PetscReal,subspace::PetscSpace = PetscSpaceCreateSubspace(petsclib::PetscLibType, origSpace::PetscSpace, dualSubspace::PetscDualSpace, copymode::PetscCopyMode)

creates a subspace from a an origSpace and its dual dualSubspace

Input Parameters:

  • origSpace - the original PetscSpace
  • dualSubspace - no idea
  • x - no idea
  • Jx - no idea
  • u - no idea
  • Ju - no idea
  • copymode - whether to copy, borrow, or own some of the input arrays I guess

Output Parameter:

  • subspace - the subspace

Level: advanced

See also: PetscSpace, PetscDualSpace, PetscCopyMode, PetscSpaceType

External Links

source
PETSc.LibPETSc.PetscSpaceDestroy — Method
PetscSpaceDestroy(petsclib::PetscLibType, sp::Union{PetscSpace, Ref{PetscSpace}})

Destroys a PetscSpace object

Collective

Input Parameter:

  • sp - the PetscSpace object to destroy

Level: beginner

See also: PetscSpace, PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceEvaluate — Method
PetscSpaceEvaluate(petsclib::PetscLibType, sp::PetscSpace, npoints::PetscInt, points::Vector{PetscReal}, B::Vector{PetscReal}, D::Vector{PetscReal}, H::Vector{PetscReal})

Evaluate the basis functions and their derivatives (jet) at each point

Input Parameters:

  • sp - The PetscSpace
  • npoints - The number of evaluation points, in reference coordinates
  • points - The point coordinates

Output Parameters:

  • B - The function evaluations in a npoints x nfuncs array
  • D - The derivative evaluations in a npoints x nfuncs x dim array
  • H - The second derivative evaluations in a npoints x nfuncs x dim x dim array

Level: beginner

See also: PetscSpace, PetscFECreateTabulation(), PetscFEGetCellTabulation(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceGetDegree — Method
minDegree::PetscInt,maxDegree::PetscInt = PetscSpaceGetDegree(petsclib::PetscLibType, sp::PetscSpace)

Return the polynomial degrees that characterize this space

Input Parameter:

  • sp - The PetscSpace

Output Parameters:

  • minDegree - The degree of the largest polynomial space contained in the space, pass NULL if not needed
  • maxDegree - The degree of the smallest polynomial space containing the space, pass NULL if not needed

Level: intermediate

See also: PetscSpace, PetscSpaceSetDegree(), PetscSpaceGetDimension(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceGetDimension — Method
dim::PetscInt = PetscSpaceGetDimension(petsclib::PetscLibType, sp::PetscSpace)

Return the dimension of this space, i.e. the number of basis vectors

Input Parameter:

  • sp - The PetscSpace

Output Parameter:

  • dim - The dimension

Level: intermediate

See also: PetscSpace, PetscSpaceGetDegree(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceGetHeightSubspace — Method
subsp::PetscSpace = PetscSpaceGetHeightSubspace(petsclib::PetscLibType, sp::PetscSpace, height::PetscInt)

Get the subset of the primal space basis that is supported on a mesh point of a given height.

Not Collective

Input Parameters:

  • sp - the PetscSpace object
  • height - the height of the mesh point for which the subspace is desired

Output Parameter:

  • subsp - the subspace

Level: advanced

See also: PetscDualSpaceGetHeightSubspace(), PetscSpace

External Links

source
PETSc.LibPETSc.PetscSpaceGetNumComponents — Method
Nc::PetscInt = PetscSpaceGetNumComponents(petsclib::PetscLibType, sp::PetscSpace)

Return the number of components for this space

Input Parameter:

  • sp - The PetscSpace

Output Parameter:

  • Nc - The number of components

Level: intermediate

See also: PetscSpace, PetscSpaceSetNumComponents(), PetscSpaceGetNumVariables(), PetscSpaceGetDimension(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceGetNumVariables — Method
n::PetscInt = PetscSpaceGetNumVariables(petsclib::PetscLibType, sp::PetscSpace)

Return the number of variables for this space

Input Parameter:

  • sp - The PetscSpace

Output Parameter:

  • n - The number of variables, e.g. x, y, z...

Level: intermediate

See also: PetscSpace, PetscSpaceSetNumVariables(), PetscSpaceGetNumComponents(), PetscSpaceGetDimension(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceGetType — Method
name::String = PetscSpaceGetType(petsclib::PetscLibType, sp::PetscSpace)

Gets the PetscSpaceType (as a string) from the object.

Not Collective

Input Parameter:

  • sp - The PetscSpace

Output Parameter:

  • name - The PetscSpace type name

Level: intermediate

See also: PetscSpaceType, PetscSpace, PetscSpaceSetType(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpacePTrimmedGetFormDegree — Method
formDegree::PetscInt = PetscSpacePTrimmedGetFormDegree(petsclib::PetscLibType, sp::PetscSpace)

Get the form degree of the trimmed polynomials.

Input Parameter:

  • sp - the function space object

Output Parameter:

  • formDegree - the form degree

Level: intermediate

See also: PetscSpace, PetscDTAltV, PetscDTPTrimmedEvalJet(), PetscSpacePTrimmedSetFormDegree()

External Links

source
PETSc.LibPETSc.PetscSpacePTrimmedSetFormDegree — Method
PetscSpacePTrimmedSetFormDegree(petsclib::PetscLibType, sp::PetscSpace, formDegree::PetscInt)

Set the form degree of the trimmed polynomials.

Input Parameters:

  • sp - the function space object
  • formDegree - the form degree

Options Database Key:

  • -petscspace_ptrimmed_form_degree degree - The trimmed polynomial form degree

Level: intermediate

See also: PetscSpace, PetscDTAltV, PetscDTPTrimmedEvalJet(), PetscSpacePTrimmedGetFormDegree()

External Links

source
PETSc.LibPETSc.PetscSpacePointGetPoints — Method
q::PetscQuadrature = PetscSpacePointGetPoints(petsclib::PetscLibType, sp::PetscSpace)

Gets the evaluation points for the space as the points of a quadrature rule

Logically Collective

Input Parameter:

  • sp - The PetscSpace

Output Parameter:

  • q - The PetscQuadrature defining the points

Level: intermediate

See also: PetscSpace, PetscQuadrature, PetscSpaceCreate(), PetscSpaceSetType()

External Links

source
PETSc.LibPETSc.PetscSpacePointSetPoints — Method
PetscSpacePointSetPoints(petsclib::PetscLibType, sp::PetscSpace, q::PetscQuadrature)

Sets the evaluation points for the space to coincide with the points of a quadrature rule

Logically Collective

Input Parameters:

  • sp - The PetscSpace
  • q - The PetscQuadrature defining the points

Level: intermediate

See also: PetscSpace, PetscQuadrature, PetscSpaceCreate(), PetscSpaceSetType()

External Links

source
PETSc.LibPETSc.PetscSpacePolynomialGetTensor — Method
tensor::PetscBool = PetscSpacePolynomialGetTensor(petsclib::PetscLibType, sp::PetscSpace)

Get whether a function space is a space of tensor polynomials.

Input Parameter:

  • sp - the function space object

Output Parameter:

  • tensor - PETSC_TRUE for a tensor polynomial space, PETSC_FALSE for a polynomial space

Level: intermediate

See also: PetscSpace, PetscSpacePolynomialSetTensor(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpacePolynomialSetTensor — Method
PetscSpacePolynomialSetTensor(petsclib::PetscLibType, sp::PetscSpace, tensor::PetscBool)

Set whether a function space is a space of tensor polynomials.

Input Parameters:

  • sp - the function space object
  • tensor - PETSC_TRUE for a tensor polynomial space, PETSC_FALSE for a polynomial space

Options Database Key:

  • -petscspace_poly_tensor (true|false) - Whether to use tensor product polynomials in higher dimension

Level: intermediate

See also: PetscSpace, PetscSpacePolynomialGetTensor(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpaceRegister — Method
PetscSpaceRegister(petsclib::PetscLibType, sname::String, fnc::external)

Adds a new PetscSpace implementation

Not Collective, No Fortran Support

Input Parameters:

  • sname - The name of a new user-defined creation routine
  • function - The creation routine for the implementation type

See also: PetscSpace, PetscSpaceRegisterAll(), PetscSpaceRegisterDestroy()

External Links

source
PETSc.LibPETSc.PetscSpaceSetDegree — Method
PetscSpaceSetDegree(petsclib::PetscLibType, sp::PetscSpace, degree::PetscInt, maxDegree::PetscInt)

Set the degree of approximation for this space.

Input Parameters:

  • sp - The PetscSpace
  • degree - The degree of the largest polynomial space contained in the space
  • maxDegree - The degree of the largest polynomial space containing the space. One of degree and maxDegree can be PETSC_DETERMINE.

Level: intermediate

See also: PetscSpace, PetscSpaceGetDegree(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceSetFromOptions — Method
PetscSpaceSetFromOptions(petsclib::PetscLibType, sp::PetscSpace)

sets parameters in a PetscSpace from the options database

Collective

Input Parameter:

  • sp - the PetscSpace object to set options for

Options Database Keys:

  • -petscspace_degree deg - the degree of the space
  • -petscspace_variables n - the number of different variables, e.g. x and y
  • -petscspace_components c - the number of components, say d for a vector field

Level: intermediate

See also: PetscSpace, PetscSpaceView()

External Links

source
PETSc.LibPETSc.PetscSpaceSetNumComponents — Method
PetscSpaceSetNumComponents(petsclib::PetscLibType, sp::PetscSpace, Nc::PetscInt)

Set the number of components for this space

Input Parameters:

  • sp - The PetscSpace
  • Nc - The number of components

Level: intermediate

See also: PetscSpace, PetscSpaceGetNumComponents(), PetscSpaceSetNumVariables(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceSetNumVariables — Method
PetscSpaceSetNumVariables(petsclib::PetscLibType, sp::PetscSpace, n::PetscInt)

Set the number of variables for this space

Input Parameters:

  • sp - The PetscSpace
  • n - The number of variables, e.g. x, y, z...

Level: intermediate

See also: PetscSpace, PetscSpaceGetNumVariables(), PetscSpaceSetNumComponents(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceSetType — Method
PetscSpaceSetType(petsclib::PetscLibType, sp::PetscSpace, name::String)

Builds a particular PetscSpace

Collective

Input Parameters:

  • sp - The PetscSpace object
  • name - The kind of space

Options Database Key:

  • -petscspace_type type - Sets the PetscSpace type; use -help for a list of available types

Level: intermediate

See also: PetscSpace, PetscSpaceType, PetscSpaceGetType(), PetscSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscSpaceSetUp — Method
PetscSpaceSetUp(petsclib::PetscLibType, sp::PetscSpace)

Construct data structures for the PetscSpace

Collective

Input Parameter:

  • sp - the PetscSpace object to setup

Level: intermediate

See also: PetscSpace, PetscSpaceView(), PetscSpaceDestroy()

External Links

source
PETSc.LibPETSc.PetscSpaceSumGetConcatenate — Method
concatenate::PetscBool = PetscSpaceSumGetConcatenate(petsclib::PetscLibType, sp::PetscSpace)

Get the concatenate flag for this space.

Input Parameter:

  • sp - the function space object

Output Parameter:

  • concatenate - flag indicating whether subspaces are concatenated.

Level: intermediate

See also: PETSCSPACESUM, PetscSpace, PetscSpaceSumSetConcatenate()

External Links

source
PETSc.LibPETSc.PetscSpaceSumGetInterleave — Method
interleave_basis::PetscBool,interleave_components::PetscBool = PetscSpaceSumGetInterleave(petsclib::PetscLibType, sp::PetscSpace)

Get whether the basis functions and components of a uniform sum are interleaved

Logically collective

Input Parameter:

  • sp - a PetscSpace of type PETSCSPACESUM

Output Parameters:

  • interleave_basis - if PETSC_TRUE, the basis vectors of the subspaces are interleaved
  • interleave_components - if PETSC_TRUE and the space concatenates components (PetscSpaceSumGetConcatenate()),

interleave the concatenated components

Level: developer

See also: PetscSpace, PETSCSPACESUM, PETSCFEVECTOR, PetscSpaceSumSetInterleave()

External Links

source
PETSc.LibPETSc.PetscSpaceSumGetNumSubspaces — Method
numSumSpaces::PetscInt = PetscSpaceSumGetNumSubspaces(petsclib::PetscLibType, sp::PetscSpace)

Get the number of spaces in the sum space

Input Parameter:

  • sp - the function space object

Output Parameter:

  • numSumSpaces - the number of spaces

Level: intermediate

See also: PETSCSPACESUM, PetscSpace, PetscSpaceSumSetNumSubspaces(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpaceSumGetSubspace — Method
subsp::PetscSpace = PetscSpaceSumGetSubspace(petsclib::PetscLibType, sp::PetscSpace, s::PetscInt)

Get a space in the sum space

Input Parameters:

  • sp - the function space object
  • s - The space number

Output Parameter:

  • subsp - the PetscSpace

Level: intermediate

See also: PETSCSPACESUM, PetscSpace, PetscSpaceSumSetSubspace(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpaceSumSetConcatenate — Method
PetscSpaceSumSetConcatenate(petsclib::PetscLibType, sp::PetscSpace, concatenate::PetscBool)

Sets the concatenate flag for this space.

Input Parameters:

  • sp - the function space object
  • concatenate - are subspaces concatenated components (true) or direct summands (false)

Level: intermediate

See also: PETSCSPACESUM, PetscSpace, PetscSpaceSumGetConcatenate()

External Links

source
PETSc.LibPETSc.PetscSpaceSumSetInterleave — Method
PetscSpaceSumSetInterleave(petsclib::PetscLibType, sp::PetscSpace, interleave_basis::PetscBool, interleave_components::PetscBool)

Set whether the basis functions and components of a uniform sum are interleaved

Logically collective

Input Parameters:

  • sp - a PetscSpace of type PETSCSPACESUM
  • interleave_basis - if PETSC_TRUE, the basis vectors of the subspaces are interleaved
  • interleave_components - if PETSC_TRUE and the space concatenates components (PetscSpaceSumGetConcatenate()),

interleave the concatenated components

Level: developer

See also: PetscSpace, PETSCSPACESUM, PETSCFEVECTOR, PetscSpaceSumGetInterleave()

External Links

source
PETSc.LibPETSc.PetscSpaceSumSetNumSubspaces — Method
PetscSpaceSumSetNumSubspaces(petsclib::PetscLibType, sp::PetscSpace, numSumSpaces::PetscInt)

Set the number of spaces in the sum space

Input Parameters:

  • sp - the function space object
  • numSumSpaces - the number of spaces

Level: intermediate

See also: PETSCSPACESUM, PetscSpace, PetscSpaceSumGetNumSubspaces(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpaceSumSetSubspace — Method
PetscSpaceSumSetSubspace(petsclib::PetscLibType, sp::PetscSpace, s::PetscInt, subsp::PetscSpace)

Set a space in the sum space

Input Parameters:

  • sp - the function space object
  • s - The space number
  • subsp - the number of spaces

Level: intermediate

See also: PETSCSPACESUM, PetscSpace, PetscSpaceSumGetSubspace(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpaceTensorGetNumSubspaces — Method
numTensSpaces::PetscInt = PetscSpaceTensorGetNumSubspaces(petsclib::PetscLibType, sp::PetscSpace)

Get the number of spaces in the tensor product space

Input Parameter:

  • sp - the function space object

Output Parameter:

  • numTensSpaces - the number of spaces

Level: intermediate

See also: PETSCSPACETENSOR, PetscSpace, PetscSpaceTensorSetNumSubspaces(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpaceTensorGetSubspace — Method
subsp::PetscSpace = PetscSpaceTensorGetSubspace(petsclib::PetscLibType, sp::PetscSpace, s::PetscInt)

Get a space in the tensor product space

Input Parameters:

  • sp - the function space object
  • s - The space number

Output Parameter:

  • subsp - the PetscSpace

Level: intermediate

See also: PETSCSPACETENSOR, PetscSpace, PetscSpaceTensorSetSubspace(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpaceTensorSetNumSubspaces — Method
PetscSpaceTensorSetNumSubspaces(petsclib::PetscLibType, sp::PetscSpace, numTensSpaces::PetscInt)

Set the number of spaces in the tensor product space

Input Parameters:

  • sp - the function space object
  • numTensSpaces - the number of spaces

Level: intermediate

See also: PETSCSPACETENSOR, PetscSpace, PetscSpaceTensorGetNumSubspaces(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpaceTensorSetSubspace — Method
PetscSpaceTensorSetSubspace(petsclib::PetscLibType, sp::PetscSpace, s::PetscInt, subsp::PetscSpace)

Set a space in the tensor product space

Input Parameters:

  • sp - the function space object
  • s - The space number
  • subsp - the number of spaces

Level: intermediate

See also: PETSCSPACETENSOR, PetscSpace, PetscSpaceTensorGetSubspace(), PetscSpaceSetDegree(), PetscSpaceSetNumVariables()

External Links

source
PETSc.LibPETSc.PetscSpaceView — Method
PetscSpaceView(petsclib::PetscLibType, sp::PetscSpace, v::PetscViewer)

Views a PetscSpace

Collective

Input Parameters:

  • sp - the PetscSpace object to view
  • v - the viewer

Level: beginner

See also: PetscSpace, PetscViewer, PetscSpaceViewFromOptions(), PetscSpaceDestroy()

External Links

source
PETSc.LibPETSc.PetscSpaceViewFromOptions — Method
PetscSpaceViewFromOptions(petsclib::PetscLibType, A::PetscSpace, obj, name::String)

View a PetscSpace based on values in the options database

Collective

Input Parameters:

  • A - the PetscSpace object
  • obj - Optional object that provides the options name prefix
  • name - command line option name

Options Database Key:

  • -name [viewertype][:...] - option name and values. See PetscObjectViewFromOptions() for the possible arguments

Level: intermediate

See also: PetscSpace, PetscSpaceView(), PetscObjectViewFromOptions(), PetscSpaceCreate()

External Links

source

PetscDualSpace

PETSc.LibPETSc.PetscDualSpaceApply — Method
value::PetscScalar = PetscDualSpaceApply(petsclib::PetscLibType, sp::PetscDualSpace, f::PetscInt, time::PetscReal, cgeom::Vector{PetscFEGeom}, numComp::PetscInt, func::external, ctx::Ptr{Cvoid})

Apply a functional from the dual space basis to an input function

Input Parameters:

  • sp - The PetscDualSpace object
  • f - The basis functional index
  • time - The time
  • cgeom - A context with geometric information for this cell, we use v0 (the initial vertex) and J (the Jacobian) (or evaluated at the coordinates of the functional)
  • numComp - The number of components for the function
  • func - The input function
  • ctx - A context for the function

Output Parameter:

  • value - numComp output values

Calling sequence: $PetscErrorCode func(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt numComponents, PetscScalar values[], PetscCtx ctx)$

Level: beginner

See also: PetscDualSpace, PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceApplyAll — Method
spValue::PetscScalar = PetscDualSpaceApplyAll(petsclib::PetscLibType, sp::PetscDualSpace, pointEval::Vector{PetscScalar})

Apply all functionals from the dual space basis to the result of an evaluation at the points returned by PetscDualSpaceGetAllData()

Input Parameters:

  • sp - The PetscDualSpace object
  • pointEval - Evaluation at the points returned by PetscDualSpaceGetAllData()

Output Parameter:

  • spValue - The values of all dual space functionals

Level: advanced

See also: PetscDualSpace, PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceApplyAllDefault — Method
spValue::PetscScalar = PetscDualSpaceApplyAllDefault(petsclib::PetscLibType, sp::PetscDualSpace, pointEval::Vector{PetscScalar})

Apply all functionals from the dual space basis to the result of an evaluation at the points returned by PetscDualSpaceGetAllData()

Input Parameters:

  • sp - The PetscDualSpace object
  • pointEval - Evaluation at the points returned by PetscDualSpaceGetAllData()

Output Parameter:

  • spValue - The values of all dual space functionals

Level: advanced

See also: PetscDualSpace, PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceApplyDefault — Method
value::PetscScalar = PetscDualSpaceApplyDefault(petsclib::PetscLibType, sp::PetscDualSpace, f::PetscInt, time::PetscReal, cgeom::Vector{PetscFEGeom}, Nc::PetscInt, func::external, ctx::Ptr{Cvoid})

Apply a functional from the dual space basis to an input function by assuming a point evaluation functional.

Input Parameters:

  • sp - The PetscDualSpace object
  • f - The basis functional index
  • time - The time
  • cgeom - A context with geometric information for this cell, we use v0 (the initial vertex) and J (the Jacobian)
  • Nc - The number of components for the function
  • func - The input function
  • ctx - A context for the function

Output Parameter:

  • value - The output value

Calling sequence: $PetscErrorCode func(PetscInt dim, PetscReal time, const PetscReal x[],PetscInt numComponents, PetscScalar values[], PetscCtx ctx)$

Level: advanced

See also: PetscDualSpace, PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceApplyFVM — Method
value::PetscScalar = PetscDualSpaceApplyFVM(petsclib::PetscLibType, sp::PetscDualSpace, f::PetscInt, time::PetscReal, cgeom::Vector{PetscFVCellGeom}, Nc::PetscInt, func::external, ctx::Ptr{Cvoid})

Apply a functional from the dual space basis to an input function by assuming a point evaluation functional at the cell centroid.

Input Parameters:

  • sp - The PetscDualSpace object
  • f - The basis functional index
  • time - The time
  • cgeom - A context with geometric information for this cell, we currently just use the centroid
  • Nc - The number of components for the function
  • func - The input function
  • ctx - A context for the function

Output Parameter:

  • value - The output value (scalar)

Calling sequence: $PetscErrorCode func(PetscInt dim, PetscReal time, const PetscReal x[], PetscInt numComponents, PetscScalar values[], PetscCtx ctx)$

Level: advanced

See also: PetscDualSpace, PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceApplyInterior — Method
spValue::PetscScalar = PetscDualSpaceApplyInterior(petsclib::PetscLibType, sp::PetscDualSpace, pointEval::Vector{PetscScalar})

Apply interior functionals from the dual space basis to the result of an evaluation at the points returned by PetscDualSpaceGetInteriorData()

Input Parameters:

  • sp - The PetscDualSpace object
  • pointEval - Evaluation at the points returned by PetscDualSpaceGetInteriorData()

Output Parameter:

  • spValue - The values of interior dual space functionals

Level: advanced

See also: PetscDualSpace, PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceApplyInteriorDefault — Method
spValue::PetscScalar = PetscDualSpaceApplyInteriorDefault(petsclib::PetscLibType, sp::PetscDualSpace, pointEval::Vector{PetscScalar})

Apply interior functionals from the dual space basis to the result of an evaluation at the points returned by PetscDualSpaceGetInteriorData()

Input Parameters:

  • sp - The PetscDualSpace object
  • pointEval - Evaluation at the points returned by PetscDualSpaceGetInteriorData()

Output Parameter:

  • spValue - The values of interior dual space functionals

Level: advanced

See also: PetscDualSpace, PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceCreate — Method
sp::PetscDualSpace = PetscDualSpaceCreate(petsclib::PetscLibType, comm::MPI_Comm)

Creates an empty PetscDualSpace object. The type can then be set with PetscDualSpaceSetType().

Collective

Input Parameter:

  • comm - The communicator for the PetscDualSpace object

Output Parameter:

  • sp - The PetscDualSpace object

Level: beginner

See also: PetscDualSpace, PetscDualSpaceSetType(), PETSCDUALSPACELAGRANGE

External Links

source
PETSc.LibPETSc.PetscDualSpaceCreateAllDataDefault — Method
allNodes::PetscQuadrature,allMat::PetscMat = PetscDualSpaceCreateAllDataDefault(petsclib::PetscLibType, sp::PetscDualSpace)

Create all evaluation nodes and the node-to-dof matrix by examining functionals

Input Parameter:

  • sp - The dualspace

Output Parameters:

  • allNodes - A PetscQuadrature object containing all evaluation nodes
  • allMat - A Mat for the node-to-dof transformation

Level: advanced

See also: PetscDualSpace, PetscDualSpaceCreate(), Mat, PetscQuadrature

External Links

source
PETSc.LibPETSc.PetscDualSpaceCreateInteriorDataDefault — Method
intNodes::PetscQuadrature,intMat::PetscMat = PetscDualSpaceCreateInteriorDataDefault(petsclib::PetscLibType, sp::PetscDualSpace)

Create quadrature points by examining interior functionals and create the matrix mapping quadrature point values to interior dual space values

Input Parameter:

  • sp - The dualspace

Output Parameters:

  • intNodes - A PetscQuadrature object containing all evaluation points needed to evaluate interior degrees of freedom
  • intMat - A matrix that computes dual space values from point values: size [spdim0 x (npoints * nc)], where spdim0 is

the size of the constrained layout (PetscSectionGetConstrainStorageSize()) of the dual space section, npoints is the number of points in allNodes and nc is PetscDualSpaceGetNumComponents().

Level: advanced

See also: PetscDualSpace, PetscQuadrature, Mat, PetscDualSpaceCreate(), PetscDualSpaceGetInteriorData()

External Links

source
PETSc.LibPETSc.PetscDualSpaceCreateSum — Method
sumSpace::PetscDualSpace = PetscDualSpaceCreateSum(petsclib::PetscLibType, numSubspaces::PetscInt, subspaces::Vector{PetscDualSpace}, concatenate::PetscBool)

Create a finite element dual basis that is the sum of other dual bases

Collective

Input Parameters:

  • numSubspaces - the number of spaces that will be added together
  • subspaces - an array of length numSubspaces of spaces
  • concatenate - if PETSC_FALSE, the sum-space has the same components as the individual dual spaces (PetscDualSpaceGetNumComponents()); if PETSC_TRUE, the individual components are concatenated to create a dual space with more components

Output Parameter:

  • sumSpace - a PetscDualSpace of type PETSCDUALSPACESUM

Level: advanced

See also: PetscDualSpace, PETSCDUALSPACESUM, PETSCSPACESUM

External Links

source
PETSc.LibPETSc.PetscDualSpaceDestroy — Method
PetscDualSpaceDestroy(petsclib::PetscLibType, sp::Union{PetscDualSpace, Ref{PetscDualSpace}})

Destroys a PetscDualSpace object

Collective

Input Parameter:

  • sp - the PetscDualSpace object to destroy

Level: beginner

See also: PetscDualSpace, PetscDualSpaceView(), PetscDualSpace(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceDuplicate — Method
spNew::PetscDualSpace = PetscDualSpaceDuplicate(petsclib::PetscLibType, sp::PetscDualSpace)

Creates a duplicate PetscDualSpace object that is not setup.

Collective

Input Parameter:

  • sp - The original PetscDualSpace

Output Parameter:

  • spNew - The duplicate PetscDualSpace

Level: beginner

See also: PetscDualSpace, PetscDualSpaceCreate(), PetscDualSpaceSetType()

External Links

source
PETSc.LibPETSc.PetscDualSpaceEqual — Method
equal::PetscBool = PetscDualSpaceEqual(petsclib::PetscLibType, A::PetscDualSpace, B::PetscDualSpace)

Determine if two dual spaces are equivalent

Input Parameters:

  • A - A PetscDualSpace object
  • B - Another PetscDualSpace object

Output Parameter:

  • equal - PETSC_TRUE if the dual spaces are equivalent

Level: advanced

See also: PetscDualSpace, PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetAllData — Method
allNodes::PetscQuadrature,allMat::PetscMat = PetscDualSpaceGetAllData(petsclib::PetscLibType, sp::PetscDualSpace)

Get all quadrature nodes from this space, and the matrix that sends quadrature node values to degree-of-freedom values

Input Parameter:

  • sp - The dualspace

Output Parameters:

  • allNodes - A PetscQuadrature object containing all evaluation nodes, pass NULL if not needed
  • allMat - A Mat for the node-to-dof transformation, pass NULL if not needed

Level: advanced

See also: PetscQuadrature, PetscDualSpace, PetscDualSpaceCreate(), Mat

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetDM — Method
dm::PetscDM = PetscDualSpaceGetDM(petsclib::PetscLibType, sp::PetscDualSpace)

Get the DM representing the reference cell of a PetscDualSpace

Not Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • dm - The reference cell, that is a DM that consists of a single cell

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceSetDM(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetDeRahm — Method
k::PetscInt = PetscDualSpaceGetDeRahm(petsclib::PetscLibType, dsp::PetscDualSpace)

Get the k-simplex associated with the functionals in this dual space

Input Parameter:

  • dsp - The PetscDualSpace

Output Parameter:

  • k - The simplex dimension

Level: developer

See also: PetscDualSpace, PetscDualSpacePullback(), PetscDualSpacePushforward(), PetscDualSpaceTransform(), PetscDualSpaceTransformType

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetDimension — Method
dim::PetscInt = PetscDualSpaceGetDimension(petsclib::PetscLibType, sp::PetscDualSpace)

Get the dimension of the dual space, i.e. the number of basis functionals

Not Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • dim - The dimension

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceGetFunctional(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetFormDegree — Method
k::PetscInt = PetscDualSpaceGetFormDegree(petsclib::PetscLibType, dsp::PetscDualSpace)

Get the form degree k for the k-form the describes the pushforwards/pullbacks of this dual space's functionals.

Input Parameter:

  • dsp - The PetscDualSpace

Output Parameter:

  • k - The signed degree k of the k. If k >= 0, this means that the degrees of freedom are k-forms, and are stored

in lexicographic order according to the basis of k-forms constructed from the wedge product of 1-forms. So for example, the 1-form basis in 3-D is (dx, dy, dz), and the 2-form basis in 3-D is (dx wedge dy, dx wedge dz, dy wedge dz). If k < 0, this means that the degrees transform as k-forms, but are stored as (N-k) forms according to the Hodge star map. So for example if k = -2 and N = 3, this means that the degrees of freedom transform as 2-forms but are stored as 1-forms.

Level: developer

See also: PetscDualSpace, PetscDTAltV, PetscDualSpacePullback(), PetscDualSpacePushforward(), PetscDualSpaceTransform(), PetscDualSpaceTransformType

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetFunctional — Method
functional::PetscQuadrature = PetscDualSpaceGetFunctional(petsclib::PetscLibType, sp::PetscDualSpace, i::PetscInt)

Get the i-th basis functional in the dual space

Not Collective

Input Parameters:

  • sp - The PetscDualSpace
  • i - The basis number

Output Parameter:

  • functional - The basis functional

Level: intermediate

See also: PetscDualSpace, PetscQuadrature, PetscDualSpaceGetDimension(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetHeightSubspace — Method
subsp::PetscDualSpace = PetscDualSpaceGetHeightSubspace(petsclib::PetscLibType, sp::PetscDualSpace, height::PetscInt)

Get the subset of the dual space basis that is supported on a mesh point of a given height. This assumes that the reference cell is symmetric over points of this height.

Not Collective

Input Parameters:

  • sp - the PetscDualSpace object
  • height - the height of the mesh point for which the subspace is desired

Output Parameter:

  • subsp - the subspace. Note that the functionals in the subspace are with respect to the intrinsic geometry of the

point, which will be of lesser dimension if height > 0.

Level: advanced

See also: PetscDualSpace, PetscSpaceGetHeightSubspace(), PetscDualSpaceGetPointSubspace()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetInteriorData — Method
intNodes::PetscQuadrature,intMat::PetscMat = PetscDualSpaceGetInteriorData(petsclib::PetscLibType, sp::PetscDualSpace)

Get all quadrature points necessary to compute the interior degrees of freedom from this space, as well as the matrix that computes the degrees of freedom from the quadrature values.

Input Parameter:

  • sp - The dualspace

Output Parameters:

  • intNodes - A PetscQuadrature object containing all evaluation points needed to evaluate interior degrees of freedom,

pass NULL if not needed

  • intMat - A matrix that computes dual space values from point values: size [spdim0 x (npoints * nc)], where spdim0 is

the size of the constrained layout (PetscSectionGetConstrainStorageSize()) of the dual space section, npoints is the number of points in intNodes and nc is PetscDualSpaceGetNumComponents(). Pass NULL if not needed

Level: advanced

See also: PetscDualSpace, PetscQuadrature, Mat, PetscDualSpaceCreate(), PetscDualSpaceGetDimension(), PetscDualSpaceGetNumComponents(), PetscQuadratureGetData()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetInteriorDimension — Method
intdim::PetscInt = PetscDualSpaceGetInteriorDimension(petsclib::PetscLibType, sp::PetscDualSpace)

Get the interior dimension of the dual space, i.e. the number of basis functionals assigned to the interior of the reference domain

Not Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • intdim - The dimension

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceGetFunctional(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetInteriorSection — Method
section::PetscSection = PetscDualSpaceGetInteriorSection(petsclib::PetscLibType, sp::PetscDualSpace)

Create a PetscSection over the reference cell with the layout from this space for interior degrees of freedom

Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • section - The interior section

Level: advanced

See also: PetscDualSpace, PetscSection, PetscDualSpaceCreate(), DMPLEX

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetNumComponents — Method
Nc::PetscInt = PetscDualSpaceGetNumComponents(petsclib::PetscLibType, sp::PetscDualSpace)

Return the number of components for this space

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • Nc - The number of components

Level: intermediate

See also: PetscDualSpaceSetNumComponents(), PetscDualSpaceGetDimension(), PetscDualSpaceCreate(), PetscDualSpace

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetNumDof — Method
numDof::Ptr{PetscInt} = PetscDualSpaceGetNumDof(petsclib::PetscLibType, sp::PetscDualSpace)

Get the number of degrees of freedom for each spatial (topological) dimension

Not Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • numDof - An array of length dim+1 which holds the number of dofs for each dimension

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceGetFunctional(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetOrder — Method
order::PetscInt = PetscDualSpaceGetOrder(petsclib::PetscLibType, sp::PetscDualSpace)

Get the order of the dual space

Not Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • order - The order

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceSetOrder(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetPointSubspace — Method
bdsp::PetscDualSpace = PetscDualSpaceGetPointSubspace(petsclib::PetscLibType, sp::PetscDualSpace, point::PetscInt)

Get the subset of the dual space basis that is supported on a particular mesh point.

Not Collective

Input Parameters:

  • sp - the PetscDualSpace object
  • point - the point (in the dual space's DM) for which the subspace is desired

Output Parameter:

  • bdsp - the subspace.

Level: advanced

See also: PetscDualSpace, PetscDualSpaceGetHeightSubspace()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetSection — Method
section::PetscSection = PetscDualSpaceGetSection(petsclib::PetscLibType, sp::PetscDualSpace)

Create a PetscSection over the reference cell with the layout from this space

Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • section - The section

Level: advanced

See also: PetscDualSpace, PetscSection, PetscDualSpaceCreate(), DMPLEX

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetSymmetries — Method
perms::Ptr{PetscInt},flips::Ptr{PetscScalar} = PetscDualSpaceGetSymmetries(petsclib::PetscLibType, sp::PetscDualSpace)

Returns a description of the symmetries of this basis

Not Collective

Input Parameter:

  • sp - the PetscDualSpace object

Output Parameters:

  • perms - Permutations of the interior degrees of freedom, parameterized by the point orientation
  • flips - Sign reversal of the interior degrees of freedom, parameterized by the point orientation

Level: developer

See also: PetscDualSpace

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetType — Method
name::String = PetscDualSpaceGetType(petsclib::PetscLibType, sp::PetscDualSpace)

Gets the PetscDualSpaceType name (as a string) from the object.

Not Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • name - The PetscDualSpaceType name

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceType, PetscDualSpaceSetType(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceGetUniform — Method
uniform::PetscBool = PetscDualSpaceGetUniform(petsclib::PetscLibType, sp::PetscDualSpace)

Whether this dual space is uniform

Not Collective

Input Parameter:

  • sp - A dual space

Output Parameter:

  • uniform - PETSC_TRUE if (a) the dual space is the same for each point in a stratum of the reference DMPLEX, and

(b) every symmetry of each point in the reference DMPLEX is also a symmetry of the point's dual space.

Level: advanced

See also: PetscDualSpace, PetscDualSpaceGetPointSubspace(), PetscDualSpaceGetSymmetries()

External Links

source
PETSc.LibPETSc.PetscDualSpaceLagrangeGetNodeType — Method
nodeType::PetscDTNodeType,boundary::PetscBool,exponent::PetscReal = PetscDualSpaceLagrangeGetNodeType(petsclib::PetscLibType, sp::PetscDualSpace)

Get a description of how nodes are laid out for Lagrange polynomials in this dual space

Not Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameters:

  • nodeType - The type of nodes
  • boundary - Whether the node type is one that includes endpoints (if nodeType is PETSCDTNODES_GAUSSJACOBI, nodes that

include the boundary are Gauss-Lobatto-Jacobi nodes)

  • exponent - If nodeType is PETSCDTNODES_GAUSSJACOBI, indicates the exponent used for both ends of the 1D Jacobi weight function

'0' is Gauss-Legendre, '-0.5' is Gauss-Chebyshev of the first type, '0.5' is Gauss-Chebyshev of the second type

Level: advanced

See also: PETSCDUALSPACELAGRANGE, PetscDualSpace, PetscDTNodeType, PetscDualSpaceLagrangeSetNodeType()

External Links

source
PETSc.LibPETSc.PetscDualSpaceLagrangeGetTensor — Method
tensor::PetscBool = PetscDualSpaceLagrangeGetTensor(petsclib::PetscLibType, sp::PetscDualSpace)

Get the tensor nature of the dual space

Not Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • tensor - Whether the dual space has tensor layout (vs. simplicial)

Level: intermediate

See also: PETSCDUALSPACELAGRANGE, PetscDualSpace, PetscDualSpaceLagrangeSetTensor(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceLagrangeGetTrimmed — Method
trimmed::PetscBool = PetscDualSpaceLagrangeGetTrimmed(petsclib::PetscLibType, sp::PetscDualSpace)

Get the trimmed nature of the dual space

Not Collective

Input Parameter:

  • sp - The PetscDualSpace

Output Parameter:

  • trimmed - Whether the dual space represents to dual basis of a trimmed polynomial space (e.g. Raviart-Thomas and higher order / other form degree variants)

Level: intermediate

See also: PETSCDUALSPACELAGRANGE, PetscDualSpace, PetscDualSpaceLagrangeSetTrimmed(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceLagrangeSetContinuity — Method
PetscDualSpaceLagrangeSetContinuity(petsclib::PetscLibType, sp::PetscDualSpace, continuous::PetscBool)

Indicate whether the element is continuous

Logically Collective

Input Parameters:

  • sp - the PetscDualSpace
  • continuous - flag for element continuity

Options Database Key:

  • -petscdualspace_lagrange_continuity (true|false) - use a continuous element

Level: intermediate

See also: PETSCDUALSPACELAGRANGE, PetscDualSpace, PetscDualSpaceLagrangeGetContinuity()

External Links

source
PETSc.LibPETSc.PetscDualSpaceLagrangeSetNodeType — Method
PetscDualSpaceLagrangeSetNodeType(petsclib::PetscLibType, sp::PetscDualSpace, nodeType::PetscDTNodeType, boundary::PetscBool, exponent::PetscReal)

Set a description of how nodes are laid out for Lagrange polynomials in this dual space

Logically Collective

Input Parameters:

  • sp - The PetscDualSpace
  • nodeType - The type of nodes
  • boundary - Whether the node type is one that includes endpoints (if nodeType is PETSCDTNODES_GAUSSJACOBI, nodes that

include the boundary are Gauss-Lobatto-Jacobi nodes)

  • exponent - If nodeType is PETSCDTNODES_GAUSSJACOBI, indicates the exponent used for both ends of the 1D Jacobi weight function

'0' is Gauss-Legendre, '-0.5' is Gauss-Chebyshev of the first type, '0.5' is Gauss-Chebyshev of the second type

Level: advanced

See also: PETSCDUALSPACELAGRANGE, PetscDualSpace, PetscDTNodeType, PetscDualSpaceLagrangeGetNodeType()

External Links

source
PETSc.LibPETSc.PetscDualSpaceLagrangeSetTensor — Method
PetscDualSpaceLagrangeSetTensor(petsclib::PetscLibType, sp::PetscDualSpace, tensor::PetscBool)

Set the tensor nature of the dual space

Not Collective

Input Parameters:

  • sp - The PetscDualSpace
  • tensor - Whether the dual space has tensor layout (vs. simplicial)

Level: intermediate

See also: PETSCDUALSPACELAGRANGE, PetscDualSpace, PetscDualSpaceLagrangeGetTensor(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceLagrangeSetTrimmed — Method
PetscDualSpaceLagrangeSetTrimmed(petsclib::PetscLibType, sp::PetscDualSpace, trimmed::PetscBool)

Set the trimmed nature of the dual space

Not Collective

Input Parameters:

  • sp - The PetscDualSpace
  • trimmed - Whether the dual space represents to dual basis of a trimmed polynomial space (e.g. Raviart-Thomas and higher order / other form degree variants)

Level: intermediate

See also: PETSCDUALSPACELAGRANGE, PetscDualSpace, PetscDualSpaceLagrangeGetTrimmed(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpacePullback — Method
PetscDualSpacePullback(petsclib::PetscLibType, dsp::PetscDualSpace, fegeom::Vector{PetscFEGeom}, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar})

Transform the given functional so that it operates on real space, rather than the reference element. Operationally, this means that we map the function evaluations depending on continuity requirements of our finite element method.

Input Parameters:

  • dsp - The PetscDualSpace
  • fegeom - The geometry for this cell
  • Nq - The number of function samples
  • Nc - The number of function components
  • pointEval - The function values

Output Parameter:

  • pointEval - The transformed function values

Level: advanced

See also: PetscDualSpace, PetscDualSpacePushforward(), PetscDualSpaceTransform(), PetscDualSpaceGetDeRahm()

External Links

source
PETSc.LibPETSc.PetscDualSpacePushforward — Method
PetscDualSpacePushforward(petsclib::PetscLibType, dsp::PetscDualSpace, fegeom::Vector{PetscFEGeom}, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar})

Transform the given function so that it operates on real space, rather than the reference element. Operationally, this means that we map the function evaluations depending on continuity requirements of our finite element method.

Input Parameters:

  • dsp - The PetscDualSpace
  • fegeom - The geometry for this cell
  • Nq - The number of function samples
  • Nc - The number of function components
  • pointEval - The function values

Output Parameter:

  • pointEval - The transformed function values

Level: advanced

See also: PetscDualSpace, PetscDualSpacePullback(), PetscDualSpaceTransform(), PetscDualSpaceGetDeRahm()

External Links

source
PETSc.LibPETSc.PetscDualSpacePushforwardGradient — Method
PetscDualSpacePushforwardGradient(petsclib::PetscLibType, dsp::PetscDualSpace, fegeom::Vector{PetscFEGeom}, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar})

Transform the given function gradient so that it operates on real space, rather than the reference element. Operationally, this means that we map the function evaluations depending on continuity requirements of our finite element method.

Input Parameters:

  • dsp - The PetscDualSpace
  • fegeom - The geometry for this cell
  • Nq - The number of function gradient samples
  • Nc - The number of function components
  • pointEval - The function gradient values

Output Parameter:

  • pointEval - The transformed function gradient values

Level: advanced

See also: PetscDualSpace, PetscDualSpacePushforward(), PetscDualSpacePullback(), PetscDualSpaceTransform(), PetscDualSpaceGetDeRahm()

External Links

source
PETSc.LibPETSc.PetscDualSpacePushforwardHessian — Method
PetscDualSpacePushforwardHessian(petsclib::PetscLibType, dsp::PetscDualSpace, fegeom::Vector{PetscFEGeom}, Nq::PetscInt, Nc::PetscInt, pointEval::Vector{PetscScalar})

Transform the given function Hessian so that it operates on real space, rather than the reference element. Operationally, this means that we map the function evaluations depending on continuity requirements of our finite element method.

Input Parameters:

  • dsp - The PetscDualSpace
  • fegeom - The geometry for this cell
  • Nq - The number of function Hessian samples
  • Nc - The number of function components
  • pointEval - The function gradient values

Output Parameter:

  • pointEval - The transformed function Hessian values

Level: advanced

See also: PetscDualSpace, PetscDualSpacePushforward(), PetscDualSpacePullback(), PetscDualSpaceTransform(), PetscDualSpaceGetDeRahm()

External Links

source
PETSc.LibPETSc.PetscDualSpaceRefinedSetCellSpaces — Method
PetscDualSpaceRefinedSetCellSpaces(petsclib::PetscLibType, sp::PetscDualSpace, cellSpaces::Vector{PetscDualSpace})

Set the dual spaces for the closures of each of the cells in the multicell DM of a PetscDualSpace

Collective

Input Parameters:

  • sp - a PetscDualSpace
  • cellSpaces - one PetscDualSpace for each of the cells. The reference count of each cell space will be incremented,

so the user is still responsible for these spaces afterwards

Level: intermediate

See also: PETSCDUALSPACEREFINED, PetscDualSpace, PetscFERefine()

External Links

source
PETSc.LibPETSc.PetscDualSpaceRegister — Method
PetscDualSpaceRegister(petsclib::PetscLibType, sname::String, fnc::external)

Adds a new PetscDualSpaceType

Not Collective, No Fortran Support

Input Parameters:

  • sname - The name of a new user-defined creation routine
  • function - The creation routine

See also: PetscDualSpace, PetscDualSpaceType, PetscDualSpaceRegisterAll(), PetscDualSpaceRegisterDestroy()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSetDM — Method
PetscDualSpaceSetDM(petsclib::PetscLibType, sp::PetscDualSpace, dm::AbstractPetscDM)

Get the DM representing the reference cell

Not Collective

Input Parameters:

  • sp - The PetscDualSpace
  • dm - The reference cell

Level: intermediate

See also: PetscDualSpace, DM, PetscDualSpaceGetDM(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSetFormDegree — Method
PetscDualSpaceSetFormDegree(petsclib::PetscLibType, dsp::PetscDualSpace, k::PetscInt)

Set the form degree k for the k-form the describes the pushforwards/pullbacks of this dual space's functionals.

Input Parameters:

  • dsp - The PetscDualSpace
  • k - The signed degree k of the k. If k >= 0, this means that the degrees of freedom are k-forms, and are stored

in lexicographic order according to the basis of k-forms constructed from the wedge product of 1-forms. So for example, the 1-form basis in 3-D is (dx, dy, dz), and the 2-form basis in 3-D is (dx wedge dy, dx wedge dz, dy wedge dz). If k < 0, this means that the degrees transform as k-forms, but are stored as (N-k) forms according to the Hodge star map. So for example if k = -2 and N = 3, this means that the degrees of freedom transform as 2-forms but are stored as 1-forms.

Level: developer

See also: PetscDualSpace, PetscDTAltV, PetscDualSpacePullback(), PetscDualSpacePushforward(), PetscDualSpaceTransform(), PetscDualSpaceTransformType

External Links

source
PETSc.LibPETSc.PetscDualSpaceSetFromOptions — Method
PetscDualSpaceSetFromOptions(petsclib::PetscLibType, sp::PetscDualSpace)

sets parameters in a PetscDualSpace from the options database

Collective

Input Parameter:

  • sp - the PetscDualSpace object to set options for

Options Database Keys:

  • -petscdualspace_order order - the approximation order of the space
  • -petscdualspace_form_degree deg - the form degree, say 0 for point evaluations, or 2 for area integrals
  • -petscdualspace_components c - the number of components, say d for a vector field
  • -petscdualspace_refcell celltype - Reference cell type name
  • -petscdualspace_lagrange_continuity (true|false) - Flag for continuous element
  • -petscdualspace_lagrange_tensor (true|false) - Flag for tensor dual space
  • -petscdualspace_lagrange_trimmed (true|false) - Flag for trimmed dual space
  • -petscdualspace_lagrange_node_type nodetype - Lagrange node location type
  • -petscdualspace_lagrange_node_endpoints (true|false) - Flag for nodes that include endpoints
  • -petscdualspace_lagrange_node_exponent exponent - Gauss-Jacobi weight function exponent
  • -petscdualspace_lagrange_use_moments (true|false) - Use moments (where appropriate) for functionals
  • -petscdualspace_lagrange_moment_order order - Quadrature order for moment functionals

Level: intermediate

See also: PetscDualSpaceView(), PetscDualSpace, PetscObjectSetFromOptions()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSetOrder — Method
PetscDualSpaceSetOrder(petsclib::PetscLibType, sp::PetscDualSpace, order::PetscInt)

Set the order of the dual space

Not Collective

Input Parameters:

  • sp - The PetscDualSpace
  • order - The order

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceGetOrder(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSetType — Method
PetscDualSpaceSetType(petsclib::PetscLibType, sp::PetscDualSpace, name::String)

Builds a particular PetscDualSpace based on its PetscDualSpaceType

Collective

Input Parameters:

  • sp - The PetscDualSpace object
  • name - The kind of space

Options Database Key:

  • -petscdualspace_type type - Sets the PetscDualSpace type; see PetscDualSpaceType for the choices

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceType, PetscDualSpaceGetType(), PetscDualSpaceCreate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSetUp — Method
PetscDualSpaceSetUp(petsclib::PetscLibType, sp::PetscDualSpace)

Construct a basis for a PetscDualSpace

Collective

Input Parameter:

  • sp - the PetscDualSpace object to setup

Level: intermediate

See also: PetscDualSpaceView(), PetscDualSpaceDestroy(), PetscDualSpace

External Links

source
PETSc.LibPETSc.PetscDualSpaceSimpleSetFunctional — Method
PetscDualSpaceSimpleSetFunctional(petsclib::PetscLibType, sp::PetscDualSpace, func::PetscInt, q::PetscQuadrature)

Set the given basis functional for this dual space

Not Collective

Input Parameters:

  • sp - the PetscDualSpace
  • func - the basis index
  • q - the basis functional

Level: intermediate

See also: PETSCDUALSPACESIMPLE, PetscDualSpace, PetscDualSpaceSimpleSetDimension()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSumGetConcatenate — Method
concatenate::PetscBool = PetscDualSpaceSumGetConcatenate(petsclib::PetscLibType, sp::PetscDualSpace)

Get the concatenate flag for this space.

Input Parameter:

  • sp - the dual space object

Output Parameter:

  • concatenate - flag indicating whether subspaces are concatenated.

Level: intermediate

See also: PETSCDUALSPACESUM, PetscDualSpace, PetscDualSpaceSumSetConcatenate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSumGetInterleave — Method
interleave_basis::PetscBool,interleave_components::PetscBool = PetscDualSpaceSumGetInterleave(petsclib::PetscLibType, sp::PetscDualSpace)

Get whether the basis functions and components of a uniform sum are interleaved

Logically collective

Input Parameter:

  • sp - a PetscDualSpace of type PETSCDUALSPACESUM

Output Parameters:

  • interleave_basis - if PETSC_TRUE, the basis vectors of the subspaces are interleaved
  • interleave_components - if PETSC_TRUE and the space concatenates components (PetscDualSpaceSumGetConcatenate()),

interleave the concatenated components

Level: developer

See also: PetscDualSpace, PETSCDUALSPACESUM, PETSCFEVECTOR, PetscDualSpaceSumSetInterleave()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSumGetSubspace — Method
subsp::PetscDualSpace = PetscDualSpaceSumGetSubspace(petsclib::PetscLibType, sp::PetscDualSpace, s::PetscInt)

Get a space in the sum space

Input Parameters:

  • sp - the dual space object
  • s - The space number

Output Parameter:

  • subsp - the PetscDualSpace

Level: intermediate

See also: PETSCDUALSPACESUM, PetscDualSpace, PetscDualSpaceSumSetSubspace()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSumSetConcatenate — Method
PetscDualSpaceSumSetConcatenate(petsclib::PetscLibType, sp::PetscDualSpace, concatenate::PetscBool)

Sets the concatenate flag for this space.

Input Parameters:

  • sp - the dual space object
  • concatenate - are subspaces concatenated components (true) or direct summands (false)

Level: intermediate

See also: PETSCDUALSPACESUM, PetscDualSpace, PetscDualSpaceSumGetConcatenate()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSumSetInterleave — Method
PetscDualSpaceSumSetInterleave(petsclib::PetscLibType, sp::PetscDualSpace, interleave_basis::PetscBool, interleave_components::PetscBool)

Set whether the basis functions and components of a uniform sum are interleaved

Logically collective

Input Parameters:

  • sp - a PetscDualSpace of type PETSCDUALSPACESUM
  • interleave_basis - if PETSC_TRUE, the basis vectors of the subspaces are interleaved
  • interleave_components - if PETSC_TRUE and the space concatenates components (PetscDualSpaceSumGetConcatenate()),

interleave the concatenated components

Level: developer

See also: PetscDualSpace, PETSCDUALSPACESUM, PETSCFEVECTOR, PetscDualSpaceSumGetInterleave()

External Links

source
PETSc.LibPETSc.PetscDualSpaceSumSetSubspace — Method
PetscDualSpaceSumSetSubspace(petsclib::PetscLibType, sp::PetscDualSpace, s::PetscInt, subsp::PetscDualSpace)

Set a space in the sum space

Input Parameters:

  • sp - the dual space object
  • s - The space number
  • subsp - the number of spaces

Level: intermediate

See also: PETSCDUALSPACESUM, PetscDualSpace, PetscDualSpaceSumGetSubspace()

External Links

source
PETSc.LibPETSc.PetscDualSpaceTransform — Method
PetscDualSpaceTransform(petsclib::PetscLibType, dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::Vector{PetscFEGeom}, Nv::PetscInt, Nc::PetscInt, vals::Vector{PetscScalar})

Transform the function values

Input Parameters:

  • dsp - The PetscDualSpace
  • trans - The type of transform
  • isInverse - Flag to invert the transform
  • fegeom - The cell geometry
  • Nv - The number of function samples
  • Nc - The number of function components
  • vals - The function values

Output Parameter:

  • vals - The transformed function values

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceTransformGradient(), PetscDualSpaceTransformHessian(), PetscDualSpacePullback(), PetscDualSpacePushforward(), PetscDualSpaceTransformType

External Links

source
PETSc.LibPETSc.PetscDualSpaceTransformGradient — Method
PetscDualSpaceTransformGradient(petsclib::PetscLibType, dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::Vector{PetscFEGeom}, Nv::PetscInt, Nc::PetscInt, vals::Vector{PetscScalar})

Transform the function gradient values

Input Parameters:

  • dsp - The PetscDualSpace
  • trans - The type of transform
  • isInverse - Flag to invert the transform
  • fegeom - The cell geometry
  • Nv - The number of function gradient samples
  • Nc - The number of function components
  • vals - The function gradient values

Output Parameter:

  • vals - The transformed function gradient values

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceTransform(), PetscDualSpacePullback(), PetscDualSpacePushforward(), PetscDualSpaceTransformType

External Links

source
PETSc.LibPETSc.PetscDualSpaceTransformHessian — Method
PetscDualSpaceTransformHessian(petsclib::PetscLibType, dsp::PetscDualSpace, trans::PetscDualSpaceTransformType, isInverse::PetscBool, fegeom::Vector{PetscFEGeom}, Nv::PetscInt, Nc::PetscInt, vals::Vector{PetscScalar})

Transform the function Hessian values

Input Parameters:

  • dsp - The PetscDualSpace
  • trans - The type of transform
  • isInverse - Flag to invert the transform
  • fegeom - The cell geometry
  • Nv - The number of function Hessian samples
  • Nc - The number of function components
  • vals - The function gradient values

Output Parameter:

  • vals - The transformed function Hessian values

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceTransform(), PetscDualSpacePullback(), PetscDualSpacePushforward(), PetscDualSpaceTransformType

External Links

source
PETSc.LibPETSc.PetscDualSpaceView — Method
PetscDualSpaceView(petsclib::PetscLibType, sp::PetscDualSpace, v::PetscViewer)

Views a PetscDualSpace

Collective

Input Parameters:

  • sp - the PetscDualSpace object to view
  • v - the viewer

Level: beginner

See also: PetscViewer, PetscDualSpaceDestroy(), PetscDualSpace

External Links

source
PETSc.LibPETSc.PetscDualSpaceViewFromOptions — Method
PetscDualSpaceViewFromOptions(petsclib::PetscLibType, A::PetscDualSpace, obj, name::String)

View a PetscDualSpace based on values in the options database

Collective

Input Parameters:

  • A - the PetscDualSpace object
  • obj - Optional object, provides the options prefix
  • name - command line option name

Options Database Key:

  • -name [viewertype][:...] - option name and values. See PetscObjectViewFromOptions() for the possible arguments

Level: intermediate

See also: PetscDualSpace, PetscDualSpaceView(), PetscObjectViewFromOptions(), PetscDualSpaceCreate()

External Links

source

PetscFV

PETSc.LibPETSc.PetscFVClone — Method
fvNew::PetscFV = PetscFVClone(petsclib::PetscLibType, fv::PetscFV)

Create a shallow copy of a PetscFV object that just references the internal objects.

Input Parameter:

  • fv - The initial PetscFV

Output Parameter:

  • fvNew - A clone of the PetscFV

Level: advanced

See also: PetscFV, PetscFVType, PetscFVCreate(), PetscFVSetType()

External Links

source
PETSc.LibPETSc.PetscFVComputeGradient — Method
PetscFVComputeGradient(petsclib::PetscLibType, fvm::PetscFV, numFaces::PetscInt, dx::Vector{PetscScalar}, grad::Vector{PetscScalar})

Compute the gradient reconstruction matrix for a given cell

Input Parameters:

  • fvm - The PetscFV object
  • numFaces - The number of cell faces which are not constrained
  • dx - The vector from the cell centroid to the neighboring cell centroid for each face

Output Parameter:

  • grad - the gradient

Level: advanced

See also: PetscFV, PetscFVCreate()

External Links

source
PETSc.LibPETSc.PetscFVCreate — Method
fvm::PetscFV = PetscFVCreate(petsclib::PetscLibType, comm::MPI_Comm)

Creates an empty PetscFV object. The type can then be set with PetscFVSetType().

Collective

Input Parameter:

  • comm - The communicator for the PetscFV object

Output Parameter:

  • fvm - The PetscFV object

Level: beginner

See also: PetscFVSetUp(), PetscFVSetType(), PETSCFVUPWIND, PetscFVDestroy()

External Links

source
PETSc.LibPETSc.PetscFVCreateDualSpace — Method
PetscFVCreateDualSpace(petsclib::PetscLibType, fvm::PetscFV, ct::DMPolytopeType)

Creates a PetscDualSpace appropriate for the PetscFV

Not Collective

Input Parameters:

  • fvm - The PetscFV object
  • ct - The DMPolytopeType for the cell

Level: intermediate

See also: PetscFVGetDualSpace(), PetscFVSetDualSpace(), PetscDualSpace, PetscFV, PetscFVCreate()

External Links

source
PETSc.LibPETSc.PetscFVCreateTabulation — Method
T::PetscTabulation = PetscFVCreateTabulation(petsclib::PetscLibType, fvm::PetscFV, nrepl::PetscInt, npoints::PetscInt, points::Vector{PetscReal}, K::PetscInt)

Tabulates the basis functions, and perhaps derivatives, at the points provided.

Not Collective

Input Parameters:

  • fvm - The PetscFV object
  • nrepl - The number of replicas
  • npoints - The number of tabulation points in a replica
  • points - The tabulation point coordinates
  • K - The order of derivative to tabulate

Output Parameter:

  • T - The basis function values and derivative at tabulation points

Level: intermediate

See also: PetscFV, PetscTabulation, PetscFECreateTabulation(), PetscTabulationDestroy(), PetscFEGetCellTabulation()

External Links

source
PETSc.LibPETSc.PetscFVDestroy — Method
PetscFVDestroy(petsclib::PetscLibType, fvm::Union{PetscFV, Ref{PetscFV}})

Destroys a PetscFV object

Collective

Input Parameter:

  • fvm - the PetscFV object to destroy

Level: beginner

See also: PetscFV, PetscFVCreate(), PetscFVView()

External Links

source
PETSc.LibPETSc.PetscFVGetCellTabulation — Method
T::PetscTabulation = PetscFVGetCellTabulation(petsclib::PetscLibType, fvm::PetscFV)

Returns the tabulation of the basis functions at the quadrature points

Not Collective

Input Parameter:

  • fvm - The PetscFV object

Output Parameter:

  • T - The basis function values and derivatives at quadrature points

Level: intermediate

See also: PetscFV, PetscTabulation, PetscFEGetCellTabulation(), PetscFVCreateTabulation(), PetscFVGetQuadrature(), PetscQuadratureGetData()

External Links

source
PETSc.LibPETSc.PetscFVGetComponentName — Method
name::String = PetscFVGetComponentName(petsclib::PetscLibType, fvm::PetscFV, comp::PetscInt)

Get the name of a component (used in output and viewing) in a PetscFV

Logically Collective

Input Parameters:

  • fvm - the PetscFV object
  • comp - the component number

Output Parameter:

  • name - the component name

Level: intermediate

See also: PetscFV, PetscFVSetComponentName()

External Links

source
PETSc.LibPETSc.PetscFVGetComputeGradients — Method
computeGradients::PetscBool = PetscFVGetComputeGradients(petsclib::PetscLibType, fvm::PetscFV)

Return flag for computation of cell gradients on a PetscFV

Not Collective

Input Parameter:

  • fvm - the PetscFV object

Output Parameter:

  • computeGradients - Flag to compute cell gradients

Level: intermediate

See also: PetscFV, PetscFVSetComputeGradients()

External Links

source
PETSc.LibPETSc.PetscFVGetDualSpace — Method
sp::PetscDualSpace = PetscFVGetDualSpace(petsclib::PetscLibType, fvm::PetscFV)

Returns the PetscDualSpace used to define the inner product on a PetscFV

Not Collective

Input Parameter:

  • fvm - The PetscFV object

Output Parameter:

  • sp - The PetscDualSpace object

Level: intermediate

See also: PetscFVSetDualSpace(), PetscFVCreateDualSpace(), PetscDualSpace, PetscFV, PetscFVCreate()

External Links

source
PETSc.LibPETSc.PetscFVGetLimiter — Method
lim::PetscLimiter = PetscFVGetLimiter(petsclib::PetscLibType, fvm::PetscFV)

Get the PetscLimiter object from the PetscFV

Not Collective

Input Parameter:

  • fvm - the PetscFV object

Output Parameter:

  • lim - The PetscLimiter

Level: intermediate

See also: PetscFV, PetscLimiter, PetscFVSetLimiter()

External Links

source
PETSc.LibPETSc.PetscFVGetNumComponents — Method
comp::PetscInt = PetscFVGetNumComponents(petsclib::PetscLibType, fvm::PetscFV)

Get the number of field components in a PetscFV

Not Collective

Input Parameter:

  • fvm - the PetscFV object

Output Parameter:

  • comp - The number of components

Level: intermediate

See also: PetscFV, PetscFVSetNumComponents(), PetscFVSetComponentName()

External Links

source
PETSc.LibPETSc.PetscFVGetQuadrature — Method
q::PetscQuadrature = PetscFVGetQuadrature(petsclib::PetscLibType, fvm::PetscFV)

Get the PetscQuadrature from a PetscFV

Not Collective

Input Parameter:

  • fvm - the PetscFV object

Output Parameter:

  • q - The PetscQuadrature

Level: intermediate

See also: PetscQuadrature, PetscFV, PetscFVSetQuadrature()

External Links

source
PETSc.LibPETSc.PetscFVGetSpatialDimension — Method
dim::PetscInt = PetscFVGetSpatialDimension(petsclib::PetscLibType, fvm::PetscFV)

Get the spatial dimension of a PetscFV

Not Collective

Input Parameter:

  • fvm - the PetscFV object

Output Parameter:

  • dim - The spatial dimension

Level: intermediate

See also: PetscFV, PetscFVSetSpatialDimension()

External Links

source
PETSc.LibPETSc.PetscFVGetType — Method
name::String = PetscFVGetType(petsclib::PetscLibType, fvm::PetscFV)

Gets the PetscFVType (as a string) from a PetscFV.

Not Collective

Input Parameter:

  • fvm - The PetscFV

Output Parameter:

  • name - The PetscFVType name

Level: intermediate

See also: PetscFV, PetscFVType, PetscFVSetType(), PetscFVCreate()

External Links

source
PETSc.LibPETSc.PetscFVInitializePackage — Method
PetscFVInitializePackage(petsclib::PetscLibType)

This function initializes everything in the PetscFV package. It is called from PetscDLLibraryRegister() when using dynamic libraries, and on the first call to PetscFVCreate() when using static libraries.

Level: developer

See also: PetscInitialize()

External Links

source
PETSc.LibPETSc.PetscFVIntegrateRHSFunction — Method
neighborVol::PetscReal = PetscFVIntegrateRHSFunction(petsclib::PetscLibType, fvm::PetscFV, prob::PetscDS, field::PetscInt, Nf::PetscInt, fgeom::Vector{PetscFVFaceGeom}, uL::Vector{PetscScalar}, uR::Vector{PetscScalar}, fluxL::Vector{PetscScalar}, fluxR::Vector{PetscScalar})

Produce the cell residual vector for a chunk of elements by quadrature integration

Not Collective

Input Parameters:

  • fvm - The PetscFV object for the field being integrated
  • prob - The PetscDS specifying the discretizations and continuum functions
  • field - The field being integrated
  • Nf - The number of faces in the chunk
  • fgeom - The face geometry for each face in the chunk
  • neighborVol - The volume for each pair of cells in the chunk
  • uL - The state from the cell on the left
  • uR - The state from the cell on the right

Output Parameters:

  • fluxL - the left fluxes for each face
  • fluxR - the right fluxes for each face

Level: developer

See also: PetscFV, PetscDS, PetscFVFaceGeom, PetscFVCreate()

External Links

source
PETSc.LibPETSc.PetscFVLeastSquaresSetMaxFaces — Method
PetscFVLeastSquaresSetMaxFaces(petsclib::PetscLibType, fvm::PetscFV, maxFaces::PetscInt)

Set the maximum number of cell faces for gradient reconstruction

Not Collective

Input Parameters:

  • fvm - The PetscFV object
  • maxFaces - The maximum number of cell faces

Level: intermediate

See also: PetscFV, PetscFVCreate(), PETSCFVLEASTSQUARES, PetscFVComputeGradient()

External Links

source
PETSc.LibPETSc.PetscFVRefine — Method
fvRef::PetscFV = PetscFVRefine(petsclib::PetscLibType, fv::PetscFV)

Create a "refined" PetscFV object that refines the reference cell into smaller copies.

Input Parameter:

  • fv - The initial PetscFV

Output Parameter:

  • fvRef - The refined PetscFV

Level: advanced

See also: PetscFV, PetscFVType, PetscFVCreate(), PetscFVSetType()

External Links

source
PETSc.LibPETSc.PetscFVRegister — Method
PetscFVRegister(petsclib::PetscLibType, sname::String, fnc::external)

Adds a new PetscFV implementation

Not Collective, No Fortran Support

Input Parameters:

  • sname - The name of a new user-defined creation routine
  • function - The creation routine itself

See also: PetscFV, PetscFVType, PetscFVRegisterAll(), PetscFVRegisterDestroy()

External Links

source
PETSc.LibPETSc.PetscFVSetComponentName — Method
PetscFVSetComponentName(petsclib::PetscLibType, fvm::PetscFV, comp::PetscInt, name::String)

Set the name of a component (used in output and viewing) in a PetscFV

Logically Collective

Input Parameters:

  • fvm - the PetscFV object
  • comp - the component number
  • name - the component name

Level: intermediate

See also: PetscFV, PetscFVGetComponentName()

External Links

source
PETSc.LibPETSc.PetscFVSetComputeGradients — Method
PetscFVSetComputeGradients(petsclib::PetscLibType, fvm::PetscFV, computeGradients::PetscBool)

Toggle computation of cell gradients on a PetscFV

Logically Collective

Input Parameters:

  • fvm - the PetscFV object
  • computeGradients - Flag to compute cell gradients

Level: intermediate

See also: PetscFV, PetscFVGetComputeGradients()

External Links

source
PETSc.LibPETSc.PetscFVSetDualSpace — Method
PetscFVSetDualSpace(petsclib::PetscLibType, fvm::PetscFV, sp::PetscDualSpace)

Sets the PetscDualSpace used to define the inner product

Not Collective

Input Parameters:

  • fvm - The PetscFV object
  • sp - The PetscDualSpace object

Level: intermediate

See also: PetscFVGetDualSpace(), PetscFVCreateDualSpace(), PetscDualSpace, PetscFV, PetscFVCreate()

External Links

source
PETSc.LibPETSc.PetscFVSetFromOptions — Method
PetscFVSetFromOptions(petsclib::PetscLibType, fvm::PetscFV)

sets parameters in a PetscFV from the options database

Collective

Input Parameter:

  • fvm - the PetscFV object to set options for

Options Database Key:

  • -petscfv_compute_gradients (true|false) - Determines whether cell gradients are calculated

Level: intermediate

See also: PetscFV, PetscFVView()

External Links

source
PETSc.LibPETSc.PetscFVSetLimiter — Method
PetscFVSetLimiter(petsclib::PetscLibType, fvm::PetscFV, lim::PetscLimiter)

Set the PetscLimiter to the PetscFV

Logically Collective

Input Parameters:

  • fvm - the PetscFV object
  • lim - The PetscLimiter

Level: intermediate

See also: PetscFV, PetscLimiter, PetscFVGetLimiter()

External Links

source
PETSc.LibPETSc.PetscFVSetNumComponents — Method
PetscFVSetNumComponents(petsclib::PetscLibType, fvm::PetscFV, comp::PetscInt)

Set the number of field components in a PetscFV

Logically Collective

Input Parameters:

  • fvm - the PetscFV object
  • comp - The number of components

Level: intermediate

See also: PetscFV, PetscFVGetNumComponents()

External Links

source
PETSc.LibPETSc.PetscFVSetQuadrature — Method
PetscFVSetQuadrature(petsclib::PetscLibType, fvm::PetscFV, q::PetscQuadrature)

Set the PetscQuadrature object for a PetscFV

Logically Collective

Input Parameters:

  • fvm - the PetscFV object
  • q - The PetscQuadrature

Level: intermediate

See also: PetscQuadrature, PetscFV, PetscFVGetQuadrature()

External Links

source
PETSc.LibPETSc.PetscFVSetSpatialDimension — Method
PetscFVSetSpatialDimension(petsclib::PetscLibType, fvm::PetscFV, dim::PetscInt)

Set the spatial dimension of a PetscFV

Logically Collective

Input Parameters:

  • fvm - the PetscFV object
  • dim - The spatial dimension

Level: intermediate

See also: PetscFV, PetscFVGetSpatialDimension()

External Links

source
PETSc.LibPETSc.PetscFVSetType — Method
PetscFVSetType(petsclib::PetscLibType, fvm::PetscFV, name::String)

Builds a particular PetscFV

Collective

Input Parameters:

  • fvm - The PetscFV object
  • name - The type of FVM space

Options Database Key:

  • -petscfv_type type - Sets the PetscFVType; use -help for a list of available types

Level: intermediate

See also: PetscFV, PetscFVType, PetscFVGetType(), PetscFVCreate()

External Links

source
PETSc.LibPETSc.PetscFVSetUp — Method
PetscFVSetUp(petsclib::PetscLibType, fvm::PetscFV)

Setup the data structures for the PetscFV based on the PetscFVType provided by PetscFVSetType()

Collective

Input Parameter:

  • fvm - the PetscFV object to setup

Level: intermediate

See also: PetscFV, PetscFVView(), PetscFVDestroy()

External Links

source
PETSc.LibPETSc.PetscFVView — Method
PetscFVView(petsclib::PetscLibType, fvm::PetscFV, v::PetscViewer)

Views a PetscFV

Collective

Input Parameters:

  • fvm - the PetscFV object to view
  • v - the viewer

Level: beginner

See also: PetscFV, PetscViewer, PetscFVDestroy()

External Links

source
PETSc.LibPETSc.PetscFVViewFromOptions — Method
PetscFVViewFromOptions(petsclib::PetscLibType, A::PetscFV, obj, name::String)

View a PetscFV based on values in the options database

Collective

Input Parameters:

  • A - the PetscFV object
  • obj - Optional object that provides the options prefix
  • name - command line option name

Options Database Key:

  • -name [viewertype][:...] - option name and values. See PetscObjectViewFromOptions() for the possible arguments

Level: intermediate

See also: PetscFV, PetscFVView(), PetscObjectViewFromOptions(), PetscFVCreate()

External Links

source

PetscLimiter

PETSc.LibPETSc.PetscLimiterCreate — Method
lim::PetscLimiter = PetscLimiterCreate(petsclib::PetscLibType, comm::MPI_Comm)

Creates an empty PetscLimiter object. The type can then be set with PetscLimiterSetType().

Collective

Input Parameter:

  • comm - The communicator for the PetscLimiter object

Output Parameter:

  • lim - The PetscLimiter object

Level: beginner

See also: PetscLimiter, PetscLimiterType, PetscLimiterSetType(), PETSCLIMITERSIN

External Links

source
PETSc.LibPETSc.PetscLimiterDestroy — Method
PetscLimiterDestroy(petsclib::PetscLibType, lim::Union{PetscLimiter, Ref{PetscLimiter}})

Destroys a PetscLimiter object

Collective

Input Parameter:

  • lim - the PetscLimiter object to destroy

Level: beginner

See also: PetscLimiter, PetscLimiterView()

External Links

source
PETSc.LibPETSc.PetscLimiterGetType — Method
name::String = PetscLimiterGetType(petsclib::PetscLibType, lim::PetscLimiter)

Gets the PetscLimiterType name (as a string) from the PetscLimiter.

Not Collective

Input Parameter:

  • lim - The PetscLimiter

Output Parameter:

  • name - The PetscLimiterType

Level: intermediate

See also: PetscLimiter, PetscLimiterType, PetscLimiterSetType(), PetscLimiterCreate()

External Links

source
PETSc.LibPETSc.PetscLimiterLimit — Method
phi::PetscReal = PetscLimiterLimit(petsclib::PetscLibType, lim::PetscLimiter, flim::PetscReal)

Limit the flux

Input Parameters:

  • lim - The PetscLimiter
  • flim - The input field

Output Parameter:

  • phi - The limited field

Level: beginner

See also: PetscLimiter, PetscLimiterType, PetscLimiterSetType(), PetscLimiterCreate()

External Links

source
PETSc.LibPETSc.PetscLimiterRegister — Method
PetscLimiterRegister(petsclib::PetscLibType, sname::String, fnc::external)

Adds a new PetscLimiter implementation

Not Collective, No Fortran Support

Input Parameters:

  • sname - The name of a new user-defined creation routine
  • function - The creation routine

See also: PetscLimiter, PetscLimiterType, PetscLimiterRegisterAll(), PetscLimiterRegisterDestroy()

External Links

source
PETSc.LibPETSc.PetscLimiterSetType — Method
PetscLimiterSetType(petsclib::PetscLibType, lim::PetscLimiter, name::String)

Builds a PetscLimiter for a given PetscLimiterType

Collective

Input Parameters:

  • lim - The PetscLimiter object
  • name - The kind of limiter

Options Database Key:

  • -petsclimiter_type type - Sets the PetscLimiter type; use -help for a list of available types

Level: intermediate

See also: PetscLimiter, PetscLimiterType, PetscLimiterGetType(), PetscLimiterCreate()

External Links

source
PETSc.LibPETSc.PetscLimiterSetUp — Method
PetscLimiterSetUp(petsclib::PetscLibType, lim::PetscLimiter)

Construct data structures for the PetscLimiter

Collective

Input Parameter:

  • lim - the PetscLimiter object to setup

Level: intermediate

See also: PetscLimiter, PetscLimiterView(), PetscLimiterDestroy()

External Links

source
PETSc.LibPETSc.PetscLimiterView — Method
PetscLimiterView(petsclib::PetscLibType, lim::PetscLimiter, v::PetscViewer)

Views a PetscLimiter

Collective

Input Parameters:

  • lim - the PetscLimiter object to view
  • v - the viewer

Level: beginner

See also: PetscLimiter, PetscViewer, PetscLimiterDestroy(), PetscLimiterViewFromOptions()

External Links

source
PETSc.LibPETSc.PetscLimiterViewFromOptions — Method
PetscLimiterViewFromOptions(petsclib::PetscLibType, A::PetscLimiter, obj, name::String)

View a PetscLimiter based on values in the options database

Collective

Input Parameters:

  • A - the PetscLimiter object to view
  • obj - Optional object that provides the options prefix to use
  • name - command line option name

Options Database Key:

  • -name [viewertype][:...] - option name and values. See PetscObjectViewFromOptions() for the possible arguments

Level: intermediate

See also: PetscLimiter, PetscLimiterView(), PetscObjectViewFromOptions(), PetscLimiterCreate()

External Links

source

PetscConvEst

PETSc.LibPETSc.PetscConvEstComputeError — Method
PetscConvEstComputeError(petsclib::PetscLibType, ce::PetscConvEst, r::PetscInt, dm::AbstractPetscDM, u::AbstractPetscVec, errors::Vector{PetscReal})

Compute per-field discretization errors of u on refinement level r

Collective

Input Parameters:

  • ce - the PetscConvEst object
  • r - the refinement level
  • dm - the DM on which u is defined (may be NULL)
  • u - the computed solution

Output Parameter:

  • errors - array of length Nf (number of fields in the DS) filled with the error in each field

Level: developer

See also: PetscConvEst, PetscConvEstComputeInitialGuess(), PetscConvEstGetConvRate()

External Links

source
PETSc.LibPETSc.PetscConvEstComputeInitialGuess — Method
PetscConvEstComputeInitialGuess(petsclib::PetscLibType, ce::PetscConvEst, r::PetscInt, dm::AbstractPetscDM, u::AbstractPetscVec)

Fill u with the initial guess to use on refinement level r of a convergence-estimation run

Collective

Input Parameters:

  • ce - the PetscConvEst object
  • r - the refinement level
  • dm - the DM on which u is defined (may be NULL)

Output Parameter:

  • u - the initial-guess vector

Level: developer

See also: PetscConvEst, PetscConvEstComputeError(), PetscConvEstGetConvRate()

External Links

source
PETSc.LibPETSc.PetscConvEstCreate — Method
ce::PetscConvEst = PetscConvEstCreate(petsclib::PetscLibType, comm::MPI_Comm)

Create a PetscConvEst object. This is used to study the convergence rate of approximations on grids to a continuum solution

Collective

Input Parameter:

  • comm - The communicator for the PetscConvEst object

Output Parameter:

  • ce - The PetscConvEst object

Level: beginner

See also: PetscConvEst, PetscConvEstDestroy(), PetscConvEstGetConvRate(), DMAdaptorCreate(), DMAdaptor

External Links

source
PETSc.LibPETSc.PetscConvEstDestroy — Method
PetscConvEstDestroy(petsclib::PetscLibType, ce::Union{PetscConvEst, Ref{PetscConvEst}})

Destroys a PETSc convergence estimator PetscConvEst object

Collective

Input Parameter:

  • ce - The PetscConvEst object

Level: beginner

See also: PetscConvEst, PetscConvEstCreate(), PetscConvEstGetConvRate()

External Links

source
PETSc.LibPETSc.PetscConvEstGetConvRate — Method
PetscConvEstGetConvRate(petsclib::PetscLibType, ce::PetscConvEst, alpha::Vector{PetscReal})

Returns an estimate of the convergence rate for the discretization

Not Collective

Input Parameter:

  • ce - The PetscConvEst object

Output Parameter:

  • alpha - The convergence rate for each field

Options Database Keys:

  • -snes_convergence_estimate - Execute convergence estimation inside SNESSolve() and print out the rate
  • -ts_convergence_estimate - Execute convergence estimation inside TSSolve() and print out the rate

Level: intermediate

See also: PetscConvEstSetSolver(), PetscConvEstCreate(), SNESSolve(), TSSolve()

External Links

source
PETSc.LibPETSc.PetscConvEstGetSolver — Method
solver::PetscObject = PetscConvEstGetSolver(petsclib::PetscLibType, ce::PetscConvEst)

Gets the solver used to produce discrete solutions

Not Collective

Input Parameter:

  • ce - The PetscConvEst object

Output Parameter:

  • solver - The solver

Level: intermediate

See also: PetscConvEst, PetscConvEstSetSolver(), PetscConvEstCreate(), PetscConvEstGetConvRate()

External Links

source
PETSc.LibPETSc.PetscConvEstMonitorDefault — Method
PetscConvEstMonitorDefault(petsclib::PetscLibType, ce::PetscConvEst, r::PetscInt)

Monitors the convergence estimation loop

Collective

Input Parameters:

  • ce - The PetscConvEst object
  • r - The refinement level

Options Database Key:

  • -convest_monitor - Activate the monitor

Level: intermediate

See also: PetscConvEst, PetscConvEstCreate(), PetscConvEstGetConvRate(), SNESSolve(), TSSolve()

External Links

source
PETSc.LibPETSc.PetscConvEstRateView — Method
PetscConvEstRateView(petsclib::PetscLibType, ce::PetscConvEst, alpha::Vector{PetscReal}, viewer::PetscViewer)

Displays the convergence rate obtained from PetscConvEstGetConvRate() using a PetscViewer

Collective

Input Parameters:

  • ce - iterative context obtained from SNESCreate()
  • alpha - the convergence rate for each field
  • viewer - the viewer to display the reason

Options Database Key:

  • -snes_convergence_estimate - print the convergence rate

Level: developer

See also: PetscConvEst, PetscConvEstGetConvRate()

External Links

source
PETSc.LibPETSc.PetscConvEstSetFromOptions — Method
PetscConvEstSetFromOptions(petsclib::PetscLibType, ce::PetscConvEst)

Sets a convergence estimator PetscConvEst object based on values in the options database

Collective

Input Parameter:

  • ce - The PetscConvEst object

Level: beginner

See also: PetscConvEst, PetscConvEstCreate(), PetscConvEstGetConvRate()

External Links

source
PETSc.LibPETSc.PetscConvEstSetSolver — Method
PetscConvEstSetSolver(petsclib::PetscLibType, ce::PetscConvEst, solver)

Sets the solver used to produce discrete solutions

Not Collective

Input Parameters:

  • ce - The PetscConvEst object
  • solver - The solver, must be a KSP, SNES, or TS object with an attached DM/DS, that can compute an exact solution

Level: intermediate

See also: PetscConvEst, PetscConvEstGetSNES(), PetscConvEstCreate(), PetscConvEstGetConvRate()

External Links

source
PETSc.LibPETSc.PetscConvEstSetUp — Method
PetscConvEstSetUp(petsclib::PetscLibType, ce::PetscConvEst)

After the solver is specified, create data structures needed for estimating convergence

Collective

Input Parameter:

  • ce - The PetscConvEst object

Level: beginner

See also: PetscConvEst, PetscConvEstCreate(), PetscConvEstGetConvRate()

External Links

source
PETSc.LibPETSc.PetscConvEstUseTS — Method
PetscConvEstUseTS(petsclib::PetscLibType, ce::PetscConvEst, checkTemporal::PetscBool)

Configure a PetscConvEst object to use a TS solver for a convergence study

Not Collective

Input Parameters:

  • ce - the convergence estimator
  • checkTemporal - PETSC_TRUE to run a temporal convergence study (refining the time step), PETSC_FALSE to run a spatial convergence study (refining the mesh)

Level: intermediate

See also: PetscConvEst, TS, PetscConvEstGetConvRate()

External Links

source
PETSc.LibPETSc.PetscConvEstView — Method
PetscConvEstView(petsclib::PetscLibType, ce::PetscConvEst, viewer::PetscViewer)

Views a PetscConvEst object

Collective

Input Parameters:

  • ce - The PetscConvEst object
  • viewer - The PetscViewer

Level: beginner

See also: PetscConvEst, PetscViewer, PetscConvEstCreate(), PetscConvEstGetConvRate()

External Links

source