[petsc-users] Removing rigid body motion using Null Space

Barry Smith bsmith at mcs.anl.gov
Tue Jul 28 12:23:37 CDT 2015

> On Jul 28, 2015, at 11:51 AM, Hom Nath Gharti <hng.email at gmail.com> wrote:
> Dear all,
> After searching old mailing lists, it appears that the rigid body
> motion can be removed using Null Space features in PETSc.
> Unfortunately, I could not successfully implement this to a simple
> elastostatic problem. I have an unconstrained sphere and I need to
> compute displacement field due to a point load on the surface.
> I tried:
> call MatNullSpaceCreate(PETSC_COMM_WORLD,PETSC_TRUE,0,0,nullspace,ierr)
> call MatSetNullSpace(Kmat,nullspace,ierr)
> call MatNullSpaceRemove(nullspace,bvec,PETSC_NULL_OBJECT,ierr)

    This won't provide the rigid body motions (translations and rotations) this only provides a constant null space. Perhaps you need MatNullSpaceCreateRigidBody()


> call MatNullSpaceDestroy(nullspace,ierr)
> But the solution did not converge! Any help/hint would be greatly appreciated.
> Best,
> Hom Nath

More information about the petsc-users mailing list