ergo
rho-mat.h
Go to the documentation of this file.
1 /* Ergo, version 3.7, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2018 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 
37 void
38 getrho_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 
42 inline void
43 getrho_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 
52 void
53 getrho_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 
58 inline void
59 getrho_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 
68 void
69 getexp_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);
72 void
73 getexp_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
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_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&#39;> and its derivatives for a nonsymmetric matrix and given se...
Definition: rho-mat.cc:326
ergo_real real
Definition: test.cc:46
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)
ergo_real * mat
Definition: grid_matrix.h:55
Definition: grid_matrix.h:53
Generic matrix interface.
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&#39;> for a nonsymmetric matrix and given set of precomputed orb...
Definition: rho-mat.cc:264