Draft: Preconditioner freezing for ContField::GlobalSolve
Issue/feature addressed
Time-dependent matrix system require re-building of local matrices at every time step. This also requires re-building the preconditioner and is computationally expensive. In particular, for the IncNavierStokesSolver
with VCSImplicit
.
Proposed solution
Separate initialising the GlobalLinearSystem (matrix) and the preconditioner, and add the possibility to save the preconditoner in ContField
.
Implementation
Added a function InitPreconditioner
in GlobalSolve
which builds the preconditioner. Additionally, the ContField
holds a reference to the preconditioner via shared_ptr
. InitPreconditioner
additionally checks whether a non-Null preconditioner ptr is available.
Tests
- All previous iterative tests with
VCSImplicit
that use aBlock
orLowEnergyBlock
preconditioner. - For example
Tet_Kovasnay_PreconditionerBlock.xml
andTet_Kovasnay_PreconditionerLowEnergyBlock.xml
- Added a test for
IterativeFull
Tet_Kovasnay_VCSImplicit.xml
Suggested reviewers
Notes
Checklist
-
Functions and classes, or changes to them, are documented. -
User guide/documentation is updated. -
Changelog is updated. -
Suitable tests added for new functionality. -
Contributed code is correctly formatted. (See the contributing guidelines). -
License added to any new files. -
No extraneous files have been added (e.g. compiler output or test data files).
Edited by Henrik Wustenberg