antioch-0.4.0
lennard_jones_potential.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_LENNARD_JONES_POTENTIAL_H
28 #define ANTIOCH_LENNARD_JONES_POTENTIAL_H
29 
30 //Antioch
31 
32 //C++
33 
34 namespace Antioch{
35 
54  template <typename CoeffType>
56  {
57  public:
58 
59  LennardJonesPotential(const CoeffType & depth = 0., const CoeffType & diameter = 0.);
61 
62  template <typename StateType>
63  void set_diameter(const StateType & diameter);
64 
65  template <typename StateType>
66  void set_depth(const StateType & depth);
67 
68  template <typename StateType>
69  void reset_coeffs(const StateType & depth, const StateType & diameter);
70 
71  CoeffType diameter() const;
72 
73  CoeffType depth() const;
74 
75  private:
76 
77 
78  CoeffType _depth;
79  CoeffType _diameter;
80 
81  };
82 
83  template <typename CoeffType>
84  inline
85  LennardJonesPotential<CoeffType>::LennardJonesPotential(const CoeffType & depth, const CoeffType & diameter):
86  _depth(depth),
87  _diameter(diameter)
88  {
89  return;
90  }
91 
92  template <typename CoeffType>
93  inline
95  {
96  return;
97  }
98 
99  template <typename CoeffType>
100  inline
102  {
103  return _depth;
104  }
105 
106  template <typename CoeffType>
107  inline
109  {
110  return _diameter;
111  }
112 
113  template <typename CoeffType>
114  template <typename StateType>
115  inline
116  void LennardJonesPotential<CoeffType>::set_diameter(const StateType & diameter)
117  {
118  _diameter = diameter;
119  }
120 
121  template <typename CoeffType>
122  template <typename StateType>
123  inline
124  void LennardJonesPotential<CoeffType>::set_depth(const StateType & depth)
125  {
126  _depth = depth;
127  }
128 
129  template <typename CoeffType>
130  template <typename StateType>
131  inline
132  void LennardJonesPotential<CoeffType>::reset_coeffs(const StateType & depth, const StateType & diameter)
133  {
134  this->set_depth(depth);
135  this->set_diameter(diameter);
136  }
137 
138 
139 } //end namespace Antioch
140 
141 #endif
void set_diameter(const StateType &diameter)
LennardJonesPotential(const CoeffType &depth=0., const CoeffType &diameter=0.)
void set_depth(const StateType &depth)
The parameters are reduced parameters.
void reset_coeffs(const StateType &depth, const StateType &diameter)

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