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

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

destroy()#

Destroy the DualSpace object.

Collective.

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

Return type:

Self

duplicate()#

Create a duplicate DualSpace object that is not set up.

Collective.

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

Return type:

DualSpace

getDM()#

Return the DM representing the reference cell of a DualSpace.

Not collective.

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.

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

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.

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

Return type:

int

getLagrangeContinuity()#

Return whether the element is continuous.

Not collective.

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

Return type:

bool

getLagrangeTensor()#

Return the tensor nature of the dual space.

Not collective.

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

Return type:

bool

getLagrangeTrimmed()#

Return the trimmed nature of the dual space.

Not collective.

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

Return type:

bool

getNumComponents()#

Return the number of components for this space.

Not collective.

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.

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

Return type:

ArrayInt

getOrder()#

Return the order of the dual space.

Not collective.

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

Return type:

int

getType()#

Return the type of the dual space object.

Not collective.

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

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

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

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

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

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

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

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

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

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

setUp()#

Construct a basis for a DualSpace.

Collective.

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

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