Re: [petsc-users] GAMG failure

2023-03-28 Thread Mark Adams
On Tue, Mar 28, 2023 at 12:38 PM Blaise Bourdin wrote: > > > On Mar 27, 2023, at 9:11 PM, Mark Adams wrote: > > Yes, the eigen estimates are converging slowly. > > BTW, have you tried hypre? It is a good solver (lots lots more woman years) > These eigen estimates are conceptually simple, but

Re: [petsc-users] GAMG failure

2023-03-28 Thread Jed Brown
This suite has been good for my solid mechanics solvers. (It's written here as a coarse grid solver because we do matrix-free p-MG first, but you can use it directly.) https://github.com/hypre-space/hypre/issues/601#issuecomment-1069426997 Blaise Bourdin writes: > On Mar 27, 2023, at 9:11

Re: [petsc-users] GAMG failure

2023-03-28 Thread Blaise Bourdin
On Mar 27, 2023, at 9:11 PM, Mark Adams wrote: Yes, the eigen estimates are converging slowly. BTW, have you tried hypre? It is a good solver (lots lots more woman years) These eigen estimates are conceptually simple, but they can lead to problems like this (hypre and an

Re: [petsc-users] GAMG failure

2023-03-27 Thread Mark Adams
Yes, the eigen estimates are converging slowly. BTW, have you tried hypre? It is a good solver (lots lots more woman years) These eigen estimates are conceptually simple, but they can lead to problems like this (hypre and an eigen estimate free smoother). But try this (good to have options

Re: [petsc-users] GAMG failure

2023-03-27 Thread Jed Brown
Try -pc_gamg_reuse_interpolation 0. I thought this was disabled by default, but I see pc_gamg->reuse_prol = PETSC_TRUE in the code. Blaise Bourdin writes: > On Mar 24, 2023, at 3:21 PM, Mark Adams wrote: > > * Do you set: > > PetscCall(MatSetOption(Amat, MAT_SPD, PETSC_TRUE)); > >

Re: [petsc-users] GAMG failure

2023-03-27 Thread Blaise Bourdin
On Mar 24, 2023, at 3:21 PM, Mark Adams wrote: * Do you set:     PetscCall(MatSetOption(Amat, MAT_SPD, PETSC_TRUE));     PetscCall(MatSetOption(Amat, MAT_SPD_ETERNAL, PETSC_TRUE)); Yes Do that to get CG Eigen estimates.

Re: [petsc-users] GAMG failure

2023-03-24 Thread Mark Adams
* Do you set: PetscCall(MatSetOption(Amat, MAT_SPD, PETSC_TRUE)); PetscCall(MatSetOption(Amat, MAT_SPD_ETERNAL, PETSC_TRUE)); Do that to get CG Eigen estimates. Outright failure is usually caused by a bad Eigen estimate. -pc_gamg_esteig_ksp_monitor_singular_value Will print out the

Re: [petsc-users] GAMG failure

2023-03-24 Thread Jed Brown
You can -pc_gamg_threshold .02 to slow the coarsening and either stronger smoother or increase number of iterations used for estimation (or increase tolerance). I assume your system is SPD and you've set the near-null space. Blaise Bourdin writes: > Hi, > > I am having issue with GAMG for

[petsc-users] GAMG failure

2023-03-24 Thread Blaise Bourdin
Hi, I am having issue with GAMG for some very ill-conditioned 2D linearized elasticity problems (sharp variation of elastic moduli with thin regions of nearly incompressible material). I use snes_type newtonls, linesearch_type cp, and pc_type gamg without any further options. pc_type Jacobi

Re: [petsc-users] gamg failure with petsc-dev

2014-08-06 Thread Mark Adams
Mark, should we provide some more flexible way to label fields? It will be more complicated than the present code and I think packing into interlaced format is faster anyway. I'm thinking this would entail reordering the matrix and inverting this permutation for the fine grid R P. This

Re: [petsc-users] gamg failure with petsc-dev

2014-04-01 Thread Mark Adams
Stephan, I have pushed a pull request to fix this but for now you can just use -mg_levels_ksp_type chebyshev -mg_levels_pc_type jacobi. This used to be the default be we move to SOR recently. Mark On Sat, Mar 29, 2014 at 5:52 PM, Mark Adams mfad...@lbl.gov wrote: Sorry for getting to this

Re: [petsc-users] gamg failure with petsc-dev

2014-04-01 Thread Stephan Kramer
On 01/04/14 16:07, Mark Adams wrote: Stephan, I have pushed a pull request to fix this but for now you can just use -mg_levels_ksp_type chebyshev -mg_levels_pc_type jacobi. This used to be the default be we move to SOR recently. Mark Ah, that's great news. Thanks a lot for the effort. You're

Re: [petsc-users] gamg failure with petsc-dev

2014-04-01 Thread Jed Brown
Stephan Kramer s.kra...@imperial.ac.uk writes: Yes indeed. I've come to realize this now by looking into how smoothed aggregation with a near null space actually works. We currently have our dofs numbered the wrong way around (vertices on the inside, velocity component on the outside - which

Re: [petsc-users] gamg failure with petsc-dev

2014-03-29 Thread Mark Adams
Sorry for getting to this late. I think you have figured it out basically but there are a few things: 1) You must set the block size of A (bs=2) for the null spaces to work and for aggregation MG to work properly. SA-AMG really does not make sense unless you work at the vertex level, for which

Re: [petsc-users] gamg failure with petsc-dev

2014-03-24 Thread Stephan Kramer
On 21/03/14 11:34, Stephan Kramer wrote: On 21/03/14 04:24, Jed Brown wrote: Stephan Kramer s.kra...@imperial.ac.uk writes: We have been having some problems with GAMG on petsc-dev (master) for cases that worked fine on petsc 3.4. We're solving a Stokes equation (just the velocity block) for

Re: [petsc-users] gamg failure with petsc-dev

2014-03-21 Thread Stephan Kramer
On 21/03/14 04:24, Jed Brown wrote: Stephan Kramer s.kra...@imperial.ac.uk writes: We have been having some problems with GAMG on petsc-dev (master) for cases that worked fine on petsc 3.4. We're solving a Stokes equation (just the velocity block) for a simple convection in a square box

[petsc-users] gamg failure with petsc-dev

2014-03-20 Thread Stephan Kramer
Hi guys, We have been having some problems with GAMG on petsc-dev (master) for cases that worked fine on petsc 3.4. We're solving a Stokes equation (just the velocity block) for a simple convection in a square box (isoviscous). The problem only occurs if we supply a near null space (via

Re: [petsc-users] gamg failure with petsc-dev

2014-03-20 Thread Jed Brown
Stephan Kramer s.kra...@imperial.ac.uk writes: We have been having some problems with GAMG on petsc-dev (master) for cases that worked fine on petsc 3.4. We're solving a Stokes equation (just the velocity block) for a simple convection in a square box (isoviscous). The problem only occurs if