XGCa
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
spline_1d_interpolation.hpp
Go to the documentation of this file.
1 #ifndef SPLINE_1D_INTERPOLATION_HPP
2 #define SPLINE_1D_INTERPOLATION_HPP
3 
4 #include "uniform_range.hpp"
5 #include "binary_search.hpp"
6 template<class Device>
8  View<double*, CLayout, Device> dx;
9  View<double*, CLayout, Device> dx_inv;
10  View<double*, CLayout, Device> l_inv;
11  View<double*, CLayout, Device> mu;
12 
13  View<double*, CLayout, Device> b;
14  View<double*, CLayout, Device> c;
15  View<double*, CLayout, Device> d;
16 
17  View<int*, CLayout, Device> xmap;
18 
19  SplinePrecomputations(const View<double*, CLayout, Device>& x, const UniformRange& range, double period);
20 
22 
23  static int get_np(int n, double period){
24  bool periodic = (period>0.0);
25  constexpr int N_WRAP = 3;
26  int offset = (periodic ? N_WRAP : 0);
27  return (offset + n + offset);
28  }
29 };
30 
31 template<class Device>
32 void spline_interpolation_to_uniform(const SplinePrecomputations<Device>& p, const View<double*, CLayout, Device>& x0, const View<double*, CLayout, Device>& y0, const UniformRange& range, const View<double*, CLayout, Device>& y, double period);
33 
34 
35 template<class Device>
36 View<double*, CLayout, Device> linear_interpolation_to_uniform(const View<double*, CLayout, Device>& x0, const View<double*, CLayout, Device>& y0, const UniformRange& range, const View<double*, CLayout, Device>& y, double period);
37 #endif
View< double *, CLayout, Device > mu
Definition: spline_1d_interpolation.hpp:11
void spline_interpolation_to_uniform(const SplinePrecomputations< Device > &p, const View< double *, CLayout, Device > &x0, const View< double *, CLayout, Device > &y0, const UniformRange &range, const View< double *, CLayout, Device > &y, double period)
Definition: spline_1d_interpolation.cpp:159
Definition: spline_1d_interpolation.hpp:7
View< double *, CLayout, Device > dx
Definition: spline_1d_interpolation.hpp:8
View< double *, CLayout, Device > d
Definition: spline_1d_interpolation.hpp:15
View< double *, CLayout, Device > linear_interpolation_to_uniform(const View< double *, CLayout, Device > &x0, const View< double *, CLayout, Device > &y0, const UniformRange &range, const View< double *, CLayout, Device > &y, double period)
Definition: spline_1d_interpolation.cpp:191
View< double *, CLayout, Device > c
Definition: spline_1d_interpolation.hpp:14
static int get_np(int n, double period)
Definition: spline_1d_interpolation.hpp:23
View< double *, CLayout, Device > dx_inv
Definition: spline_1d_interpolation.hpp:9
View< int *, CLayout, Device > xmap
Definition: spline_1d_interpolation.hpp:17
View< double *, CLayout, Device > b
Definition: spline_1d_interpolation.hpp:13
Definition: uniform_range.hpp:8
View< double *, CLayout, Device > l_inv
Definition: spline_1d_interpolation.hpp:10
SplinePrecomputations()
Definition: spline_1d_interpolation.hpp:21