petsc4py.PETSc.Space¶
- class petsc4py.PETSc.Space¶
Bases:
ObjectLinear space object.
Enumerations
Methods Summary
create([comm])Create an empty
Spaceobject.destroy()Destroy the
Spaceobject.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
Spacefrom 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.viewFromOptions(name[, obj])View a
Spacebased on values in the options database.Methods Documentation
- create(comm=None)¶
Create an empty
Spaceobject.Collective.
The type can then be set with
setType.- Parameters:
comm (Comm | None) – MPI communicator, defaults to
Sys.getDefaultComm.- Return type:
See also
petsc.PetscSpaceCreate
- destroy()¶
Destroy the
Spaceobject.Collective.
See also
petsc.PetscSpaceDestroySource code at petsc4py/PETSc/Space.pyx:57
- Return type:
- getDegree()¶
Return the polynomial degrees that characterize this space.
- Returns:
- Return type:
See also
setDegree,petsc.PetscSpaceGetDegree
- getDimension()¶
Return the number of basis vectors.
See also
petsc.PetscSpaceGetDimensionSource code at petsc4py/PETSc/Space.pyx:101
- Return type:
- getNumComponents()¶
Return the number of components for this space.
See also
setNumComponents,petsc.PetscSpaceGetNumComponentsSource code at petsc4py/PETSc/Space.pyx:184
- Return type:
- getNumVariables()¶
Return the number of variables for this space.
See also
setNumVariables,petsc.PetscSpaceGetNumVariablesSource code at petsc4py/PETSc/Space.pyx:156
- Return type:
- getPTrimmedFormDegree()¶
Return the form degree of the trimmed polynomials.
See also
setPTrimmedFormDegree,petsc.PetscSpacePTrimmedGetFormDegreeSource code at petsc4py/PETSc/Space.pyx:515
- Return type:
- getPointPoints()¶
Return the evaluation points for the space as the points of a quad.
Logically collective.
See also
setPointPoints,petsc.PetscSpacePointGetPointsSource code at petsc4py/PETSc/Space.pyx:485
- Return type:
- getPolynomialTensor()¶
Return whether a function space is a space of tensor polynomials.
Return
Trueif 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).See also
setPolynomialTensor,petsc.PetscSpacePolynomialGetTensorSource code at petsc4py/PETSc/Space.pyx:424
- Return type:
- getSumConcatenate()¶
Return the concatenate flag for this space.
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
setSumConcatenate,petsc.PetscSpaceSumGetConcatenateSource code at petsc4py/PETSc/Space.pyx:257
- Return type:
- getSumNumSubspaces()¶
Return the number of spaces in the sum.
See also
setSumNumSubspaces,petsc.PetscSpaceSumGetNumSubspacesSource code at petsc4py/PETSc/Space.pyx:296
- Return type:
- getSumSubspace(s)¶
Return a space in the sum.
See also
setSumSubspace,petsc.PetscSpaceSumGetSubspace
- getTensorNumSubspaces()¶
Return the number of spaces in the tensor product.
See also
setTensorNumSubspaces,petsc.PetscSpaceTensorGetNumSubspacesSource code at petsc4py/PETSc/Space.pyx:360
- Return type:
- getTensorSubspace(s)¶
Return a space in the tensor product.
See also
setTensorSubspace,petsc.PetscSpaceTensorGetSubspace
- getType()¶
Return the type of the space object.
Not collective.
See also
setType,petsc.PetscSpaceGetTypeSource code at petsc4py/PETSc/Space.pyx:223
- Return type:
- setDegree(degree, maxDegree)¶
Set the degree of approximation for this space.
One of
degreeandmaxDegreecan beNone.- Parameters:
- Return type:
See also
getDegree,petsc.PetscSpaceSetDegree
- setFromOptions()¶
Set parameters in
Spacefrom the options database.Collective.
See also
Working with PETSc options (TODO),
petsc.PetscSpaceSetFromOptionsSource code at petsc4py/PETSc/Space.pyx:89
- Return type:
- setNumComponents(nc)¶
Set the number of components for this space.
See also
getNumComponents,petsc.PetscSpaceSetNumComponents
- setNumVariables(n)¶
Set the number of variables for this space.
See also
getNumVariables,petsc.PetscSpaceSetNumVariables
- setPTrimmedFormDegree(formDegree)¶
Set the form degree of the trimmed polynomials.
See also
getPTrimmedFormDegree,petsc.PetscSpacePTrimmedSetFormDegree
- 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
getPointPoints,petsc.PetscSpacePointSetPoints
- setPolynomialTensor(tensor)¶
Set whether a function space is a space of tensor polynomials.
Set to
Truefor 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).- Parameters:
tensor (bool) –
Truefor a tensor polynomial space,Falsefor a polynomial space.- Return type:
See also
getPolynomialTensor,petsc.PetscSpacePolynomialSetTensor
- setSumConcatenate(concatenate)¶
Set the concatenate flag for this space.
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) –
Trueif subspaces are concatenated components,Falseif direct summands.- Return type:
See also
getSumConcatenate,petsc.PetscSpaceSumSetConcatenate
- setSumNumSubspaces(numSumSpaces)¶
Set the number of spaces in the sum.
See also
getSumNumSubspaces,petsc.PetscSpaceSumSetNumSubspaces
- setSumSubspace(s, subsp)¶
Set a space in the sum.
See also
getSumSubspace,petsc.PetscSpaceSumSetSubspace
- setTensorNumSubspaces(numTensSpaces)¶
Set the number of spaces in the tensor product.
See also
getTensorNumSubspaces,petsc.PetscSpaceTensorSetNumSubspaces
- setTensorSubspace(s, subsp)¶
Set a space in the tensor product.
See also
getTensorSubspace,petsc.PetscSpaceTensorSetSubspace
- setType(space_type)¶
Build a particular type of space.
Collective.
See also
getType,petsc.PetscSpaceSetType
- setUp()¶
Construct data structures for the
Space.Collective.
See also
petsc.PetscSpaceSetUpSource code at petsc4py/PETSc/Space.pyx:22
- Return type:
- viewFromOptions(name, obj=None)¶
View a
Spacebased on values in the options database.Collective.
- Parameters:
- Return type:
See also
Working with PETSc options (TODO),
petsc.PetscSpaceViewFromOptions