QMCPACK
ValidSpaceGridInput.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) 2023 QMCPACK developers.
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
8 //
9 // File created by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Lab
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 #ifndef QMCPLUSPLUS_VALID_SPACEGRID_INPUT_H
13 #define QMCPLUSPLUS_VALID_SPACEGRID_INPUT_H
14 
15 #include <array>
16 #include <string_view>
17 
18 namespace qmcplusplus
19 {
20 namespace testing
21 {
22 
24 {
25  enum valid
26  {
27  DEFAULT = 0,
34  };
35  static constexpr std::array<std::string_view, NUM_CASES> xml{
36  R"XML(
37  <spacegrid coord="cartesian">
38  <axis p1="a1" scale=".5" label="x" grid="-1 (.1) 1"/>
39  <axis p1="a2" scale=".5" label="y" grid="-1 (.1) 1"/>
40  <axis p1="a3" scale=".5" label="z" grid="-1 (.1) 1"/>
41  </spacegrid>
42 )XML",
43  R"XML(
44  <spacegrid coord="cartesian">
45  <origin p1="zero"/>
46  <axis p1="a1" scale=".5" label="x" grid="-1 (.1) 1"/>
47  <axis p1="a2" scale=".5" label="y" grid="-1 (.1) 1"/>
48  <axis p1="a3" scale=".5" label="z" grid="-1 (.1) 1"/>
49  </spacegrid>
50 )XML",
51  R"XML(
52  <spacegrid coord="cylindrical">
53  <origin p1="zero"/>
54  <axis p1="r1" scale=".5" label="r" grid="0 (.1) 1"/>
55  <axis p1="r2" scale=".5" label="phi" grid="0 (.1) 1"/>
56  <axis p1="r3" scale=".5" label="z" grid="-1 (.1) 1"/>
57  </spacegrid>
58 )XML",
59  R"XML(
60  <spacegrid coord="spherical">
61  <origin p1="ion1"/>
62  <axis p1="r1" scale="6.9" label="r" grid="0 (0.1) 1"/>
63  <axis p1="r2" scale="6.9" label="phi" grid="0 (0.1) 1"/>
64  <axis p1="r3" scale="6.9" label="theta" grid="0 (0.1) 1"/>
65  </spacegrid>
66 )XML",
67  R"XML(
68  <spacegrid coord="spherical">
69  <origin p1="ion1"/>
70  <axis p1="r1" scale="6.9" label="r" grid="0 (0.1) 1"/>
71  <axis p1="r2" scale="6.9" label="phi" grid="0 (0.1) 1"/>
72  <axis p1="r3" scale="6.9" label="theta" grid="0 (0.1) 1"/>
73  </spacegrid>
74 )XML",
75  R"XML(
76  <spacegrid coord="spherical">
77  <origin p1="ion2"/>
78  <axis p1="r1" scale="6.9" label="r" grid="0 1"/>
79  <axis p1="r2" scale="6.9" label="phi" grid="0 1"/>
80  <axis p1="r3" scale="6.9" label="theta" grid="0 1"/>
81  </spacegrid>
82 )XML"};
83 };
84 
86 {
87  static constexpr std::array<std::string_view, 5> xml{
88  R"XML(
89  <spacegrid coord="cartesian">
90  <axis p1="a1" scale=".5" label="x" grid="-1 (.1) 1"/>
91  <axis p1="a2" scale=".5" label="q" grid="-1 (.1) 1"/>
92  <axis p1="a3" scale=".5" label="z" grid="-1 (.1) 1"/>
93  </spacegrid>
94  )XML",
95  R"XML(
96  <spacegrid coord="sphericalt">
97  <origin p1="ion1p"/>
98  <axis p1="r6" scale="6.9" label="r" grid="0 (0.1) 1"/>
99  <axis p1="r2" scale="6.9" label="phi" grid="0 (0.1) 1"/>
100  <axis p1="r3" scale="6.9" label="theta" grid="0 (0.1) 1"/>
101  </spacegrid>
102  )XML",
103  R"XML(
104  <spacegrid coord="spherical">
105  <origin p1="ion2"/>
106  <axis p1="r1" scale="6.9" label="x" grid="0 1"/>
107  <axis p1="r2" scale="6.9" label="phi" grid="0 1"/>
108  <axis p1="r3" scale="6.9" label="theta" grid="0 1"/>
109  </spacegrid>
110  )XML",
111  R"XML(
112  <spacegrid coord="spherical">
113  <origin p1="ion2"/>
114  <axis p1="r2" scale="6.9" label="phi" grid="0 1"/>
115  <axis p1="r3" scale="6.9" label="theta" grid="0 1"/>
116  </spacegrid>
117  )XML",
118  R"XML(
119  <spacegrid coord="spherical">
120  <origin p1="ion2"/>
121  <axis p1="r6" scale="6.9" label="r" grid="0 (0.1) 1"/>
122  <axis p1="r2" scale="6.9" label="phi" grid="1 -1"/>
123  <axis p1="r3" scale="6.9" label="theta" grid="0 1"/>
124  </spacegrid>
125  )XML"};
126 
127  enum bad
128  {
134  };
135 };
136 } // namespace testing
137 } // namespace qmcplusplus
138 
139 #endif
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
static constexpr std::array< std::string_view, 5 > xml
static constexpr std::array< std::string_view, NUM_CASES > xml