ampsci
c++ program for high-precision atomic structure calculations of single-valence systems
Loading...
Searching...
No Matches
NumCalc_coeficients.hpp
1#pragma once
2#include <array>
3
4namespace NumCalc {
5//==============================================================================
6// Define the coeficients for quadrature integration:
7template <std::size_t N>
8struct QintCoefs {};
9
10template <>
11struct QintCoefs<13> {
12 static constexpr std::size_t N = 13;
13 static constexpr std::array<double, N> cq{
14 {1382741929621, 9535909891802, -5605325192308, 28323664941310,
15 -32865015189975, 53315213499588, -41078125154304, 39022895874876,
16 -13155015007785, 12465244770050, 3283609164916, 5551687979302,
17 5206230892907}};
18 static constexpr double dq_inv = 1.0 / 5230697472000;
19};
20template <>
21struct QintCoefs<11> {
22 static constexpr std::size_t N = 11;
23 static constexpr std::array<double, N> cq{
24 {262747265, 1637546484, -454944189, 3373884696, -2145575886, 3897945600,
25 -1065220914, 1942518504, 636547389, 1021256716, 952327935}};
26 static constexpr double dq_inv = 1.0 / 958003200;
27};
28template <>
29struct QintCoefs<9> {
30 static constexpr std::size_t N = 9;
31 static constexpr std::array<double, N> cq{{2082753, 11532470, 261166,
32 16263486, -1020160, 12489922,
33 5095890, 7783754, 7200319}};
34 static constexpr double dq_inv = 1.0 / 7257600;
35};
36template <>
37struct QintCoefs<7> {
38 static constexpr std::size_t N = 7;
39 static constexpr std::array<double, N> cq{
40 {36799, 176648, 54851, 177984, 89437, 130936, 119585}};
41 static constexpr double dq_inv = 1.0 / 120960;
42};
43template <>
44struct QintCoefs<5> {
45 static constexpr std::size_t N = 5;
46 static constexpr std::array<double, N> cq{{475, 1902, 1104, 1586, 1413}};
47 static constexpr double dq_inv = 1.0 / 1440;
48};
49template <>
50struct QintCoefs<3> {
51 static constexpr std::size_t N = 3;
52 static constexpr std::array<double, N> cq{{9, 28, 23}};
53 static constexpr double dq_inv = 1.0 / 24;
54};
55template <>
56struct QintCoefs<1> {
57 static constexpr std::size_t N = 1;
58 static constexpr std::array<double, N> cq{{1}};
59 static constexpr double dq_inv = 1.0; // technically, this is 'zero'
60};
61
62} // namespace NumCalc
Numerical integration and differentiation. Bit of a mess right now..
Definition NumCalc_coeficients.hpp:4