The evaluation of the source term function, even if it was zero, was affecting the performance of the matrix-free application, as the evaluation needed to be executed every time we performed a vmult using the matrix-free operators.
Description of the solution
This PR adds a new enable parameter that allows to disable the source term explicitly in the matrix free application. It allows to reset the pointer of the forcing function in mf_navier_stokes.cc and consequently to check within the matrix-free operators if the pointer exists or not, to evaluate the source term function.
How Has This Been Tested?
All the tests pass and theenable = false parameter was added to all the matrix-free tests that do not require a source term.
Documentation
The parameter was added to the source term page in the documentation with a tip that specifies when it is useful to explicitly disable the source term.
Future changes
The Navier-Stokes source term parameter subsection needs to be renamed from xyz to navier stokes. Since this changes more than 100 files (tests, examples, documentation), I will do this in the next PR.
Description of the problem
The evaluation of the source term function, even if it was zero, was affecting the performance of the matrix-free application, as the evaluation needed to be executed every time we performed a vmult using the matrix-free operators.
Description of the solution
This PR adds a new
enable
parameter that allows to disable the source term explicitly in the matrix free application. It allows to reset the pointer of the forcing function inmf_navier_stokes.cc
and consequently to check within the matrix-free operators if the pointer exists or not, to evaluate the source term function.How Has This Been Tested?
enable = false
parameter was added to all the matrix-free tests that do not require a source term.Documentation
Future changes
xyz
tonavier stokes
. Since this changes more than 100 files (tests, examples, documentation), I will do this in the next PR.