-
Notifications
You must be signed in to change notification settings - Fork 16
Matlab compiling and vectorized matlab function #194
base: master
Are you sure you want to change the base?
Conversation
…or input. This was not much faster than a matlab loop but convenient.
See also http://www.mathworks.com/matlabcentral/answers/269-using-c-style-comments-in-mex-files or http://www.mathworks.com/matlabcentral/answers/8870-c-comments-in-mex-files-under-linux - I think this sort of idea is a nicer solution than a separate mexopts.sh file. Apart from that, nice work. I am looking to deprecate the Props function fairly soon, so only using the PropsSI variants. Could you not have added your code as a conditional branch in the PropsSI mex file? That would be a nicer solution I think. Wrapping C/C++ libraries for MATLAB sucks, and it involves a lot of ugly hacking. Have you looked into python before? I guess with your existing library, its a bit less exciting... Also, we are completely rewriting the guts of CoolProp, partly in order to support mixtures. Watch this space. It's taking a lot more time than originally planned, which is not really surprising. |
Hei Thank you for your answer. MRST is of historical reasons in matlab. Today we probably would have started in python (even it exist advantages of the matlab programing enviroment also) If we at some point have time( and money), we would like to translate some of the MRST code to python. I do not think it will take long time to get a OK simulator up and running. I will look at putting the vectorized version as a branch in PropsSI. Best regards |
@hnil Thanks for your reply. If you can implement the vectorized code as a Do the people in your project know about CoolProp? If not, who should I I might be able to help a bit with the python side of things. I have quite On Tue, Mar 25, 2014 at 10:44 AM, hnil [email protected] wrote:
|
Hei Sorry for abit late answere. I have talked to some of the developers of OPM (c++ code). I think that it would I do not disagree with you about matlab/python. But due to historical reasons it is at the moment no Else I am using python on my spare time. What is your prefered working enviroment for python. When I have time I will look at the vertorized version and the compiling options. I will consult one of may colleages which has struggled with the mex interface many times. Best regards |
@hnil You might want to hold off with the C++ integration for a bit since the API is getting a full overhaul at the C++ level. I can't say when it will be finished. But the high-level integration will remain the same - the Props and PropsSI and IPropsSI functions will be supported indefinitely. For python, I have used Eclipse+pydev - quite nice and free, debugger, etc. A bit difficult to get set up, but once you have, works fine. For lighter weight stuff, I use SciTe most of the time, or IEP is a new entrant to this market. As soon as you've got the vectorized code ready, let me know. I don't have the time to modify/merge your changes right now unfortunately. |
Hei I will let you know have done it. No trouble for me. Best wishes |
Here is some modifications to make Matlab compiling go smoother.
(the original did not compile due to -ansi which was default on my installation.)
In addition there is new function which take vector input and output.
The aim was to be able to use your excellent work as an add on to open source Matlab Reservoir ToolBox
www.sintef.no/Projectweb/MRST/
Your work was very useful to be able to test realistic fluids for simulation of reservoir with temperature.
I have seen that you had started on an interface for mixtures. I would be very intrested to test that for our code also.