Faster matrix (re)-building for LinearADR problems
Issue/feature addressed
Currently, a LinearADR problem always rebuilds elemental Mass and Laplacian matrices. This causes an overhead of about 30% for VCSImplicit simulations at large scale and is only required if Mass and Laplacian matrices are time-dependent through varcoeffs
.
Proposed solution
This fix adds a check for conditional updating of Mass and Laplacian matrices to the LinearADR option in the CreateMatrix function for Expansion2D
and Expansion3D
.
Implementation
An if condition that checks whether the massVarcoeffs or laplacianVarcoeffs map is empty.
Tests
- We would need to have a memory-constraint test environment. Still, I am running this fix on large-scale simulations and do not encounter any memory issues.
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