MCPcopy Create free account
hub / github.com/CoolProp/CoolProp / set_binary_interaction_double

Method set_binary_interaction_double

src/Backends/Cubics/VTPRBackend.cpp:101–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void CoolProp::VTPRBackend::set_binary_interaction_double(const std::size_t i, const std::size_t j, const std::string& parameter,
102 const double value) {
103 // bound-check indices
104 if (i >= N) {
105 if (j >= N) {
106 throw ValueError(format("Both indices i [%d] and j [%d] are out of bounds. Must be between 0 and %d.", i, j, N - 1));
107 } else {
108 throw ValueError(format("Index i [%d] is out of bounds. Must be between 0 and %d.", i, N - 1));
109 }
110 } else if (j >= N) {
111 throw ValueError(format("Index j [%d] is out of bounds. Must be between 0 and %d.", j, N - 1));
112 }
113 cubic->set_interaction_parameter(i, j, parameter, value);
114 for (auto& linked_state : linked_states) {
115 linked_state->set_binary_interaction_double(i, j, parameter, value);
116 }
117};
118
119void CoolProp::VTPRBackend::set_Q_k(const size_t sgi, const double value) {
120 cubic->set_Q_k(sgi, value);

Calls 2

formatFunction · 0.50

Tested by

no test coverage detected