Commit Graph

5235 Commits

Author SHA1 Message Date
Jorrit Wronski
54519d7afe Updated handling of compile definitions and MSVC runtime selection 2022-08-12 11:07:18 +02:00
Jimmy C
0ce42fcf3b Bump FindMathematica (#2146) 2022-07-26 20:39:36 -04:00
Yaykhel
dc668009d2 Corrected rho_ice route by replacing g_ice with dg_dp_Ice in Ice.cpp (#2143) 2022-07-13 10:06:32 -04:00
Ian Bell
a2a4040912 Round kb and N_AV for PCSAFT to exact CODATA values 2022-06-29 09:13:49 -04:00
Ian Bell
66d43a96e9 More PC-SAFT unrounding 2022-06-28 18:50:01 -04:00
Ian Bell
a1f4d88a0b Unround the PC-SAFT coefficients for ai and bi 2022-06-28 17:25:46 -04:00
Friederike Boehm
c4cf52b671 AbstractState functions for CoolPropLib (#2135)
* Add AbstractState functions to CoolPropLib
AbstractState_get_mole_fractions_satState
AbstractState_keyed_output_satState
AbstractState_backend_name
add_fluids_as_JSON

* Overloaded AbstractState_get_phase_envelope_data and appended checkedMemory to function name
2022-06-07 08:26:10 -04:00
Friederike Boehm
44325d9e6a Add Props1SImulti and PropsSImulti to CoolPropLib (#2133)
Props1SImulti new function in CoolProp
2022-05-17 20:13:57 -04:00
Jeff Henning
4a5fcaa7ca Bump IF97 to included reverse T(P,H) patch [skip ci] (#2132) 2022-05-09 17:57:53 -04:00
Ian Bell
6f4dfa82c1 Turn musl builds back on 2022-04-20 22:22:51 -04:00
Julien Marrec
c66399d31d Simplify CoolProp python bindings cibuildwheel (#2122)
* Try to simplify cibuildwheel setup

* Split up the builds by python version it takes WAY too long otherwise

About 1h15 on mac, 45 min on windows, and Linux didn't finish (but that's becasue of aarch64 I think)

* Remove linux aarch64: docker is hanging because it doesn't pass the --platform tag correctly

```
 Status: Downloaded newer image for quay.io/pypa/manylinux2014_aarch64:2022-03-31-361e6b6
  WARNING: The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
  eab86187799169ab1ff12c486be2dbfa69f7a676b9a00c20e297c2207b9c293e
      + /bin/true
  standard_init_linux.go:228: exec user process caused: exec format error
```

* Try to use Cmake for Linux, see if it fixes the whl size (which bloated from 6MB to 42 MB)
2022-04-12 19:04:04 -04:00
Julien Marrec
a5f9344737 Missing a py37 build for Windows x64 + fix py38 win32 and py39 win32 (#2120)
* Missing a py37 build for Windows x64
2022-04-12 14:13:10 -04:00
Julien Marrec
06000823dc I moved the TWINE stuff in the wrong step (#2118) 2022-04-11 20:04:25 -04:00
Julien Marrec
8aa50fc270 Fix mac sed (#2116)
* Minimum fix for sed: mac has a weird sed version...

* Make repalcement from python to avoid dealing with weird sed version on mac

* Try to get the size of the wheels (/!\ 100MB max per upload)

* move setting env vars up a block
2022-04-11 12:35:06 -04:00
Ian Bell
9c2f19d658 Add two book locations 2022-04-07 13:27:11 -04:00
Ian Bell
256b810f31 Fix constant generation after the clang-format 2022-04-06 10:54:40 -04:00
Friederike Boehm
4ef119f102 Add bound-check to setter and getter functions (#2107) 2022-04-01 07:40:14 -04:00
Julien Marrec
6913fc41dc Format macros, they keep getting picked incrementally by clang format + Strip trailing whitespaces
```
find . -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx|py)$' | xargs -I@ sed -i 's/[ \t]*$//' "@"
```
2022-04-01 07:39:35 -04:00
Julien Marrec
a7a3c844e2 I think I know why mac is failing, it's because of the newline char (#2110) 2022-04-01 07:38:29 -04:00
Ian Bell
9a0acba19a Add dependencies for getting version in CI 2022-03-31 19:31:09 -04:00
Ian Bell
51740177af Fix sed for versioning of wheels 2022-03-31 19:07:16 -04:00
Ian Bell
f6fbdb2af6 packaging is also needed 2022-03-31 19:01:57 -04:00
Ian Bell
9b03196b44 requests is needed to extract the version 2022-03-31 19:00:17 -04:00
Julien Marrec
76b48b35f2 Configure upload to pypi/testpypi (#2109)
* Enable upload to testpypi

* Figure out the next available version to avoid override (especially for testpypi, shouldn't happen for pypi as we should bump in CMakeLists)
2022-03-31 18:53:39 -04:00
Julien Marrec
c1ed08617e Bump Catch 1 to Catch v3.0.0-preview4 (#2105)
* Bump Catch2 to latest v3.0.0-preview4

Bump Catch2 to latest 2.x: 2.13.8

Rename submodule Catch to Catch2

Add catch2 to ctest

Fix missing ";" in catch tests

Use ctest for catch2: run once with little output, then 2nd time with verbose output for failed tests

Run through CatchTestRunner: TEMP: PICK A STYLE

Update Catch to v3.0.0-preview4

Try to migrate to catch2 v3

Ok it builds and runs, but I'm missing tests

Get all files that have inline tests, now I get same behavior as with catch1

Put back app sources

* Remove the link to coolprop lib since I am now using APP_SOURCES instead of just the specific files with tests
2022-03-31 18:47:00 -04:00
Julien Marrec
05c8cf503b Lint: use automated tooling to reformat C++ and CMakeLists files (#2103)
* Add initial clang tidy / clang format config files

* Clang format the entire codebase

```
find ./src -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
find ./include -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
find ./Web -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
find ./dev -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
find ./wrappers -regextype posix-extended -regex '.*\.(cpp|hpp|c|h|cxx|hxx)$' | xargs clang-format-12 -style=file -i -fallback-style=none
```

* Add a .cmake-format file and reformat CmakeLists.txt with it

https://github.com/cheshirekow/cmake_format

* Add a clang-format workflow


only runs on PRs, only on touched files
2022-03-31 10:51:48 -04:00
Julien Marrec
3b8ed97fbc Github Actions: add shared library and doxygen workflows. (#2098)
* First try at building shared library

* Rename artifact for clarity instead of putting them all in the same

* Add a doxygen worklow

* Extract version from CMakeLists to name the artifacts

* move the extract version bit to a script in dev/ so I can reuse for documentation too

* Disable fail-fast, and don't use fstrings in extract_version.py (mac has a too old python by default, and I don't want to call setuppython actions)

* Mac still picks up a too old python, whatever: just setup any 3.x (it's cached, so quick)

* First try for a Windows Installer package

* forgot to create the build dir

* forgot build type

* Try to re-enable catch2 tests

* adjust

* Leave the coolprop catch2 tests in a separate workflow, since many are currently failing
2022-03-31 10:16:34 -04:00
Julien Marrec
1ae92851f2 Add a cppcheck workflow (#2106) 2022-03-31 10:12:02 -04:00
Julien Marrec
149a40d88b Add github action to build python wheels (including python 3.9 and 3.10) (#2097)
* Fix build error: `src/Backends/IF97/IF97Backend.h:54:34: error: call of overloaded ‘abs(double)’ is ambiguous`

Found with the manylinux_2_24_x86_64

gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

* Register MSVC 2019 and 2022 in setup.py

* setup.py: when calling cmake, build in parallel

* Enable using Env variables instead of passing them as args to setup.py

* Github actions for linux: try 1

* use actions/checkout@v3 for submodules

* mod setup.py:; typo

* Random shot for cibuildwheel for all platforms

* I thought package_dir was a flag, but it's positional

* typo in cmake_compiler

* add cython to setup_requires

* try a pryproject.toml to install cython

* try more requirements?

* pywin32 only found on win32 I guess

* Try with CIBW_BEFORE_BUILD instead

* try to enable msvc via vcvarsall on windows, and pass MACOSX_DEPLOYMENT_TARGET

* more tweaks for windoze

* disable tests for now (fails on windows)

* tweak mac again: it seems mac doesn't understand a C++ lambda, so like it's using pre C++11

* tweak

* try 10.15 for mac...

* try to  force C++11 since mac picks up the path where lambdas are used...

* Move back down to 10.9 now that C++11 is enabled and it works on mac, it should be enough

* Try to debug win32

* Enable part of the upload step (minus the upload) to list the wheels

* try to allow win32 to fail for now (instead of plain disabling)

* Disable the python_linux.yml workflow, so cibuildwheels works fine.

* Adjust the upload step to point to the right folder

* make LGTM python happy
2022-03-31 09:26:31 -04:00
friederikeboehm
072f828e3e Fix Rcomponent in calc_alpha0_deriv_nocache (#2101) 2022-03-24 17:58:35 -04:00
Ian Bell
381c8535e5 Update the Javascript tooling 2022-02-08 01:21:03 -05:00
friederikeboehm
5b8496f9da Add functions to CoolPropLib (#2084)
Add functions to CoolPropLib: AbstractState_get_mole_fractions and AbstractState_fluid_names
2022-02-02 19:04:51 -05:00
David Contreras
339a7ac497 Included CoolPropJavascriptDemo (#2076)
Included an example that manages units and other mathematical functions with mathjs
2022-01-12 21:08:54 -07:00
Ian Bell
77f3bdec7a Fix PHI0 delta derivatives for REFPROP backend. Closes #2073 2022-01-08 18:29:20 -05:00
Vladimir Portyanikhin
71a82276ff Updated info for the C# Wrapper (#2062)
Updated info about 3-party wrapper (SharpProp)
2021-11-07 11:58:57 -05:00
Jeff Henning
9500f4d314 Merge pull request #2058 from henningjp/IF97-QPatch
IF97 Backend Q and Phase Patch
2021-11-03 14:34:45 -04:00
Qi-Chu-woodside
2d52842caf Fix typo in iQ description (#2056) 2021-11-02 19:21:26 -04:00
henningjp
dd42740c7f Include iphase_critical_point check when returning _phase from IF97 Backend 2021-10-28 22:13:41 -04:00
henningjp
111fce7029 Updated Mathcad wrapper to handle Saturation/2-phase errors if TP inputs 2021-10-28 07:52:19 -04:00
henningjp
31903f8a5e IF97 patch to set _Q and _phase 2021-10-28 07:49:11 -04:00
Ian Bell
be204ce8d5 Implement ancillary equation for ammonia. See #2049 2021-10-24 13:29:17 -04:00
Ian Bell
fe7f6db631 Fix rounding for reducing density for nitrogen; closes #2055 2021-10-24 13:14:08 -04:00
Ian Bell
02746ef456 Fix reducing density for R236ea; #2054
Had been truncated to too few digits
2021-10-24 13:13:07 -04:00
Ian Bell
e6ba7dbee5 Fix typo in last digit for water; closes #2053 2021-10-24 13:10:58 -04:00
Vladimir Portyanikhin
0c4c2555ac Update index.rst for the C# Wrapper (#2050)
* Update index.rst for the C# Wrapper

Changed information about 3-party wrappers

* Update index.rst for the C# Wrapper

Returned the SharpFluids description. Added short description for the SharpProp

* Update index.rst for the C# Wrapper

Nuget -> NuGet
2021-10-06 21:07:05 -04:00
Ian Bell
c06d2df794 Fix printing of State class 2021-10-02 15:05:56 -04:00
Ian Bell
f4c09bb686 Update tabular data reading example in docs for python 3 2021-10-02 13:47:07 -04:00
Ian Bell
64e27b95de Add function set_interaction_parameters 2021-07-27 14:50:09 -04:00
Dong Keun Oh
f7c545138a A minor correction in case of COOLPROP_OBJECT_LIBRARY=ON (#2011) 2021-03-25 22:38:19 -04:00
Bryan W. Weber
2ea29cfeaa Fix build on macOS (#2008)
The changes in #1990 require C++11 compiler support. On macOS 10.14 with
XCode 11.3, the -std=c++11 flag must be specified to the compiler.
2021-03-15 21:32:42 -04:00