petsc4py.PETSc.Space#
- class petsc4py.PETSc.Space#
Bases:
Object
Function space object.
Enumerations
The function space types.
Methods Summary
create
([comm])Create an empty
Space
object.destroy
()Destroy the
Space
object.Return the polynomial degrees that characterize this space.
Return the number of basis vectors.
Return the number of components for this space.
Return the number of variables for this space.
Return the form degree of the trimmed polynomials.
Return the evaluation points for the space as the points of a quad.
Return whether a function space is a space of tensor polynomials.
Return the concatenate flag for this space.
Return the number of spaces in the sum.
Return a space in the sum.
Return the number of spaces in the tensor product.
Return a space in the tensor product.
getType
()Return the type of the space object.
setDegree
(degree, maxDegree)Set the degree of approximation for this space.
Set parameters in
Space
from the options database.setNumComponents
(nc)Set the number of components for this space.
Set the number of variables for this space.
setPTrimmedFormDegree
(formDegree)Set the form degree of the trimmed polynomials.
setPointPoints
(quad)Set the evaluation points for the space to be based on a quad.
setPolynomialTensor
(tensor)Set whether a function space is a space of tensor polynomials.
setSumConcatenate
(concatenate)Set the concatenate flag for this space.
setSumNumSubspaces
(numSumSpaces)Set the number of spaces in the sum.
setSumSubspace
(s, subsp)Set a space in the sum.
setTensorNumSubspaces
(numTensSpaces)Set the number of spaces in the tensor product.
setTensorSubspace
(s, subsp)Set a space in the tensor product.
setType
(space_type)Build a particular type of space.
setUp
()Construct data structures for the
Space
.view
([viewer])View a
Space
.Methods Documentation
- create(comm=None)#
Create an empty
Space
object.Collective.
The type can then be set with
setType
.- Parameters:
comm (Comm | None) – MPI communicator, defaults to
Sys.getDefaultComm
.- Return type:
See also
- destroy()#
Destroy the
Space
object.Collective.
See also
Source code at petsc4py/PETSc/Space.pyx:59
- Return type:
- getDegree()#
Return the polynomial degrees that characterize this space.
Not collective.
- Returns:
- Return type:
See also
- getDimension()#
Return the number of basis vectors.
Not collective.
See also
Source code at petsc4py/PETSc/Space.pyx:103
- Return type:
- getNumComponents()#
Return the number of components for this space.
Not collective.
See also
Source code at petsc4py/PETSc/Space.pyx:195
- Return type:
- getNumVariables()#
Return the number of variables for this space.
Not collective.
See also
Source code at petsc4py/PETSc/Space.pyx:163
- Return type:
- getPTrimmedFormDegree()#
Return the form degree of the trimmed polynomials.
Not collective.
Source code at petsc4py/PETSc/Space.pyx:545
- Return type:
- getPointPoints()#
Return the evaluation points for the space as the points of a quad.
Logically collective.
See also
Source code at petsc4py/PETSc/Space.pyx:513
- Return type:
- getPolynomialTensor()#
Return whether a function space is a space of tensor polynomials.
Not collective.
Return
True
if a function space is a space of tensor polynomials (the space is spanned by polynomials whose degree in each variable is bounded by the given order), as opposed to polynomials (the space is spanned by polynomials whose total degree—summing over all variables is bounded by the given order).Source code at petsc4py/PETSc/Space.pyx:448
- Return type:
- getSumConcatenate()#
Return the concatenate flag for this space.
Not collective.
A concatenated sum space will have the number of components equal to the sum of the number of components of all subspaces. A non-concatenated, or direct sum space will have the same number of components as its subspaces.
See also
Source code at petsc4py/PETSc/Space.pyx:261
- Return type:
- getSumNumSubspaces()#
Return the number of spaces in the sum.
Not collective.
Source code at petsc4py/PETSc/Space.pyx:304
- Return type:
- getSumSubspace(s)#
Return a space in the sum.
Not collective.
See also
- getTensorNumSubspaces()#
Return the number of spaces in the tensor product.
Not collective.
Source code at petsc4py/PETSc/Space.pyx:376
- Return type:
- getTensorSubspace(s)#
Return a space in the tensor product.
Not collective.
See also
- getType()#
Return the type of the space object.
Not collective.
See also
Source code at petsc4py/PETSc/Space.pyx:227
- Return type:
- setDegree(degree, maxDegree)#
Set the degree of approximation for this space.
Logically collective.
One of
degree
andmaxDegree
can beNone
.- Parameters:
- Return type:
See also
- setFromOptions()#
Set parameters in
Space
from the options database.Collective.
Source code at petsc4py/PETSc/Space.pyx:91
- Return type:
- setNumComponents(nc)#
Set the number of components for this space.
Logically collective.
See also
- setNumVariables(n)#
Set the number of variables for this space.
Logically collective.
See also
- setPTrimmedFormDegree(formDegree)#
Set the form degree of the trimmed polynomials.
Logically collective.
- setPointPoints(quad)#
Set the evaluation points for the space to be based on a quad.
Logically collective.
Sets the evaluation points for the space to coincide with the points of a quadrature rule.
See also
- setPolynomialTensor(tensor)#
Set whether a function space is a space of tensor polynomials.
Logically collective.
Set to
True
for a function space which is a space of tensor polynomials (the space is spanned by polynomials whose degree in each variable is bounded by the given order), as opposed to polynomials (the space is spanned by polynomials whose total degree—summing over all variables is bounded by the given order).
- setSumConcatenate(concatenate)#
Set the concatenate flag for this space.
Logically collective.
A concatenated sum space will have the number of components equal to the sum of the number of components of all subspaces. A non-concatenated, or direct sum space will have the same number of components as its subspaces.
- Parameters:
concatenate (bool) –
True
if subspaces are concatenated components,False
if direct summands.- Return type:
See also
- setSumNumSubspaces(numSumSpaces)#
Set the number of spaces in the sum.
Logically collective.
- setSumSubspace(s, subsp)#
Set a space in the sum.
Logically collective.
See also
- setTensorNumSubspaces(numTensSpaces)#
Set the number of spaces in the tensor product.
Logically collective.
- setTensorSubspace(s, subsp)#
Set a space in the tensor product.
Logically collective.
See also
- setType(space_type)#
Build a particular type of space.
Collective.
See also
- setUp()#
Construct data structures for the
Space
.Collective.
See also
Source code at petsc4py/PETSc/Space.pyx:24
- Return type: