7

I am trying to solving a poisson equation in structured grid with Geometric Multigrid method. However, when coarsening the fine grid, I simply double the grid spacing at each successive level. That means that the number of points on the finest grid must be a power of 2. This is an undesirable constraint when doing some numerical simulations.

Is there any strategy to avoid this constraint (i.e., to use grids whose sizes are not powers of 2?

Thanks.

Aron Ahmadia
  • 6,951
  • 4
  • 34
  • 54
Anyang
  • 71
  • 3
  • 1
    You can use any grid sizes you want in geometric multigrid, are you asking how to build the appropriate restriction and coarsening operators? – Aron Ahmadia Jul 05 '12 at 23:03
  • Sorry, I mean the number of grid in some direction has to be the power of 2 in the method of GMG. If not the case, how to coarsen the grid. – Anyang Jul 07 '12 at 01:53
  • scicomp is a collaborative edited wiki, and we will clean up grammar/math formatting errors as we encounter them in questions and answers. Please contact the moderators or system staff if you have any questions about this policy. Thanks. – Aron Ahmadia Jul 08 '12 at 18:34

2 Answers2

4

All you need is a hierarchy of meshes that reduces sufficiently fast. You can use a 3:1 coarsening ratio, or you could use unstructured meshes, etc. There is no such restriction as the one you cite, even though it's common to implement the multigrid method with a 2:1 coarsening ratio.

Wolfgang Bangerth
  • 55,373
  • 59
  • 119
  • Yes, I can choose the the different ratio, but eventually the number of finest grid is also restricted. – Anyang Jul 07 '12 at 01:54
  • 1
    I think the question is whether one can use arbitrary grid sizes; e.g., a prime number. – David Ketcheson Jul 07 '12 at 06:23
  • I think a linear algebraic solver should not directly restrict the dimension of problems. – Anyang Jul 07 '12 at 06:56
  • 1
    @DavidKetcheson: You mean what do you do if you have a 5x5 mesh? You coarsen it to a 2x2 mesh where the four coarse mesh cells consists of 2x2, 2x3, 3x2 and 3x3 fine mesh cells, respectively. As I said, there is no real requirement on how to do the coarsening, it just needs to end up in a hierarchy of meshes. – Wolfgang Bangerth Jul 07 '12 at 11:36
  • @Anyang: I think you need to clarify your question since I'm not quite sure what exactly it is you are asking. – Wolfgang Bangerth Jul 07 '12 at 11:36
  • @WolfgangBangerth, as far as I understand, your comment is what he's looking for. – David Ketcheson Jul 07 '12 at 11:40
  • @WolfgangBangerth: Here I clarify my question: I discretize a Poisson equation using finite difference with the five-point stencil in computational region [0,1]x[0,1],each direction with 5 cells. And, the scalar variable is cell centered. So I get a 5X5 mesh. So How should I coarsen the grid. I did not catch the strategy you mentioned above. – Anyang Jul 08 '12 at 05:21
  • @DavidKetcheson: Yes, that is exactly what I am looking for, but I have not comprehended how to coarsen the fine mesh. Just because the number of mesh in each direction is not exactly power exponent of 2. – Anyang Jul 08 '12 at 05:26
  • @Anyang Read through Wolfgang's comment again. If you start with a cell-centered grid with corners at [0,1,2,3,4,5]x[0,1,2,3,4,5], you can use a 2x2 coarse grid with corners at [0,2,5]x[0,2,5], a 3x3 coarse grid [0,2,4,5]x[0,2,4,5], a 1x1 grid [0,5]x[0,5], etc. – Jed Brown Jul 08 '12 at 17:34
  • 1
    @JedBrown Following your strategy,I can get the coarse grid,in this case, I get a non-uniform grid size, therefore, how should I construct the Restriction and Interpolation operator? – Anyang Jul 09 '12 at 02:04
  • By the natural restriction and prolongation operators from a non-uniform grid to another non-uniform grid. Read through any multigrid book to see how this is done. – Wolfgang Bangerth Jul 09 '12 at 13:51
  • 1
    @WolfgangBangerth I did not find a multigrid book at my hand covers the prolongation and restriction of non-uniform grid. Could you please give me an suggestion? – Anyang Jul 09 '12 at 14:16
  • You're asking too much. What I mean is that if you understand how it works for uniform meshes, you will understand how it works for non-uniform meshes. You need to learn to understand, not just copy what others do or write. – Wolfgang Bangerth Jul 09 '12 at 15:53
3

Actually there's no restriction that the number of intervals in the fine grid should have to be a power of 2. This number can be either odd or even. No big deal. Take 1-dimension problem as an example, suppose the number of intervals in the fine grid is 7(Thus the number of nodes is 8), then you can use the following restriction operator

Columns 1 through 7

      0.5         0.25            0            0            0            0            0
        0         0.25          0.5         0.25            0            0            0
        0            0            0         0.25          0.5         0.25            0
        0            0            0            0            0         0.25          0.5

Column 8

        0
        0
        0
     0.25

If the number of intervals in the fine grid is 8(Thus the number of nodes is 9), then the restriction operator should be

Columns 1 through 7

      0.5         0.25            0            0            0            0            0
        0         0.25          0.5         0.25            0            0            0
        0            0            0         0.25          0.5         0.25            0
        0            0            0            0            0         0.25          0.5
        0            0            0            0            0            0            0

Columns 8 through 9

        0            0
        0            0
        0            0
     0.25            0
     0.25          0.5

So you see, whether the number of intervals in the fine grid is odd or even, the multigrid technique would work well.

Hanyu Ye
  • 191
  • 5
  • 1
    The first and last rows of your restriction operator do not sum to 1 -- is that okay? Or should they be scaled so that they sum to 1? Moreover, will the prolongation operator be a constant multiple of the transpose of the restriction operator, or will the first and last rows need to be multiplied by a different constant than the rest of the transposed restriction operator matrix? – nukeguy Jun 07 '16 at 19:58
  • I just realized that the sums of the rows of the restriction operators are irrelevant in a multigrid scheme. You can multiply the restriction operator by any invertible matrix and it won't change anything. Likewise, the sums of the columns of an interpolation operator are also irrelevant. – nukeguy Jul 20 '17 at 19:57