[petsc-users] Rigid body nullspace for Stokes operator
Jed Brown
jed at jedbrown.org
Tue Nov 5 14:40:53 CST 2024
The code snippet I shared contained orthogonalization. There isn't a VecQR or VecOrthogonalize, though such a utility would be useful. Right-looking modified Gram-Schmidt would be fine for that purpose, though Cholesky QR(2) may be a bit faster.
Amneet Bhalla <mail2amneet at gmail.com> writes:
> I set the rigid body null vectors but PETSc errors out that these are not
> orthogonal. Is there a canned routine in PETSc to orthogonalize a bunch of
> Vecs?
>
> [0]PETSC ERROR: Invalid argument
>
> [0]PETSC ERROR: Vector 0 must be orthogonal to vector 2, inner product is
> 0.612391
>
> [0]PETSC ERROR: See https://urldefense.us/v3/__https://petsc.org/release/faq/__;!!G_uCfscf7eWS!ZflPyOP4IDILfa8HbHnR6mnArgOdC6dZ_mtE9devYndPR0QSR4S1__A-ax9BF-jpScXFYeYXsw3fTEv4TSk$ for trouble shooting.
>
> [0]PETSC ERROR: Petsc Release Version 3.17.5, unknown
>
> [0]PETSC ERROR: ./acoustic_streaming_hier_integrator_2d on a darwin-dbg
> named APSB-MacBook-Pro-16.local by amneetb Mon Nov 4 18:01:09 2024
>
> [0]PETSC ERROR: Configure options --CC=mpicc --CXX=mpicxx --FC=mpif90
> --PETSC_ARCH=darwin-dbg --with-debugging=1 --download-hypre=1 --with-x=0
> -download-mumps -download-scalapack -download-parmetis -download-metis
> -download-ptscotch
>
> [0]PETSC ERROR: #1 MatNullSpaceCreate() at
> /Users/amneetb/Softwares/PETSc-Gitlab/PETSc/src/mat/interface/matnull.c:271
>
> [0]PETSC ERROR: #2 resetMatNearNullspace() at
> ../../../IBAMR/ibtk/lib/../src/solvers/impls/PETScKrylovLinearSolver.cpp:697
>
> P=00000:Program abort called in file
> ``../../../IBAMR/ibtk/lib/../src/solvers/impls/PETScKrylovLinearSolver.cpp''
> at line 697
>
> P=00000:ERROR MESSAGE:
>
> P=00000:
> Abort trap: 6
>
> On Mon, Nov 4, 2024 at 10:11 AM Jed Brown <jed at jedbrown.org> wrote:
>
>> Unless the problem is entirely floating (the true null space is all six
>> rigid body modes), then they will be different, so yes, you'll typically
>> have two MatNullSpace objects.
>>
>> Amneet Bhalla <mail2amneet at gmail.com> writes:
>>
>> > Hi Jed,
>> >
>> > Do I need to create two separate MattNullSpace objects if I want to use
>> > both MatSetNullSpace() and MatSetNearNullSpace()?
>> >
>> > Thanks,
>> >
>> >
>> > On Thu, Oct 31, 2024 at 8:18 AM Jed Brown <jed at jedbrown.org> wrote:
>> >
>> >> Pierre Jolivet <pierre at joliv.et> writes:
>> >>
>> >> >> On 31 Oct 2024, at 2:47 PM, Mark Adams <mfadams at lbl.gov> wrote:
>> >> >>
>> >> >> Interesting. I have seen hypre do fine on elasticity, but do you know
>> >> if boomeramg (classical) uses these vectors or is there a smoothed
>> >> aggregation solver in hypre?
>> >> >
>> >> > I’m not sure it is precisely “standard” smoothed aggregation, see
>> bottom
>> >> paragraph of
>> >>
>> https://urldefense.us/v3/__https://hypre.readthedocs.io/en/latest/solvers-boomeramg.html*amg-for-systems-of-pdes__;Iw!!G_uCfscf7eWS!fdj4AzKhAcDmM1x_ZQ8gxqWeX6BAKY9urnvATMpT7hC8lw77ak7tqxqXGIX3PMg2wYA5PGu7EzyCW0yzixutBg$
>> >> > I’ve never made it to work, but I know some do.
>> >> > A while back, Stefano gave me this pointer as well:
>> >>
>> https://urldefense.us/v3/__https://github.com/mfem/mfem/blob/17955e114020af340e9a06a66ebef43e05012d9c/linalg/hypre.cpp*L5245__;Iw!!G_uCfscf7eWS!fdj4AzKhAcDmM1x_ZQ8gxqWeX6BAKY9urnvATMpT7hC8lw77ak7tqxqXGIX3PMg2wYA5PGu7EzyCW0wVEi33Pw$
>> >>
>> >> It's still classical AMG, and in my experience, struggles on very thin
>> >> structures (e.g., aspect ratio 1000 cantilever beams) when compared to
>> SA.
>> >> However, it can be quite competitive for many structures. I found that
>> the
>> >> "MFEM elasticity suite", which is based on Baker et al 2010, gave rather
>> >> poor results. This is a configuration that works on GPUs and gives good
>> >> convergence and performance for elasticity:
>> >>
>> >>
>> >>
>> https://urldefense.us/v3/__https://github.com/hypre-space/hypre/issues/601*issuecomment-1069426997__;Iw!!G_uCfscf7eWS!arUVBVKKcYs1M5OhNqqRZl2b2o0NIUkG7fV_22qBbg-ssHhhHazhkpMbYNjCOTN66Sfbk-VZilfox9bxDf0$
>> >>
>> >> In the above issue, I was only using BoomerAMG as a coarse level for
>> p-MG
>> >> so all the options have a `-mg_coarse_` prefix; here are those options
>> >> without the prefix:
>> >>
>> >> -pc_hypre_boomeramg_coarsen_type pmis
>> >> -pc_hypre_boomeramg_interp_type ext+i
>> >> -pc_hypre_boomeramg_no_CF
>> >> -pc_hypre_boomeramg_P_max 6
>> >> -pc_hypre_boomeramg_print_statistics 1
>> >> -pc_hypre_boomeramg_relax_type_down Chebyshev
>> >> -pc_hypre_boomeramg_relax_type_up Chebyshev
>> >> -pc_hypre_boomeramg_strong_threshold 0.5
>> >> -pc_type hypre
>> >>
>> >
>> >
>> > --
>> > --Amneet
>>
>
>
> --
> --Amneet
More information about the petsc-users
mailing list