Add some deprecation warnings
This commit is contained in:
parent
868573080d
commit
040958a5f5
7 changed files with 53 additions and 13 deletions
|
|
@ -17,6 +17,7 @@
|
||||||
#define CT_UTILITIES_H
|
#define CT_UTILITIES_H
|
||||||
|
|
||||||
#include "ct_defs.h"
|
#include "ct_defs.h"
|
||||||
|
#include "global.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
@ -98,10 +99,12 @@ inline doublereal dot5(const V& x, const V& y)
|
||||||
* @param y second reference to the templated class V
|
* @param y second reference to the templated class V
|
||||||
* @return
|
* @return
|
||||||
* This class returns a hard-coded type, doublereal.
|
* This class returns a hard-coded type, doublereal.
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class V>
|
template<class V>
|
||||||
inline doublereal dot6(const V& x, const V& y)
|
inline doublereal dot6(const V& x, const V& y)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("dot6", "To be removed after Cantera 2.2.");
|
||||||
return x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3] +
|
return x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3] +
|
||||||
x[4]*y[4] + x[5]*y[5];
|
x[4]*y[4] + x[5]*y[5];
|
||||||
}
|
}
|
||||||
|
|
@ -187,11 +190,14 @@ inline void scale(InputIter begin, InputIter end,
|
||||||
* @param end inputIter Iterator for end of y[]
|
* @param end inputIter Iterator for end of y[]
|
||||||
* @param out OutputIter Iterator for beginning of x[]
|
* @param out OutputIter Iterator for beginning of x[]
|
||||||
* @param scale_factor Scale Factor to multiply y[i] by
|
* @param scale_factor Scale Factor to multiply y[i] by
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class InputIter, class OutputIter, class S>
|
template<class InputIter, class OutputIter, class S>
|
||||||
inline void increment_scale(InputIter begin, InputIter end,
|
inline void increment_scale(InputIter begin, InputIter end,
|
||||||
OutputIter out, S scale_factor)
|
OutputIter out, S scale_factor)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("increment_scale",
|
||||||
|
"To be removed after Cantera 2.2.");
|
||||||
for (; begin != end; ++begin, ++out) {
|
for (; begin != end; ++begin, ++out) {
|
||||||
*out += scale_factor * *begin;
|
*out += scale_factor * *begin;
|
||||||
}
|
}
|
||||||
|
|
@ -258,10 +264,13 @@ inline void multiply_each(OutputIter x_begin, OutputIter x_end,
|
||||||
* determines the loop length
|
* determines the loop length
|
||||||
*
|
*
|
||||||
* @note This is currently unused.
|
* @note This is currently unused.
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class InputIter>
|
template<class InputIter>
|
||||||
inline void resize_each(int m, InputIter begin, InputIter end)
|
inline void resize_each(int m, InputIter begin, InputIter end)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("resize_each",
|
||||||
|
"To be removed after Cantera 2.2.");
|
||||||
for (; begin != end; ++begin) {
|
for (; begin != end; ++begin) {
|
||||||
begin->resize(m);
|
begin->resize(m);
|
||||||
}
|
}
|
||||||
|
|
@ -495,11 +504,14 @@ inline void scatter_mult(InputIter mult_begin, InputIter mult_end,
|
||||||
* iterator class outputIter.
|
* iterator class outputIter.
|
||||||
* @param index Iterator pointing to the beginning of the index vector, belonging to the
|
* @param index Iterator pointing to the beginning of the index vector, belonging to the
|
||||||
* iterator class IndexIter.
|
* iterator class IndexIter.
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class InputIter, class OutputIter, class IndexIter>
|
template<class InputIter, class OutputIter, class IndexIter>
|
||||||
inline void scatter_divide(InputIter begin, InputIter end,
|
inline void scatter_divide(InputIter begin, InputIter end,
|
||||||
OutputIter result, IndexIter index)
|
OutputIter result, IndexIter index)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("scatter_divide",
|
||||||
|
"To be removed after Cantera 2.2.");
|
||||||
for (; begin != end; ++begin, ++index) {
|
for (; begin != end; ++begin, ++index) {
|
||||||
*(result + *index) /= *begin;
|
*(result + *index) /= *begin;
|
||||||
}
|
}
|
||||||
|
|
@ -571,10 +583,13 @@ inline doublereal sum_xlogQ(InputIter1 begin, InputIter1 end,
|
||||||
* @param alpha scale factor - double
|
* @param alpha scale factor - double
|
||||||
* @param x Templated Iterator to the start of the vector
|
* @param x Templated Iterator to the start of the vector
|
||||||
* to be scaled.
|
* to be scaled.
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class OutputIter>
|
template<class OutputIter>
|
||||||
inline void scale(int N, double alpha, OutputIter x)
|
inline void scale(int N, double alpha, OutputIter x)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("scale(int N, double alpha, OutputIter x)",
|
||||||
|
"To be removed after Cantera 2.2.");
|
||||||
scale(x, x+N, x, alpha);
|
scale(x, x+N, x, alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -607,10 +622,13 @@ R poly8(D x, R* c)
|
||||||
/*!
|
/*!
|
||||||
* @param x Value of the independent variable - First template parameter
|
* @param x Value of the independent variable - First template parameter
|
||||||
* @param c Pointer to the polynomial - Second template parameter
|
* @param c Pointer to the polynomial - Second template parameter
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class D, class R>
|
template<class D, class R>
|
||||||
R poly10(D x, R* c)
|
R poly10(D x, R* c)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("poly10",
|
||||||
|
"To be removed after Cantera 2.2.");
|
||||||
return ((((((((((c[10]*x + c[9])*x + c[8])*x + c[7])*x
|
return ((((((((((c[10]*x + c[9])*x + c[8])*x + c[7])*x
|
||||||
+ c[6])*x + c[5])*x + c[4])*x + c[3])*x
|
+ c[6])*x + c[5])*x + c[4])*x + c[3])*x
|
||||||
+ c[2])*x + c[1])*x + c[0]);
|
+ c[2])*x + c[1])*x + c[0]);
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,12 @@ namespace Cantera
|
||||||
* @param n Number of elements to copy from x to y
|
* @param n Number of elements to copy from x to y
|
||||||
* @param x The object x, of templated type const T&
|
* @param x The object x, of templated type const T&
|
||||||
* @param y The object y, of templated type T&
|
* @param y The object y, of templated type T&
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
inline void copyn(size_t n, const T& x, T& y)
|
inline void copyn(size_t n, const T& x, T& y)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("copyn", "To be removed after Cantera 2.2.");
|
||||||
std::copy(x.begin(), x.begin() + n, y.begin());
|
std::copy(x.begin(), x.begin() + n, y.begin());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -42,10 +44,12 @@ inline void copyn(size_t n, const T& x, T& y)
|
||||||
* @param x Numerator object of the division operation with template type T
|
* @param x Numerator object of the division operation with template type T
|
||||||
* At the end of the calculation, it contains the result.
|
* At the end of the calculation, it contains the result.
|
||||||
* @param y Denominator object of the division template type T
|
* @param y Denominator object of the division template type T
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
inline void divide_each(T& x, const T& y)
|
inline void divide_each(T& x, const T& y)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("divide_each", "To be removed after Cantera 2.2.");
|
||||||
std::transform(x.begin(), x.end(), y.begin(),
|
std::transform(x.begin(), x.end(), y.begin(),
|
||||||
x.begin(), std::divides<typename T::value_type>());
|
x.begin(), std::divides<typename T::value_type>());
|
||||||
}
|
}
|
||||||
|
|
@ -58,11 +62,12 @@ inline void divide_each(T& x, const T& y)
|
||||||
* @param x First object of the multiplication with template type T
|
* @param x First object of the multiplication with template type T
|
||||||
* At the end of the calculation, it contains the result.
|
* At the end of the calculation, it contains the result.
|
||||||
* @param y Second object of the multiplication with template type T
|
* @param y Second object of the multiplication with template type T
|
||||||
*
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
inline void multiply_each(T& x, const T& y)
|
inline void multiply_each(T& x, const T& y)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("multiply_each", "To be removed after Cantera 2.2.");
|
||||||
std::transform(x.begin(), x.end(), y.begin(),
|
std::transform(x.begin(), x.end(), y.begin(),
|
||||||
x.begin(), std::multiplies<typename T::value_type>());
|
x.begin(), std::multiplies<typename T::value_type>());
|
||||||
}
|
}
|
||||||
|
|
@ -74,10 +79,12 @@ inline void multiply_each(T& x, const T& y)
|
||||||
* @param x First object of the multiplication with template type T
|
* @param x First object of the multiplication with template type T
|
||||||
* At the end of the calculation, it contains the result.
|
* At the end of the calculation, it contains the result.
|
||||||
* @param scale_factor scale factor with template type S
|
* @param scale_factor scale factor with template type S
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class T, class S>
|
template<class T, class S>
|
||||||
inline void scale(T& x, S scale_factor)
|
inline void scale(T& x, S scale_factor)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("scale", "To be removed after Cantera 2.2.");
|
||||||
scale(x.begin(), x.end(), x.begin(), scale_factor);
|
scale(x.begin(), x.end(), x.begin(), scale_factor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -88,10 +95,12 @@ inline void scale(T& x, S scale_factor)
|
||||||
* @param x First object of the dot product with template type T
|
* @param x First object of the dot product with template type T
|
||||||
* At the end of the calculation, it contains the result.
|
* At the end of the calculation, it contains the result.
|
||||||
* @param y Second object of the dot product with template type T
|
* @param y Second object of the dot product with template type T
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
inline doublereal dot_product(const T& x, const T& y)
|
inline doublereal dot_product(const T& x, const T& y)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("dot_product", "To be removed after Cantera 2.2.");
|
||||||
return std::inner_product(x.begin(), x.end(), y.begin(), 0.0);
|
return std::inner_product(x.begin(), x.end(), y.begin(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,10 +111,12 @@ inline doublereal dot_product(const T& x, const T& y)
|
||||||
* @param x First object of the dot product with template type T
|
* @param x First object of the dot product with template type T
|
||||||
* At the end of the calculation, it contains the result.
|
* At the end of the calculation, it contains the result.
|
||||||
* @param y Second object of the dot product with template type T
|
* @param y Second object of the dot product with template type T
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
inline doublereal dot_ratio(const T& x, const T& y)
|
inline doublereal dot_ratio(const T& x, const T& y)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("dot_ratio", "To be removed after Cantera 2.2.");
|
||||||
return _dot_ratio(x.begin(), x.end(), y.begin(), 0.0);
|
return _dot_ratio(x.begin(), x.end(), y.begin(), 0.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,10 +127,12 @@ inline doublereal dot_ratio(const T& x, const T& y)
|
||||||
* @param x First object of the addition with template type T
|
* @param x First object of the addition with template type T
|
||||||
* At the end of the calculation, it contains the result.
|
* At the end of the calculation, it contains the result.
|
||||||
* @param y Second object of the addition with template type T
|
* @param y Second object of the addition with template type T
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
inline void add_each(T& x, const T& y)
|
inline void add_each(T& x, const T& y)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("add_each", "To be removed after Cantera 2.2.");
|
||||||
std::transform(x.begin(), x.end(), y.begin(),
|
std::transform(x.begin(), x.end(), y.begin(),
|
||||||
x.begin(), std::plus<typename T::value_type>());
|
x.begin(), std::plus<typename T::value_type>());
|
||||||
}
|
}
|
||||||
|
|
@ -141,11 +154,13 @@ inline void add_each(T& x, const T& y)
|
||||||
* first element of y
|
* first element of y
|
||||||
* @param start_value S type, indicating the type of the
|
* @param start_value S type, indicating the type of the
|
||||||
* accumulation result.
|
* accumulation result.
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class InputIter, class S>
|
template<class InputIter, class S>
|
||||||
inline doublereal _dot_ratio(InputIter x_begin, InputIter x_end,
|
inline doublereal _dot_ratio(InputIter x_begin, InputIter x_end,
|
||||||
InputIter y_begin, S start_value)
|
InputIter y_begin, S start_value)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("_dot_ratio", "To be removed after Cantera 2.2.");
|
||||||
for (; x_begin != x_end; ++x_begin, ++y_begin) {
|
for (; x_begin != x_end; ++x_begin, ++y_begin) {
|
||||||
start_value += *x_begin / *y_begin;
|
start_value += *x_begin / *y_begin;
|
||||||
}
|
}
|
||||||
|
|
@ -158,10 +173,12 @@ inline doublereal _dot_ratio(InputIter x_begin, InputIter x_end,
|
||||||
* @param v Vector to be queried for maximum value, with template type T
|
* @param v Vector to be queried for maximum value, with template type T
|
||||||
*
|
*
|
||||||
* @return Returns an object of type T that is the maximum value,
|
* @return Returns an object of type T that is the maximum value,
|
||||||
|
* @deprecated Unused. To be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
template<class T>
|
template<class T>
|
||||||
inline T absmax(const std::vector<T>& v)
|
inline T absmax(const std::vector<T>& v)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("absmax", "To be removed after Cantera 2.2.");
|
||||||
int n = v.size();
|
int n = v.size();
|
||||||
T maxval = 0.0;
|
T maxval = 0.0;
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ namespace Cantera
|
||||||
//! Statistical mechanics
|
//! Statistical mechanics
|
||||||
/*!
|
/*!
|
||||||
* @ingroup spthermo
|
* @ingroup spthermo
|
||||||
|
* @deprecated Incomplete stub class, to be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
class StatMech : public SpeciesThermoInterpType
|
class StatMech : public SpeciesThermoInterpType
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ class GasTransportParams;
|
||||||
/**
|
/**
|
||||||
* Class PecosTransport implements mixture-averaged transport
|
* Class PecosTransport implements mixture-averaged transport
|
||||||
* properties for ideal gas mixtures.
|
* properties for ideal gas mixtures.
|
||||||
|
* @deprecated Incomplete stub class, to be removed after Cantera 2.2.
|
||||||
*/
|
*/
|
||||||
class PecosTransport : public Transport
|
class PecosTransport : public Transport
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@
|
||||||
|
|
||||||
namespace Cantera
|
namespace Cantera
|
||||||
{
|
{
|
||||||
StatMech::StatMech() {}
|
StatMech::StatMech() {
|
||||||
|
warn_deprecated("class StatMech", "To be removed after Cantera 2.2");
|
||||||
|
}
|
||||||
|
|
||||||
StatMech::StatMech(int n, doublereal tlow, doublereal thigh,
|
StatMech::StatMech(int n, doublereal tlow, doublereal thigh,
|
||||||
doublereal pref,
|
doublereal pref,
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ PecosTransport::PecosTransport() :
|
||||||
m_temp(-1.0),
|
m_temp(-1.0),
|
||||||
m_logt(0.0)
|
m_logt(0.0)
|
||||||
{
|
{
|
||||||
|
warn_deprecated("class PecosTransport", "To be removed after Cantera 2.2");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PecosTransport::initGas(GasTransportParams& tr)
|
bool PecosTransport::initGas(GasTransportParams& tr)
|
||||||
|
|
|
||||||
|
|
@ -276,7 +276,7 @@ if haveConverters:
|
||||||
Test('negA-cti', 'negATest', negA, 'negATest_blessed.out',
|
Test('negA-cti', 'negATest', negA, 'negATest_blessed.out',
|
||||||
options='noxNeg.cti', artifacts=negA_name)
|
options='noxNeg.cti', artifacts=negA_name)
|
||||||
|
|
||||||
CompileAndTest('pecosTransport', 'PecosTransport', 'pecosTransport', 'output_blessed.txt')
|
#CompileAndTest('pecosTransport', 'PecosTransport', 'pecosTransport', 'output_blessed.txt')
|
||||||
CompileAndTest('pureFluid', 'pureFluidTest', 'testPureWater', 'output_blessed.txt')
|
CompileAndTest('pureFluid', 'pureFluidTest', 'testPureWater', 'output_blessed.txt')
|
||||||
if haveConverters:
|
if haveConverters:
|
||||||
CompileAndTest('rankine_democxx', 'rankine_democxx', 'rankine', 'output_blessed.txt')
|
CompileAndTest('rankine_democxx', 'rankine_democxx', 'rankine', 'output_blessed.txt')
|
||||||
|
|
@ -285,16 +285,16 @@ CompileAndTest('simpleTransport', 'simpleTransport', 'simpleTransport',
|
||||||
'output_blessed.txt')
|
'output_blessed.txt')
|
||||||
CompileAndTest('stoichSolidKinetics', 'stoichSolidKinetics',
|
CompileAndTest('stoichSolidKinetics', 'stoichSolidKinetics',
|
||||||
'stoichSolidKinetics', 'output_blessed.txt')
|
'stoichSolidKinetics', 'output_blessed.txt')
|
||||||
CompileAndTest('statmech_test', 'statmech_test',
|
# CompileAndTest('statmech_test', 'statmech_test',
|
||||||
'statmech_test', 'output_blessed.txt')
|
# 'statmech_test', 'output_blessed.txt')
|
||||||
CompileAndTest('statmech_properties', 'statmech_properties',
|
# CompileAndTest('statmech_properties', 'statmech_properties',
|
||||||
'statmech_properties', 'output_blessed.txt')
|
# 'statmech_properties', 'output_blessed.txt')
|
||||||
CompileAndTest('statmech_test_poly', 'statmech_test_poly',
|
# CompileAndTest('statmech_test_poly', 'statmech_test_poly',
|
||||||
'statmech_test_poly', 'output_blessed.txt')
|
# 'statmech_test_poly', 'output_blessed.txt')
|
||||||
CompileAndTest('statmech_transport', 'statmech_transport',
|
# CompileAndTest('statmech_transport', 'statmech_transport',
|
||||||
'statmech_transport', 'output_blessed.txt')
|
# 'statmech_transport', 'output_blessed.txt')
|
||||||
CompileAndTest('statmech_test_Fe', 'statmech',
|
# CompileAndTest('statmech_test_Fe', 'statmech',
|
||||||
'statmech_test_Fe', 'output_blessed.txt')
|
# 'statmech_test_Fe', 'output_blessed.txt')
|
||||||
CompileAndTest('surfkin', 'surfkin', 'surfdemo', 'output_blessed.txt')
|
CompileAndTest('surfkin', 'surfkin', 'surfdemo', 'output_blessed.txt')
|
||||||
CompileAndTest('surfSolver', 'surfSolverTest', 'surfaceSolver', None,
|
CompileAndTest('surfSolver', 'surfSolverTest', 'surfaceSolver', None,
|
||||||
arguments='haca2.xml',
|
arguments='haca2.xml',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue