1 #ifndef TEMPERATURE_IMP_BASE_H 2 #define TEMPERATURE_IMP_BASE_H 5 #include <boost/function.hpp> 39 virtual void print(std::ostream& Os)
const { Os <<
desc(); }
45 virtual std::string
desc()
const {
return "TemperatureImpBase"; }
70 void init(
const blitz::Array<double, 1>& Coeff,
71 const blitz::Array<bool, 1>& Used_flag,
73 bool Mark_according_to_press =
true,
76 Mark_according_to_press,
93 const blitz::Array<bool, 1>& Used_flag,
95 bool Mark_according_to_press =
true,
98 Mark_according_to_press, Pdep_start),
101 void fill_cache()
const virtual AutoDerivativeWithUnit< double > temperature(const AutoDerivativeWithUnit< double > &Press) const
Return the temperature at the given pressure (in Pascals)
virtual void print(std::ostream &Os) const
Print to stream.
This is a AutoDerivative that also has units associated with it.
void init(const blitz::Array< double, 1 > &Coeff, const blitz::Array< bool, 1 > &Used_flag, const boost::shared_ptr< Pressure > &Press, bool Mark_according_to_press=true, int Pdep_start=0)
Initialize object.
TemperatureImpBase()
Default constructor, derived class should call init if they use this constructor. ...
AutoDerivativeWithUnit< T > convert(const Unit &R) const
Convert to the given units.
virtual void update_sub_state_hook()
Hook for anything a derived class needs to do after coefficient is updated and before notify_update...
const Unit Pa("Pa", N/(m *m))
virtual boost::shared_ptr< Temperature > clone() const =0
Clone a Temperature object.
const Unit K("K", 1.0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0)
virtual std::string desc() const
Description of object, to be printed to stream.
virtual ~TemperatureImpBase()
As a design principle, we have each base class with the absolutely minimum interface needed for use f...
It is common to have a class that is an Observable with a set of coefficients, a subset of which are ...
Contains classes to abstract away details in various Spurr Radiative Transfer software.
virtual void calc_temperature_grid() const =0
Derived classes should provide a function to fill in tgrid when this is called.
void init(const blitz::Array< double, 1 > &Coeff, const blitz::Array< bool, 1 > &Used_flag, const boost::shared_ptr< Pressure > &Press=boost::shared_ptr< Pressure >(), bool Mark_according_to_press=true, int Pdep_start=0)
boost::function< AutoDerivative< double >AutoDerivative< double >)> tgrid
The cached temperature grid.
This class maintains the temperature portion of the state.
TemperatureImpBase(const blitz::Array< double, 1 > &Coeff, const blitz::Array< bool, 1 > &Used_flag, const boost::shared_ptr< Pressure > &Press, bool Mark_according_to_press=true, int Pdep_start=0)
Constructor that sets the coefficient() and used_flag() values.
bool cache_stale
If this is true, the recalculate the temperature_grid the next time we need it.