ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
ions_move_cg.h
Go to the documentation of this file.
1#ifndef IONS_MOVE_CG_H
2#define IONS_MOVE_CG_H
3
7{
8 public:
11
12 void allocate(void);
13 void start(UnitCell &ucell, const ModuleBase::matrix &force, const double &etot);
14
15 static double RELAX_CG_THR;
16 int sd_step=0;
17 int cg_step=0;
18
19 private:
20 double *pos0;
21 double *grad0;
22 double *cg_grad0;
23 double *move0;
24 double e0=0.0;
25 // setup gradients.
26 void setup_cg_grad(double *grad,
27 const double *grad0,
28 double *cg_grad,
29 const double *cg_grad0,
30 const int &ncggrad,
31 int &flag); // LiuXh fix bug of lpf, 20180515
32 void setup_move(double *move, double *cg_gradn, const double &trust_radius);
33 void Brent(double &fa, double &fb, double &fc, double &xa, double &xb, double &xc, double &best_x, double &xpt);
34 void f_cal(const double *g0, const double *g1, const int &dim, double &f_value);
35 void third_order(const double &e0,
36 const double &e1,
37 const double &fa,
38 const double &fb,
39 const double x,
40 double &best_x);
41};
42
43#endif
Definition ions_move_cg.h:7
void Brent(double &fa, double &fb, double &fc, double &xa, double &xb, double &xc, double &best_x, double &xpt)
Definition ions_move_cg.cpp:412
static double RELAX_CG_THR
Definition ions_move_cg.h:15
double * move0
Definition ions_move_cg.h:23
double * cg_grad0
Definition ions_move_cg.h:22
int sd_step
Definition ions_move_cg.h:16
Ions_Move_CG()
Definition ions_move_cg.cpp:26
void setup_move(double *move, double *cg_gradn, const double &trust_radius)
Definition ions_move_cg.cpp:502
void third_order(const double &e0, const double &e1, const double &fa, const double &fb, const double x, double &best_x)
Definition ions_move_cg.cpp:371
double * grad0
Definition ions_move_cg.h:21
void setup_cg_grad(double *grad, const double *grad0, double *cg_grad, const double *cg_grad0, const int &ncggrad, int &flag)
Definition ions_move_cg.cpp:311
void allocate(void)
Definition ions_move_cg.cpp:42
void f_cal(const double *g0, const double *g1, const int &dim, double &f_value)
Definition ions_move_cg.cpp:484
int cg_step
Definition ions_move_cg.h:17
double * pos0
Definition ions_move_cg.h:20
double e0
Definition ions_move_cg.h:24
~Ions_Move_CG()
Definition ions_move_cg.cpp:34
Definition matrix.h:19
Definition unitcell.h:16
iclock::time_point start
Definition test_partition.cpp:22