DFT-FE 1.3.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 inline dftfe::uInt
41 {
42 return FEOrder + 1;
43 }
44
45 /// 1d quad rule smeared nuclear charge
46 constexpr dftfe::uInt
48 {
49 return 10;
50 }
51
52 /// number of copies 1d quad rule smeared nuclear charge
53 constexpr dftfe::uInt
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 dftfe::uInt
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 dftfe::uInt
71 {
72 return 3;
73 }
74
75 /// 1d quad rule smeared nuclear charge if cell stress calculation is on
76 constexpr dftfe::uInt
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 dftfe::uInt
86 {
87 return 5; //
88 }
89
90#ifdef DFTFE_WITH_HIGHERQUAD_PSP
91
92
93 /// 1d quadrature rule order for non-local part of pseudopotential
94 inline dftfe::uInt
96 {
97 return 14; // Can be changed from 14 to 18 Step 1
98 }
99
100 /// number of copies 1d quad rule non-local PSP
101 inline dftfe::uInt
103 {
104 return 1;
105 }
106
107 /// 1d quadrature rule order for local part of pseudopotential
108 inline dftfe::uInt
110 {
111 return 14;
112 }
113
114 /// number of copies 1d quad rule local PSP
115 constexpr dftfe::uInt
117 {
118 return 1;
119 }
120#else
121
122
123
124 /// 1d quadrature rule order for non-local part of pseudopotential
125 inline dftfe::uInt
127 {
128 return 10;
129 }
130
131 /// number of copies 1d quad rule non-local PSP
132 constexpr dftfe::uInt
134 {
135 return 1;
136 }
137
138 /// 1d quadrature rule order for local part of pseudopotential
139 inline dftfe::uInt
141 {
142 return 10;
143 }
144
145 /// number of copies 1d quad rule local PSP
146 constexpr dftfe::uInt
148 {
149 return 1;
150 }
151
152#endif
153} // namespace dftfe
154#endif
Definition pseudoPotentialToDftfeConverter.cc:34
constexpr dftfe::uInt C_num1DQuadSmearedChargeHigh()
Definition constants.h:62
constexpr dftfe::uInt C_numCopies1DQuadSmearedCharge()
number of copies 1d quad rule smeared nuclear charge
Definition constants.h:54
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:133
constexpr dftfe::uInt C_numCopies1DQuadSmearedChargeStress()
Definition constants.h:85
const double C_haToeV
Definition constants.h:33
constexpr dftfe::uInt C_numCopies1DQuadSmearedChargeHigh()
Definition constants.h:70
dftfe::uInt C_num1DQuad(dftfe::uInt FEOrder)
1d quadrature rule order
Definition constants.h:40
constexpr dftfe::uInt C_numCopies1DQuadLPSP()
number of copies 1d quad rule local PSP
Definition constants.h:147
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:77
dftfe::uInt C_num1DQuadLPSP(dftfe::uInt FEOrder)
1d quadrature rule order for local part of pseudopotential
Definition constants.h:140
constexpr dftfe::uInt C_num1DQuadSmearedCharge()
1d quad rule smeared nuclear charge
Definition constants.h:47
const double C_AngToBohr
Definition constants.h:36
dftfe::uInt C_num1DQuadNLPSP(dftfe::uInt FEOrder)
1d quadrature rule order for non-local part of pseudopotential
Definition constants.h:126