diff --git a/interface/CPP/test_teqpcpp.cpp b/interface/CPP/test_teqpcpp.cpp index c5f5063f73a7ec89dea471036cb818e7ec39a223..cccc85ffc71034382f86e32ca9be10694d63feb8 100644 --- a/interface/CPP/test_teqpcpp.cpp +++ b/interface/CPP/test_teqpcpp.cpp @@ -23,7 +23,6 @@ int main() { }}; //std::cout << j.dump(2); auto am = teqp::cppinterface::make_model(j); - auto am2 = teqp::cppinterface::make_vdW1(2, 3); auto z = (Eigen::ArrayXd(2) << 0.5, 0.5).finished(); double Ar01 = am->get_Arxy(0, 1, 300, 3, z); @@ -45,11 +44,4 @@ int main() { const auto& p = std::get<teqp::multifluid_t>(am->get_model()); std::cout << p.get_meta() << std::endl; - try{ - std::cout << am->get_m() << std::endl; - } - catch(std::exception&e){ - std::cout << e.what() << std::endl; - std::cout << "This fails, as it should because the model is not a PCSAFT one" << std::endl; - } } diff --git a/src/sat_Z_accuracy.cpp b/src/sat_Z_accuracy.cpp index 7c479a62804238922cdb260c7e93a905b6df39d0..3d0fa50433954c2e2b88ab97ac5662d2df2b0919 100644 --- a/src/sat_Z_accuracy.cpp +++ b/src/sat_Z_accuracy.cpp @@ -10,6 +10,10 @@ #undef REFPROP_FUNCTION_MODIFIER #undef REFPROP_IMPLEMENTATION +#if !defined(TEQP_MULTIPRECISION_ENABLED) +#error "TEQP_MULTIPRECISION_ENABLED must be turned on" +#endif + #include <iostream> #include <valarray> diff --git a/src/teqp_profile.cpp b/src/teqp_profile.cpp index e50cbadf9dc55f9112c19ce5e711968a8dbe2997..2aaa490fa8a095fc5f284216201e9de226642716 100644 --- a/src/teqp_profile.cpp +++ b/src/teqp_profile.cpp @@ -60,7 +60,7 @@ int main() { for (auto j = 0; j < N; ++j) { x1 += j * 1e-10; //auto f_Ar01 = [&x1, &x2, &c](auto& model) { using tdx = TDXDerivatives<decltype(model), decltype(x1), decltype(c)>; return tdx::get_Ar02(model, x1, x2, c); }; - auto v = mc.caller(4, [&x1, &x2, &c](auto& model) { using tdx = TDXDerivatives<decltype(model), decltype(x1), decltype(c)>; return tdx::get_Ar0n<3>(model, x1, x2, c); }); + auto v = mc.caller(4, [&x1, &x2, &c](auto& model) { using tdx = TDXDerivatives<decltype(model), decltype(x1), decltype(c)>; return tdx::template get_Ar0n<3>(model, x1, x2, c); }); //std::cout << v << std::endl; } } diff --git a/src/test_LennardJones.cpp b/src/test_LennardJones.cpp index 2c9648ae0bbcfd90f7aad4764444699a0bd913bb..ff252a55e22b18ba47cdf664307cd34f1452718c 100644 --- a/src/test_LennardJones.cpp +++ b/src/test_LennardJones.cpp @@ -104,7 +104,8 @@ int main() { auto m = teqp::build_model(j); for (auto& el : data) { - auto [T, rho, p, ur, cvr, w, a] = el; // I + auto [T_, rho_, p, ur, cvr, w, a] = el; + double T = T_, rho = rho_; // It is not possible to capture tuple-unpacked variables auto NT = 0, ND = 0; @@ -148,4 +149,4 @@ int main() { std::cout << "ur: " << urcalc << ", " << ur << std::endl; std::cout << "cvr: " << cvrcalc << ", " << cvr << std::endl; } -} \ No newline at end of file +}