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

Function AbstractState_get_spinodal_data

src/CoolPropLib.cpp:986–1005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

984}
985
986EXPORT_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
1007EXPORT_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) {

Callers

nothing calls this directly

Calls 5

HandleExceptionFunction · 0.85
get_spinodal_dataMethod · 0.80
formatFunction · 0.70
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected