Skip to content

Commit 10a3913

Browse files
committed
Deprecate ResidEval and ResidJacEval
1 parent 71e52c2 commit 10a3913

File tree

7 files changed

+21
-2
lines changed

7 files changed

+21
-2
lines changed

include/cantera/numerics/ResidEval.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
#include "cantera/base/utilities.h"
1212
#include "cantera/base/global.h"
1313

14+
#ifndef CT_SKIP_DEPRECATION_WARNINGS
15+
#pragma message("warning: ResidEval.h and class ResidEval are deprecated and will " \
16+
"be removed after Cantera 3.0.")
17+
#endif
18+
1419
namespace Cantera
1520
{
1621

@@ -27,12 +32,15 @@ const int c_LT_ZERO = -2;
2732
* \vec{F}(t,\vec{y}, \vec{y^\prime})
2833
* \f]
2934
* The DAE solver attempts to find a solution y(t) such that F = 0.
35+
* @deprecated Unused. To be removed after Cantera 3.0.
3036
* @ingroup DAE_Group
3137
*/
3238
class ResidEval
3339
{
3440
public:
35-
ResidEval() {}
41+
ResidEval() {
42+
warn_deprecated("class ResidEval", "To be removed after Cantera 3.0");
43+
}
3644
virtual ~ResidEval() {}
3745

3846
/**

include/cantera/numerics/ResidJacEval.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
#include "ResidEval.h"
1414
#include "DenseMatrix.h"
1515

16+
#ifndef CT_SKIP_DEPRECATION_WARNINGS
17+
#pragma message("warning: ResidJacEval.h and class ResidJacEval are deprecated and " \
18+
"will be removed after Cantera 3.0.")
19+
#endif
20+
1621
namespace Cantera
1722
{
1823

@@ -51,6 +56,8 @@ enum ResidEval_Type_Enum {
5156
* A class for full (non-sparse dense matrices with Fortran-compatible data
5257
* storage. The class adds support for identifying what types of calls are made
5358
* to the residual evaluator by adding the ResidEval_Type_Enum class.
59+
*
60+
* @deprecated Unused. To be removed after Cantera 3.0.
5461
*/
5562
class ResidJacEval : public ResidEval
5663
{

include/cantera/thermo/MixtureFugacityTP.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#define CT_MIXTUREFUGACITYTP_H
1313

1414
#include "ThermoPhase.h"
15-
#include "cantera/numerics/ResidEval.h"
1615

1716
namespace Cantera
1817
{

src/numerics/ResidJacEval.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ namespace Cantera
1111
ResidJacEval::ResidJacEval(doublereal atol) :
1212
m_atol(atol)
1313
{
14+
warn_deprecated("class ResidJacEval", "To be removed after Cantera 3.0");
1415
}
1516

1617
int ResidJacEval::nEquations() const

src/thermo/MixtureFugacityTP.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
#include "cantera/thermo/MixtureFugacityTP.h"
1212
#include "cantera/base/stringUtils.h"
13+
#include "cantera/base/utilities.h"
14+
#include "cantera/base/global.h"
1315

1416
using namespace std;
1517

src/thermo/PengRobinson.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "cantera/thermo/ThermoFactory.h"
88
#include "cantera/thermo/Species.h"
99
#include "cantera/base/stringUtils.h"
10+
#include "cantera/base/utilities.h"
1011

1112
#include <boost/algorithm/string.hpp>
1213
#include <boost/math/tools/roots.hpp>

src/thermo/RedlichKwongMFTP.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include "cantera/thermo/ThermoFactory.h"
88
#include "cantera/thermo/Species.h"
99
#include "cantera/base/stringUtils.h"
10+
#include "cantera/base/utilities.h"
1011

1112
#include <boost/algorithm/string.hpp>
1213
#include <boost/math/tools/roots.hpp>

0 commit comments

Comments
 (0)