Cantera
Install
User Guide
Examples
Reference
Develop
Community
4.0.0a2
Toggle main menu visibility
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
6
#include "
cantera/transport/Transport.h
"
7
#include "
cantera/base/AnyMap.h
"
8
#include "
cantera/transport/TransportFactory.h
"
9
10
namespace
Cantera
11
{
12
13
shared_ptr<Transport>
Transport::clone
(shared_ptr<ThermoPhase>
thermo
)
const
14
{
15
return
newTransport
(
thermo
,
transportModel
());
16
}
17
18
size_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
26
AnyMap
Transport::parameters
()
const
27
{
28
AnyMap
out;
29
string
name =
TransportFactory::factory
()->
canonicalize
(
transportModel
());
30
if
(name !=
""
) {
31
out[
"transport"
] = name;
32
}
33
return
out;
34
}
35
36
}
AnyMap.h
TransportFactory.h
Header file defining class TransportFactory (see TransportFactory).
Transport.h
Headers for the Transport object, which is the virtual base class for all transport property evaluato...
Cantera::AnyMap
A map of string keys to values whose type can vary at runtime.
Definition
AnyMap.h:431
Cantera::Factory::canonicalize
string canonicalize(const string &name)
Get the canonical name registered for a type.
Definition
FactoryBase.h:94
Cantera::IndexError
An array index is out of range.
Definition
ctexceptions.h:180
Cantera::TransportFactory::factory
static TransportFactory * factory()
Return a pointer to a TransportFactory instance.
Definition
TransportFactory.cpp:54
Cantera::Transport::transportModel
virtual string transportModel() const
Identifies the model represented by this Transport object.
Definition
Transport.h:101
Cantera::Transport::parameters
AnyMap parameters() const
Return the parameters for a phase definition which are needed to reconstruct an identical object usin...
Definition
Transport.cpp:26
Cantera::Transport::m_nsp
size_t m_nsp
Number of species in the phase.
Definition
Transport.h:435
Cantera::Transport::clone
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
Cantera::Transport::thermo
ThermoPhase & thermo()
Phase object.
Definition
Transport.h:111
Cantera::Transport::checkSpeciesIndex
size_t checkSpeciesIndex(size_t k) const
Check that the specified species index is in range.
Definition
Transport.cpp:18
Cantera::newTransport
shared_ptr< Transport > newTransport(shared_ptr< ThermoPhase > thermo, const string &model)
Create a new Transport instance.
Definition
TransportFactory.cpp:110
Cantera
Namespace for the Cantera kernel.
Definition
AnyMap.cpp:595
src
transport
Transport.cpp
Generated by
1.17.0