Restructuring of CVariable into a Contiguous Data Structure by pcarruscag · Pull Request #753 · su2code/SU2
This is the container class I am planning to use to replace the data members of CVariable.
Where CVariable has a scalar it will have a column vector, and where it has an array it will have a row-major matrix (so it can still return the solution as a pointer to the beginning of a row), where it has a matrix we'll see... this supports nesting but at the moment that is only efficient if the inner type has a static size.
Following some of the comments in #716, it supports aligned memory allocation (c++11 required) and compile-time sizes (no dynamic allocation), which may eventually be used to create an "easily-vectorizable" type (e.g. vector of 4 doubles) to explore vectorization of the numerics.
I am hoping to eventually build some basic dense linear algebra capabilities to collect some of the functionality we have throughout the code. I am not a meta-programming expert though, so the interface for that might not be the most user friendly.
I will add the SU2 header to this file and fix the formatting soonish.