ERKALE
ERKALE - DFT from Hel
 All Classes Functions Variables Friends Pages
lmgrid.h
1 /*
2  * This source code is part of
3  *
4  * E R K A L E
5  * -
6  * HF/DFT from Hel
7  *
8  * Written by Susi Lehtola, 2010-2011
9  * Copyright (c) 2010-2011, Susi Lehtola
10  *
11  * This program is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU General Public License
13  * as published by the Free Software Foundation; either version 2
14  * of the License, or (at your option) any later version.
15  */
16 
17 
18 #ifndef ERKALE_LMGRID
19 #define ERKALE_LMGRID
20 
21 #include <complex>
22 #include <vector>
23 #include "basis.h"
24 
26 #define lmind(l,m) ( ((size_t) (l))*(size_t (l)) + (size_t) (l) + (size_t) (m))
27 
29 typedef struct {
31  double r;
33  double w;
35 
37 std::vector<radial_grid_t> form_radial_grid(int nrad);
38 
40 typedef struct {
44  double w;
46 
48 std::vector<angular_grid_t> form_angular_grid(int lmax);
50 std::vector< std::vector< std::complex<double> > > compute_spherical_harmonics(const std::vector<angular_grid_t> & grid, int lmax);
51 
53 typedef struct {
55  std::vector<radial_grid_t> grid;
57  std::vector< std::vector< std::vector< std::complex<double> > > > clm;
58 } expansion_t;
59 
61 expansion_t expand_orbitals(const arma::mat & C, const BasisSet & bas, const coords_t & cen, bool verbose=true, size_t Nrad=200, int lmax=5, int lquad=30);
62 
64 typedef struct {
66  std::vector<radial_grid_t> grid;
68  std::vector< std::vector< std::vector< double > > > clm;
70 
72 real_expansion_t expand_orbitals_real(const arma::mat & C, const BasisSet & bas, const coords_t & cen, bool verbose=true, size_t Nrad=200, int lmax=5, int lquad=30);
73 
75 arma::mat weight_decomposition(const real_expansion_t & exp, bool total=true);
77 arma::mat weight_decomposition(const expansion_t & exp, bool total=true);
78 
80 arma::mat angular_decomposition(const real_expansion_t & exp, int l);
81 
82 #endif
std::vector< radial_grid_t > grid
Radial grid.
Definition: lmgrid.h:66
std::vector< radial_grid_t > grid
Radial grid.
Definition: lmgrid.h:55
coords_t r
Coordinate on the (unit) sphere.
Definition: lmgrid.h:42
std::vector< std::vector< std::vector< double > > > clm
Expansion coefficients of orbitals clm[norbs][l,m][nrad].
Definition: lmgrid.h:68
double r
Radius.
Definition: lmgrid.h:31
Basis set.
Definition: basis.h:187
Expansion of orbitals.
Definition: lmgrid.h:53
double w
Radial weight.
Definition: lmgrid.h:33
Coordinates structure.
Definition: basis.h:50
Structure for angular integration.
Definition: lmgrid.h:40
Structure for radial integration.
Definition: lmgrid.h:29
std::vector< std::vector< std::vector< std::complex< double > > > > clm
Expansion coefficients of orbitals clm[norbs][l,m][nrad].
Definition: lmgrid.h:57
Expansion of orbitals.
Definition: lmgrid.h:64
double w
Weight.
Definition: lmgrid.h:44