9#include "../cooling/texture_utilities.h"
10#include "../global/global.h"
11#include "../io/ParameterMap.h"
12#include "../utils/shared.h"
75 template <
bool TABLE_ONLY>
88 if ((not TABLE_ONLY) and (log10(T) > 9.0)) {
89 lambda = 0.45 * log10(T) - 26.065;
90 }
else if (TABLE_ONLY or (log10(T) >= 1.0)) {
94 const Real remap_log_T = (log_T - 1.0) * 10;
95 const Real remap_log_n = (log_n + 6.0) * 10;
97 lambda = Bilinear_Texture(this->coolTexObj_.
get(), remap_log_T, remap_log_n);
98 const Real H = Bilinear_Texture(this->heatTexObj_.
get(), remap_log_T, remap_log_n);
105 cooling = pow(10, lambda);
106 return n * n * (cooling - heating);
A class that provides map-like access to parameter files.
Definition ParameterMap.h:74
Wraps a handles while providing shared object semantics.
Definition shared.h:367
__host__ __device__ __forceinline__ HandleT get() const noexcept
Return the stored handle.
Definition shared.h:436
A callable type that uses texture mapping to interpolate Cloudy cooling/heating.
Definition load_cloudy_texture.h:40
__device__ Real operator()(Real n, Real T) const
compute the net cooling/heating rate
Definition load_cloudy_texture.h:121
__device__ __forceinline__ Real calc_contrib_(Real n, Real T) const
compute the net cooling contribution
Definition load_cloudy_texture.h:76
__host__ CloudyHeatAndCool(ParameterMap &pmap)
Construct an instance from the ParameterMap.
Definition load_cloudy_texture.h:58
Describes cooling components.
Definition cool_components.h:52