grid_params.h

Go to the documentation of this file.
00001 /* Ergo, version 3.2, a program for linear scaling electronic structure
00002  * calculations.
00003  * Copyright (C) 2012 Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek.
00004  * 
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation, either version 3 of the License, or
00008  * (at your option) any later version.
00009  * 
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  * 
00018  * Primary academic reference:
00019  * Kohn−Sham Density Functional Theory Electronic Structure Calculations 
00020  * with Linearly Scaling Computational Time and Memory Usage,
00021  * Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek,
00022  * J. Chem. Theory Comput. 7, 340 (2011),
00023  * <http://dx.doi.org/10.1021/ct100611z>
00024  * 
00025  * For further information about Ergo, see <http://www.ergoscf.org>.
00026  */
00027 
00028 #if !defined(_GRID_PARAMS_H_)
00029 #define _GRID_PARAMS_H_ 1
00030 
00031 #include "grid_atomic.h"
00032 
00033 namespace Dft {
00034 
00036 struct HiCuGridParams {
00037   ergo_real maxError;
00038   ergo_real box_size;
00039   ergo_real start_box_size_debug;
00040   int use_error_per_volume;
00041   int do_double_checking;
00042   int compare_to_refined;
00043   int use_energy_criterion;
00044   int use_energy_criterion_only;
00045   int do_variation_checking;
00046 };
00047 
00049 struct GridParams {
00053   ergo_real boxSize;
00054   ergo_real radint;
00055   int angmin;
00056   int angmax;
00057   typedef enum { GC2, LMG, TURBO } RadialScheme;
00058   typedef enum { TYPE_STANDARD, TYPE_HICU } GridType;
00059   RadialScheme radialGridScheme;
00060   GridType  gridType;
00061   bool cubicBoxes; 
00063   /* The following are HiCu grid parameters. */
00064   HiCuGridParams hicuParams;
00065 explicit GridParams(ergo_real r_ = 1e-9, int a1 = 6, int a2 = 30,
00066            ergo_real bs = 5.0, bool cubic = false,
00067            ergo_real hicume = 1e-7, 
00068            ergo_real hicubs = 1.5, ergo_real hicusbsd = 0, 
00069            int hicuerrpervol = 0,
00070            int hicudodoublecheck = 1,
00071            int hicuctr = 0, int hicuuec = 0,int hicuueco = 0,
00072            int hicudovarcheck = 0)
00073 : boxSize(bs), radint(r_), angmin(a1), angmax(a2), radialGridScheme(LMG),
00074     gridType(TYPE_STANDARD), cubicBoxes(cubic)
00075   { 
00076     hicuParams.maxError = hicume;
00077     hicuParams.box_size = hicubs;
00078     hicuParams.start_box_size_debug = hicusbsd;
00079     hicuParams.use_error_per_volume = hicuerrpervol; 
00080     hicuParams.do_double_checking = hicudodoublecheck;
00081     hicuParams.compare_to_refined = hicuctr;
00082     hicuParams.use_energy_criterion = hicuuec;
00083     hicuParams.use_energy_criterion_only = hicuueco;
00084     hicuParams.do_variation_checking = hicudovarcheck;
00085   }
00086 };
00087 
00088 }
00089 #endif /* _GRID_PARAMS_H_ */

Generated on Mon Sep 17 14:30:39 2012 for ergo by  doxygen 1.4.7