antioch-0.4.0
List of all members | Public Member Functions | Public Attributes | Private Attributes
Antioch::ConstantRate< CoeffType > Class Template Reference

Constant rate equation. More...

#include <constant_rate.h>

Inheritance diagram for Antioch::ConstantRate< CoeffType >:
Antioch::KineticsType< CoeffType >

Public Member Functions

 ConstantRate (const CoeffType Cf=0.)
 
 ~ConstantRate ()
 
void set_Cf (const CoeffType Cf)
 
template<typename VectorCoeffType >
void reset_coefs (const VectorCoeffType &coefficients)
 reset the coeffs More...
 
CoeffType Cf () const
 
void set_parameter (KineticsModel::Parameters parameter, CoeffType new_value)
 set one parameter, characterized by enum More...
 
CoeffType get_parameter (KineticsModel::Parameters parameter) const
 get one parameter, characterized by enum More...
 
template<typename VectorCoeffType >
void set_parameter (KineticsModel::Parameters parameter, VectorCoeffType new_value)
 for compatibility purpose with photochemistry (particle flux reactions) More...
 
template<typename StateType >
 rate (const StateType &T) const template< typename StateType > operator()(const StateType &T) const template< typename StateType > derivative(const StateType &T) const template< typename StateType > void rate_and_derivative(const StateType &T
 Simultaneously evaluate the rate and its derivative at T. More...
 
template<typename StateType , typename VectorStateType >
 rate (const KineticsConditions< StateType, VectorStateType > &cond) const ANTIOCH_AUTOFUNC(StateType
 
 constant_clone (cond.T(), _Cf)) template< typename StateType
 
VectorStateType operator() (const KineticsConditions< StateType, VectorStateType > &cond) const template< typename StateType
 
VectorStateType VectorStateType derivative (const KineticsConditions< StateType, VectorStateType > &cond) const ANTIOCH_AUTOFUNC(StateType
 
VectorStateType VectorStateType zero_clone (cond.T())) template< typename StateType
 Simultaneously evaluate the rate and its derivative at T. More...
 
VectorStateType
VectorStateType
VectorStateType void 
rate_and_derivative (const KineticsConditions< StateType, VectorStateType > &cond, StateType &rate, StateType &drate_dT) const
 
const std::string numeric () const
 print equation More...
 
KineticsModel::KineticsModel type () const
 
StateType operator() (const StateType &temp) const
 
StateType derivative (const StateType &conditions) const
 
CoeffType get_parameter (KineticsModel::Parameters parameter, int l) const
 get one parameter, characterized by enum, for vectorized parameter More...
 
void compute_rate_and_derivative (const KineticsConditions< StateType, VectorStateType > &conditions, StateType &rate, StateType &drate_dT) const
 
void compute_rate_and_derivative (const StateType &temp, StateType &rate, StateType &drate_dT) const
 
void set_index (unsigned int nr)
 
void print (std::ostream &os=std::cout) const
 Formatted print, by default to std::cout. More...
 

Public Attributes

StateType & rate
 
StateType StateType &drate_dT const
 

Private Attributes

CoeffType _Cf
 

Detailed Description

template<typename CoeffType = double>
class Antioch::ConstantRate< CoeffType >

Constant rate equation.

This is a constant value for the kinetics model of the form:

\[ \alpha(T) = A \]

Thus

\[ \frac{\partial \alpha(T)}{\partial T} = 0 \]

Definition at line 55 of file constant_rate.h.

Constructor & Destructor Documentation

template<typename CoeffType >
Antioch::ConstantRate< CoeffType >::ConstantRate ( const CoeffType  Cf = 0.)

Definition at line 141 of file constant_rate.h.

142  : KineticsType<CoeffType>(KineticsModel::CONSTANT),
143  _Cf(Cf)
144  {
145  return;
146  }
CoeffType Cf() const
template<typename CoeffType >
Antioch::ConstantRate< CoeffType >::~ConstantRate ( )

Definition at line 149 of file constant_rate.h.

150  {
151  return;
152  }

Member Function Documentation

template<typename CoeffType >
CoeffType Antioch::ConstantRate< CoeffType >::Cf ( ) const
inline
void Antioch::KineticsType< CoeffType, VectorCoeffType >::compute_rate_and_derivative ( const KineticsConditions< StateType, VectorStateType > &  conditions,
StateType &  rate,
StateType &  drate_dT 
) const
inherited
void Antioch::KineticsType< CoeffType, VectorCoeffType >::compute_rate_and_derivative ( const StateType &  temp,
StateType &  rate,
StateType &  drate_dT 
) const
inherited
template<typename CoeffType = double>
Antioch::ConstantRate< CoeffType >::constant_clone ( cond.  T(),
_Cf   
)
Returns
the rate evaluated at T.
StateType Antioch::KineticsType< CoeffType, VectorCoeffType >::derivative ( const StateType &  conditions) const
inherited
template<typename CoeffType = double>
VectorStateType VectorStateType Antioch::ConstantRate< CoeffType >::derivative ( const KineticsConditions< StateType, VectorStateType > &  cond) const

Referenced by test_values(), and vectester().

template<typename CoeffType >
CoeffType Antioch::ConstantRate< CoeffType >::get_parameter ( KineticsModel::Parameters  parameter) const
inline

get one parameter, characterized by enum

Definition at line 186 of file constant_rate.h.

References Antioch::KineticsModel::A, antioch_assert_equal_to, and Antioch::ConstantRate< CoeffType >::Cf().

187  {
189 
190  return this->Cf();
191  }
#define antioch_assert_equal_to(expr1, expr2)
CoeffType Cf() const
CoeffType Antioch::KineticsType< CoeffType, VectorCoeffType >::get_parameter ( KineticsModel::Parameters  parameter,
int  l 
) const
inherited

get one parameter, characterized by enum, for vectorized parameter

template<typename CoeffType >
const std::string Antioch::ConstantRate< CoeffType >::numeric ( ) const
virtual

print equation

Implements Antioch::KineticsType< CoeffType >.

Definition at line 155 of file constant_rate.h.

References Antioch::ConstantRate< CoeffType >::_Cf.

156  {
157  std::stringstream os;
158  os << _Cf;
159 
160  return os.str();
161  }
StateType Antioch::KineticsType< CoeffType, VectorCoeffType >::operator() ( const StateType &  temp) const
inherited
template<typename CoeffType = double>
VectorStateType Antioch::ConstantRate< CoeffType >::operator() ( const KineticsConditions< StateType, VectorStateType > &  cond) const
Returns
the derivative with respect to temperature evaluated at T.
void Antioch::KineticsType< CoeffType, VectorCoeffType >::print ( std::ostream &  os = std::cout) const
inherited

Formatted print, by default to std::cout.

template<typename CoeffType = double>
template<typename StateType >
Antioch::ConstantRate< CoeffType >::rate ( const StateType &  T) const

Simultaneously evaluate the rate and its derivative at T.

Returns
the rate evaluated at T.
the rate evaluated at T.
the derivative with respect to temperature evaluated at T.
template<typename CoeffType = double>
template<typename StateType , typename VectorStateType >
Antioch::ConstantRate< CoeffType >::rate ( const KineticsConditions< StateType, VectorStateType > &  cond) const
Returns
the rate evaluated at T.
template<typename CoeffType = double>
void Antioch::ConstantRate< CoeffType >::rate_and_derivative ( const KineticsConditions< StateType, VectorStateType > &  cond,
StateType &  rate,
StateType &  drate_dT 
) const
inline

Definition at line 211 of file constant_rate.h.

References Antioch::constant_fill(), and Antioch::set_zero().

Referenced by test_values(), and vectester().

214  {
216  Antioch::set_zero(drate_dT);
217  return;
218  }
void set_zero(_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &a)
Definition: eigen_utils.h:217
void constant_fill(_Matrix< _Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols > &output, const Scalar &value)
Definition: eigen_utils.h:204
template<typename CoeffType >
template<typename VectorCoeffType >
void Antioch::ConstantRate< CoeffType >::reset_coefs ( const VectorCoeffType &  coefficients)
inline

reset the coeffs

You require exactly one parameter

Definition at line 196 of file constant_rate.h.

References antioch_assert_equal_to, and Antioch::ConstantRate< CoeffType >::set_Cf().

Referenced by tester().

197  {
198  antioch_assert_equal_to(coefficients.size(),1);
199 
200  this->set_Cf(coefficients[0]);
201  }
#define antioch_assert_equal_to(expr1, expr2)
void set_Cf(const CoeffType Cf)
template<typename CoeffType >
void Antioch::ConstantRate< CoeffType >::set_Cf ( const CoeffType  Cf)
inline

Definition at line 166 of file constant_rate.h.

References Antioch::ConstantRate< CoeffType >::Cf().

Referenced by Antioch::ConstantRate< CoeffType >::reset_coefs(), Antioch::ConstantRate< CoeffType >::set_parameter(), and tester().

167  {
168  _Cf = Cf;
169 
170  return;
171  }
CoeffType Cf() const
void Antioch::KineticsType< CoeffType, VectorCoeffType >::set_index ( unsigned int  nr)
inherited
template<typename CoeffType >
void Antioch::ConstantRate< CoeffType >::set_parameter ( KineticsModel::Parameters  parameter,
CoeffType  new_value 
)
inline

set one parameter, characterized by enum

Definition at line 175 of file constant_rate.h.

References Antioch::KineticsModel::A, antioch_assert_equal_to, and Antioch::ConstantRate< CoeffType >::set_Cf().

176  {
178 
179  this->set_Cf(new_value);
180 
181  return;
182  }
#define antioch_assert_equal_to(expr1, expr2)
void set_Cf(const CoeffType Cf)
template<typename CoeffType = double>
template<typename VectorCoeffType >
void Antioch::ConstantRate< CoeffType >::set_parameter ( KineticsModel::Parameters  parameter,
VectorCoeffType  new_value 
)
inline

for compatibility purpose with photochemistry (particle flux reactions)

Definition at line 88 of file constant_rate.h.

References antioch_error.

88 {antioch_error();}
#define antioch_error()
KineticsModel::KineticsModel Antioch::KineticsType< CoeffType, VectorCoeffType >::type ( ) const
inherited
template<typename CoeffType = double>
VectorStateType VectorStateType Antioch::ConstantRate< CoeffType >::zero_clone ( cond.  T())

Simultaneously evaluate the rate and its derivative at T.

Member Data Documentation

template<typename CoeffType = double>
CoeffType Antioch::ConstantRate< CoeffType >::_Cf
private
template<typename CoeffType = double>
StateType StateType& drate_dT Antioch::ConstantRate< CoeffType >::const

Definition at line 110 of file constant_rate.h.

template<typename CoeffType = double>
StateType& Antioch::ConstantRate< CoeffType >::rate

Definition at line 110 of file constant_rate.h.


The documentation for this class was generated from the following file:

Generated on Thu Jul 7 2016 11:09:48 for antioch-0.4.0 by  doxygen 1.8.8