Skip to content

Commit

Permalink
Replace doublereal
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl authored and speth committed Aug 5, 2023
1 parent 845a551 commit 86b2a13
Show file tree
Hide file tree
Showing 160 changed files with 3,694 additions and 3,694 deletions.
12 changes: 6 additions & 6 deletions include/cantera/base/Array.h
Expand Up @@ -148,7 +148,7 @@ class Array2D
* @param j column index.
* @returns a reference to A(i,j) which may be assigned.
*/
doublereal& operator()(size_t i, size_t j) {
double& operator()(size_t i, size_t j) {
return value(i,j);
}

Expand All @@ -158,7 +158,7 @@ class Array2D
* @param j Index for the column to be retrieved.
* @returns the value of the matrix entry
*/
doublereal operator()(size_t i, size_t j) const {
double operator()(size_t i, size_t j) const {
return value(i,j);
}

Expand All @@ -171,7 +171,7 @@ class Array2D
* @param j The column index
* @returns a changeable reference to the matrix entry
*/
doublereal& value(size_t i, size_t j) {
double& value(size_t i, size_t j) {
return m_data[m_nrows*j + i];
}

Expand All @@ -182,7 +182,7 @@ class Array2D
* @param i The row index
* @param j The column index
*/
doublereal value(size_t i, size_t j) const {
double value(size_t i, size_t j) const {
return m_data[m_nrows*j + i];
}

Expand Down Expand Up @@ -232,7 +232,7 @@ class Array2D
* @param j Value of the column
* @returns a pointer to the top of the column
*/
doublereal* ptrColumn(size_t j) {
double* ptrColumn(size_t j) {
return &m_data[m_nrows*j];
}

Expand All @@ -242,7 +242,7 @@ class Array2D
* @param j Value of the column
* @returns a const pointer to the top of the column
*/
const doublereal* ptrColumn(size_t j) const {
const double* ptrColumn(size_t j) const {
return &m_data[m_nrows*j];
}

Expand Down
4 changes: 2 additions & 2 deletions include/cantera/base/ValueCache.h
Expand Up @@ -136,7 +136,7 @@ typedef CachedValue<vector<double>>& CachedArray;
* @code
* class Example {
* ValueCache m_cache;
* doublereal get_property(doublereal T, doublereal P) {
* double get_property(double T, double P) {
* const static int cacheId = m_cache.getId();
* CachedScalar cached = m_cache.getScalar(cacheId);
* if (T != cached.state1 || P != cached.state2) {
Expand All @@ -157,7 +157,7 @@ class ValueCache
int getId();

//! Get a reference to a CachedValue object representing a scalar
//! (doublereal) with the given id.
//! (double) with the given id.
CachedScalar getScalar(int id) {
return m_scalarCache[id];
}
Expand Down
8 changes: 4 additions & 4 deletions include/cantera/base/stringUtils.h
Expand Up @@ -61,16 +61,16 @@ std::string stripnonprint(const std::string& s);
Composition parseCompString(const string& ss,
const vector<string>& names=vector<string>());

//! Translate a string into one doublereal value
//! Translate a string into one double value
/*!
* No error checking is done on the conversion.
*
* @param val String value of the double
* @returns a double
*/
doublereal fpValue(const std::string& val);
double fpValue(const std::string& val);

//! Translate a string into one doublereal value, with error checking
//! Translate a string into one double value, with error checking
/*!
* fpValueCheck is a wrapper around the C++ stringstream double parser. It
* does quite a bit more error checking than atof() or strtod(), and is quite
Expand All @@ -91,7 +91,7 @@ doublereal fpValue(const std::string& val);
* @param val String representation of the number
* @returns a double
*/
doublereal fpValueCheck(const std::string& val);
double fpValueCheck(const std::string& val);

//! This function separates a string up into tokens according to the location of
//! white space.
Expand Down
14 changes: 7 additions & 7 deletions include/cantera/base/utilities.h
Expand Up @@ -34,10 +34,10 @@ namespace Cantera
*
* @param x first reference to the templated class V
* @param y second reference to the templated class V
* @return This class returns a hard-coded type, doublereal.
* @return This class returns a hard-coded type, double.
*/
template<class V>
inline doublereal dot4(const V& x, const V& y)
inline double dot4(const V& x, const V& y)
{
return x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3];
}
Expand All @@ -49,10 +49,10 @@ inline doublereal dot4(const V& x, const V& y)
*
* @param x first reference to the templated class V
* @param y second reference to the templated class V
* @return This class returns a hard-coded type, doublereal.
* @return This class returns a hard-coded type, double.
*/
template<class V>
inline doublereal dot5(const V& x, const V& y)
inline double dot5(const V& x, const V& y)
{
return x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3] +
x[4]*y[4];
Expand All @@ -61,13 +61,13 @@ inline doublereal dot5(const V& x, const V& y)
//! Function that calculates a templated inner product.
/*!
* This inner product is templated twice. The output variable is hard coded
* to return a doublereal.
* to return a double.
*
* template<class InputIter, class InputIter2>
*
* @code
* double x[8], y[8];
* doublereal dsum = dot<double *,double *>(x, &x+7, y);
* double dsum = dot<double *,double *>(x, &x+7, y);
* @endcode
*
* @param x_begin Iterator pointing to the beginning, belonging to the
Expand All @@ -79,7 +79,7 @@ inline doublereal dot5(const V& x, const V& y)
* @return The return is hard-coded to return a double.
*/
template<class InputIter, class InputIter2>
inline doublereal dot(InputIter x_begin, InputIter x_end,
inline double dot(InputIter x_begin, InputIter x_end,
InputIter2 y_begin)
{
return std::inner_product(x_begin, x_end, y_begin, 0.0);
Expand Down
6 changes: 3 additions & 3 deletions include/cantera/equil/ChemEquil.h
Expand Up @@ -136,7 +136,7 @@ class ChemEquil
ThermoPhase* m_phase;

//! number of atoms of element m in species k.
doublereal nAtoms(size_t k, size_t m) const {
double nAtoms(size_t k, size_t m) const {
return m_comp[k*m_mm + m];
}

Expand All @@ -156,7 +156,7 @@ class ChemEquil
* @param t temperature in K.
*/
void setToEquilState(ThermoPhase& s,
const vector<double>& x, doublereal t);
const vector<double>& x, double t);

//! Estimate the initial mole numbers. This version borrows from the
//! MultiPhaseEquil solver.
Expand Down Expand Up @@ -274,7 +274,7 @@ class ChemEquil

//! Storage of the element compositions. natom(k,m) = m_comp[k*m_mm+ m];
vector<double> m_comp;
doublereal m_temp, m_dens;
double m_temp, m_dens;
double m_p0 = OneAtm;

//! Index of the element id corresponding to the electric charge of each
Expand Down

0 comments on commit 86b2a13

Please sign in to comment.