mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-12 07:28:10 -05:00
* 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
26 lines
866 B
C++
26 lines
866 B
C++
|
||
#include "crossplatform_shared_ptr.h"
|
||
#include <AbstractState.h>
|
||
#include <CoolProp.h>
|
||
|
||
int main(int argc, const char* argv[]) {
|
||
shared_ptr<CoolProp::AbstractState> pState;
|
||
pState.reset(CoolProp::AbstractState::factory("TTSE&HEOS", "Water"));
|
||
std::cout << "T crit: " << pState->T_critical() << std::endl;
|
||
pState->update(CoolProp::QT_INPUTS, 0.2, 373.15);
|
||
double res = pState->first_two_phase_deriv_splined(CoolProp::iDmass, CoolProp::iHmass, CoolProp::iP, 0.3);
|
||
|
||
/*x, y1 = [], []
|
||
for Q in np.linspace(0, 0.3, steps) :
|
||
AS.update(CoolProp.PQ_INPUTS, 101325, Q)
|
||
x.append(AS.Q())
|
||
try :
|
||
y1.append(AS.first_two_phase_deriv_splined(CoolProp.iDmass, CoolProp.iHmass, CoolProp.iP, 0.3))
|
||
except Exception as e :
|
||
print e
|
||
y1.append(np.NAN)
|
||
break
|
||
plt.plot(x, y1, label = 'Two-phase (splined, tabular)', ls = '--', lw = 3)
|
||
|
||
´*/
|
||
} |