|
Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
|
A callable type that uses texture mapping to interpolate Cloudy cooling/heating. More...
#include <load_cloudy_texture.h>
Public Member Functions | |
| __host__ | CloudyHeatAndCool (std::string filename) |
| Construct an instance from the appropriate file name. | |
| __host__ | CloudyHeatAndCool (ParameterMap &pmap) |
| Construct an instance from the ParameterMap. | |
| template<bool TABLE_ONLY> | |
| __device__ __forceinline__ Real | calc_contrib_ (Real n, Real T) const |
| compute the net cooling contribution | |
| __device__ Real | operator() (Real n, Real T) const |
| compute the net cooling/heating rate | |
A callable type that uses texture mapping to interpolate Cloudy cooling/heating.
For more context, a "callable" object is sometimes called a "functor." Essentially a "callable" object carries around state and can be called like a function.
This is intended to be used as a cooling component that is used to construct a cooling recipe.
As of now, this class internally tracks both a cooling table AND a heating table. If we want to support the use of just a single table:
|
explicit |
Construct an instance from the appropriate file name.
When passed an empty string, it tries to guess the location of the standard data file.
|
inline |
compute the net cooling contribution
This primarily exists for testing purposes.
|
inline |
compute the net cooling/heating rate
The docstring of the cool_component namespace provides further context about how this method is used and describes some relevant optimization considerations
obj, then you call this method by invoking obj(n, T). In python, this method would be called __call__