| 834 | } |
| 835 | |
| 836 | EXPORT_CODE void CONVENTION AbstractState_update_and_5_out(const long handle, const long input_pair, const double* value1, const double* value2, |
| 837 | const long length, long* outputs, double* out1, double* out2, double* out3, double* out4, |
| 838 | double* out5, long* errcode, char* message_buffer, const long buffer_length) { |
| 839 | *errcode = 0; |
| 840 | fpu_reset_guard guard; |
| 841 | try { |
| 842 | shared_ptr<CoolProp::AbstractState>& AS = handle_manager.get(handle); |
| 843 | |
| 844 | for (int i = 0; i < length; i++) { |
| 845 | try { |
| 846 | AS->update(static_cast<CoolProp::input_pairs>(input_pair), *(value1 + i), *(value2 + i)); |
| 847 | *(out1 + i) = AS->keyed_output(static_cast<CoolProp::parameters>(outputs[0])); |
| 848 | *(out2 + i) = AS->keyed_output(static_cast<CoolProp::parameters>(outputs[1])); |
| 849 | *(out3 + i) = AS->keyed_output(static_cast<CoolProp::parameters>(outputs[2])); |
| 850 | *(out4 + i) = AS->keyed_output(static_cast<CoolProp::parameters>(outputs[3])); |
| 851 | *(out5 + i) = AS->keyed_output(static_cast<CoolProp::parameters>(outputs[4])); |
| 852 | } catch (...) { // NOLINT(bugprone-empty-catch) |
| 853 | // Per-element failure is intentionally swallowed so a single |
| 854 | // bad input point does not abort the whole batch. As |
| 855 | // documented in CoolPropLib.h, the output slot for this index |
| 856 | // is left unchanged on error. |
| 857 | } |
| 858 | }; |
| 859 | } catch (...) { |
| 860 | HandleException(errcode, message_buffer, buffer_length); |
| 861 | } |
| 862 | } |
| 863 | |
| 864 | EXPORT_CODE void CONVENTION AbstractState_set_binary_interaction_double(const long handle, const long i, const long j, const char* parameter, |
| 865 | const double value, long* errcode, char* message_buffer, |
no test coverage detected