ABACUS develop
Atomic-orbital Based Ab-initio Computation at UStc
Loading...
Searching...
No Matches
Ions_Move_CG Class Reference

#include <ions_move_cg.h>

Inheritance diagram for Ions_Move_CG:
Collaboration diagram for Ions_Move_CG:

Public Member Functions

 Ions_Move_CG ()
 ~Ions_Move_CG ()=default
void allocate (const int dim)
bool start (UnitCell &ucell, const ModuleBase::matrix &force, const double &etot, const int istep, int &update_iter, std::ofstream &ofs, std::vector< double > &etot_info, std::string &relax_method, const Relax_Criteria &criteria)
Public Member Functions inherited from CG_Base
void setup_cg_grad (const int dim, double *grad, const double *grad0, double *cg_grad, const double *cg_grad0, const int &ncggrad, int &flag)
 Setup conjugate gradient direction.
void Brent (double &fa, double &fb, double &fc, double &xa, double &xb, double &xc, double &best_x, double &xpt)
 Brent's method for one-dimensional minimization.
void third_order (const double &e0, const double &e1, const double &fa, const double &fb, const double x, double &best_x)
 Third-order polynomial interpolation for line search.
void f_cal (const int dim, const double *g0, const double *g1, double &f_value)
 Calculate projection of gradient onto search direction.
void setup_move (const int dim, double *move, double *cg_gradn, const double &trust_radius)
 Calculate movement vector from CG direction.

Static Public Attributes

static double RELAX_CG_THR = -1.0

Private Attributes

std::vector< double > pos0
std::vector< double > grad0
std::vector< double > cg_grad0
std::vector< double > move0
double e0 = 0.0
bool sd = false
bool trial = false
int ncggrad = 0
int nbrent = 0
double fa = 0.0
double fb = 0.0
double fc = 0.0
double xa = 0.0
double xb = 0.0
double xc = 0.0
double xpt = 0.0
double steplength = 0.0
double fmax = 0.0

Friends

class IonsMoveCGTest

Additional Inherited Members

Protected Member Functions inherited from CG_Base
void normalize (const int dim, double *cg_gradn, const double *cg_grad)
 Normalize vector.

Constructor & Destructor Documentation

◆ Ions_Move_CG()

Ions_Move_CG::Ions_Move_CG ( )

◆ ~Ions_Move_CG()

Ions_Move_CG::~Ions_Move_CG ( )
default

Member Function Documentation

◆ allocate()

void Ions_Move_CG::allocate ( const int dim)
Here is the call graph for this function:

◆ start()

bool Ions_Move_CG::start ( UnitCell & ucell,
const ModuleBase::matrix & force,
const double & etot,
const int istep,
int & update_iter,
std::ofstream & ofs,
std::vector< double > & etot_info,
std::string & relax_method,
const Relax_Criteria & criteria )
Here is the call graph for this function:

◆ IonsMoveCGTest

friend class IonsMoveCGTest
friend

Member Data Documentation

◆ cg_grad0

std::vector<double> Ions_Move_CG::cg_grad0
private

◆ e0

double Ions_Move_CG::e0 = 0.0
private

◆ fa

double Ions_Move_CG::fa = 0.0
private

◆ fb

double Ions_Move_CG::fb = 0.0
private

◆ fc

double Ions_Move_CG::fc = 0.0
private

◆ fmax

double Ions_Move_CG::fmax = 0.0
private

◆ grad0

std::vector<double> Ions_Move_CG::grad0
private

◆ move0

std::vector<double> Ions_Move_CG::move0
private

◆ nbrent

int Ions_Move_CG::nbrent = 0
private

◆ ncggrad

int Ions_Move_CG::ncggrad = 0
private

◆ pos0

std::vector<double> Ions_Move_CG::pos0
private

◆ RELAX_CG_THR

double Ions_Move_CG::RELAX_CG_THR = -1.0
static

◆ sd

bool Ions_Move_CG::sd = false
private

◆ steplength

double Ions_Move_CG::steplength = 0.0
private

◆ trial

bool Ions_Move_CG::trial = false
private

◆ xa

double Ions_Move_CG::xa = 0.0
private

◆ xb

double Ions_Move_CG::xb = 0.0
private

◆ xc

double Ions_Move_CG::xc = 0.0
private

◆ xpt

double Ions_Move_CG::xpt = 0.0
private

The documentation for this class was generated from the following files: