antioch-0.4.0
temp_cache.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 
28 #ifndef ANTIOCH_TEMP_CACHE_H
29 #define ANTIOCH_TEMP_CACHE_H
30 
31 // Antioch
32 #include "antioch/cmath_shims.h"
33 
34 namespace Antioch
35 {
36  template<typename StateType=double>
37  class TempCache
38  {
39  public:
40 
41  explicit TempCache(const StateType& T_in);
42 
43  TempCache(const StateType& T_in,
44  const StateType& T2_in,
45  const StateType& T3_in,
46  const StateType& T4_in,
47  const StateType& lnT_in);
48 
49  const StateType& T;
50  StateType T2;
51  StateType T3;
52  StateType T4;
53  StateType lnT;
54 
55  private:
56 
57  TempCache();
58 
59  };
60 
61  template<typename StateType>
62  TempCache<StateType>::TempCache(const StateType& T_in)
63  : T(T_in), T2(T*T), T3(T2*T), T4(T2*T2), lnT(T_in)
64  {
65 
66  lnT = ant_log(T);
67  return;
68  }
69 
70  template<typename StateType>
71  TempCache<StateType>::TempCache(const StateType& T_in,
72  const StateType& T2_in,
73  const StateType& T3_in,
74  const StateType& T4_in,
75  const StateType& lnT_in)
76  : T(T_in), T2(T2_in), T3(T3_in), T4(T4_in), lnT(lnT_in)
77  {
78  return;
79  }
80 
81 }
82 
83 #endif // ANTIOCH_TEMP_CACHE_H
const StateType & T
Definition: temp_cache.h:49
The parameters are reduced parameters.

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