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
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
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
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
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
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
4f52e5242a
handle name mangling properly in REFPROP shared library
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-12-10 12:13:01 -05:00
Ian Bell
8327d54ea2
Replaced all tabs with spaces (finally) in C++ files
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-19 12:16:14 -05:00
Ian Bell
ff91925a27
CATCH_ALL_ERRORS_RETURN_HUGE doesn't cout the error message
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-11-17 17:49:10 -05:00
Ian Bell
3310d1cf11
Fixed (?) splines in critical region
...
I have no explanation for the broken code that used to be in the solve_cubic function. Seems it was related to the linear or quadratic cases but it makes no sense. Removed the code.
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-10-14 14:49:19 +02:00
Ian Bell
1a82468c68
Expose mixture binary pair data all the way through python
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-25 13:43:29 +02:00
Ian Bell
86f52bdf4e
Phase Envelope calculations now include Tsat_max and psat_max, along with indices thereof.
...
The Tsat_max and psat_max values are calculated using exact solution based on finding dT/dP and dp/dT equaling zero by a 1D solution in rhov.
See also https://github.com/CoolProp/CoolProp/issues/133
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-10 15:17:19 +02:00
Ian Bell
068e737388
TP flash basically working again for mixtures
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-08 00:08:18 +02:00
Ian Bell
a25022e596
Interpolation functions take in std::size_t instead of int
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-06 20:05:07 +02:00
Ian Bell
8fdd1fddaf
Refactor of mixing parameters successful
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-06 15:41:33 +02:00
Ian Bell
f021e422e6
Add min_abs_value function
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-09-03 17:36:55 +01:00
Ian Bell
d3261395bf
Replaced all fabs() with std::abs()
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-23 14:56:07 +02:00
Ian Bell
69bbdc693b
Reimplemented critical region splines all the way from scripts to build to C++ code
...
Closes https://github.com/CoolProp/CoolProp/issues/94
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-22 22:14:48 +02:00
Ian Bell
b4b24ae1a3
Fixed macros for POW2, POW3, etc.
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-21 00:45:53 +02:00
Ian Bell
2270f9f076
Helmholtz derivatives are all calculated using parallel code - next step is to remove classes from Helmholtz
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-15 21:16:41 +02:00
Ian Bell
faf530d588
Fixed melting curves, PY flash works for subcritical cases
2014-08-09 11:07:21 +02:00
Ian Bell
de8c4e1b86
Added linspace function
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-08-01 14:15:55 +02:00
jowr
6be83b1ad3
Tried pointers, but LiBr still does not work. Somnehow the object gets converted to the base class.
2014-07-17 16:34:35 +02:00
Ian Bell
a2a4b71577
Added POW2 POW3 etc macros
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-07-10 14:39:52 +02:00
jowr
3b02f98879
Merge branch 'master' into eigenPolynomials
...
Conflicts:
externals/eigen
include/MatrixMath.h
include/PolyMath.h
src/Backends/Helmholtz/Fluids/Incompressible.cpp
src/Backends/Helmholtz/Fluids/Incompressible.h
src/PolyMath.cpp
2014-06-29 18:26:06 +02:00
Ian Bell
1ee68e7a28
CoolPropTools.h
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-06-21 00:00:40 +02:00
Ian Bell
35ec080139
CoolPropTools.h
...
Signed-off-by: Ian Bell <ian.h.bell@gmail.com >
2014-06-20 23:58:58 +02:00
jowr
4e2aa1c404
Started to work on flexible polynomial solvers for fractional exponents
2014-06-13 13:56:08 +02:00
jowr
e2eee9a1df
Added solver and derivative functions, tested and works. Might need to implement our own solvers. Now way of telling Eigen not to find all roots. We know the bounds in most cases...
2014-06-11 17:52:56 +02:00