Foam::FixedList accepts only static data members?
Dear Foamers,
I need to define a new vector type with a fixed length. For that purpose I used: typedef FixedList<scalar, n_> newType_; This appears to work with n being defined as a "static const int" only. In my case, however, n is an integer, which is initialized in another class and passed on. Trying to compile produces the following error: error: invalid use of non-static data member ‘Foam::specie::n_ Any help on this issue is greatly appreciated! Hagen |
Quote:
|
I would like to define the new type to store species properties, e.g. the critical temperature, in a multi-component solver. Thus the size of the vector depends on the number of species involved. In order to have a flexible code, suitable for changing number of species, I want to read the vector size from the "thermophysicalProperties" dictionary.
Do I get it right that this is not possible with the FixedList class since the size of it is fixed during compilation? Any suggestions how to define a vector type with flexible size? Thank you! |
Quote:
|
All times are GMT -4. The time now is 15:44. |