Cantera  4.0.0a2
Loading...
Searching...
No Matches
Transport.cpp
Go to the documentation of this file.
1//! @file Transport.cpp
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
9
10namespace Cantera
11{
12
13shared_ptr<Transport> Transport::clone(shared_ptr<ThermoPhase> thermo) const
14{
16}
17
18size_t Transport::checkSpeciesIndex(size_t k) const
19{
20 if (k < m_nsp) {
21 return k;
22 }
23 throw IndexError("Transport::checkSpeciesIndex", "species", k, m_nsp);
24}
25
27{
28 AnyMap out;
30 if (name != "") {
31 out["transport"] = name;
32 }
33 return out;
34}
35
36}
Header file defining class TransportFactory (see TransportFactory)
Headers for the Transport object, which is the virtual base class for all transport property evaluato...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:431
string canonicalize(const string &name)
Get the canonical name registered for a type.
Definition FactoryBase.h:94
An array index is out of range.
static TransportFactory * factory()
Return a pointer to a TransportFactory instance.
virtual string transportModel() const
Identifies the model represented by this Transport object.
Definition Transport.h:101
AnyMap parameters() const
Return the parameters for a phase definition which are needed to reconstruct an identical object usin...
Definition Transport.cpp:26
size_t m_nsp
Number of species in the phase.
Definition Transport.h:435
shared_ptr< Transport > clone(shared_ptr< ThermoPhase > thermo) const
Create a new Transport object using the same transport model and species transport properties as this...
Definition Transport.cpp:13
ThermoPhase & thermo()
Phase object.
Definition Transport.h:111
size_t checkSpeciesIndex(size_t k) const
Check that the specified species index is in range.
Definition Transport.cpp:18
shared_ptr< Transport > newTransport(shared_ptr< ThermoPhase > thermo, const string &model)
Create a new Transport instance.
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595