antioch-0.4.0
kinetics_conditions.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // Antioch - A Gas Dynamics Thermochemistry Library
5 //
6 // Copyright (C) 2014-2016 Paul T. Bauman, Benjamin S. Kirk,
7 // Sylvain Plessis, Roy H. Stonger
8 //
9 // Copyright (C) 2013 The PECOS Development Team
10 //
11 // This library is free software; you can redistribute it and/or
12 // modify it under the terms of the Version 2.1 GNU Lesser General
13 // Public License as published by the Free Software Foundation.
14 //
15 // This library is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
23 // Boston, MA 02110-1301 USA
24 //
25 //-----------------------------------------------------------------------el-
26 
27 #ifndef ANTIOCH_KINETICS_CONDITIONS_H
28 #define ANTIOCH_KINETICS_CONDITIONS_H
29 
30 // Antioch
32 #include "antioch/particle_flux.h"
33 #include "antioch/temp_cache.h"
34 
35 // C++
36 #include <vector>
37 #include <map>
38 
39 namespace Antioch{
40 
62  template <typename StateType,
63  typename VectorStateType = std::vector<StateType> >
65  {
66  public:
67 
68  KineticsConditions(const StateType & temperature);
70 
71  void add_particle_flux(const ParticleFlux<VectorStateType> & pf, unsigned int nr);
72 
73  const StateType & T() const;
74 
76  //
77  // \todo generalize
78  const StateType & Tvib() const;
79 
80  const TempCache<StateType> & temp_cache() const;
81 
82  const ParticleFlux<VectorStateType> & particle_flux(int nr) const;
83 
84  private:
85 
87 
89 
90  // pointer's not const, particle flux is
91  std::map<unsigned int,ParticleFlux<VectorStateType> const * const > _map_pf;
92 
93  };
94 
95 
96  template <typename StateType, typename VectorStateType>
97  inline
99  _temperature(temperature)
100  {
101  return;
102  }
103 
104  template <typename StateType, typename VectorStateType>
105  inline
107  {
108  return;
109  }
110 
111  template <typename StateType, typename VectorStateType>
112  inline
114  {
115  _map_pf.insert(std::make_pair(nr, &pf));
116  }
117 
118  template <typename StateType, typename VectorStateType>
119  inline
121  {
122  return _temperature.T;
123  }
124 
125  template <typename StateType, typename VectorStateType>
126  inline
128  {
129  return _temperature.T;
130  }
131 
132  template <typename StateType, typename VectorStateType>
133  inline
135  {
136  antioch_assert(_map_pf.count(nr));
137  return *(_map_pf.at(nr));
138  }
139 
140  template <typename StateType, typename VectorStateType>
141  inline
143  {
144  return _temperature;
145  }
146 
147 } //end namespace Antioch
148 
149 #endif
#define antioch_assert(asserted)
const StateType & Tvib() const
returns the temperature T,
TempCache< StateType > _temperature
const ParticleFlux< VectorStateType > & particle_flux(int nr) const
const TempCache< StateType > & temp_cache() const
The parameters are reduced parameters.
std::map< unsigned int, ParticleFlux< VectorStateType > const *const > _map_pf
const StateType & T() const
This class contains the conditions of the chemistry.
void add_particle_flux(const ParticleFlux< VectorStateType > &pf, unsigned int nr)

Generated on Thu Jul 7 2016 11:09:45 for antioch-0.4.0 by  doxygen 1.8.8