mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-15 00:48:18 -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
17 lines
787 B
C++
17 lines
787 B
C++
#include "CoolProp.h"
|
|
#include "AbstractState.h"
|
|
#include <iostream>
|
|
#include "crossplatform_shared_ptr.h"
|
|
using namespace CoolProp;
|
|
int main() {
|
|
shared_ptr<AbstractState> Water(AbstractState::factory("HEOS", "Water"));
|
|
Water->update(PQ_INPUTS, 101325, 0); // SI units
|
|
std::cout << "T: " << Water->T() << " K" << std::endl;
|
|
std::cout << "rho': " << Water->rhomass() << " kg/m^3" << std::endl;
|
|
std::cout << "rho': " << Water->rhomolar() << " mol/m^3" << std::endl;
|
|
std::cout << "h': " << Water->hmass() << " J/kg" << std::endl;
|
|
std::cout << "h': " << Water->hmolar() << " J/mol" << std::endl;
|
|
std::cout << "s': " << Water->smass() << " J/kg/K" << std::endl;
|
|
std::cout << "s': " << Water->smolar() << " J/mol/K" << std::endl;
|
|
return EXIT_SUCCESS;
|
|
} |