From: Dmitry K. <ka...@mc...> - 2013-05-09 21:01:33
|
GAMG is primarily an algebraic multigrid preconditioner. The geometric part is somewhat weaker and isn't the primary purpose of GAMG, so I would recommend using -pc_gamg_type agg for plain aggregation. For good performance with elasticity it is important to use smoothed aggregation, for example, -pc_gamg_agg_nsmooths 1 but for that to be effective, it is critical to supply a "nearnullspace" -- basically, the nullspace of the Neumann operator. It is the rigid body modes in the case of elasticity. If you are able to specify the block size of the matrix, GAMG will try to guess the correct nearnullspace for you. In particular bs=3 will cause GAMG to construct the rigid body modes from the coordinates set with PCSetCoordinates. Now, libMesh doesn't have an API for setting the matrix block size (as far as I know). You can hack a bit: extract the PETSc objects and do it yourself, but a more natural way is to compute your own rigid body modes in a callback attached to NonlinearSolver::nearnullspace or NonlinearSolver::nearnullspace_object. A nearnullspace is simply an array of NumericVector that contains a basis for the nearnullspace. libMesh will orthonormalize it for you (PETSc requires that). Hope this helps. Dmitry. On Thu, May 9, 2013 at 11:08 AM, Cody Permann <cod...@gm...> wrote: > On Thu, May 9, 2013 at 9:18 AM, Ataollah Mesgarnejad < > am...@ti... > > wrote: > > > > > Cody, > > > > On May 9, 2013, at 9:29 AM, Cody Permann <cod...@gm...> wrote: > > > > > > > > > > On Thu, May 9, 2013 at 8:07 AM, Ataollah Mesgarnejad < > > am...@ti...> wrote: > > > >> Dear all, > >> > >> I was wondering if anyone has any experience using gamg with libMesh > (I'm > >> particularly interested in elasticity)? > >> > >> > > It certainly works, however in my very limited experiecne, it's slightly > > more tricky to use than Hypre as we've found that it requires a few more > > options. Gamg is very flexible and part of PETSc so it ties in nicely. > > > > > > > > That's wonderful. Do I need to add anything in the code itself like block > > size or ..? Or do you mean the command line options for gamg? > > > > Just the command line options. If you have specific questions, the petsc > user list is a great place to ask. > > Cody > > > > > My main question would be if the geometric part of gamg would work with > >> the underlying mesh structure in libMesh? > >> > > > > I'm not sure if I'm missing something with this question. I don't see > why > > this preconditioner would care about the mesh structure, it's abstracted > > well above that level. From libMesh's perspective, it's just another > > preconditioner. > > > > > > OK. I'm not very familiar with low level structure in libMesh so I wasn't > > sure. > > > > Thanks, > > Ata > > > > > > Cody > > > > > >> > >> I would appreciate any comments/recommendations, > >> Ata > >> > >> > ------------------------------------------------------------------------------ > >> Learn Graph Databases - Download FREE O'Reilly Book > >> "Graph Databases" is the definitive new guide to graph databases and > >> their applications. This 200-page book is written by three acclaimed > >> leaders in the field. The early access version is available now. > >> Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > >> _______________________________________________ > >> Libmesh-users mailing list > >> Lib...@li... > >> https://lists.sourceforge.net/lists/listinfo/libmesh-users > >> > > > > > > > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and > their applications. This 200-page book is written by three acclaimed > leaders in the field. The early access version is available now. > Download your free book today! http://p.sf.net/sfu/neotech_d2d_may > _______________________________________________ > Libmesh-users mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libmesh-users > |