antioch-0.4.0
gsl_spliner_impl.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 #include "antioch_config.h" //only of we have GSL
28 
29 #ifdef ANTIOCH_HAVE_GSL
30 
31 #ifndef ANTIOCH_GSL_SPLINER_IMPL_H
32 #define ANTIOCH_GSL_SPLINER_IMPL_H
33 
34 // Antioch
37 
38 // GSL
39 #include <gsl/gsl_spline.h>
40 #include <gsl/gsl_errno.h>
41 
42 namespace Antioch
43 {
45  namespace AntiochPrivate
46  {
48  class GSLSplinerImplementation
49  {
50  public:
51 
53 
56  GSLSplinerImplementation();
57 
59  ~GSLSplinerImplementation();
60 
62  void spline_init( const double* x, const double* y, unsigned int size );
63 
65  void spline_clear();
66 
68  double eval(double x) const;
69 
71  double eval_deriv(double x) const;
72 
73  private:
74 
75  gsl_interp_accel * _acc;
76  gsl_spline * _spline;
77 
78  };
79 
80  } // end namespace AntiochPrivate
81 
82 } // end namespace Antioch
83 
84 #endif // ANTIOCH_GSL_SPLINER_IMPL_H
85 
86 #endif// if ANTIOCH_HAVE_GSL
The parameters are reduced parameters.

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