| 332 | } |
| 333 | |
| 334 | svd::SVDDecomposition unpack_decomp(const msgpack::object& o, std::size_t* out_region_idx, ::CoolProp::parameters* out_prop) { |
| 335 | check_array(o, 14, "decomp"); |
| 336 | *out_region_idx = static_cast<std::size_t>(as<std::uint32_t>(o.via.array.ptr[0])); |
| 337 | *out_prop = static_cast<::CoolProp::parameters>(as<std::int32_t>(o.via.array.ptr[1])); |
| 338 | svd::SVDDecomposition d; |
| 339 | d.NX = as<std::int32_t>(o.via.array.ptr[2]); |
| 340 | d.NY = as<std::int32_t>(o.via.array.ptr[3]); |
| 341 | d.rank = as<std::int32_t>(o.via.array.ptr[4]); |
| 342 | d.out_transform = static_cast<svd::OutputTransform>(as<std::uint8_t>(o.via.array.ptr[5])); |
| 343 | d.slope_source = static_cast<svd::SlopeSource>(as<std::uint8_t>(o.via.array.ptr[6])); |
| 344 | d.x_grid = as<std::vector<double>>(o.via.array.ptr[7]); |
| 345 | d.y_grid = as<std::vector<double>>(o.via.array.ptr[8]); |
| 346 | d.U = as<std::vector<double>>(o.via.array.ptr[9]); |
| 347 | d.dU_dx = as<std::vector<double>>(o.via.array.ptr[10]); |
| 348 | d.V_S = as<std::vector<double>>(o.via.array.ptr[11]); |
| 349 | d.dV_S_dy = as<std::vector<double>>(o.via.array.ptr[12]); |
| 350 | d.S = as<std::vector<double>>(o.via.array.ptr[13]); |
| 351 | return d; |
| 352 | } |
| 353 | |
| 354 | // Best-effort SuperAncillary handle acquisition for `fluid_name`. Returns |
| 355 | // null when the fluid isn't a HEOS pure fluid (mixtures / unknown names); |
no test coverage detected