Conversation
…assing (4 test cases, 28 assertions)
|
just remove the old trapezoidal map and use the new one for everything. Just rename trapezoidalmapFAST trapezoidalmap. |
|
I have verified the new implementation against the old one using the fgm unsteady testcase. It produces identical history and restart files. Map memory for the 7k-point FGM table drops from 18.2 MB to 1.3 MB. |
|
@tkiymaz can you fix the conflicts so the regression tests run again? |
|
Ok great, If you think it's ready just remove the WIP and pr:draft label |
I tested couple of times, I think it is ready. I changed the title and remove the pr:draft label. |
| /*--- Simple row-major matrix with a fixed number of columns. ---*/ | ||
| template <typename T, size_t N> | ||
| struct Matrix { | ||
| std::vector<T> data; | ||
|
|
||
| void resize(size_t rows, size_t) { data.resize(rows * N); } | ||
| size_t rows() const { return data.size() / N; } | ||
|
|
||
| const T& operator()(size_t i, size_t j) const { return data[i * N + j]; } | ||
| T& operator()(size_t i, size_t j) { return data[i * N + j]; } | ||
| }; |
There was a problem hiding this comment.
You can replace with C2DContainer also with a compile-time number of columns
| * \author D. Mayer, T. Economon | ||
| * \brief Memory-efficient trapezoidal map for 2D lookup table queries, | ||
| * based on the LUT implementation of P. Gomes (https://github.com/pcarruscag/LUT). | ||
| * \author T. Kiymaz |
There was a problem hiding this comment.
Do I get second author then? 😉
Proposed Changes
The original trapezoidal map implementation needs excessive memory for large lookup tables (LUT) (e.g., 300+ MB for tables with ~80k points). This PR introduces a new memory-efficient trapezoidal map implementation (LUT_FAST) for Flamelet-Generated Manifold (FGM) lookup tables, based on LUT algorithm of Pedro Gomes. The new implementation reduces memory usage while maintaining query performance. A new unit test is created and all tests are passed.
Related Work
This code is an implementation of https://github.com/pcarruscag/LUT to SU2.
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --allto format old commits.