From 01e63f004e62e0db19fa81307c03fa2c0f424ca5 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Wed, 22 Feb 2012 00:16:48 +0000 Subject: [PATCH] All tests using TemperatureTable.h now use a shared copy --- test_problems/SConscript | 2 +- .../HMW_graph_CpvT/TemperatureTable.h | 123 ------------------ .../cathermo/HMW_graph_GvI/TemperatureTable.h | 123 ------------------ .../cathermo/HMW_graph_GvT/TemperatureTable.h | 123 ------------------ .../cathermo/HMW_graph_HvT/TemperatureTable.h | 123 ------------------ .../cathermo/HMW_graph_VvT/TemperatureTable.h | 123 ------------------ .../cathermo/stoichSubSSTP/TemperatureTable.h | 123 ------------------ .../TemperatureTable.h | 17 +-- 8 files changed, 6 insertions(+), 751 deletions(-) delete mode 100644 test_problems/cathermo/HMW_graph_CpvT/TemperatureTable.h delete mode 100644 test_problems/cathermo/HMW_graph_GvI/TemperatureTable.h delete mode 100644 test_problems/cathermo/HMW_graph_GvT/TemperatureTable.h delete mode 100644 test_problems/cathermo/HMW_graph_HvT/TemperatureTable.h delete mode 100644 test_problems/cathermo/HMW_graph_VvT/TemperatureTable.h delete mode 100644 test_problems/cathermo/stoichSubSSTP/TemperatureTable.h rename test_problems/{cathermo/HMW_dupl_test => shared}/TemperatureTable.h (86%) diff --git a/test_problems/SConscript b/test_problems/SConscript index 03f84a2bb..ad1c2e0b4 100644 --- a/test_problems/SConscript +++ b/test_problems/SConscript @@ -2,7 +2,7 @@ from buildutils import * Import('env','buildTargets','installTargets') localenv = env.Clone() -localenv.Append(CPPPATH=['#include', '#src']) +localenv.Append(CPPPATH=['#include', '#src', 'shared']) os.environ['PYTHONPATH'] = pjoin(os.getcwd(), '..', 'Cantera', 'python') os.environ['CANTERA_DATA'] = pjoin(os.getcwd(), '..', 'data', 'inputs') diff --git a/test_problems/cathermo/HMW_graph_CpvT/TemperatureTable.h b/test_problems/cathermo/HMW_graph_CpvT/TemperatureTable.h deleted file mode 100644 index c248db366..000000000 --- a/test_problems/cathermo/HMW_graph_CpvT/TemperatureTable.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2004 Sandia Corporation. Under the terms of Contract - * DE-AC04-94AL85000, there is a non-exclusive license for use of this - * work by or on behalf of the U.S. Government. Export of this program - * may require a license from the United States Government. - */ - -#ifndef TEMPERATURE_TABLE_H -#define TEMPERATURE_TABLE_H -//#include "cantera/base/mdp_allo.h" -#include -using std::vector; - -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -/** - * This Class constructs a vector of temperature from which to make - * a table. - */ -class TemperatureTable -{ - -public: - int NPoints; - bool Include298; - double Tlow; //!< Min temperature for thermo data fit - double Thigh; //!< Max temperature for thermo table - double DeltaT; - vector T; - int numAddedTs; - vector AddedTempVector; -public: - /* - * Default constructor for TemperatureTable() - */ - TemperatureTable(const int nPts = 14, - const bool inc298 = true, - const double tlow = 300., - const double deltaT = 100., - const int numAdded = 0, - const double* addedTempVector = 0) : - NPoints(nPts), - Include298(inc298), - Tlow(tlow), - DeltaT(deltaT), - T(0), - numAddedTs(numAdded) { - /****************************/ - int i; - // AddedTempVector = mdp_alloc_dbl_1(numAdded, 0.0); - AddedTempVector.resize(numAdded, 0.0); - for (int i = 0; i < numAdded; i++) { - AddedTempVector[i] = addedTempVector[i]; - } - //mdp_copy_dbl_1(AddedTempVector, addedTempVector, numAdded); - // T = mdp_alloc_dbl_1(NPoints, 0.0); - T.resize(NPoints, 0.0); - double TCurrent = Tlow; - for (i = 0; i < NPoints; i++) { - T[i] = TCurrent; - TCurrent += DeltaT; - } - if (Include298) { - T.push_back(298.15); - //mdp_realloc_dbl_1(&T, NPoints+1, NPoints, 298.15); - NPoints++; - } - if (numAdded > 0) { - //mdp_realloc_dbl_1(&T, NPoints+numAdded, NPoints, 0.0); - T.resize(NPoints+numAdded, 0.0); - for (i = 0; i < numAdded; i++) { - T[i+NPoints] = addedTempVector[i]; - } - NPoints += numAdded; - } - std::sort(T.begin(), T.end()); - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Destructor - */ - ~TemperatureTable() { - //mdp_safe_free((void **) &AddedTempVector); - // mdp_safe_free((void **) &T); - } - - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Overloaded operator[] - * - * return the array value in the vector - */ - double operator[](const int i) { - return T[i]; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * size() - */ - int size() { - return NPoints; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Block assignment and copy constructors: not needed. - */ -private: - TemperatureTable(const TemperatureTable&); - TemperatureTable& operator=(const TemperatureTable&); -}; -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -#endif diff --git a/test_problems/cathermo/HMW_graph_GvI/TemperatureTable.h b/test_problems/cathermo/HMW_graph_GvI/TemperatureTable.h deleted file mode 100644 index c248db366..000000000 --- a/test_problems/cathermo/HMW_graph_GvI/TemperatureTable.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2004 Sandia Corporation. Under the terms of Contract - * DE-AC04-94AL85000, there is a non-exclusive license for use of this - * work by or on behalf of the U.S. Government. Export of this program - * may require a license from the United States Government. - */ - -#ifndef TEMPERATURE_TABLE_H -#define TEMPERATURE_TABLE_H -//#include "cantera/base/mdp_allo.h" -#include -using std::vector; - -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -/** - * This Class constructs a vector of temperature from which to make - * a table. - */ -class TemperatureTable -{ - -public: - int NPoints; - bool Include298; - double Tlow; //!< Min temperature for thermo data fit - double Thigh; //!< Max temperature for thermo table - double DeltaT; - vector T; - int numAddedTs; - vector AddedTempVector; -public: - /* - * Default constructor for TemperatureTable() - */ - TemperatureTable(const int nPts = 14, - const bool inc298 = true, - const double tlow = 300., - const double deltaT = 100., - const int numAdded = 0, - const double* addedTempVector = 0) : - NPoints(nPts), - Include298(inc298), - Tlow(tlow), - DeltaT(deltaT), - T(0), - numAddedTs(numAdded) { - /****************************/ - int i; - // AddedTempVector = mdp_alloc_dbl_1(numAdded, 0.0); - AddedTempVector.resize(numAdded, 0.0); - for (int i = 0; i < numAdded; i++) { - AddedTempVector[i] = addedTempVector[i]; - } - //mdp_copy_dbl_1(AddedTempVector, addedTempVector, numAdded); - // T = mdp_alloc_dbl_1(NPoints, 0.0); - T.resize(NPoints, 0.0); - double TCurrent = Tlow; - for (i = 0; i < NPoints; i++) { - T[i] = TCurrent; - TCurrent += DeltaT; - } - if (Include298) { - T.push_back(298.15); - //mdp_realloc_dbl_1(&T, NPoints+1, NPoints, 298.15); - NPoints++; - } - if (numAdded > 0) { - //mdp_realloc_dbl_1(&T, NPoints+numAdded, NPoints, 0.0); - T.resize(NPoints+numAdded, 0.0); - for (i = 0; i < numAdded; i++) { - T[i+NPoints] = addedTempVector[i]; - } - NPoints += numAdded; - } - std::sort(T.begin(), T.end()); - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Destructor - */ - ~TemperatureTable() { - //mdp_safe_free((void **) &AddedTempVector); - // mdp_safe_free((void **) &T); - } - - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Overloaded operator[] - * - * return the array value in the vector - */ - double operator[](const int i) { - return T[i]; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * size() - */ - int size() { - return NPoints; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Block assignment and copy constructors: not needed. - */ -private: - TemperatureTable(const TemperatureTable&); - TemperatureTable& operator=(const TemperatureTable&); -}; -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -#endif diff --git a/test_problems/cathermo/HMW_graph_GvT/TemperatureTable.h b/test_problems/cathermo/HMW_graph_GvT/TemperatureTable.h deleted file mode 100644 index c248db366..000000000 --- a/test_problems/cathermo/HMW_graph_GvT/TemperatureTable.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2004 Sandia Corporation. Under the terms of Contract - * DE-AC04-94AL85000, there is a non-exclusive license for use of this - * work by or on behalf of the U.S. Government. Export of this program - * may require a license from the United States Government. - */ - -#ifndef TEMPERATURE_TABLE_H -#define TEMPERATURE_TABLE_H -//#include "cantera/base/mdp_allo.h" -#include -using std::vector; - -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -/** - * This Class constructs a vector of temperature from which to make - * a table. - */ -class TemperatureTable -{ - -public: - int NPoints; - bool Include298; - double Tlow; //!< Min temperature for thermo data fit - double Thigh; //!< Max temperature for thermo table - double DeltaT; - vector T; - int numAddedTs; - vector AddedTempVector; -public: - /* - * Default constructor for TemperatureTable() - */ - TemperatureTable(const int nPts = 14, - const bool inc298 = true, - const double tlow = 300., - const double deltaT = 100., - const int numAdded = 0, - const double* addedTempVector = 0) : - NPoints(nPts), - Include298(inc298), - Tlow(tlow), - DeltaT(deltaT), - T(0), - numAddedTs(numAdded) { - /****************************/ - int i; - // AddedTempVector = mdp_alloc_dbl_1(numAdded, 0.0); - AddedTempVector.resize(numAdded, 0.0); - for (int i = 0; i < numAdded; i++) { - AddedTempVector[i] = addedTempVector[i]; - } - //mdp_copy_dbl_1(AddedTempVector, addedTempVector, numAdded); - // T = mdp_alloc_dbl_1(NPoints, 0.0); - T.resize(NPoints, 0.0); - double TCurrent = Tlow; - for (i = 0; i < NPoints; i++) { - T[i] = TCurrent; - TCurrent += DeltaT; - } - if (Include298) { - T.push_back(298.15); - //mdp_realloc_dbl_1(&T, NPoints+1, NPoints, 298.15); - NPoints++; - } - if (numAdded > 0) { - //mdp_realloc_dbl_1(&T, NPoints+numAdded, NPoints, 0.0); - T.resize(NPoints+numAdded, 0.0); - for (i = 0; i < numAdded; i++) { - T[i+NPoints] = addedTempVector[i]; - } - NPoints += numAdded; - } - std::sort(T.begin(), T.end()); - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Destructor - */ - ~TemperatureTable() { - //mdp_safe_free((void **) &AddedTempVector); - // mdp_safe_free((void **) &T); - } - - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Overloaded operator[] - * - * return the array value in the vector - */ - double operator[](const int i) { - return T[i]; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * size() - */ - int size() { - return NPoints; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Block assignment and copy constructors: not needed. - */ -private: - TemperatureTable(const TemperatureTable&); - TemperatureTable& operator=(const TemperatureTable&); -}; -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -#endif diff --git a/test_problems/cathermo/HMW_graph_HvT/TemperatureTable.h b/test_problems/cathermo/HMW_graph_HvT/TemperatureTable.h deleted file mode 100644 index c248db366..000000000 --- a/test_problems/cathermo/HMW_graph_HvT/TemperatureTable.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2004 Sandia Corporation. Under the terms of Contract - * DE-AC04-94AL85000, there is a non-exclusive license for use of this - * work by or on behalf of the U.S. Government. Export of this program - * may require a license from the United States Government. - */ - -#ifndef TEMPERATURE_TABLE_H -#define TEMPERATURE_TABLE_H -//#include "cantera/base/mdp_allo.h" -#include -using std::vector; - -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -/** - * This Class constructs a vector of temperature from which to make - * a table. - */ -class TemperatureTable -{ - -public: - int NPoints; - bool Include298; - double Tlow; //!< Min temperature for thermo data fit - double Thigh; //!< Max temperature for thermo table - double DeltaT; - vector T; - int numAddedTs; - vector AddedTempVector; -public: - /* - * Default constructor for TemperatureTable() - */ - TemperatureTable(const int nPts = 14, - const bool inc298 = true, - const double tlow = 300., - const double deltaT = 100., - const int numAdded = 0, - const double* addedTempVector = 0) : - NPoints(nPts), - Include298(inc298), - Tlow(tlow), - DeltaT(deltaT), - T(0), - numAddedTs(numAdded) { - /****************************/ - int i; - // AddedTempVector = mdp_alloc_dbl_1(numAdded, 0.0); - AddedTempVector.resize(numAdded, 0.0); - for (int i = 0; i < numAdded; i++) { - AddedTempVector[i] = addedTempVector[i]; - } - //mdp_copy_dbl_1(AddedTempVector, addedTempVector, numAdded); - // T = mdp_alloc_dbl_1(NPoints, 0.0); - T.resize(NPoints, 0.0); - double TCurrent = Tlow; - for (i = 0; i < NPoints; i++) { - T[i] = TCurrent; - TCurrent += DeltaT; - } - if (Include298) { - T.push_back(298.15); - //mdp_realloc_dbl_1(&T, NPoints+1, NPoints, 298.15); - NPoints++; - } - if (numAdded > 0) { - //mdp_realloc_dbl_1(&T, NPoints+numAdded, NPoints, 0.0); - T.resize(NPoints+numAdded, 0.0); - for (i = 0; i < numAdded; i++) { - T[i+NPoints] = addedTempVector[i]; - } - NPoints += numAdded; - } - std::sort(T.begin(), T.end()); - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Destructor - */ - ~TemperatureTable() { - //mdp_safe_free((void **) &AddedTempVector); - // mdp_safe_free((void **) &T); - } - - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Overloaded operator[] - * - * return the array value in the vector - */ - double operator[](const int i) { - return T[i]; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * size() - */ - int size() { - return NPoints; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Block assignment and copy constructors: not needed. - */ -private: - TemperatureTable(const TemperatureTable&); - TemperatureTable& operator=(const TemperatureTable&); -}; -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -#endif diff --git a/test_problems/cathermo/HMW_graph_VvT/TemperatureTable.h b/test_problems/cathermo/HMW_graph_VvT/TemperatureTable.h deleted file mode 100644 index c248db366..000000000 --- a/test_problems/cathermo/HMW_graph_VvT/TemperatureTable.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2004 Sandia Corporation. Under the terms of Contract - * DE-AC04-94AL85000, there is a non-exclusive license for use of this - * work by or on behalf of the U.S. Government. Export of this program - * may require a license from the United States Government. - */ - -#ifndef TEMPERATURE_TABLE_H -#define TEMPERATURE_TABLE_H -//#include "cantera/base/mdp_allo.h" -#include -using std::vector; - -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -/** - * This Class constructs a vector of temperature from which to make - * a table. - */ -class TemperatureTable -{ - -public: - int NPoints; - bool Include298; - double Tlow; //!< Min temperature for thermo data fit - double Thigh; //!< Max temperature for thermo table - double DeltaT; - vector T; - int numAddedTs; - vector AddedTempVector; -public: - /* - * Default constructor for TemperatureTable() - */ - TemperatureTable(const int nPts = 14, - const bool inc298 = true, - const double tlow = 300., - const double deltaT = 100., - const int numAdded = 0, - const double* addedTempVector = 0) : - NPoints(nPts), - Include298(inc298), - Tlow(tlow), - DeltaT(deltaT), - T(0), - numAddedTs(numAdded) { - /****************************/ - int i; - // AddedTempVector = mdp_alloc_dbl_1(numAdded, 0.0); - AddedTempVector.resize(numAdded, 0.0); - for (int i = 0; i < numAdded; i++) { - AddedTempVector[i] = addedTempVector[i]; - } - //mdp_copy_dbl_1(AddedTempVector, addedTempVector, numAdded); - // T = mdp_alloc_dbl_1(NPoints, 0.0); - T.resize(NPoints, 0.0); - double TCurrent = Tlow; - for (i = 0; i < NPoints; i++) { - T[i] = TCurrent; - TCurrent += DeltaT; - } - if (Include298) { - T.push_back(298.15); - //mdp_realloc_dbl_1(&T, NPoints+1, NPoints, 298.15); - NPoints++; - } - if (numAdded > 0) { - //mdp_realloc_dbl_1(&T, NPoints+numAdded, NPoints, 0.0); - T.resize(NPoints+numAdded, 0.0); - for (i = 0; i < numAdded; i++) { - T[i+NPoints] = addedTempVector[i]; - } - NPoints += numAdded; - } - std::sort(T.begin(), T.end()); - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Destructor - */ - ~TemperatureTable() { - //mdp_safe_free((void **) &AddedTempVector); - // mdp_safe_free((void **) &T); - } - - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Overloaded operator[] - * - * return the array value in the vector - */ - double operator[](const int i) { - return T[i]; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * size() - */ - int size() { - return NPoints; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Block assignment and copy constructors: not needed. - */ -private: - TemperatureTable(const TemperatureTable&); - TemperatureTable& operator=(const TemperatureTable&); -}; -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -#endif diff --git a/test_problems/cathermo/stoichSubSSTP/TemperatureTable.h b/test_problems/cathermo/stoichSubSSTP/TemperatureTable.h deleted file mode 100644 index c248db366..000000000 --- a/test_problems/cathermo/stoichSubSSTP/TemperatureTable.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2004 Sandia Corporation. Under the terms of Contract - * DE-AC04-94AL85000, there is a non-exclusive license for use of this - * work by or on behalf of the U.S. Government. Export of this program - * may require a license from the United States Government. - */ - -#ifndef TEMPERATURE_TABLE_H -#define TEMPERATURE_TABLE_H -//#include "cantera/base/mdp_allo.h" -#include -using std::vector; - -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -/** - * This Class constructs a vector of temperature from which to make - * a table. - */ -class TemperatureTable -{ - -public: - int NPoints; - bool Include298; - double Tlow; //!< Min temperature for thermo data fit - double Thigh; //!< Max temperature for thermo table - double DeltaT; - vector T; - int numAddedTs; - vector AddedTempVector; -public: - /* - * Default constructor for TemperatureTable() - */ - TemperatureTable(const int nPts = 14, - const bool inc298 = true, - const double tlow = 300., - const double deltaT = 100., - const int numAdded = 0, - const double* addedTempVector = 0) : - NPoints(nPts), - Include298(inc298), - Tlow(tlow), - DeltaT(deltaT), - T(0), - numAddedTs(numAdded) { - /****************************/ - int i; - // AddedTempVector = mdp_alloc_dbl_1(numAdded, 0.0); - AddedTempVector.resize(numAdded, 0.0); - for (int i = 0; i < numAdded; i++) { - AddedTempVector[i] = addedTempVector[i]; - } - //mdp_copy_dbl_1(AddedTempVector, addedTempVector, numAdded); - // T = mdp_alloc_dbl_1(NPoints, 0.0); - T.resize(NPoints, 0.0); - double TCurrent = Tlow; - for (i = 0; i < NPoints; i++) { - T[i] = TCurrent; - TCurrent += DeltaT; - } - if (Include298) { - T.push_back(298.15); - //mdp_realloc_dbl_1(&T, NPoints+1, NPoints, 298.15); - NPoints++; - } - if (numAdded > 0) { - //mdp_realloc_dbl_1(&T, NPoints+numAdded, NPoints, 0.0); - T.resize(NPoints+numAdded, 0.0); - for (i = 0; i < numAdded; i++) { - T[i+NPoints] = addedTempVector[i]; - } - NPoints += numAdded; - } - std::sort(T.begin(), T.end()); - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Destructor - */ - ~TemperatureTable() { - //mdp_safe_free((void **) &AddedTempVector); - // mdp_safe_free((void **) &T); - } - - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Overloaded operator[] - * - * return the array value in the vector - */ - double operator[](const int i) { - return T[i]; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * size() - */ - int size() { - return NPoints; - } - /***********************************************************************/ - /***********************************************************************/ - /***********************************************************************/ - /* - * Block assignment and copy constructors: not needed. - */ -private: - TemperatureTable(const TemperatureTable&); - TemperatureTable& operator=(const TemperatureTable&); -}; -/***********************************************************************/ -/***********************************************************************/ -/***********************************************************************/ -#endif diff --git a/test_problems/cathermo/HMW_dupl_test/TemperatureTable.h b/test_problems/shared/TemperatureTable.h similarity index 86% rename from test_problems/cathermo/HMW_dupl_test/TemperatureTable.h rename to test_problems/shared/TemperatureTable.h index c248db366..b2791b542 100644 --- a/test_problems/cathermo/HMW_dupl_test/TemperatureTable.h +++ b/test_problems/shared/TemperatureTable.h @@ -1,14 +1,15 @@ /* * Copyright 2004 Sandia Corporation. Under the terms of Contract * DE-AC04-94AL85000, there is a non-exclusive license for use of this - * work by or on behalf of the U.S. Government. Export of this program - * may require a license from the United States Government. + * work by or on behalf of the U.S. Government. */ #ifndef TEMPERATURE_TABLE_H #define TEMPERATURE_TABLE_H -//#include "cantera/base/mdp_allo.h" + #include +#include + using std::vector; /***********************************************************************/ @@ -48,13 +49,10 @@ public: numAddedTs(numAdded) { /****************************/ int i; - // AddedTempVector = mdp_alloc_dbl_1(numAdded, 0.0); AddedTempVector.resize(numAdded, 0.0); for (int i = 0; i < numAdded; i++) { AddedTempVector[i] = addedTempVector[i]; } - //mdp_copy_dbl_1(AddedTempVector, addedTempVector, numAdded); - // T = mdp_alloc_dbl_1(NPoints, 0.0); T.resize(NPoints, 0.0); double TCurrent = Tlow; for (i = 0; i < NPoints; i++) { @@ -63,11 +61,9 @@ public: } if (Include298) { T.push_back(298.15); - //mdp_realloc_dbl_1(&T, NPoints+1, NPoints, 298.15); NPoints++; } if (numAdded > 0) { - //mdp_realloc_dbl_1(&T, NPoints+numAdded, NPoints, 0.0); T.resize(NPoints+numAdded, 0.0); for (i = 0; i < numAdded; i++) { T[i+NPoints] = addedTempVector[i]; @@ -82,10 +78,7 @@ public: /* * Destructor */ - ~TemperatureTable() { - //mdp_safe_free((void **) &AddedTempVector); - // mdp_safe_free((void **) &T); - } + ~TemperatureTable() {} /***********************************************************************/ /***********************************************************************/