You need to get the nonuniform finite difference stencil right and the refinement right and the interpolation right. For example when you refine are you putting the new grid points 1/2 way between the coarser 2 or defined by the "grading" of the coarse mesh. I recommend doing the problem with 1d to understand exactly what you are doing, get it working there. Once you understand it doing 2 or 3d is easy.
Barry > On Sep 1, 2015, at 2:22 AM, Filippo Leonardi > <[email protected]> wrote: > > Dear PETSc Users, > > I want to use multigrid to solve uniform (just Laplace) poisson in 2D/3D on > cartesian, non-uniform meshes with a standard 5 (7)-points stencil FD. > > I always scaled my Poisson matrix like in the doc examples, i.e. multiplying > by dx*dy (so that in ComputeRHS I need to scale b, in A*x = b, as well). This > always worked properly with both MG/GAMG and with galerkin matrices. > > Now I'd like to use non-uniform meshes, therefore the scaling is non-uniform. > However I cannot get my matrices to scale properly with any sort of multigrid. > > One would think that without scaling, i.e. solving the original system, at > least MG+galerkin or GAMG should work anyways provided the matrix A and b are > consistent. > > I tried without boundaries (i.e. torus), so this is not the problem. > > Anyone did/knows how to do this properly? > > Thanks, > F
