ergo
sparse_matrix.cc File Reference

The implementation of sparse matrix optimized for XC integration. More...

#include <string.h>
#include <list>
#include <map>
#include <set>
#include <vector>
#include "output.h"
#include "dft_common.h"
#include "sparse_matrix.h"

Classes

class  NeighbourList
 

Typedefs

typedef ergo_realErgoRealPtr
 
typedef ergo_real real
 

Functions

static ergo_real sqDist (const ergo_real a[], const ergo_real b[])
 computes a squared distance between two points. More...
 
static void zeroorbs (real *tmp, const int *nblocks, const int(*iblocks)[2], int ldaib, int nvclen)
 
void getrho_blocked_lda (int nbast, const Dft::SparseMatrix &dmat, const ergo_real *gao, const int *nblocks, const int(*iblocks)[2], int ldaib, ergo_real *tmp, int nvclen, ergo_real *rho)
 
void getrho_blocked_gga (int nbast, const Dft::SparseMatrix &dmat, const ergo_real *gao, const int *nblocks, const int(*iblocks)[2], int ldaib, ergo_real *tmp, int nvclen, ergo_real *rho, ergo_real(*grad)[3])
 

Detailed Description

The implementation of sparse matrix optimized for XC integration.

Notes: the atom reordering issues are not discussed. Some preliminary experiments suggest that reordering may give 20% speedup. The permutation speedup remain to be thoroughly tested.

Typedef Documentation

◆ ErgoRealPtr

◆ real

typedef ergo_real real

Function Documentation

◆ getrho_blocked_gga()

void getrho_blocked_gga ( int  nbast,
const Dft::SparseMatrix &  dmat,
const ergo_real gao,
const int *  nblocks,
const int(*)  iblocks[2],
int  ldaib,
ergo_real tmp,
int  nvclen,
ergo_real rho,
ergo_real(*)  grad[3] 
)

References zeroorbs().

◆ getrho_blocked_lda()

void getrho_blocked_lda ( int  nbast,
const Dft::SparseMatrix &  dmat,
const ergo_real gao,
const int *  nblocks,
const int(*)  iblocks[2],
int  ldaib,
ergo_real tmp,
int  nvclen,
ergo_real rho 
)

References zeroorbs().

◆ sqDist()

static ergo_real sqDist ( const ergo_real  a[],
const ergo_real  b[] 
)
inlinestatic

computes a squared distance between two points.

Referenced by NeighbourList::setOverlappingWith().

◆ zeroorbs()

static void zeroorbs ( real tmp,
const int *  nblocks,
const int(*)  iblocks[2],
int  ldaib,
int  nvclen 
)
static