grid_atomic.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 
00032 #if !defined(_GRID_ATOMIC_H_)
00033 #define _GRID_ATOMIC_H_ 1
00034 
00035 #include "realtype.h"
00036 #include "matrix_typedefs.h"
00037 #include "basisinfo.h"
00038 #include "grid_interface.h"
00039 
00040 typedef ergo_real real;
00041 typedef ergo_long_real long_real;
00042 
00043 extern const real BraggRadii[];
00044 extern const unsigned BraggSize;
00045 
00046 
00048 struct RadialScheme {
00049   const char *name;
00050   int gridSize;
00051   explicit RadialScheme(const char *n) : name(n), gridSize(0) {}
00052   inline int size() const { return gridSize; }
00053   virtual void init(int myNumber, int charge, real threshold) = 0;
00054   virtual void generate(real *r, real *w) = 0;
00055   virtual ~RadialScheme() {}
00056 };
00057 
00058 struct RadialSchemeGC2 : public RadialScheme {
00059   void *quadData;
00060   RadialSchemeGC2(): RadialScheme("Gauss-Chebychev scheme of second kind")
00061   {}
00062   virtual void init(int myNumber, int charge, real threshold);
00063   virtual void generate(real *r, real *w);
00064 };
00065 
00066 struct RadialSchemeTurbo : public RadialScheme {
00067   real zeta;
00068   RadialSchemeTurbo(): RadialScheme("Chebychev T2 scheme/M4 mapping (Turbo)")
00069   {}
00070   virtual void init(int myNumber, int charge, real threshold);
00071   virtual void generate(real *r, real *w);
00072 };
00073 
00074 struct RadialSchemeLMG : public RadialScheme {
00075   explicit RadialSchemeLMG(const GridGenMolInfo& ggmi_);
00076 
00077   virtual void init(int myNumber, int charge, real threshold);
00078   virtual void generate(real *r, real *w);
00079   virtual ~RadialSchemeLMG();
00080   private:
00081   const GridGenMolInfo& ggmi;
00082   int *nucorb;
00083   real (*aa)[2];
00084   int maxL;
00085   /* grid params */
00086   real rl, grdc, h, eph;
00087 };
00088 
00089 
00090 
00091 #endif /* _GRID_ATOMIC_H_ */

Generated on 21 Nov 2012 for ergo by  doxygen 1.6.1