ergo
grid_params.h
Go to the documentation of this file.
1/* Ergo, version 3.8, a program for linear scaling electronic structure
2 * calculations.
3 * Copyright (C) 2019 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek,
4 * and Anastasia Kruchinina.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Primary academic reference:
20 * Ergo: An open-source program for linear-scaling electronic structure
21 * calculations,
22 * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia
23 * Kruchinina,
24 * SoftwareX 7, 107 (2018),
25 * <http://dx.doi.org/10.1016/j.softx.2018.03.005>
26 *
27 * For further information about Ergo, see <http://www.ergoscf.org>.
28 */
29
38#if !defined(_GRID_PARAMS_H_)
39#define _GRID_PARAMS_H_ 1
40
41#include "grid_atomic.h"
42
43namespace Dft {
44
56};
57
59struct GridParams {
65 int angmin;
66 int angmax;
67 typedef enum { GC2, LMG, TURBO } RadialScheme;
68 typedef enum { TYPE_STANDARD, TYPE_HICU } GridType;
73 /* The following are HiCu grid parameters. */
75explicit GridParams(ergo_real r_ = 1e-9, int a1 = 6, int a2 = 30,
76 ergo_real bs = 5.0, bool cubic = false,
77 ergo_real hicume = 1e-7,
78 ergo_real hicubs = 1.5, ergo_real hicusbsd = 0,
79 int hicuerrpervol = 0,
80 int hicudodoublecheck = 1,
81 int hicuctr = 0, int hicuuec = 0,int hicuueco = 0,
82 int hicudovarcheck = 0)
83: boxSize(bs), radint(r_), angmin(a1), angmax(a2), radialGridScheme(LMG),
85 {
86 hicuParams.maxError = hicume;
87 hicuParams.box_size = hicubs;
89 hicuParams.use_error_per_volume = hicuerrpervol;
90 hicuParams.do_double_checking = hicudodoublecheck;
94 hicuParams.do_variation_checking = hicudovarcheck;
95 }
96};
97
98}
99#endif /* _GRID_PARAMS_H_ */
Implements shared parts of the grid generation code.
Definition: grid_matrix.h:42
double ergo_real
Definition: realtype.h:69
A structure describing the grid settings.
Definition: grid_params.h:59
RadialScheme
Definition: grid_params.h:67
@ TURBO
Definition: grid_params.h:67
@ LMG
Definition: grid_params.h:67
@ GC2
Definition: grid_params.h:67
RadialScheme radialGridScheme
Definition: grid_params.h:69
int angmin
Definition: grid_params.h:65
HiCuGridParams hicuParams
Definition: grid_params.h:74
int angmax
Definition: grid_params.h:66
GridParams(ergo_real r_=1e-9, int a1=6, int a2=30, ergo_real bs=5.0, bool cubic=false, ergo_real hicume=1e-7, ergo_real hicubs=1.5, ergo_real hicusbsd=0, int hicuerrpervol=0, int hicudodoublecheck=1, int hicuctr=0, int hicuuec=0, int hicuueco=0, int hicudovarcheck=0)
Definition: grid_params.h:75
ergo_real boxSize
All the dimensions of the smallest box must be below this threshold.
Definition: grid_params.h:63
ergo_real radint
Definition: grid_params.h:64
bool cubicBoxes
whether cubic grid boxes should be enforced.
Definition: grid_params.h:71
GridType
Definition: grid_params.h:68
@ TYPE_STANDARD
Definition: grid_params.h:68
@ TYPE_HICU
Definition: grid_params.h:68
GridType gridType
Definition: grid_params.h:70
A structure describing the HiCu grid settings.
Definition: grid_params.h:46
int compare_to_refined
Definition: grid_params.h:52
ergo_real start_box_size_debug
Definition: grid_params.h:49
int use_energy_criterion
Definition: grid_params.h:53
int use_energy_criterion_only
Definition: grid_params.h:54
ergo_real box_size
Definition: grid_params.h:48
ergo_real maxError
Definition: grid_params.h:47
int use_error_per_volume
Definition: grid_params.h:50
int do_variation_checking
Definition: grid_params.h:55
int do_double_checking
Definition: grid_params.h:51
RadialScheme describes the radial grid.
Definition: grid_atomic.h:50