rho-mat.cc File Reference

Functions for density and gradient evaluation. More...

#include <string.h>
#include <stdio.h>
#include "realtype.h"
#include "gblas.h"
#include "rho-mat.h"

Defines

#define restrict

Typedefs

typedef ergo_real real

Functions

static void zeroorbs (real *tmp, const int *nblocks, const int(*iblocks)[2], int ldaib, int nvclen)
 helper function for zeroing only used blocks of orbitals.
void getrho_blocked_lda (int nbast, const real *dmat, const real *restrict gao, const int *nblocks, const int(*iblocks)[2], int ldaib, real *tmp, int nvclen, real *rho)
 Computes the expectation value <o|dmat|o'> for a symmetric matrix and given set of precomputed orbital values gao.
void getrho_blocked_gga (int nbast, const real *dmat, const real *restrict gao, const int *nblocks, const int(*iblocks)[2], int ldaib, real *tmp, int nvclen, real *rho, real(*grad)[3])
 Computes the expectation value <o|dmat|o'> and its derivatives for a symmetric matrix and given set of precomputed orbital values and their cartesian derivatives gao.
void getexp_blocked_lda (int nbast, const real *dmat, const real *gao, const int *nblocks, const int(*iblocks)[2], int ldaib, real *tmp, int nvclen, real *rho)
 Computes the expectation value <o|dmat|o'> for a nonsymmetric matrix and given set of precomputed orbital values gao.
void getexp_blocked_gga (int nbast, const real *dmat, const real *gao, const int *nblocks, const int(*iblocks)[2], int ldaib, real *tmp, int nvclen, real(*rgrad)[4])
 Computes the expectation value <o|dmat|o'> and its derivatives for a nonsymmetric matrix and given set of precomputed orbital values and their cartesian derivatives gao.


Detailed Description

Functions for density and gradient evaluation.

The density can be evaluated at entire batches of grid points.


Define Documentation

#define restrict


Typedef Documentation

typedef ergo_real real


Function Documentation

void getexp_blocked_gga ( int  nbast,
const real dmat,
const real gao,
const int *  nblocks,
const int *  iblocks[2],
int  ldaib,
real tmp,
int  nvclen,
real rgrad[4] 
)

Computes the expectation value <o|dmat|o'> and its derivatives for a nonsymmetric matrix and given set of precomputed orbital values and their cartesian derivatives gao.

Sparsity of gao as determined with help of nblocks and iblocks is used to reduce the computational effort.

Parameters:
dmat full square symmetric matrix
nbast size of dmat
gao orbital matrix[4][nbast][nvclen]. First block [0][][] contains orbital values. Subsequent blocks - orbital derivatives wrt x,y, and z coordinates. Set values are determied by nblocks and iblocks, other values shall not be accessed.
nblocks number of nonzero row blocks in gao
iblocks ranges [a,b) of nonzero blocks in gao.
ldaib not used
tmp temporary matrix [nbast][nvclen]
nvclen batch length - number of columns in gao.
rgrad a vector of quartets where the computed expectation values and gradient values will be stored.

void getexp_blocked_lda ( int  nbast,
const real dmat,
const real gao,
const int *  nblocks,
const int *  iblocks[2],
int  ldaib,
real tmp,
int  nvclen,
real rho 
)

Computes the expectation value <o|dmat|o'> for a nonsymmetric matrix and given set of precomputed orbital values gao.

Sparsity of gao as determined with help of nblocks and iblocks is used to reduce the computational effort.

Parameters:
dmat full square symmetric matrix
nbast size of dmat
gao orbital matrix[nbast][nvclen]. Set values are determied by nblocks and iblocks, other values shall not be accessed.
nblocks number of nonzero row blocks in gao
iblocks ranges [a,b) of nonzero blocks in gao.
ldaib not used
tmp temporary matrix [nbast][nvclen]
nvclen batch length - number of columns in gao.
rho the vector[nvclen] where the computed expectation values will be stored.

void getrho_blocked_gga ( int  nbast,
const real dmat,
const real *restrict  gao,
const int *  nblocks,
const int *  iblocks[2],
int  ldaib,
real tmp,
int  nvclen,
real rho,
real grad[3] 
)

Computes the expectation value <o|dmat|o'> and its derivatives for a symmetric matrix and given set of precomputed orbital values and their cartesian derivatives gao.

Sparsity of gao as determined with help of nblocks and iblocks is used to reduce the computational effort.

Parameters:
dmat full square symmetric matrix
nbast size of dmat
gao orbital matrix[4][nbast][nvclen]. First block [0][][] contains orbital values. Subsequent blocks - orbital derivatives wrt x,y, and z coordinates. Set values are determied by nblocks and iblocks, other values shall not be accessed.
nblocks number of nonzero row blocks in gao
iblocks ranges [a,b) of nonzero blocks in gao.
ldaib not used
tmp temporary matrix [nbast][nvclen]
nvclen batch length - number of columns in gao.
rho the vector[nvclen] where the computed expectation values will be stored.
grad a vector of triples where the computed gradient values will be stored.

void getrho_blocked_lda ( int  nbast,
const real dmat,
const real *restrict  gao,
const int *  nblocks,
const int *  iblocks[2],
int  ldaib,
real tmp,
int  nvclen,
real rho 
)

Computes the expectation value <o|dmat|o'> for a symmetric matrix and given set of precomputed orbital values gao.

Sparsity of gao as determined with help of nblocks and iblocks is used to reduce the computational effort.

Parameters:
dmat full square symmetric matrix
nbast size of dmat
gao orbital matrix[nbast][nvclen]. Set values are determied by nblocks and iblocks, other values shall not be accessed.
nblocks number of nonzero row blocks in gao
iblocks ranges [a,b) of nonzero blocks in gao.
ldaib not used
tmp temporary matrix [nbast][nvclen]
nvclen batch length - number of columns in gao.
rho the vector[nvclen] where the computed expectation values will be stored.

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

helper function for zeroing only used blocks of orbitals.

Selected values for the first index are looped over, and all allowed values of the second index.

Parameters:
tmp the matrix[nbast][nvclen]
nblocks pointer to an integer containing number of nonzero orbital blocks.
iblocks a set of nblocks integer pairs [a,b) defining the range of first index to be zeroed.
ldaib not used
nvclen batch length - and the second dimension of tmp.


Generated on Mon Sep 17 14:30:41 2012 for ergo by  doxygen 1.4.7