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

Jed Brown jed at jedbrown.org
Tue Jul 28 16:33:04 CDT 2015

Hom Nath Gharti <hng.email at gmail.com> writes:

> Thanks for your response. My example is also a elasticity problem
> where displacment is a vector-valued.

You called it "electrostatic".  Anyway, use the actual null space for
your operator and run the tests I mentioned.

> On Tue, Jul 28, 2015 at 3:38 PM, Jed Brown <jed at jedbrown.org> wrote:
>> Hom Nath Gharti <hng.email at gmail.com> writes:
>>> Dear all,
>>> After searching old mailing lists, it appears that the rigid body
>>> motion
>> "rigid body motion" refers to rotations and translations, which appear
>> in vector-valued problems like elasticity or fluids.
>>> can be removed using Null Space features in PETSc.  Unfortunately, I
>>> could not successfully implement this to a simple elastostatic
>>> problem.
>> What is vector-valued in your electrostatic 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)
>>> call MatNullSpaceDestroy(nullspace,ierr)
>>> But the solution did not converge! Any help/hint would be greatly appreciated.
>> Check that this really is the null space of the operator.  You can use
>> -ksp_test_null_space, for example.
>> Check that the preconditioner is stable.  Use a simple preconditioner on
>> a tiny problem to start with.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150728/989e1df2/attachment.pgp>

More information about the petsc-users mailing list