ergo
rho-mat.h
Go to the documentation of this file.
1/* Ergo, version 3.8.2, a program for linear scaling electronic structure
2 * calculations.
3 * Copyright (C) 2023 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek,
4 * and Anastasia Kruchinina.
5 *
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Primary academic reference:
20 * Ergo: An open-source program for linear-scaling electronic structure
21 * calculations,
22 * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia
23 * Kruchinina,
24 * SoftwareX 7, 107 (2018),
25 * <http://dx.doi.org/10.1016/j.softx.2018.03.005>
26 *
27 * For further information about Ergo, see <http://www.ergoscf.org>.
28 */
29
30#ifndef RHOMAT_HEADER
31#define RHOMAT_HEADER 1
32
33#include "grid_matrix.h"
34
36
37void
38getrho_blocked_lda(int nbast, const real * dmat, const real * gao,
39 const int* nblocks, const int (*iblocks)[2],
40 int ldaib, real *tmp, int nvclen, real *rho);
41
42inline void
43getrho_blocked_lda(int nbast, const Dft::FullMatrix& m, const real * gao,
44 const int* nblocks, const int (*iblocks)[2],
45 int ldaib, real *tmp, int nvclen, real *rho)
46{
47 getrho_blocked_lda(nbast, m.mat, gao, nblocks, iblocks,
48 ldaib, tmp, nvclen, rho);
49}
50
51
52void
53getrho_blocked_gga(int nbast, const real * dmat, const real * gao,
54 const int* nblocks, const int (*iblocks)[2],
55 int ldaib, real *tmp, int nvclen,
56 real *rho, real (*grad)[3]);
57
58inline void
59getrho_blocked_gga(int nbast, const Dft::FullMatrix& dmat, const real * gao,
60 const int* nblocks, const int (*iblocks)[2],
61 int ldaib, real *tmp, int nvclen,
62 real *rho, real (*grad)[3])
63{
64 getrho_blocked_gga(nbast, dmat.mat, gao, nblocks, iblocks,
65 ldaib, tmp, nvclen, rho, grad);
66}
67
68void
69getexp_blocked_lda(int nbast, const real * dmat, const real * gao,
70 const int* nblocks, const int (*iblocks)[2],
71 int ldaib, real *tmp, int nvclen, real *rho);
72void
73getexp_blocked_gga(int nbast, const real * dmat, const real * gao,
74 const int* nblocks, const int (*iblocks)[2],
75 int ldaib, real *tmp, int nvclen,
76 real (*rgrad)[4]);
77
78#endif
Definition grid_matrix.h:53
ergo_real * mat
Definition grid_matrix.h:55
ergo_real real
Definition test.cc:46
Generic matrix interface.
void getrho_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)
void getrho_blocked_gga(int nbast, const real *dmat, const real *gao, const int *nblocks, const int(*iblocks)[2], int ldaib, real *tmp, int nvclen, real *rho, real(*grad)[3])
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 orb...
Definition rho-mat.cc:264
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 se...
Definition rho-mat.cc:326