Remove deprecated functions
This commit is contained in:
parent
63dd02073c
commit
e778afad32
9 changed files with 0 additions and 413 deletions
|
|
@ -1,58 +0,0 @@
|
|||
/**
|
||||
* @file Cantera.h
|
||||
* Basic include file to be used in all Cantera application environments.
|
||||
* @deprecated To be removed in Cantera 2.2. Applications should include
|
||||
* relevant headers directly.
|
||||
*/
|
||||
|
||||
/*
|
||||
* $Revision: 923 $
|
||||
* $Date: 2012-01-03 10:05:28 -0700 (Tue, 03 Jan 2012) $
|
||||
*/
|
||||
|
||||
// Copyright 2001 California Institute of Technology
|
||||
|
||||
/*
|
||||
* Note, this include should be the first include that code containing the
|
||||
* Cantera namespace sees when in the Cantera application environment.
|
||||
*/
|
||||
|
||||
#ifndef CANTERA_H_INCL
|
||||
#define CANTERA_H_INCL
|
||||
|
||||
// If we are using this file, then we are in the Cantera Apps environment.
|
||||
// Define a variable to signify this fact.
|
||||
#ifndef CANTERA_APP
|
||||
#define CANTERA_APP
|
||||
#endif
|
||||
|
||||
// define the presence of the Cantera_CXX namespace
|
||||
namespace Cantera_CXX{ }
|
||||
|
||||
// Include global typedefs and values for physical constants using SI units
|
||||
#include "base/ct_defs.h"
|
||||
|
||||
// some useful functions
|
||||
#include "base/global.h"
|
||||
|
||||
// the CanteraError exception class
|
||||
#include "base/ctexceptions.h"
|
||||
|
||||
// The Cantera logger class
|
||||
#include "base/logger.h"
|
||||
|
||||
// Include the timer
|
||||
#include "base/clockWC.h"
|
||||
|
||||
// Include routines for reading and writing XML files
|
||||
#include "base/xml.h"
|
||||
|
||||
// Include string utility routines
|
||||
#include "base/stringUtils.h"
|
||||
|
||||
// Include the array object
|
||||
#include "base/Array.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
@ -541,46 +541,6 @@ doublereal getFloatCurrent(const Cantera::XML_Node& currXML, const std::string&
|
|||
bool getOptionalFloat(const Cantera::XML_Node& parent, const std::string& name,
|
||||
doublereal& fltRtn, const std::string& type="");
|
||||
|
||||
//! Get a vector of floating-point values from a child element.
|
||||
/*!
|
||||
* Returns a std::map containing a keyed values for child XML_Nodes of the
|
||||
* current node with the name, "float". In the keyed mapping there will be a
|
||||
* list of titles vs. values for all of the XML nodes. The float XML_nodes are
|
||||
* expected to be in a particular form created by the function addFloat(). One
|
||||
* value per XML_node is expected.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Code snippet:
|
||||
* @code
|
||||
* const XML_Node &State_XMLNode;
|
||||
* std::map<std::string,double> v;
|
||||
* bool convert = true;
|
||||
* getFloats(State_XMLNode, v, convert);
|
||||
* @endcode
|
||||
*
|
||||
* reads the corresponding XML file:
|
||||
*
|
||||
* <state>
|
||||
* <float title="a1" units="m3"> 32.4 <\float>
|
||||
* <float title="a2" units="cm3"> 1. <\float>
|
||||
* <float title="a3"> 100. <\float>
|
||||
* <\state>
|
||||
*
|
||||
* Will produce the mapping:
|
||||
*
|
||||
* v["a1"] = 32.4
|
||||
* v["a2"] = 1.0E-6
|
||||
* v["a3"] = 100.
|
||||
*
|
||||
* @param node Current XML node to get the values from
|
||||
* @param v Output map of the results.
|
||||
* @param convert Turn on conversion to SI units
|
||||
* @deprecated Unused. To be removed in Cantera 2.2.
|
||||
*/
|
||||
void getFloats(const Cantera::XML_Node& node, std::map<std::string, double>& v,
|
||||
const bool convert=true);
|
||||
|
||||
//! Get an integer value from a child element.
|
||||
/*!
|
||||
* Returns an integer value for the child named 'name' of element 'parent'.
|
||||
|
|
|
|||
|
|
@ -196,22 +196,6 @@ std::string parseSpeciesName(const std::string& nameStr, std::string& phaseName)
|
|||
std::string wrapString(const std::string& s,
|
||||
const int len=70);
|
||||
|
||||
//! Routine strips off white space from a c character string
|
||||
/*!
|
||||
* This routine strips off blanks and tabs (only leading and trailing
|
||||
* characters) in 'str'. On return, it returns the number of
|
||||
* characters still included in the string (excluding the null character).
|
||||
*
|
||||
* Comments are excluded -> All instances of the comment character, '!', are
|
||||
* replaced by NULL character thereby terminating the string.
|
||||
*
|
||||
* @param str On output 'str' contains the same characters as on input except
|
||||
* the leading and trailing white space and comments have been
|
||||
* removed.
|
||||
* @deprecated
|
||||
*/
|
||||
int stripLTWScstring(char str[]);
|
||||
|
||||
//! Interpret one or two token string as a single double
|
||||
/*!
|
||||
* This is similar to atof(). However, the second token is interpreted as an
|
||||
|
|
|
|||
|
|
@ -289,24 +289,6 @@ void vcs_print_stringTrunc(const char* str, size_t space, int alignment);
|
|||
* @return returns true if the doubles are "equal" and false otherwise
|
||||
*/
|
||||
bool vcs_doubleEqual(double d1, double d2);
|
||||
|
||||
//! Sorts a vector of ints in place from lowest to the highest values
|
||||
/*!
|
||||
* The vector is returned sorted from lowest to highest.
|
||||
*
|
||||
* @param x Reference to a vector of ints.
|
||||
* @deprecated
|
||||
*/
|
||||
void vcs_heapsort(std::vector<int> &x);
|
||||
|
||||
//! Sorts a vector of ints and eliminates duplicates from the resulting list
|
||||
/*!
|
||||
* @param xOrderedUnique Ordered vector of unique ints that were part of the original list
|
||||
* @param x Reference to a constant vector of ints.
|
||||
* @deprecated
|
||||
*/
|
||||
void vcs_orderedUnique(std::vector<int> & xOrderedUnique, const std::vector<int> & x);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -99,16 +99,6 @@ public:
|
|||
return m_press;
|
||||
}
|
||||
|
||||
//! @deprecated unused
|
||||
virtual void setState(size_t point, const doublereal* state,
|
||||
doublereal* x) {
|
||||
warn_deprecated("StFlow::setState");
|
||||
setTemperature(point, state[2]);
|
||||
for (size_t k = 0; k < m_nsp; k++) {
|
||||
setMassFraction(point, k, state[4+k]);
|
||||
}
|
||||
}
|
||||
|
||||
//! Write the initial solution estimate into array x.
|
||||
virtual void _getInitialSoln(doublereal* x) {
|
||||
for (size_t j = 0; j < m_points; j++) {
|
||||
|
|
|
|||
|
|
@ -205,31 +205,6 @@ void getIntegers(const Cantera::XML_Node& node,
|
|||
}
|
||||
}
|
||||
|
||||
void getFloats(const Cantera::XML_Node& node, std::map<std::string, double>& v,
|
||||
const bool convert)
|
||||
{
|
||||
warn_deprecated("ctml::getFloats",
|
||||
"To be removed in Cantera 2.2.");
|
||||
std::vector<XML_Node*> f;
|
||||
node.getChildren("float",f);
|
||||
for (size_t i = 0; i < f.size(); i++) {
|
||||
const XML_Node& fi = *(f[i]);
|
||||
doublereal x = fpValue(fi());
|
||||
const string& vmin = fi["min"];
|
||||
const string& vmax = fi["max"];
|
||||
if (vmin != "" && x < fpValue(vmin) - Tiny) {
|
||||
writelog("\nWarning: value "+fi()+" is below lower limit of "
|
||||
+vmin+".\n");
|
||||
}
|
||||
if (fi["max"] != "" && x > fpValue(vmax) + Tiny) {
|
||||
writelog("\nWarning: value "+fi()+" is above upper limit of "
|
||||
+vmax+".\n");
|
||||
}
|
||||
doublereal fctr = (convert ? toSI(fi["units"]) : 1.0); // toSI(typ,units);
|
||||
v[fi["title"]] = fctr*x;
|
||||
}
|
||||
}
|
||||
|
||||
doublereal getFloat(const Cantera::XML_Node& parent,
|
||||
const std::string& name,
|
||||
const std::string& type)
|
||||
|
|
|
|||
|
|
@ -328,47 +328,6 @@ std::string parseSpeciesName(const std::string& nameStr, std::string& phaseName)
|
|||
return s;
|
||||
}
|
||||
|
||||
int stripLTWScstring(char str[])
|
||||
{
|
||||
warn_deprecated("stripLTWScstring");
|
||||
int i = 0, j = 0;
|
||||
char ch;
|
||||
const char COM_CHAR='\0';
|
||||
/*
|
||||
* Quick Returns
|
||||
*/
|
||||
if ((str == 0) || (str[0] == '\0')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Find first non-space character character */
|
||||
while (((ch = str[i]) != '\0') && isspace(ch)) {
|
||||
i++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Move real part of str to the front by copying the string
|
||||
* - Comments are handled here, by terminating the copy at the
|
||||
* first comment indicator, and inserting the null character at
|
||||
* that point.
|
||||
*/
|
||||
|
||||
while ((ch = str[j+i]) != '\0' &&
|
||||
(ch != COM_CHAR)) {
|
||||
str[j] = ch;
|
||||
j++;
|
||||
}
|
||||
str[j] = '\0';
|
||||
j--;
|
||||
/* Remove trailing white space by inserting a null character */
|
||||
while ((j != -1) && isspace(str[j])) {
|
||||
j--;
|
||||
}
|
||||
j++;
|
||||
str[j] = '\0';
|
||||
return j;
|
||||
}
|
||||
|
||||
doublereal strSItoDbl(const std::string& strSI)
|
||||
{
|
||||
std::vector<std::string> v;
|
||||
|
|
|
|||
|
|
@ -190,63 +190,4 @@ bool vcs_doubleEqual(double d1, double d2)
|
|||
return true;
|
||||
}
|
||||
|
||||
void vcs_heapsort(std::vector<int> & x)
|
||||
{
|
||||
int n = x.size();
|
||||
if (n < 2) {
|
||||
return;
|
||||
}
|
||||
doublereal rra;
|
||||
int ll = n / 2;
|
||||
int iret = n - 1;
|
||||
|
||||
while (1 > 0) {
|
||||
if (ll > 0) {
|
||||
ll--;
|
||||
rra = x[ll];
|
||||
} else {
|
||||
rra = x[iret];
|
||||
x[iret] = x[0];
|
||||
iret--;
|
||||
if (iret == 0) {
|
||||
x[0] = rra;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
int i = ll;
|
||||
int j = ll + ll + 1;
|
||||
|
||||
while (j <= iret) {
|
||||
if (j < iret) {
|
||||
if (x[j] < x[j + 1]) {
|
||||
j++;
|
||||
}
|
||||
}
|
||||
if (rra < x[j]) {
|
||||
x[i] = x[j];
|
||||
i = j;
|
||||
j = j + j + 1;
|
||||
} else {
|
||||
j = iret + 1;
|
||||
}
|
||||
}
|
||||
x[i] = rra;
|
||||
}
|
||||
}
|
||||
|
||||
void vcs_orderedUnique(std::vector<int> & xOrderedUnique, const std::vector<int> & x)
|
||||
{
|
||||
std::vector<int> xordered(x);
|
||||
vcs_heapsort(xordered);
|
||||
int lastV = x[0] - 1;
|
||||
xOrderedUnique.clear();
|
||||
for (int i = 0; i < (int) xordered.size(); i++) {
|
||||
if (lastV != xordered[i]) {
|
||||
xOrderedUnique.push_back(xordered[i]);
|
||||
lastV = xordered[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,146 +0,0 @@
|
|||
/**
|
||||
* @file FtnTransport.h
|
||||
*
|
||||
* Customizable Fortran transport manager. This manager calls
|
||||
* external Fortran functions to evaluate the transport
|
||||
* properties. This is designed to be used to build custom transport
|
||||
* managers in Fortran.
|
||||
*/
|
||||
|
||||
// Copyright 2003 California Institute of Technology
|
||||
|
||||
|
||||
#ifndef CT_FTNTRANSPORT_H
|
||||
#define CT_FTNTRANSPORT_H
|
||||
|
||||
#include "cantera/transport/TransportBase.h"
|
||||
|
||||
|
||||
/**
|
||||
* Change these definitions to change the names of the Fortran
|
||||
* procedures. If you want to define more than one custom Fortran
|
||||
* transport manager, copy this file, rename the class, and change
|
||||
* these definitions.
|
||||
*
|
||||
* The Fortran procedure names must follow the conventions of the Fortran
|
||||
* compiler. On most unix systems, this means the names must be lowercase,
|
||||
* and must include a trailing underscore.
|
||||
*
|
||||
*/
|
||||
#define __VISC__ visc_
|
||||
#define __BULKVISC__ bvisc_
|
||||
#define __TCON__ tcon_
|
||||
#define __TDIFF__ tdiff_
|
||||
#define __MULTIDIFF__ multidiff_
|
||||
#define __MIXDIFF__ mixdiff_
|
||||
#define __SIGMA__ sigma_
|
||||
#define __GETMOBILITIES__ getmobilities_
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
doublereal __VISC__(doublereal* t, doublereal* p, doublereal* x);
|
||||
doublereal __BULKVISC__(doublereal* t, doublereal* p, doublereal* x);
|
||||
doublereal __TCON__(doublereal* t, doublereal* p, doublereal* x);
|
||||
|
||||
void __TDIFF__(doublereal* t, doublereal* p, doublereal* x, doublereal* dt);
|
||||
void __MULTIDIFF__(doublereal* t, doublereal* p, doublereal* x,
|
||||
integer* ld, doublereal* d);
|
||||
void __MIXDIFF__(doublereal* t, doublereal* p, doublereal* x, doublereal* d);
|
||||
void __BINDIFF__(doublereal* t, doublereal* p, doublereal* x, integer* ld, doublereal* d);
|
||||
doublereal __SIGMA__(doublereal* t, doublereal* p, doublereal* x);
|
||||
|
||||
doublereal __GETMOBILITIES__(doublereal* t, doublereal* p,
|
||||
doublereal* x, doublereal* mobil);
|
||||
|
||||
}
|
||||
|
||||
namespace Cantera
|
||||
{
|
||||
|
||||
/**
|
||||
* A class that calls external Fortran functions to evaluate
|
||||
* transport properties.
|
||||
* @deprecated Broken and unused
|
||||
*/
|
||||
class FtnTransport : public Transport
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
FtnTransport(int model, thermo_t* thermo) : Transport(thermo) {
|
||||
warn_deprecated("FtnTransport", "This class will be removed in Cantera 2.2.");
|
||||
m_model = model;
|
||||
m_x.resize(m_thermo->nSpecies(), 0.0);
|
||||
updateTPX();
|
||||
}
|
||||
|
||||
virtual int model() {
|
||||
return cFtnTransport + m_model;
|
||||
}
|
||||
|
||||
virtual doublereal viscosity() {
|
||||
updateTPX();
|
||||
return __VISC__(&m_temp, &m_pres, m_x.begin());
|
||||
}
|
||||
|
||||
virtual doublereal bulkViscosity() {
|
||||
updateTPX();
|
||||
return __BULKVISC__(&m_temp, &m_pres, m_x.begin());
|
||||
}
|
||||
|
||||
virtual doublereal thermalConductivity() {
|
||||
updateTPX();
|
||||
return __TCON__(&m_temp, &m_pres, m_x.begin());
|
||||
}
|
||||
|
||||
virtual doublereal electricalConductivity() {
|
||||
updateTPX();
|
||||
return __SIGMA__(&m_temp, &m_pres, m_x.begin());
|
||||
}
|
||||
|
||||
virtual void getMobilities(doublereal* mobil) {
|
||||
updateTPX();
|
||||
__GETMOBILITIES__(&m_temp, &m_pres, m_x.begin(), mobil);
|
||||
}
|
||||
|
||||
|
||||
virtual void getThermalDiffCoeffs(doublereal* dt) {
|
||||
updateTPX();
|
||||
__TDIFF__(&m_temp, &m_pres, m_x.begin(), dt);
|
||||
}
|
||||
|
||||
virtual void getBinaryDiffCoeffs(int ld, doublereal* d) {
|
||||
updateTPX();
|
||||
integer ldd = ld;
|
||||
__BINDIFF__(&m_temp, &m_pres, m_x.begin(), &ldd, d);
|
||||
}
|
||||
|
||||
virtual void getMultiDiffCoeffs(int ld, doublereal* d) {
|
||||
updateTPX();
|
||||
integer ldd = ld;
|
||||
__MULTIDIFF__(&m_temp, &m_pres, m_x.begin(), &ldd, d);
|
||||
}
|
||||
|
||||
virtual void getMixDiffCoeffs(doublereal* d) {
|
||||
updateTPX();
|
||||
__MIXDIFF__(&m_temp, &m_pres, m_x.begin(), d);
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
|
||||
void updateTPX() {
|
||||
m_temp = m_thermo->temperature();
|
||||
m_pres = m_thermo->pressure();
|
||||
m_thermo->getMoleFractions(m_x.begin());
|
||||
}
|
||||
doublereal m_temp;
|
||||
doublereal m_pres;
|
||||
vector_fp m_x;
|
||||
int m_model;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue