JDFTx  1.2.0
LatticeMinimizer Class Reference
Inheritance diagram for LatticeMinimizer:
Minimizable< matrix3<> >

Public Member Functions

 LatticeMinimizer (Everything &)
 
void step (const matrix3<> &dir, double alpha)
 Move the state in parameter space along direction dir with scale alpha.
 
double compute (matrix3<> *grad, matrix3<> *Kgrad)
 Returns the objective function at the current state and store the gradient in grad and preconditioned gradient in Kgrad, if non-null.
 
bool report (int iter)
 
void constrain (matrix3<> &)
 Constrain search directions to the space of free directions for minimize.
 
double safeStepSize (const matrix3<> &dir) const
 Override to return maximum safe step size along a given direction. Steps can be arbitrarily large by default.
 
double sync (double x) const
 All processes minimize together; make sure scalars are in sync to round-off error.
 
std::vector< double > calculateStress ()
 Calculates the stresses along the strain directions.
 
void restore ()
 Restores the lattice to the original state (i.e. strain=0)
 
- Public Member Functions inherited from Minimizable< matrix3<> >
double minimize (const MinimizeParams &params)
 Minimize this objective function with algorithm controlled by params and return the minimized value.
 
void fdTest (const MinimizeParams &params)
 

Public Attributes

std::vector< matrix3<> > strainBasis
 

Friends

class IonDynamics
 

Member Function Documentation

bool LatticeMinimizer::report ( int  iter)
virtual

Override for optional processing/reporting after each/every few iterations It should return whether the state was modified

Reimplemented from Minimizable< matrix3<> >.

Member Data Documentation

std::vector<matrix3<> > LatticeMinimizer::strainBasis

Set of independent directions in the space of all allowed strains. Their span is consistent with symmetries and truncation (if any).


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