[petsc-users] Rigid body nullspace for Stokes operator
Amneet Bhalla
mail2amneet at gmail.com
Tue Oct 29 14:47:26 CDT 2024
Hi Mark,
Thanks! I am not sure how to construct null space and zero energy modes
manually for this operator. Is there some theory or documentation I can
follow to figure out what the null space and zero energy modes look like
for this operator? Once I know what these are in symbolic form, I think I
should be able to construct them manually.
Best,
--Amneet
On Tue, Oct 29, 2024 at 7:35 AM Mark Adams <mfadams at lbl.gov> wrote:
> 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!aMSTPnVUiWdbtpI6UINZH776-nK60U2dgj1Bdi0emhPwrO4arqfcByiLjc2h5-zJ200uYPq7HgtpUtfCgZLepbk2Fw$
>>> <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
>>>
>>>
>>>
>>>
--
--Amneet
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20241029/339cf204/attachment-0001.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/339cf204/attachment-0001.png>
More information about the petsc-users
mailing list