[petsc-users] 2D Poisson on nonuniform meshes
Barry Smith
bsmith at mcs.anl.gov
Tue Sep 1 14:01:27 CDT 2015
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 <filippo.leonardi at sam.math.ethz.ch> 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
More information about the petsc-users
mailing list