[cantera] r3412 committed - [Transport] Provide transitional 'TransportFactory::initTransport'...

1 view
Skip to first unread message

can...@googlecode.com

unread,
Feb 26, 2015, 4:59:51 PM2/26/15
to cantera...@googlegroups.com
Revision: 3412
Author: yar...@gmail.com
Date: Thu Feb 26 21:59:37 2015 UTC
Log: [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.
https://code.google.com/p/cantera/source/detail?r=3412

Modified:
/cantera/trunk/include/cantera/transport/TransportFactory.h
/cantera/trunk/src/transport/TransportFactory.cpp

=======================================
--- /cantera/trunk/include/cantera/transport/TransportFactory.h Wed Jan 7
23:30:57 2015 UTC
+++ /cantera/trunk/include/cantera/transport/TransportFactory.h Thu Feb 26
21:59:37 2015 UTC
@@ -107,6 +107,22 @@
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
=======================================
--- /cantera/trunk/src/transport/TransportFactory.cpp Thu Feb 26 21:52:52
2015 UTC
+++ /cantera/trunk/src/transport/TransportFactory.cpp Thu Feb 26 21:59:37
2015 UTC
@@ -285,6 +285,15 @@
}
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)
Reply all
Reply to author
Forward
0 new messages