Re: [petsc-users] GAMG failure
* 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 estimates as its iterating. You can look at that to check that the max has converged. * -pc_gamg_aggressive_coarsening 0 will slow coarsening as well as threshold. * you can run with '-info :pc' and send me the output (grep on GAMG) Mark On Fri, Mar 24, 2023 at 2:47 PM Jed Brown wrote: > 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 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 converges fine (although slowly of course). > > > > > > I am not really surprised that gamg would not converge out of the box, > but don’t know where to start to investigate the convergence failure. Can > anybody help? > > > > Blaise > > > > — > > Canada Research Chair in Mathematical and Computational Aspects of Solid > Mechanics (Tier 1) > > Professor, Department of Mathematics & Statistics > > Hamilton Hall room 409A, McMaster University > > 1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada > > https://www.math.mcmaster.ca/bourdin | +1 (905) 525 9140 ext. 27243 >
Re: [petsc-users] GAMG failure
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 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 converges > fine (although slowly of course). > > > I am not really surprised that gamg would not converge out of the box, but > don’t know where to start to investigate the convergence failure. Can anybody > help? > > Blaise > > — > Canada Research Chair in Mathematical and Computational Aspects of Solid > Mechanics (Tier 1) > Professor, Department of Mathematics & Statistics > Hamilton Hall room 409A, McMaster University > 1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada > https://www.math.mcmaster.ca/bourdin | +1 (905) 525 9140 ext. 27243
[petsc-users] GAMG failure
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 converges fine (although slowly of course). I am not really surprised that gamg would not converge out of the box, but don’t know where to start to investigate the convergence failure. Can anybody help? Blaise — Canada Research Chair in Mathematical and Computational Aspects of Solid Mechanics (Tier 1) Professor, Department of Mathematics & Statistics Hamilton Hall room 409A, McMaster University 1280 Main Street West, Hamilton, Ontario L8S 4K1, Canada https://www.math.mcmaster.ca/bourdin | +1 (905) 525 9140 ext. 27243