QMCPACK
GridTraits.h
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2016 Jeongnim Kim and QMCPACK developers.
6 //
7 // File developed by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
8 // Jeremy McMinnis, jmcminis@gmail.com, University of Illinois at Urbana-Champaign
9 //
10 // File created by: Jeongnim Kim, jeongnim.kim@gmail.com, University of Illinois at Urbana-Champaign
11 //////////////////////////////////////////////////////////////////////////////////////
12 
13 
14 /** @file GridTraits.h
15  *
16  * Define data types for any GridType
17  */
18 #ifndef QMCPLUSPLUS_ONEDIMENSIONALGRID_TRAITS_H
19 #define QMCPLUSPLUS_ONEDIMENSIONALGRID_TRAITS_H
20 #include <vector>
21 #include <complex>
22 #include <limits>
23 
24 /** enumeration of one-dimensional grid type
25  */
26 enum
27 {
32 };
33 
34 /** enumeration of boundary conditions
35  */
36 enum
37 {
41 };
42 
43 template<class T>
44 struct GridTraits
45 {};
46 
47 template<>
48 struct GridTraits<double>
49 {
50  using point_type = double;
51  using value_type = double;
52 };
53 
54 template<>
55 struct GridTraits<std::complex<double>>
56 {
57  using point_type = double;
58  using value_type = std::complex<double>;
59 };
60 
61 template<>
62 struct GridTraits<float>
63 {
64  using point_type = float;
65  using value_type = float;
66 };
67 
68 template<>
69 struct GridTraits<std::complex<float>>
70 {
71  using point_type = float;
72  using value_type = std::complex<float>;
73 };
74 #endif
std::complex< float > value_type
Definition: GridTraits.h:72
std::complex< double > value_type
Definition: GridTraits.h:58