petsc4py.PETSc.NullSpace#
- class petsc4py.PETSc.NullSpace#
Bases:
Object
Nullspace object.
See also
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
- 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
- destroy()#
Destroy the null space.
Collective.
See also
Source code at petsc4py/PETSc/Mat.pyx:5786
- Return type:
- getFunction()#
Return the callback to remove the nullspace.
Not collective.
See also
Source code at petsc4py/PETSc/Mat.pyx:5926
- Return type:
- getVecs()#
Return the vectors defining the null space.
Not collective.
See also
- hasConstant()#
Return whether the null space contains the constant.
Not collective.
See also
Source code at petsc4py/PETSc/Mat.pyx:5890
- Return type:
- remove(vec)#
Remove all components of a null space from a vector.
Collective.
See also
- setFunction(function, args=None, kargs=None)#
Set the callback to remove the nullspace.
Logically collective.
- Parameters:
- Return type:
See also
- test(mat)#
Return if the claimed null space is valid for a matrix.
Collective.
See also