[Transport] Provide transitional 'TransportFactory::initTransport'

There are user-provided classes derived from GasTransport which still call this
method, so a version of it that calls the new method for initializing
GasTransport objects needs to be provided until after Cantera 2.2.
This commit is contained in:
Ray Speth 2015-02-26 21:59:37 +00:00
parent 2e53890adf
commit 7cdeedb91b
2 changed files with 25 additions and 0 deletions

View file

@ -107,6 +107,22 @@ public:
virtual Transport*
newTransport(thermo_t* thermo, int log_level=0);
//! Initialize an existing transport manager
/*!
* This routine sets up an existing gas-phase transport manager. It
* calculates the collision integrals and calls the initGas() function to
* populate the species-dependent data structure.
*
* @param tr Pointer to the Transport manager
* @param thermo Pointer to the ThermoPhase object
* @param mode Chemkin compatible mode or not. This alters the specification of the
* collision integrals. defaults to no.
* @param log_level Defaults to zero, no logging
* @deprecated To be removed after Cantera 2.2. This initialization is now
* handled directly by GasTransport::init.
*/
virtual void initTransport(Transport* tr, thermo_t* thermo, int mode=0, int log_level=0);
//! Initialize an existing transport manager for liquid phase
/*!
* This routine sets up an existing liquid-phase transport manager. It is

View file

@ -286,6 +286,15 @@ Transport* TransportFactory::newTransport(thermo_t* phase, int log_level)
return newTransport(transportModel, phase,log_level);
}
void TransportFactory::initTransport(Transport* tr, thermo_t* thermo,
int mode, int log_level)
{
warn_deprecated("TransportFactory::initTransport",
"To be removed after Cantera 2.2. This initialization is "
"now handled directly by GasTransport::init");
tr->init(thermo);
}
void TransportFactory::setupLiquidTransport(thermo_t* thermo, int log_level,
LiquidTransportParams& trParam)
{