petsc4py.PETSc.DualSpace#

class petsc4py.PETSc.DualSpace#

Bases: Object

Dual space to a linear space.

Enumerations

Type

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.

viewFromOptions(name[, obj])

View a DualSpace based on values in the options database.

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:581

destroy()#

Destroy the DualSpace object.

Collective.

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

Return type:

Self

duplicate()#

Create a duplicate DualSpace object that is not set up.

Collective.

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

Return type:

DualSpace

getDM()#

Return the DM representing the reference cell of a DualSpace.

Not collective.

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

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:680

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:806

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:826

Return type:

int

getLagrangeContinuity()#

Return whether the element is continuous.

Not collective.

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

Return type:

bool

getLagrangeTensor()#

Return the tensor nature of the dual space.

Not collective.

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

Return type:

bool

getLagrangeTrimmed()#

Return the trimmed nature of the dual space.

Not collective.

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

Return type:

bool

getNumComponents()#

Return the number of components for this space.

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

Return type:

int

getNumDof()#

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

Not collective.

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

Return type:

ArrayInt

getOrder()#

Return the order of the dual space.

Not collective.

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

Return type:

int

getType()#

Return the type of the dual space object.

Not collective.

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

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:663

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:857

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:889

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:921

setNumComponents(nc)#

Set the number of components for this space.

Parameters:

nc (int) – The number of components

Return type:

None

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

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:772

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:964

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:982

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:738

setUp()#

Construct a basis for a DualSpace.

Collective.

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

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:604

viewFromOptions(name, obj=None)#

View a DualSpace based on values in the options database.

Collective.

Parameters:
  • name (str) – Command line option name.

  • obj (Object | None) – Optional object that provides the options prefix.

Return type:

None

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