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
257 stars 54 forks source link

Improve timer output for the fluid applications #1187

Closed lpsaavedra closed 6 days ago

lpsaavedra commented 1 week ago

Description

Trying to analyze times for different benchmarks using the matrix-free application, I realized that there were time sections missing, i.e., there was 10-15% of the total time that was not reported in the final time table. In addition, the functions to update multiphysics vectors were always being executed even if only the fluid dynamics was enabled (in these calls we convert from deal.II to Trilinos vectors), which lead to unnecessary time spent there.

Solution

Added additional time sections so that the time summary table reflects the overall time reported at the top. The changes were also applied to the matrix-based application so that they can be easily compared. The matrix-free application now checks whether other physics are enabled or not to only perform the update of the multiphysics vectors when needed.

As examples of the new timer output, this is how it would look like for the TGV case:

No time outputs are present in any test. However, I tested this with two of the matrix-free benchmarks (steady and transient) to verify that everything works as it should when outputting the timer per iteration or at the end of the simulation.

Documentation

The Timer section in the General, CFD and Multiphysics parameters section of the documentation was updated.

Miscellaneous (will be removed when merged)

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

Pull request related list: