| 984 | } |
| 985 | |
| 986 | EXPORT_CODE void CONVENTION AbstractState_get_spinodal_data(const long handle, const long length, double* tau, double* delta, double* M1, |
| 987 | long* errcode, char* message_buffer, const long buffer_length) { |
| 988 | *errcode = 0; |
| 989 | fpu_reset_guard guard; |
| 990 | try { |
| 991 | shared_ptr<CoolProp::AbstractState>& AS = handle_manager.get(handle); |
| 992 | CoolProp::SpinodalData spin = AS->get_spinodal_data(); |
| 993 | if (spin.tau.size() > static_cast<std::size_t>(length)) { |
| 994 | throw CoolProp::ValueError(format("Length of spinodal vectors [%d] is greater than allocated buffer length [%d]", |
| 995 | static_cast<int>(spin.tau.size()), static_cast<int>(length))); |
| 996 | } |
| 997 | for (std::size_t i = 0; i < spin.tau.size(); ++i) { |
| 998 | *(tau + i) = spin.tau[i]; |
| 999 | *(delta + i) = spin.delta[i]; |
| 1000 | *(M1 + i) = spin.M1[i]; |
| 1001 | } |
| 1002 | } catch (...) { |
| 1003 | HandleException(errcode, message_buffer, buffer_length); |
| 1004 | } |
| 1005 | } |
| 1006 | |
| 1007 | EXPORT_CODE void CONVENTION AbstractState_all_critical_points(const long handle, long length, double* T, double* p, double* rhomolar, long* stable, |
| 1008 | long* errcode, char* message_buffer, const long buffer_length) { |
nothing calls this directly
no test coverage detected