petsc4py.PETSc.NullSpace
- class petsc4py.PETSc.NullSpace
Bases:
Object
Nullspace object.
See also
petsc.MatNullSpace
Methods Summary
create
([constant, vectors, comm])Create the null space.
createRigidBody
(coords)Create rigid body modes from coordinates.
destroy
()Destroy the null space.
Return the callback to remove the nullspace.
getVecs
()Return the vectors defining the null space.
Return whether the null space contains the constant.
remove
(vec)Remove all components of a null space from a vector.
setFunction
(function[, args, kargs])Set the callback to remove the nullspace.
test
(mat)Return if the claimed null space is valid for a matrix.
view
([viewer])View the null space.
Methods Documentation
- create(constant=False, vectors=(), comm=None)
Create the null space.
Collective.
- Parameters:
constant (bool) – A flag to indicate the null space contains the constant vector.
vectors (Sequence[Vec]) – The sequence of vectors that span the null space.
comm – MPI communicator, defaults to
Sys.getDefaultComm
.
- Return type:
See also
destroy
,petsc.MatNullSpaceCreate
- createRigidBody(coords)
Create rigid body modes from coordinates.
Collective.
- Parameters:
coords (Vec) – The block coordinates of each node. Requires the block size to have been set.
- Return type:
See also
petsc.MatNullSpaceCreateRigidBody
- destroy()
Destroy the null space.
Collective.
See also
create
,petsc.MatNullSpaceDestroy
Source code at petsc4py/PETSc/Mat.pyx:5643
- Return type:
- getFunction()
Return the callback to remove the nullspace.
Not collective.
See also
Source code at petsc4py/PETSc/Mat.pyx:5785
- Return type:
- getVecs()
Return the vectors defining the null space.
Not collective.
See also
petsc.MatNullSpaceGetVecs
- hasConstant()
Return whether the null space contains the constant.
Not collective.
See also
petsc.MatNullSpaceGetVecs
Source code at petsc4py/PETSc/Mat.pyx:5749
- Return type:
- remove(vec)
Remove all components of a null space from a vector.
Collective.
See also
petsc.MatNullSpaceRemove
- setFunction(function, args=None, kargs=None)
Set the callback to remove the nullspace.
Logically collective.
- Parameters:
- Return type:
See also
getFunction
,petsc.MatNullSpaceSetFunction
- test(mat)
Return if the claimed null space is valid for a matrix.
Collective.
See also
petsc.MatNullSpaceTest