petsc4py.PETSc.DualSpace

class petsc4py.PETSc.DualSpace

Bases: Object

Dual space to a linear space.

Enumerations

Type

The dual space types.

Methods Summary

create([comm])

Create an empty DualSpace object.

destroy()

Destroy the DualSpace object.

duplicate()

Create a duplicate DualSpace object that is not set up.

getDM()

Return the DM representing the reference cell of a DualSpace.

getDimension()

Return the dimension of the dual space.

getFunctional(i)

Return the i-th basis functional in the dual space.

getInteriorDimension()

Return the interior dimension of the dual space.

getLagrangeContinuity()

Return whether the element is continuous.

getLagrangeTensor()

Return the tensor nature of the dual space.

getLagrangeTrimmed()

Return the trimmed nature of the dual space.

getNumComponents()

Return the number of components for this space.

getNumDof()

Return the number of degrees of freedom for each spatial dimension.

getOrder()

Return the order of the dual space.

getType()

Return the type of the dual space object.

setDM(dm)

Set the DM representing the reference cell.

setLagrangeContinuity(continuous)

Indicate whether the element is continuous.

setLagrangeTensor(tensor)

Set the tensor nature of the dual space.

setLagrangeTrimmed(trimmed)

Set the trimmed nature of the dual space.

setNumComponents(nc)

Set the number of components for this space.

setOrder(order)

Set the order of the dual space.

setSimpleDimension(dim)

Set the number of functionals in the dual space basis.

setSimpleFunctional(func, functional)

Set the given basis element for this dual space.

setType(dualspace_type)

Build a particular type of dual space.

setUp()

Construct a basis for a DualSpace.

view([viewer])

View a DualSpace.

Methods Documentation

create(comm=None)

Create an empty DualSpace object.

Collective.

The type can then be set with setType.

Parameters:

comm (Comm | None) – MPI communicator, defaults to Sys.getDefaultComm.

Return type:

Self

See also

petsc.PetscDualSpaceCreate

Source code at petsc4py/PETSc/Space.pyx:593

destroy()

Destroy the DualSpace object.

Collective.

See also

petsc.PetscDualSpaceDestroy

Source code at petsc4py/PETSc/Space.pyx:635

Return type:

Self

duplicate()

Create a duplicate DualSpace object that is not set up.

Collective.

See also

petsc.PetscDualSpaceDuplicate

Source code at petsc4py/PETSc/Space.pyx:648

Return type:

DualSpace

getDM()

Return the DM representing the reference cell of a DualSpace.

Not collective.

See also

setDM, petsc.PetscDualSpaceGetDM

Source code at petsc4py/PETSc/Space.pyx:661

Return type:

DM

getDimension()

Return the dimension of the dual space.

Not collective.

The dimension of the dual space, i.e. the number of basis functionals.

See also

petsc.PetscDualSpaceGetDimension

Source code at petsc4py/PETSc/Space.pyx:692

Return type:

int

getFunctional(i)

Return the i-th basis functional in the dual space.

Not collective.

Parameters:

i (int) – The basis number.

Return type:

Quad

See also

petsc.PetscDualSpaceGetFunctional

Source code at petsc4py/PETSc/Space.pyx:822

getInteriorDimension()

Return the interior dimension of the dual space.

Not collective.

The interior dimension of the dual space, i.e. the number of basis functionals assigned to the interior of the reference domain.

See also

petsc.PetscDualSpaceGetInteriorDimension

Source code at petsc4py/PETSc/Space.pyx:842

Return type:

int

getLagrangeContinuity()

Return whether the element is continuous.

Not collective.

See also

setLagrangeContinuity, petsc.PetscDualSpaceLagrangeGetContinuity

Source code at petsc4py/PETSc/Space.pyx:859

Return type:

bool

getLagrangeTensor()

Return the tensor nature of the dual space.

Not collective.

See also

setLagrangeTensor, petsc.PetscDualSpaceLagrangeGetTensor

Source code at petsc4py/PETSc/Space.pyx:891

Return type:

bool

getLagrangeTrimmed()

Return the trimmed nature of the dual space.

Not collective.

See also

setLagrangeTrimmed, petsc.PetscDualSpaceLagrangeGetTrimmed

