334 Commits

Author SHA1 Message Date
Ian Bell
f053de76b1 Kill warning about initialization order in Helmholtz.h 2015-02-28 20:12:59 -07:00
Ian Bell
c674ff5aa8 Merge pull request #510 from mikekaganski/master
const, ref and iterator optimization
2015-02-28 19:55:10 -07:00
Ian Bell
6cd7307a06 Fix preprocessor for non-clang compilers
No short-circuiting in preprocessor logicals - didn't know that

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-28 19:09:56 -07:00
Ian Bell
63b5fd938d Disable thread_local for apple clang that is not up-to-date (new clang is fine, but I can't update clang on the IPU slave)
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-28 18:57:35 -07:00
Ian Bell
864904f61d Destructor for CoolPropBaseError has to be throw()
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-28 18:07:01 -07:00
mikekaganski
28691e8e75 const, ref and iterator optimization
1. Another set of arguments optimized:
* args-by-val converted to args-by-ref
* in some cases, reverse has been done, if that is better: if the
object's copy is modified in the func, it's better to avoid extra copy
from arg to local var
2. some const functions marked as such (this is just a beginning)
3. iterators were replaced with const_iterators where applicable
4. catches that catch std::exception& changed to catch (...) - that is
safer; if exception handling is restructured, this will have to be
reconsidered anyway
5. removed some basic structures' constructors; changed them to hold
const char*s to avoid unnecessary string constructions;
6. in some places, moved variable declarations to their definitions, to
avoid calling default constructors and then assigning
7. removed some unnecessary shared_pointers in favor of local objects;
8. in FORTRAN-style functions, added const specifiers to input doubles;
9. fixed a place where values were inserted into a map while iterating
through it
10. fixed is_valid_*_derivative: they could accept incorrect values and
throw when upper index is less than lower
2015-03-01 10:51:01 +10:00
Ian Bell
edd82bbb73 Fixed c++11 incompatibility with Exception refactor; 2015-02-28 16:46:56 -07:00
Ian Bell
8503e37c0f Merge pull request #509 from mikekaganski/master
Exceptions restructured
2015-02-28 16:36:45 -07:00
mikekaganski
e9c1d6ad60 Exceptions restructured
1. add integer codes to exceptions (to address #381 No1);
2. restructure derived exceptions to be specializations of templated
classes to make their definitions more compact, and remove code
duplication.
2015-02-28 18:00:45 +10:00
Ian Bell
84bdcb1aee Add configuration key for maximum table directory size
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-27 22:12:59 -07:00
Ian Bell
5c3cb6f9a4 Fix templated output type for min3 and min4 functions 2015-02-26 09:43:12 -07:00
mikekaganski
869d1afc71 More ref args 2015-02-27 00:56:38 +10: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
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
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
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
b0eb894240 Merge pull request #499 from CoolProp/longdouble_remap
Longdouble remap
2015-02-24 20:05:25 -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
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
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
mikekaganski
f8bb1c0044 Avoid copying parameters 2015-02-24 09:26:11 +10: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
aef97f9755 Lots of little changes to squelch warnings
Closes #484
Closes #483

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-21 14:39:25 -07:00
Jorrit Wronski
9738503e0c Moved reference state from fluid to state object, incompressibles do internal caching now. 2015-02-11 14:48:04 +01:00
Jorrit Wronski
c9c29eadd1 Added partial derivatives for incompressible fluids. Tests need to be updated and the docs are outdated... 2015-02-10 16:43:29 +01:00
Ian Bell
183868dee2 Implement acentric factor through AbstractState and Props1SI; closes #448
Fix all instances of accentric->acentric in fluid files and codebase.

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-03 17:37:53 -05:00
Ian Bell
b2018a4abc Do not evaluate flash call if inputs are all in outputs; see #409
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-02-02 20:20:43 -05:00
Ian Bell
f9223dd30d Merge branch 'master' into two_phase_derivatives_and_splines 2015-02-02 12:23:12 -05:00
Ian Bell
2495df75ed Catch exceptions in High-Level API; Closes #441
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-01-30 05:00:31 -07:00
Jorrit Wronski
792c466c3d I hope this is the last commit to fix #429 and to fix #413 2015-01-27 20:44:05 +01:00
Jorrit Wronski
104175dfa1 Trying to fix #413 2015-01-20 11:01:34 +01:00
Ian Bell
02dc2fa860 Fix bug with inserter
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-01-19 19:41:54 -07:00
Ian Bell
4ebe23ed95 Comment out the HAPropsSI code consistency test
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-01-19 17:28:54 -07:00
Ian Bell
e8b7c7da8e Merge branch 'master' into two_phase_derivatives_and_splines 2015-01-07 15:41:59 -07:00
Ian Bell
fe48c7e403 Fixed bugs with bad departure function names and better error message; Closes #396
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-01-07 13:05:39 -07:00
Ian Bell
ad978bf294 Expose second derivatives through AbstractState and add test (passes)
Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-01-04 00:34:45 -05:00
Ian Bell
9e5c3d6035 Preliminary work on two-phase derivatives and splines
Added two-phase derivative, works!
Spline for drho/dh|p works
Spline for drho/dh|p NOT WORKING

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2015-01-01 22:58:05 -05:00
Ian Bell
50b611bd4a Move predefined mixture parsing to HelmholtzEOS initializer function; Closes #373
Renamed functions for Helmholtz backend for getting const or non-const reference to mole fractions

Signed-off-by: Ian Bell <ian.h.bell@gmail.com>
2014-12-31 18:06:12 -05:00