Commit Graph

2397 Commits

Author SHA1 Message Date
Ian Bell
1dafe24f48 Merge pull request #504 from mikekaganski/master
More ref args
2015-02-26 09:34:02 -07:00
mikekaganski
869d1afc71 More ref args 2015-02-27 00:56:38 +10:00
Jorrit Wronski
f31a75e1ed Trying to write a Python script to compare the speed of TTSE in v4 and v5 2015-02-26 10:47:59 +01:00
Ian Bell
004d497ec0 Merge pull request #501 from mikekaganski/master
thread_local: one more (hopefully portable) attempt
2015-02-25 08:23:26 -07:00
Ian Bell
f2e23cd5d7 Merge branch 'master' of https://github.com/coolprop/coolprop 2015-02-25 08:22:51 -07:00
Ian Bell
77046321b8 Allow user to specify another HMX.BNC path for REFPROP
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-25 08:22:34 -07:00
Ian Bell
5cbab2a859 Remove double declaration of UNICODE
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-25 08:10:08 -07:00
mikekaganski
4c8421165c thread_local: one more (hopefully portable) attempt 2015-02-25 20:20:05 +10:00
Ian Bell
de2d5828d3 One more CoolProp namespace on OSX in CoolPropTools.h 2015-02-24 21:59:32 -07:00
Ian Bell
c7ef99e7bf Resolve another bug with OSX compilation
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-24 21:51:54 -07:00
Ian Bell
8ef1a75f38 Added CoolProp:: namespace spec to some functions in CoolPropTools.h
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-24 21:47:00 -07:00
Ian Bell
44ad30bcb0 Fix const ref for strsplit
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-24 21:29:53 -07:00
Ian Bell
2f029d40e7 Revert the thread_local; not all our supported compilers can do C++11
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-24 21:27:14 -07:00
Ian Bell
2e270f291f Cleaned up CoolPropTools.h a little bit
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-24 21:25:33 -07:00
Ian Bell
aeb1fed0ba Merge branch 'master' of https://github.com/coolprop/coolprop 2015-02-24 21:20:17 -07:00
Ian Bell
e4672f1a98 Merge pull request #500 from mikekaganski/master
Fix directory size calculations
2015-02-24 21:19:46 -07:00
mikekaganski
c38c4c468f Fix directory size calculations 2015-02-25 13:58:41 +10:00
Ian Bell
6c58a9fa1d Merge branch 'master' of https://github.com/coolprop/coolprop 2015-02-24 20:05:39 -07:00
Ian Bell
b0eb894240 Merge pull request #499 from CoolProp/longdouble_remap
Longdouble remap
2015-02-24 20:05:25 -07:00
Ian Bell
729b44ae5d Merge remote-tracking branch 'remotes/origin/longdouble_remap' 2015-02-24 20:03:57 -07:00
Ian Bell
e5b66b3218 Merge pull request #496 from CoolProp/directory_size
Implement checking of directory size
2015-02-23 23:39:11 -07:00
Ian Bell
d12a4883f9 Fix python build script
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 23:27:57 -07:00
Ian Bell
e74211910f Once more to get rid of min and max macros
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 23:15:11 -07:00
Ian Bell
2c61b99ffb Undef min and max aggressively
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 23:12:11 -07:00
Ian Bell
703fd306ee Merge pull request #495 from mikekaganski/CoolPropDbl
CoolPropDbl
2015-02-23 23:08:01 -07:00
Ian Bell
01f4b87dae Undef min and max macros for windows
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 23:06:36 -07:00
Ian Bell
b1f28712e8 Fixed uint64_t on visual studio
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 22:58:53 -07:00
Ian Bell
a7116fd6ad Add UNICODE and _UNICODE to CMakeLists.txt 2015-02-23 22:52:03 -07:00
Ian Bell
fe396aa3f5 Windows uses wstring, *nix uses string
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 22:46:49 -07:00
Ian Bell
518502145d Fixed string conversions 2015-02-23 22:41:20 -07:00
Ian Bell
280e9afc78 Fixed function pointer
string and wstring versions

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 22:36:55 -07:00
Ian Bell
b93a8e0106 Added directory size functions
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-23 22:24:47 -07:00
mikekaganski
1068b724c3 CoolPropDbl
Introduce CoolPropDbl to replace long doubles. This may help to overcome
possible portability problems, and test for efficiency and precision.
2015-02-24 13:24:51 +10:00
Ian Bell
6d39bf8e02 Merge pull request #493 from mikekaganski/master
Avoid copying of parameters; some fixes for _HAPropsSI_inputs
2015-02-23 19:44:34 -07:00
mikekaganski
f94a249895 tidy _HAPropsSI_inputs
avoided double lookup for input key (match_input_key + get_input_key);

unified MoleFractionWater call;

if ((key = get_input_key(input_keys, GIVEN_HUMRAT)) && key >= 0) may
give false negatives if get_input_key returns 0;

added throw
2015-02-24 09:26:12 +10:00
mikekaganski
f8bb1c0044 Avoid copying parameters 2015-02-24 09:26:11 +10:00
Jorrit Wronski
e41783a38b Added citation information to author info 2015-02-23 17:36:06 +01:00
Jorrit Wronski
e6353e9c3e Added speed test code 2015-02-23 09:35:54 +01:00
Ian Bell
aff594bb25 Fix reducing state access for REFPROP; closes #487
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-22 23:11:40 -07:00
Ian Bell
7361d715ef Refactored HAPropsSI and broke up into inputs and outputs parts; Closes #485
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-22 22:57:49 -07:00
Ian Bell
2b7638bd53 Merge pull request #488 from mikekaganski/master
Some more static analyser warning fixes
2015-02-21 22:55:10 -07:00
mikekaganski
2bcfdf824c Simplify exception handling 2015-02-22 15:10:08 +10:00
mikekaganski
9710d80581 One leftover to previous commit 2015-02-22 15:01:58 +10:00
mikekaganski
0e3a9fe9af Fix static analyzer warnings "Local declaration hides local"
C6246 Local declaration hides local Local declaration of 'z' hides
declaration of the same name in outer scope. For additional information,
see previous declaration at line '187' of
'd:\documents\github\coolprop\src\coolprop.cpp'. CoolProp coolprop.cpp
230
C6246 Local declaration hides local Local declaration of 'fluid' hides
declaration of the same name in outer scope. For additional information,
see previous declaration at line '852' of
'd:\documents\github\coolprop\src\coolprop.cpp'. CoolProp coolprop.cpp
871
C6246 Local declaration hides local Local declaration of 'options' hides
declaration of the same name in outer scope. For additional information,
see previous declaration at line '743' of
'd:\documents\github\coolprop\src\backends\helmholtz\flashroutines.cpp'.
CoolProp flashroutines.cpp 778
C6246 Local declaration hides local Local declaration of 'h1' hides
declaration of the same name in outer scope. For additional information,
see previous declaration at line '1338' of
'd:\documents\github\coolprop\src\backends\helmholtz\flashroutines.cpp'.
CoolProp flashroutines.cpp 1367
C6246 Local declaration hides local Local declaration of 'el' hides
declaration of the same name in outer scope. For additional information,
see previous declaration at line '250' of
'd:\documents\github\coolprop\src\helmholtz.cpp'. CoolProp helmholtz.cpp
259
C6246 Local declaration hides local Local declaration of 'y' hides
declaration of the same name in outer scope. For additional information,
see previous declaration at line '1649' of
'd:\documents\github\coolprop\src\backends\helmholtz\helmholtzeosmixturebackend.cpp'.
CoolProp helmholtzeosmixturebackend.cpp 1756
C6246 Local declaration hides local Local declaration of 'iclosest'
hides declaration of the same name in outer scope. For additional
information, see previous declaration at line '415' of
'd:\documents\github\coolprop\src\backends\helmholtz\phaseenveloperoutines.cpp'.
CoolProp phaseenveloperoutines.cpp 467
C6246 Local declaration hides local Local declaration of 'crit' hides
declaration of the same name in outer scope. For additional information,
see previous declaration at line '181' of
'd:\documents\github\coolprop\src\backends\helmholtz\vleroutines.cpp'.
CoolProp vleroutines.cpp 284
C6246 Local declaration hides local Local declaration of 'crit' hides
declaration of the same name in outer scope. For additional information,
see previous declaration at line '925' of
'd:\documents\github\coolprop\src\backends\helmholtz\vleroutines.cpp'.
CoolProp vleroutines.cpp 950
2015-02-22 14:43:57 +10:00
mikekaganski
75b7d51f59 Return result of redirect_stdout to user
What happens if stdout had been closed and not reopen?
2015-02-22 13:58:00 +10:00
mikekaganski
b576789870 More compact and performant way to avoid NULL in fractions_ptr
I suppose it is preferrable because:
1. It stops as soon as the problem is apparent;
2. It avoids extra checks (tiny speed-up)
3. It is more compact.
2015-02-22 13:50:06 +10:00
Ian Bell
a7a14d7781 Update setup.py for python building
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-21 17:50:06 -07:00
Ian Bell
945f095c71 Added msgpack-c include path to CMakeLists.txt 2015-02-21 17:41:24 -07:00
Ian Bell
6fa33422b4 Update codelite project
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-21 17:36:57 -07:00
Ian Bell
8a1ce06f62 Writing to single-phase tabular tables works now using msgpack-c
Packed data can be read back into python using something like

``` python
import json
import msgpack
import numpy as np
import matplotlib.pyplot as plt

with open(r'C:\Users\Belli\Documents\Code\coolprop-v5-new\dev\codelite\Debug\single_phase.bin','rb') as fp:
    i, matrices = msgpack.load(fp)
    T,h,p,rho = np.array(matrices['T']), np.array(matrices['hmolar']), np.array(matrices['p']), np.array(matrices['rhomolar'])
    T[np.logical_or(np.isnan(T),np.isinf(T))] = np.nan
    rho[np.logical_or(np.isnan(rho),np.isinf(rho))] = np.nan
    h[np.logical_or(np.isnan(h),np.isinf(h))] = np.nan
    p[np.logical_or(np.isnan(p),np.isinf(p))] = np.nan

    plt.scatter(T, np.log(p), c = rho, linewidths = 0)
    plt.show()
```
2015-02-21 17:34:27 -07:00