| 121 | }; |
| 122 | |
| 123 | double CoolProp::VTPRBackend::get_binary_interaction_double(const std::size_t i, const std::size_t j, const std::string& parameter) { |
| 124 | // bound-check indices |
| 125 | if (i >= N) { |
| 126 | if (j >= N) { |
| 127 | throw ValueError(format("Both indices i [%d] and j [%d] are out of bounds. Must be between 0 and %d.", i, j, N - 1)); |
| 128 | } else { |
| 129 | throw ValueError(format("Index i [%d] is out of bounds. Must be between 0 and %d.", i, N - 1)); |
| 130 | } |
| 131 | } else if (j >= N) { |
| 132 | throw ValueError(format("Index j [%d] is out of bounds. Must be between 0 and %d.", j, N - 1)); |
| 133 | } |
| 134 | return cubic->get_interaction_parameter(i, j, parameter); |
| 135 | }; |
| 136 | |
| 137 | const UNIFACLibrary::UNIFACParameterLibrary& CoolProp::VTPRBackend::LoadLibrary() { |
| 138 | if (!lib.is_populated() || get_config_bool(VTPR_ALWAYS_RELOAD_LIBRARY)) { |
no test coverage detected