Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage of MGR #1209

Open
zongy17 opened this issue Jan 19, 2025 · 3 comments
Open

Usage of MGR #1209

zongy17 opened this issue Jan 19, 2025 · 3 comments

Comments

@zongy17
Copy link

zongy17 commented Jan 19, 2025

Dear hypre developers and users,

Greetings! I am a user of hypre who regularly employs various algebraic multigrid methods provided by hypre to solve my linear systems, such as BoomerAMG, SMG, and (Sys-)PFMG. I have noticed that hypre also offers a less commonly used multigrid method called MGR (Multigrid Reduction). However, I have found very limited information on MGR, whether in academic papers or documentation, which has left me quite puzzled. It seems that MGR could potentially be a very effective tool for my application scenarios, but my lack of understanding hinders its utilization. Specifically, I have a few questions that I would like to consult with the developers and other users about.

  1. Regarding MGR, what should my input look like? Is it similar to BoomerAMG, where only the assembled sparse matrix A is required, or does it resemble SMG and (Sys-)PFMG, which also require predefined grids and graphs? Or does it necessitate some other different types of input?

  2. What is the multigrid algorithm of MGR, and are there any papers that I can refer to? I have read a brief comment about MGR at https://github.com/hypre-space/hypre/blob/master/src/docs/usr-manual/solvers-boomeramg.rst, which suggests that MGR is similar to the nodal approach of BoomerAMG, but there is no further explanation.

  3. In the hypre documentation regarding MGR (https://hypre.readthedocs.io/en/latest/solvers-mgr.html), it is mentioned that "The MGR algorithm accepts information about the variables in block form from the user." Could you please explain what is meant by "block form" in this context? How should this block form be provided?

I believe my questions may also be of reference value to many other hypre users. I sincerely hope to receive assistance from those familiar with MGR, so that I can effectively utilize MGR! Thank you very much!

Best regards,
Yi

@oseikuffuor1
Copy link
Contributor

Hello @zongy17,
Thanks for your interest in MGR. MGR is designed for applications with PDE systems, such as multiphysics applications and applications that typically employ the use of block preconditioners. It provides a general framework to treat each physical variable by applying appropriate solvers (to do block elimination) in a multilevel way. The coarse grid (final Schur Complement system) it typically solved by BoomerAMG. Several papers have been published on MGR. Here are a few for your reference, but you can find more on hypre's github publications page

To answer your specific questions:

  1. MGR's input similar to BoomerAMG. It is idea for advanced users who have an idea of the physical variables in their system. In addition to the input matrix, you would also provide information about the block structure of the system. That is, how many variables (which determines how many levels of reduction is done), and the order in which the reduction is done (which determines which variables are eliminated or kept to the last level to be treated by AMG). Other options such is smoothers and coarsening strategies for the various levels may also be provided (just like for BoomerAMG).
  2. See suggested publications
  3. See answer in 1. It is assumed that your system has multiple variables, and not a scalar problem (which would then be treated directly by BooomerAMG). The reduction typically leads to a scalar (single variable) problem or one that is amenable to solution by BoomerAMG.

Let us know if you have additional questions or need help setting up your system.

@zongy17
Copy link
Author

zongy17 commented Jan 21, 2025

Hi, @oseikuffuor1 ,
Thank you very much for your response, which has been very helpful in furthering my understanding of MGR. I will read the three papers you recommended. Also, from what you said, I have gained a quick overview of how MGR works. Could you please verify if my understanding of the following is correct?

MGR is designed for solving linear systems with multiple degrees of freedom (i.e., multiple variables at each grid point, such as three displacements in solid mechanics problems or pressure and various component concentrations in reservoir simulations). When providing input, users need to specify the number of variables per grid point (e.g., $r$, so each block in the BSR matrix is of size $r\times r$). Then, users define the elimination order (e.g., for $r=4$, the order might be 0,3,2, leaving the variable at position 1 as the remaining one). Finally, the reduced single-degree-of-freedom (scalar) linear system is passed to BoomerAMG for solving. Is my understanding correct?

Additionally, I'd like to know if there are any example codes in hypre that demonstrate how to define and call MGR. Thank you again. I really appreciate your help!

@oseikuffuor1
Copy link
Contributor

@zongy17 yes your understanding is essentially correct, although the interface to achieve this might be slightly different depending on the case. See the user manual for a high-level description and here for a more detailed example. See also the reference manual for the many options that make the MGR framework quite flexible. Let us know if you have additional questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants