jwindahlModelon / MultiPhaseMixtureMedia

MultiPhaseMixtureMedia is a framework for thermodynamic properties in Modelica including an external C/C++ Modelica property interface with back ends to CAPE-OPEN, RefProp and FluidProp.
18 stars 9 forks source link

Improve performance of properties in MaterialObject #8

Open jwindahlModelon opened 9 years ago

jwindahlModelon commented 9 years ago

The _propSet and _propLookup methods of AMaterialObject should be implemented more efficiently. The _properties member should become a 2-dimenional array of vector. This can then be indexed directly by phase and prop constants from COCOnsts.h. For handling the lookup where prop and phase are BSTRs, two new hashmaps are needed, mapping the strings to the integer indices of the 2d array.

Reported by Maarten