HubbardGPU
Hubbard diagonalisation on the GPU (and CPU)
 All Classes Files Functions Variables Typedefs Friends Macros
hamgpu.h
Go to the documentation of this file.
1 /* Copyright (C) 2012 Ward Poelmans
2 
3 This file is part of Hubbard-GPU.
4 
5 Hubbard-GPU is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9 
10 Hubbard-GPU is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with Hubbard-GPU. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef HAMGPU_H
20 #define HAMGPU_H
21 
27 template<class T>
28 class GPUHamiltonian: public T
29 {
30  public:
31  GPUHamiltonian(int L, int Nu, int Nd, double J, double U);
32  GPUHamiltonian(int L, int D, int Nu, int Nd, double J, double U);
33  virtual ~GPUHamiltonian();
34 
35  virtual void mvprod(double *x, double *y, double alpha) const;
36 
37  double LanczosDiagonalize(int m=0);
38 
39  protected:
40 
42  double *Umat_gpu;
43 
45  double *Up_data_gpu;
47  double *Down_data_gpu;
48 
50  unsigned int *Up_ind_gpu;
52  unsigned int *Down_ind_gpu;
53 
54 };
55 
56 #endif /* HAMGPU_H */
57 
58 /* vim: set ts=8 sw=4 tw=0 expandtab :*/