The stabilization parameter was being computed every time the vmult and evaluate_residual functions of the matrix-free operators were called. However, this is not needed and was affecting the performance of the matrix-free application.
Description of the solution
The stabilization parameter is now precomputed and stored in a table before using it in those function calls. Since its computation involves the values of the velocity of the previous newton step, the stabilization parameter is now calculated within the evaluate_non_linear_term(...) function, which has been now renamed to evaluate_non_linear_term_and_calculate_tau(...) for consistency.
How Has This Been Tested?
All the existent tests pass with exception of the transient TGV case which uses ILU as preconditioner and GLS stabilization (lethe/applications_tests/lethe-fluid-matrix-free/tgv_fe1_ilu_gls.prm) ; however, the changes are minimal, so the output was updated. I am not sure why it changed, but I decided to run the same test using GMG to double check if it had similar changes, and no changes were observed.
Description of the problem
The stabilization parameter was being computed every time the
vmult
andevaluate_residual
functions of the matrix-free operators were called. However, this is not needed and was affecting the performance of the matrix-free application.Description of the solution
The stabilization parameter is now precomputed and stored in a table before using it in those function calls. Since its computation involves the values of the velocity of the previous newton step, the stabilization parameter is now calculated within the
evaluate_non_linear_term(...)
function, which has been now renamed toevaluate_non_linear_term_and_calculate_tau(...)
for consistency.How Has This Been Tested?
lethe/applications_tests/lethe-fluid-matrix-free/tgv_fe1_ilu_gls.prm
) ; however, the changes are minimal, so the output was updated. I am not sure why it changed, but I decided to run the same test using GMG to double check if it had similar changes, and no changes were observed.