DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
constants.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
4// authors.
5//
6// This file is part of the DFT-FE code.
7//
8// The DFT-FE code is free software; you can use it, redistribute
9// it, and/or modify it under the terms of the GNU Lesser General
10// Public License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12// The full text of the license can be found in the file LICENSE at
13// the top level of the DFT-FE distribution.
14//
15// ---------------------------------------------------------------------
16//
17// @author Sambit Das and Phani Motamarri
18//
19
20#ifndef constants_H_
21#define constants_H_
22
23namespace dftfe
24{
25 //
26 // Add prefix C_ to all constants
27 //
28
29 /// Boltzmann constant
30 const double C_kb = 3.166811429e-06;
31 const double C_haPerBohrToeVPerAng = 27.211386245988 / 0.529177210903;
32 const double C_haToeV = 27.211386245988;
33 const double C_bohrToAng = 0.529177210903;
34 const double C_pi = 3.14159265359;
35 const double C_AngToBohr = 1.0 / 0.529177210903;
36
37 /// 1d quadrature rule order
38 template <unsigned int FEOrder>
39 constexpr unsigned int
41 {
42 return FEOrder + 1;
43 }
44
45 /// 1d quad rule smeared nuclear charge
46 constexpr unsigned int
48 {
49 return 10;
50 }
51
52 /// number of copies 1d quad rule smeared nuclear charge
53 constexpr unsigned int
55 {
56 return 2; // can be changed from 2 to 3
57 }
58
59 /// 1d quad rule smeared nuclear charge
60 /// if a very coarse FE mesh is used (e.g. softer pseudopotentials)
61 constexpr unsigned int
63 {
64 return 10;
65 }
66
67 /// number of copies 1d quad rule smeared nuclear charge
68 /// if a very coarse FE mesh is used (e.g. softer pseudpotentials)
69 constexpr unsigned int
71 {
72 return 3;
73 }
74
75 /// 1d quad rule smeared nuclear charge if cell stress calculation is on
76 constexpr unsigned int
78 {
79 return 10;
80 }
81
82 /// number of copies 1d quad rule smeared nuclear charge if cell stress
83 /// calculation is on
84 constexpr unsigned int
86 {
87 return 5; //
88 }
89
90#ifdef DFTFE_WITH_HIGHERQUAD_PSP
91 /// rho nodal polynomial order
92 template <unsigned int FEOrder, unsigned int FEOrderElectro>
93 constexpr unsigned int
95 {
96 return ((FEOrder + 2) > FEOrderElectro ? (FEOrder + 2) : FEOrderElectro);
97 }
98
99 /// 1d quadrature rule order for non-local part of pseudopotential
100 template <unsigned int FEOrder>
101 constexpr unsigned int
103 {
104 return 14; // Can be changed from 14 to 18 Step 1
105 }
106
107 /// number of copies 1d quad rule non-local PSP
108 constexpr unsigned int
110 {
111 return 1;
112 }
113
114 /// 1d quadrature rule order for local part of pseudopotential
115 template <unsigned int FEOrder>
116 constexpr unsigned int
118 {
119 return 14;
120 }
121
122 /// number of copies 1d quad rule local PSP
123 constexpr unsigned int
125 {
126 return 1;
127 }
128#else
129
130 /// rho nodal polynomial order
131 template <unsigned int FEOrder, unsigned int FEOrderElectro>
132 constexpr unsigned int
134 {
135 return ((FEOrder + 2) > FEOrderElectro ? (FEOrder + 2) : FEOrderElectro);
136 }
137
138 /// 1d quadrature rule order for non-local part of pseudopotential
139 template <unsigned int FEOrder>
140 constexpr unsigned int
142 {
143 return 10;
144 }
145
146 /// number of copies 1d quad rule non-local PSP
147 constexpr unsigned int
149 {
150 return 1;
151 }
152
153 /// 1d quadrature rule order for local part of pseudopotential
154 template <unsigned int FEOrder>
155 constexpr unsigned int
157 {
158 return 10;
159 }
160
161 /// number of copies 1d quad rule local PSP
162 constexpr unsigned int
164 {
165 return 1;
166 }
167
168#endif
169} // namespace dftfe
170#endif
Definition pseudoPotentialToDftfeConverter.cc:34
constexpr unsigned int C_num1DQuad()
1d quadrature rule order
Definition constants.h:40
constexpr unsigned int C_num1DQuadSmearedCharge()
1d quad rule smeared nuclear charge
Definition constants.h:47
constexpr unsigned int C_numCopies1DQuadSmearedChargeStress()
Definition constants.h:85
constexpr unsigned int C_num1DQuadSmearedChargeStress()
1d quad rule smeared nuclear charge if cell stress calculation is on
Definition constants.h:77
constexpr unsigned int C_num1DQuadSmearedChargeHigh()
Definition constants.h:62
const double C_pi
Definition constants.h:34
const double C_haPerBohrToeVPerAng
Definition constants.h:31
constexpr unsigned int C_num1DQuadNLPSP()
1d quadrature rule order for non-local part of pseudopotential
Definition constants.h:141
constexpr unsigned int C_numCopies1DQuadNLPSP()
number of copies 1d quad rule non-local PSP
Definition constants.h:148
constexpr unsigned int C_numCopies1DQuadSmearedChargeHigh()
Definition constants.h:70
const double C_haToeV
Definition constants.h:32
constexpr unsigned int C_numCopies1DQuadSmearedCharge()
number of copies 1d quad rule smeared nuclear charge
Definition constants.h:54
constexpr unsigned int C_rhoNodalPolyOrder()
rho nodal polynomial order
Definition constants.h:133
const double C_bohrToAng
Definition constants.h:33
const double C_kb
Boltzmann constant.
Definition constants.h:30
constexpr unsigned int C_numCopies1DQuadLPSP()
number of copies 1d quad rule local PSP
Definition constants.h:163
constexpr unsigned int C_num1DQuadLPSP()
1d quadrature rule order for local part of pseudopotential
Definition constants.h:156
const double C_AngToBohr
Definition constants.h:35