Skip to content

[tabulatedcomp] fill arrays on the fly

Dennis Gläser requested to merge feature/improve-tabulated-component into master

This commit makes !836 (merged) ready for merge.

Instead of filling all arrays during initialization, we fill the data arrays when called. This gets rid of the try and catch blocks in the initializing function and allows for static asserts in the components within functions that are not overloaded. The overhead is one more interpolation call during the first call to the property which should be neglectable. For the pressure(t, rho) functions we have to introduce one additional if statement within each call. For models using only a small fraction of the properties, this commit gets rid of the long initialization times. Execution of test_tabulation with all properties did not show any difference in runtime. The 2p2c tests however run significantly faster because they only need densities and viscosities, making the initialization much faster.

Merge request reports