[Kinetics] Add methods for inspecting ChebyshevRate objects
This commit is contained in:
parent
b12c90b315
commit
a9c6eb6fda
2 changed files with 51 additions and 2 deletions
|
|
@ -521,7 +521,48 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
//! Minimum valid temperature [K]
|
||||
double Tmin() const {
|
||||
return Tmin_;
|
||||
}
|
||||
|
||||
//! Maximum valid temperature [K]
|
||||
double Tmax() const {
|
||||
return Tmax_;
|
||||
}
|
||||
|
||||
//! Minimum valid pressure [Pa]
|
||||
double Pmin() const {
|
||||
return Pmin_;
|
||||
}
|
||||
|
||||
//! Maximum valid pressure [Pa]
|
||||
double Pmax() const {
|
||||
return Pmax_;
|
||||
}
|
||||
|
||||
//! Number of points in the pressure direction
|
||||
size_t nPressure() const {
|
||||
return nP_;
|
||||
}
|
||||
|
||||
//! Number of points in the temperature direction
|
||||
size_t nTemperature() const {
|
||||
return nT_;
|
||||
}
|
||||
|
||||
//! Access the Chebyshev coefficients.
|
||||
/*!
|
||||
* \f$ \alpha_{t,p} = \mathrm{coeffs}[N_P*t + p] \f$ where
|
||||
* \f$ 0 <= t < N_T \f$ and \f$ 0 <= p < N_P \f$.
|
||||
*/
|
||||
const vector_fp& coeffs() const {
|
||||
return chebCoeffs_;
|
||||
}
|
||||
|
||||
protected:
|
||||
double Tmin_, Tmax_; //!< valid temperature range
|
||||
double Pmin_, Pmax_; //!< valid pressure range
|
||||
double TrNum_, TrDen_; //!< terms appearing in the reduced temperature
|
||||
double PrNum_, PrDen_; //!< terms appearing in the reduced pressure
|
||||
|
||||
|
|
|
|||
|
|
@ -245,7 +245,11 @@ std::vector<std::pair<double, Arrhenius> > Plog::rates() const
|
|||
}
|
||||
|
||||
ChebyshevRate::ChebyshevRate(const ReactionData& rdata)
|
||||
: nP_(rdata.chebDegreeP)
|
||||
: Tmin_(rdata.chebTmin)
|
||||
, Tmax_(rdata.chebTmax)
|
||||
, Pmin_(rdata.chebPmin)
|
||||
, Pmax_(rdata.chebPmax)
|
||||
, nP_(rdata.chebDegreeP)
|
||||
, nT_(rdata.chebDegreeT)
|
||||
, chebCoeffs_(rdata.chebCoeffs)
|
||||
, dotProd_(rdata.chebDegreeT)
|
||||
|
|
@ -263,7 +267,11 @@ ChebyshevRate::ChebyshevRate(const ReactionData& rdata)
|
|||
|
||||
ChebyshevRate::ChebyshevRate(double Pmin, double Pmax, double Tmin, double Tmax,
|
||||
const Array2D& coeffs)
|
||||
: nP_(coeffs.nColumns())
|
||||
: Tmin_(Tmin)
|
||||
, Tmax_(Tmax)
|
||||
, Pmin_(Pmin)
|
||||
, Pmax_(Pmax)
|
||||
, nP_(coeffs.nColumns())
|
||||
, nT_(coeffs.nRows())
|
||||
, chebCoeffs_(coeffs.nColumns() * coeffs.nRows(), 0.0)
|
||||
, dotProd_(coeffs.nRows())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue