12 """Grids + 7 property tables (float64, C-order), Cf_vac with the _ensure_cea fallback."""
13 assert getattr(cache,
"use_3d",
False),
"cache is not a 3D grid"
14 Pc = np.ascontiguousarray(cache.Pc_grid, np.float64)
15 MR = np.ascontiguousarray(cache.MR_grid, np.float64)
16 eps = np.ascontiguousarray(cache.eps_grid, np.float64)
17 cf_vac = getattr(cache,
"Cf_vac_table",
None)
20 gt = np.asarray(cache.gamma_table, np.float64)
21 cf_vac = np.empty_like(gt)
22 for k
in range(gt.shape[2]):
24 for i
in range(gt.shape[0]):
25 for j
in range(gt.shape[1]):
26 cf_vac[i, j, k] = _isentropic_cf_vac(gt[i, j, k], ek)
27 A =
lambda t: np.ascontiguousarray(t, np.float64)
28 return (Pc, MR, eps, A(cache.cstar_table), A(cache.Cf_table), A(cache.Tc_table),
29 A(cache.gamma_table), A(cache.R_table), A(cache.M_table), A(cf_vac))