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#include <TypeConfig.h>
23
24namespace dftfe
25{
26 //
27 // Add prefix C_ to all constants
28 //
29
30 /// Boltzmann constant
31 const double C_kb = 3.166811429e-06;
32 const double C_haPerBohrToeVPerAng = 27.211386245988 / 0.529177210903;
33 const double C_haToeV = 27.211386245988;
34 const double C_bohrToAng = 0.529177210903;
35 const double C_pi = 3.14159265359;
36 const double C_AngToBohr = 1.0 / 0.529177210903;
37
38 /// 1d quadrature rule order
39 template <dftfe::uInt FEOrder>
40 constexpr dftfe::uInt
42 {
43 return FEOrder + 1;
44 }
45
46 /// 1d quad rule smeared nuclear charge
47 constexpr dftfe::uInt
49 {
50 return 10;
51 }
52
53 /// number of copies 1d quad rule smeared nuclear charge
54 constexpr dftfe::uInt
56 {
57 return 2; // can be changed from 2 to 3
58 }
59
60 /// 1d quad rule smeared nuclear charge
61 /// if a very coarse FE mesh is used (e.g. softer pseudopotentials)
62 constexpr dftfe::uInt
64 {
65 return 10;
66 }
67
68 /// number of copies 1d quad rule smeared nuclear charge
69 /// if a very coarse FE mesh is used (e.g. softer pseudpotentials)
70 constexpr dftfe::uInt
72 {
73 return 3;
74 }
75
76 /// 1d quad rule smeared nuclear charge if cell stress calculation is on
77 constexpr dftfe::uInt
79 {
80 return 10;
81 }
82
83 /// number of copies 1d quad rule smeared nuclear charge if cell stress
84 /// calculation is on
85 constexpr dftfe::uInt
87 {
88 return 5; //
89 }
90
91#ifdef DFTFE_WITH_HIGHERQUAD_PSP
92 /// rho nodal polynomial order
93 template <dftfe::uInt FEOrder, dftfe::uInt FEOrderElectro>
94 constexpr dftfe::uInt
96 {
97 return ((FEOrder + 2) > FEOrderElectro ? (FEOrder + 2) : FEOrderElectro);
98 }
99
100 /// 1d quadrature rule order for non-local part of pseudopotential
101 template <dftfe::uInt FEOrder>
102 constexpr dftfe::uInt
104 {
105 return 14; // Can be changed from 14 to 18 Step 1
106 }
107
108 /// number of copies 1d quad rule non-local PSP
109 constexpr dftfe::uInt
111 {
112 return 1;
113 }
114
115 /// 1d quadrature rule order for local part of pseudopotential
116 template <dftfe::uInt FEOrder>
117 constexpr dftfe::uInt
119 {
120 return 14;
121 }
122
123 /// number of copies 1d quad rule local PSP
124 constexpr dftfe::uInt
126 {
127 return 1;
128 }
129#else
130
131 /// rho nodal polynomial order
132 template <dftfe::uInt FEOrder, dftfe::uInt FEOrderElectro>
133 constexpr dftfe::uInt
135 {
136 return ((FEOrder + 2) > FEOrderElectro ? (FEOrder + 2) : FEOrderElectro);
137 }
138
139 /// 1d quadrature rule order for non-local part of pseudopotential
140 template <dftfe::uInt FEOrder>
141 constexpr dftfe::uInt
143 {
144 return 10;
145 }
146
147 /// number of copies 1d quad rule non-local PSP
148 constexpr dftfe::uInt
150 {
151 return 1;
152 }
153
154 /// 1d quadrature rule order for local part of pseudopotential
155 template <dftfe::uInt FEOrder>
156 constexpr dftfe::uInt
158 {
159 return 10;
160 }
161
162 /// number of copies 1d quad rule local PSP
163 constexpr dftfe::uInt
165 {
166 return 1;
167 }
168
169#endif
170} // namespace dftfe
171#endif
Definition pseudoPotentialToDftfeConverter.cc:34
constexpr dftfe::uInt C_num1DQuad()
1d quadrature rule order
Definition constants.h:41
constexpr dftfe::uInt C_num1DQuadSmearedChargeHigh()
Definition constants.h:63
constexpr dftfe::uInt C_numCopies1DQuadSmearedCharge()
number of copies 1d quad rule smeared nuclear charge
Definition constants.h:55
const double C_pi
Definition constants.h:35
const double C_haPerBohrToeVPerAng
Definition constants.h:32
std::uint32_t uInt
Definition TypeConfig.h:10
constexpr dftfe::uInt C_numCopies1DQuadNLPSP()
number of copies 1d quad rule non-local PSP
Definition constants.h:149
constexpr dftfe::uInt C_numCopies1DQuadSmearedChargeStress()
Definition constants.h:86
const double C_haToeV
Definition constants.h:33
constexpr dftfe::uInt C_numCopies1DQuadSmearedChargeHigh()
Definition constants.h:71
constexpr dftfe::uInt C_numCopies1DQuadLPSP()
number of copies 1d quad rule local PSP
Definition constants.h:164
constexpr dftfe::uInt C_num1DQuadLPSP()
1d quadrature rule order for local part of pseudopotential
Definition constants.h:157
constexpr dftfe::uInt C_rhoNodalPolyOrder()
rho nodal polynomial order
Definition constants.h:134
const double C_bohrToAng
Definition constants.h:34
const double C_kb
Boltzmann constant.
Definition constants.h:31
constexpr dftfe::uInt C_num1DQuadSmearedChargeStress()
1d quad rule smeared nuclear charge if cell stress calculation is on
Definition constants.h:78
constexpr dftfe::uInt C_num1DQuadSmearedCharge()
1d quad rule smeared nuclear charge
Definition constants.h:48
constexpr dftfe::uInt C_num1DQuadNLPSP()
1d quadrature rule order for non-local part of pseudopotential
Definition constants.h:142
const double C_AngToBohr
Definition constants.h:36