HubbardGPU
Hubbard diagonalisation on the GPU (and CPU)
 All Classes Files Functions Variables Typedefs Friends Macros
hamsparse2D.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 HAMSPARSE2D_H
20 #define HAMSPARSE2D_H
21 
22 #include "hamsparse2D_CSR.h"
23 
29 {
30  public:
31  SparseHamiltonian2D(int L, int D, int Nu, int Nd, double J, double U);
32  virtual ~SparseHamiltonian2D();
33 
34  void BuildSparseHam();
35 
36  void PrintSparse() const;
37 
38  void PrintRawELL() const;
39 
40  virtual void mvprod(double *, double *, double) const;
41 
42  protected:
43 
45  double *Up_data;
47  double *Down_data;
48 
50  unsigned int *Up_ind;
52  unsigned int *Down_ind;
53 
55  int size_Up;
57  int size_Down;
58 
59 };
60 
61 #endif /* HAMSPARSE2D_H */
62 
63 /* vim: set ts=8 sw=4 tw=0 expandtab :*/