HubbardGPU
Hubbard diagonalisation on the GPU (and CPU)
 All Classes Files Functions Variables Typedefs Friends Macros
GPUHamiltonian< T > Class Template Reference

#include <hamgpu.h>

+ Inheritance diagram for GPUHamiltonian< T >:
+ Collaboration diagram for GPUHamiltonian< T >:

Public Member Functions

 GPUHamiltonian (int L, int Nu, int Nd, double J, double U)
 
 GPUHamiltonian (int L, int D, int Nu, int Nd, double J, double U)
 
virtual ~GPUHamiltonian ()
 
virtual void mvprod (double *x, double *y, double alpha) const
 
double LanczosDiagonalize (int m=0)
 
template<>
 GPUHamiltonian (int Ns, int Nu, int Nd, double J, double U)
 
template<>
 GPUHamiltonian (int L, int D, int Nu, int Nd, double J, double U)
 

Protected Attributes

double * Umat_gpu
 The diagonal of the full hamiltonian (onsite interaction) More...
 
double * Up_data_gpu
 The array to hold the data (ELL format) for the up hamiltonian. More...
 
double * Down_data_gpu
 The array to hold the data (ELL format) for the down hamiltonian. More...
 
unsigned int * Up_ind_gpu
 The array to hold the indices for the up hamiltonian. More...
 
unsigned int * Down_ind_gpu
 The array to hold the indices for the down hamiltonian. More...
 

Detailed Description

template<class T>
class GPUHamiltonian< T >

This template class is used to do the Lanczos calculation on the GPU.

Author
Ward Poelmans wpoel.nosp@m.y86@.nosp@m.gmail.nosp@m..com

Definition at line 28 of file hamgpu.h.

Constructor & Destructor Documentation

template<class T >
GPUHamiltonian< T >::GPUHamiltonian ( int  L,
int  Nu,
int  Nd,
double  J,
double  U 
)
template<class T >
GPUHamiltonian< T >::GPUHamiltonian ( int  L,
int  D,
int  Nu,
int  Nd,
double  J,
double  U 
)
template<class T >
GPUHamiltonian< T >::~GPUHamiltonian ( )
virtual

Definition at line 62 of file hamgpu.cu.

template<>
GPUHamiltonian< SparseHamiltonian >::GPUHamiltonian ( int  Ns,
int  Nu,
int  Nd,
double  J,
double  U 
)

The constructor for the SparseHamiltonian Class

Definition at line 47 of file hamgpu.cu.

template<>
GPUHamiltonian< SparseHamiltonian2D >::GPUHamiltonian ( int  L,
int  D,
int  Nu,
int  Nd,
double  J,
double  U 
)

The constructor for the SparseHamiltonian2D Class

Definition at line 56 of file hamgpu.cu.

Member Function Documentation

template<class T >
double GPUHamiltonian< T >::LanczosDiagonalize ( int  m = 0)

Calculates the lowest eigenvalue of the hamiltonian matrix using the lanczos algorithm. Needs lapack.

Parameters
man optional estimate for the lanczos space size
Returns
the lowest eigenvalue

Definition at line 141 of file hamgpu.cu.

+ Here is the call graph for this function:

template<class T >
void GPUHamiltonian< T >::mvprod ( double *  x,
double *  y,
double  alpha 
) const
virtual

The matrix vector product. The method should calculate y = A*x + alpha * y

Parameters
xthe input vector
ythe output vector
alphathe multiplicative constant

Definition at line 114 of file hamgpu.cu.

Member Data Documentation

template<class T >
double* GPUHamiltonian< T >::Down_data_gpu
protected

The array to hold the data (ELL format) for the down hamiltonian.

Definition at line 47 of file hamgpu.h.

template<class T >
unsigned int* GPUHamiltonian< T >::Down_ind_gpu
protected

The array to hold the indices for the down hamiltonian.

Definition at line 52 of file hamgpu.h.

template<class T >
double* GPUHamiltonian< T >::Umat_gpu
protected

The diagonal of the full hamiltonian (onsite interaction)

Definition at line 42 of file hamgpu.h.

template<class T >
double* GPUHamiltonian< T >::Up_data_gpu
protected

The array to hold the data (ELL format) for the up hamiltonian.

Definition at line 45 of file hamgpu.h.

template<class T >
unsigned int* GPUHamiltonian< T >::Up_ind_gpu
protected

The array to hold the indices for the up hamiltonian.

Definition at line 50 of file hamgpu.h.


The documentation for this class was generated from the following files: