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

Function unpack_decomp

src/SBTL/SVDSurfaceSerializer.cpp:334–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334svd::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);

Callers 1

unpack_surfaceFunction · 0.85

Calls 1

check_arrayFunction · 0.85

Tested by

no test coverage detected