Source code at petsc4py/PETSc/Space.pyx:923

Return type:

bool

getNumComponents()

Return the number of components for this space.

Not collective.

See also

setNumComponents, petsc.PetscDualSpaceGetNumComponents

Source code at petsc4py/PETSc/Space.pyx:708

Return type:

int

getNumDof()

Return the number of degrees of freedom for each spatial dimension.

Not collective.

See also

petsc.PetscDualSpaceGetNumDof

Source code at petsc4py/PETSc/Space.pyx:806

Return type:

ArrayInt

getOrder()

Return the order of the dual space.

Not collective.

See also

setOrder, petsc.PetscDualSpaceGetOrder

Source code at petsc4py/PETSc/Space.pyx:774

Return type:

int

getType()

Return the type of the dual space object.

Not collective.

See also

setType, petsc.PetscDualSpaceGetType

Source code at petsc4py/PETSc/Space.pyx:740

Return type:

str

setDM(dm)

Set the DM representing the reference cell.

Not collective.

Parameters:

dm (DM) – The reference cell.

Return type:

None

See also

getDM, petsc.PetscDualSpaceSetDM

Source code at petsc4py/PETSc/Space.pyx:675

setLagrangeContinuity(continuous)

Indicate whether the element is continuous.

Not collective.

Parameters:

continuous (bool) – The flag for element continuity.

Return type:

None

See also

getLagrangeContinuity, petsc.PetscDualSpaceLagrangeSetContinuity

Source code at petsc4py/PETSc/Space.pyx:873

setLagrangeTensor(tensor)

Set the tensor nature of the dual space.

Not collective.

Parameters:

tensor (bool) – Whether the dual space has tensor layout (vs. simplicial).

Return type:

None

See also

getLagrangeTensor, petsc.PetscDualSpaceLagrangeSetTensor

Source code at petsc4py/PETSc/Space.pyx:905

setLagrangeTrimmed(trimmed)

Set the trimmed nature of the dual space.

Not collective.

Parameters:

trimmed (bool) – Whether the dual space represents to dual basis of a trimmed polynomial space (e.g. Raviart-Thomas and higher order / other form degree variants).

Return type:

None

See also

getLagrangeTrimmed, petsc.PetscDualSpaceLagrangeSetTrimmed

Source code at petsc4py/PETSc/Space.pyx:937

setNumComponents(nc)

Set the number of components for this space.

Logically collective.

Parameters:

nc (int) – The number of components

Return type:

None

See also

getNumComponents, petsc.PetscDualSpaceSetNumComponents

Source code at petsc4py/PETSc/Space.pyx:722

setOrder(order)

Set the order of the dual space.

Not collective.

Parameters:

order (int) – The order.

Return type:

None

See also

getOrder, petsc.PetscDualSpaceSetOrder

Source code at petsc4py/PETSc/Space.pyx:788

setSimpleDimension(dim)

Set the number of functionals in the dual space basis.

Logically collective.

Parameters:

dim (int) – The basis dimension.

Return type:

None

See also

petsc.PetscDualSpaceSimpleSetDimension

Source code at petsc4py/PETSc/Space.pyx:957

setSimpleFunctional(func, functional)

Set the given basis element for this dual space.

Not collective.

Parameters:
  • func (int) – The basis index.

  • functional (Quad) – The basis functional.

Return type:

None

See also

petsc.PetscDualSpaceSimpleSetFunctional

Source code at petsc4py/PETSc/Space.pyx:975

setType(dualspace_type)

Build a particular type of dual space.

Collective.

Parameters:

dualspace_type (Type | str) – The kind of space.

Return type:

Self

See also

getType, petsc.PetscDualSpaceSetType

Source code at petsc4py/PETSc/Space.pyx:754

setUp()

Construct a basis for a DualSpace.

Collective.

See also

petsc.PetscDualSpaceSetUp

Source code at petsc4py/PETSc/Space.pyx:581

Return type:

None

view(viewer=None)

View a DualSpace.

Collective.

Parameters:

viewer (Viewer | None) – A Viewer to display the DualSpace.

Return type:

None

See also

petsc.PetscDualSpaceView

Source code at petsc4py/PETSc/Space.pyx:616