FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
abacus-develop/source/source_esolver/esolver.h at develop · pplab/abacus-develop · GitHub
pplab
/
abacus-develop
Public
forked from
deepmodeling/abacus-develop
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
abacus-develop
/
source
/
source_esolver
/
esolver.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
73 lines (56 loc) · 2.08 KB
Breadcrumbs
abacus-develop
/
source
/
source_esolver
/
esolver.h
Copy path
File metadata and controls
73 lines (56 loc) · 2.08 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#
ifndef
ESOLVER_H
#
define
ESOLVER_H
#
include
"
source_base/matrix.h
"
#
include
"
source_cell/unitcell.h
"
#
include
"
source_io/module_parameter/parameter.h
"
namespace
ModuleESolver
{
class
ESolver
{
public:
ESolver
()
{
classname =
"
ESolver
"
;
}
virtual
~ESolver
()
{
}
//
! initialize the energy solver by using input parameters and cell modules
virtual
void
before_all_runners
(UnitCell& ucell,
const
Input_para& inp) = 0;
//
! run energy solver
virtual
void
runner
(UnitCell& cell,
const
int
istep) = 0;
//
! perform post processing calculations
virtual
void
after_all_runners
(UnitCell& ucell) = 0;
//
! deal with exx and other calculation than scf/md/relax/cell-relax:
//
! such as nscf, get_wf and get_pchg
virtual
void
others
(UnitCell& ucell,
const
int
istep) {};
//
! calculate total energy of a given system
virtual
double
cal_energy
() = 0;
//
! calcualte forces for the atoms in the given cell
virtual
void
cal_force
(UnitCell& ucell, ModuleBase::matrix& force) = 0;
//
! calcualte stress of given cell
virtual
void
cal_stress
(UnitCell& ucell, ModuleBase::matrix& stress) = 0;
bool
conv_esolver =
true
;
//
whether esolver is converged
std::string classname;
};
/*
*
* @brief A subrutine called in init_esolver()
* This function returns type of ESolver
* Based on PARAM.inp.basis_type and PARAM.inp.esolver_type
*
* @return [out] std::string The type of ESolver
*/
std::string
determine_type
();
/*
*
* @brief Determine and initialize an ESolver based on input information.
*
* This function determines the type of ESolver to create based on input information and initializes
* the corresponding ESolver child class. It supports various ESolver types including ksdft_pw,
* ksdft_lcao, ksdft_lcao_tddft, sdft_pw, ofdft, lj_pot, and dp_pot.
*
* @return [out] A pointer to an ESolver object that will be initialized.
*/
ESolver*
init_esolver
(
const
Input_para& inp, UnitCell& ucell);
void
clean_esolver
(ESolver*& pesolver,
const
bool
lcao_cblacs_exit =
false
);
}
//
namespace ModuleESolver
#
endif
Back
|
FazBrowse Home
|
New Git URL