chaos-polymtl / lethe

Repository for the open-source lethe CFD/DEM/CFD-DEM project
https://chaos-polymtl.github.io/lethe/index.html
GNU Lesser General Public License v2.1
267 stars 59 forks source link

Add timers for GMG vmult #1112

Closed lpsaavedra closed 3 months ago

lpsaavedra commented 3 months ago

Description of the problem

There were only timers for the setup of the different components of multigrid but not for the actual application of the MG preconditioner.

Description of the solution

Now an additional table with specific times is printed when set mg verbosity = extra verbose with all the information:

+-------------------------------------------------------+------------+------------+
| Total wallclock time elapsed since start              |      23.3s |            |
|                                                       |            |            |
| Section                                   | no. calls |  wall time | % of total |
+-------------------------------------------+-----------+------------+------------+
| gmg::vmult::level_0                       |       174 |      1.89s |       8.1% |
| gmg::vmult::level_1::0_pre_smoother_step  |       174 |      6.11s |        26% |
| gmg::vmult::level_1::1_residual_step      |       174 |     0.673s |       2.9% |
| gmg::vmult::level_1::2_restriction        |       174 |    0.0134s |         0% |
| gmg::vmult::level_1::3_prolongation       |       174 |    0.0156s |         0% |
| gmg::vmult::level_1::4_edge_prolongation  |       174 |  0.000208s |         0% |
| gmg::vmult::level_1::5_post_smoother_step |       174 |      6.83s |        29% |
| gmg::vmult::transfer_to_global            |       174 |   0.00177s |         0% |
| gmg::vmult::transfer_to_mg                |       174 |   0.00202s |         0% |
+-------------------------------------------+-----------+------------+------------+

It can be printed for each iteration or at the end as with the other tables reporting times in Lethe. The existent timer for the MG setup times was renamed and now both timers belong to the MFNavierStokesPreconditionGMG class.