Kindfield
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Friends
Pages
src
solvers
hartreesolver.h
Go to the documentation of this file.
1
#ifndef HARTREESOLVER_H
2
#define HARTREESOLVER_H
3
4
#include <armadillo>
5
6
using namespace
arma;
7
8
// Forward declarations
9
class
ElectronSystem
;
10
11
class
HartreeSolver
12
{
13
public
:
14
explicit
HartreeSolver
(
ElectronSystem
*basisFunction);
15
16
virtual
~
HartreeSolver
();
17
18
double
alpha[4];
19
20
void
reset();
21
void
advance();
22
23
inline
void
setBasisFunction(
ElectronSystem
*basisFunction);
24
25
inline
double
energy
();
26
private
:
27
mat h;
28
mat S;
29
mat F;
30
vec C;
31
32
double
****Q;
33
34
ElectronSystem
*m_basisFunction;
35
36
void
resetC();
37
void
setupF();
38
void
setupQ();
39
void
setupS();
40
void
setuph();
41
void
setupAlpha();
42
void
normalizeCwithRegardsToS();
43
44
void
cleanUpQMemory();
45
void
allocateQMemory();
46
47
double
*QData;
48
49
bool
isQAllocated =
false
;
50
51
double
m_energy = 0;
52
};
53
54
inline
void
HartreeSolver::setBasisFunction
(
ElectronSystem
*basisFunction) {
55
m_basisFunction = basisFunction;
56
}
57
58
inline
double
HartreeSolver::energy
()
59
{
60
return
m_energy;
61
}
62
63
#endif // HARTREESOLVER_H
Generated on Sun Jun 22 2014 14:02:46 for Kindfield by
1.8.4