#include <Minimize.h>
Public Member Functions | |
| virtual void | step (const Vector &dir, double alpha)=0 |
| Move the state in parameter space along direction dir with scale alpha. | |
| virtual double | compute (Vector *grad)=0 |
| Returns the objective function at the current state and store the gradient in grad, if non-null. | |
| virtual Vector | precondition (const Vector &grad) |
| virtual bool | report (int iter) |
| virtual void | constrain (Vector &) |
| virtual double | sync (double x) const |
| Override to synchronize scalars over MPI processes (if the same minimization is happening in sync over many processes) | |
| double | minimize (const MinimizeParams ¶ms) |
| Minimize this objective function with algorithm controlled by params and return the minimized value. | |
| void | fdTest (const MinimizeParams ¶ms) |
Interface (abstract base class) for the minimization algorithm template
| Vector | A data type that represents a direction in the tangent space of the parameter manifold, which must have the following functions/operators defined:
|
|
inlinevirtual |
Constrain an arbitrary vector to the space of free directions for minimize. Used only to generate a random direction for fdTest within the valid minimization subspace.
Reimplemented in IonicMinimizer, WannierMinimizer, ElecMinimizer, LatticeMinimizer, BandMinimizer, and InverseKohnSham.
| void Minimizable< Vector >::fdTest | ( | const MinimizeParams & | params | ) |
Checks the consistency of the value and gradient returned by compute. params is used primarily to control output
|
inlinevirtual |
Override to enable preconditioning: return the preconditioned gradient, given the gradient The last call to compute() is guaranteed to be at the same position, so a cached result may be returned
Reimplemented in InvertKS, FluidMixture, WannierMinimizer, IonicMinimizer, ElecMinimizer, NonlinearPCM, LatticeMinimizer, InverseKohnSham, BandMinimizer, and WannierMinimizerFD.
|
inlinevirtual |
Override for optional processing/reporting after each/every few iterations It should return whether the state was modified
Reimplemented in WannierMinimizer, IonicMinimizer, ElecMinimizer, LatticeMinimizer, InverseKohnSham, and BandMinimizer.