[petsc-users] Rigid body nullspace for Stokes operator

Mark Adams mfadams at lbl.gov
Tue Oct 29 09:35:07 CDT 2024


Oh my mistake. You are using staggered grids. So you don't have a block
size that hypre would use for the "nodal" methods.
I'm not sure what you are doing exactly, but try hypre and you could create
the null space, zero energy modes, manually, attach to the matrix and try
GAMG.
You can run with '-info :pc' and grep on GAMG to see if GAMG is picking the
null space up (send this output if you can't figure it out).

Thanks,
Mark

On Tue, Oct 29, 2024 at 9:28 AM Mark Adams <mfadams at lbl.gov> wrote:

> This coordinate interface is just a shortcut for vertex based
> discretizations with 3 dof per vertex, etc. (maybe works in 2D).
> You will need to construct the null space vectors manually and attach it
> to the matrix. Used by GAMG.
>
> Note, for hypre you want to use the "nodal" options and it does not use
> these null space vectors. That is probably the way you want to go.
> eg: -pc_hypre_boomeramg_nodal_coarsen
>
> I would run with hypre boomerang and -help and grep on nodal to see all
> the "nodal" options and use them.
>
> Thanks,
> Mark
>
>
> On Mon, Oct 28, 2024 at 8:06 PM Amneet Bhalla <mail2amneet at gmail.com>
> wrote:
>
>> Hi Folks,
>>
>> I am trying to solve the momentum equation in a projection preconditioner
>> using GAMG or Hypre solver. The equation looks like for velocity variable
>> *v* looks like:
>>
>>
>>  [image: Screenshot 2024-10-28 at 4.15.17 PM.png]
>>
>> Here, μ is spatially varying dynamic viscosity and λ is spatially
>> varying bulk viscosity. I understand that I need to specify rigid body
>> nullspace modes to the multigrid solver in order to accelerate its
>> convergence. Looking into this routine MatNullSpaceCreateRigidBody() (
>> https://urldefense.us/v3/__https://petsc.org/release/manualpages/Mat/MatNullSpaceCreateRigidBody/__;!!G_uCfscf7eWS!fvbxApGfOnVAUcLkCZPIxbc5jwYHihkD1jmTEvL11YXyNA4lOMbAnVq07EV5NPvtjqYVtD9iNVbIoU_JvyhjM_M$ 
>> <https://urldefense.us/v3/__https://petsc.org/release/manualpages/Mat/MatNullSpaceCreateRigidBody/__;!!G_uCfscf7eWS!eKqgIJjCdMzIU76f7X65AmGxrU_-lC7W02BMWafJ77DNf_IuQk6O1X3qU1x9Ez8NJ20vZEL-mF6T1yNmDnwv0eWa2w$>),
>> I see that I need to provide the coordinates of each node. I am using
>> staggered grid discretization. Do I need to provide coordinates of
>> staggered grid locations?
>>
>> Thanks,
>> --
>> --Amneet
>>
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20241029/e2903113/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2024-10-28 at 4.15.17 PM.png
Type: image/png
Size: 17171 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20241029/e2903113/attachment.png>


More information about the petsc-users mailing list