|
| SolverFIRE (SolverControl &solver_control, VectorMemory< VectorType > &vector_memory, const AdditionalData &data=AdditionalData()) |
|
| SolverFIRE (SolverControl &solver_control, const AdditionalData &data=AdditionalData()) |
|
template<typename PreconditionerType = DiagonalMatrix<VectorType>> |
void | solve (const std::function< double(VectorType &, const VectorType &)> &compute, VectorType &x, const PreconditionerType &inverse_mass_matrix) |
|
template<typename MatrixType , typename PreconditionerType > |
void | solve (const MatrixType &A, VectorType &x, const VectorType &b, const PreconditionerType &preconditioner) |
|
boost::signals2::connection | connect (const std::function< SolverControl::State(const unsigned int iteration, const double check_value, const VectorType ¤t_iterate)> &slot) |
|
template<typename VectorType = Vector<double>>
class SolverFIRE< VectorType >
FIRE (Fast Inertial Relaxation Engine) for minimization of (potentially non-linear) objective function \(E(\mathbf x)\), \(\mathbf x\) is a vector of \(n\) variables ( \(n\) is the number of variables of the objective function). Like all other solver classes, it can work on any kind of vector and matrix as long as they satisfy certain requirements (for the requirements on matrices and vectors in order to work with this class, see the documentation of the Solver base class). The type of the solution vector must be passed as template argument, and defaults to Vector<double>.
FIRE is a damped dynamics method described in Structural Relaxation Made Simple by Bitzek et al. 2006, typically used to find stable equilibrium configurations of atomistic systems in computational material science. Starting from a given initial configuration of the atomistic system, the algorithm relies on inertia to obtain (nearest) configuration with least potential energy.
Notation:
- The global vector of unknown variables: \(\mathbf x\).
- Objective function: \(E(\mathbf x)\).
- Rate of change of unknowns: \(\mathbf v\).
- Gradient of the objective function w.r.t unknowns: \(\mathbf g = \nabla E(\mathbf x)\).
- Mass matrix: \(\mathbf M\).
- Initial guess of unknowns: \(\mathbf x_0\).
- Time step: \(\Delta t\).
Given initial values for \(\Delta t\), \(\alpha = \alpha_0\), \(\epsilon\), \(\mathbf x = \mathbf x_0\) and \(\mathbf v= \mathbf 0\) along with a given mass matrix \(\mathbf M\), FIRE algorithm is as follows,
- Calculate \(\mathbf g = \nabla E(\mathbf x)\) and check for convergence ( \(\mathbf g \cdot \mathbf g < \epsilon^2 \)).
- Update \(\mathbf x\) and \(V\) using simple (forward) Euler integration step,
\(\mathbf x = \mathbf x + \Delta t \mathbf v\),
\(\mathbf v = \mathbf v + \Delta t \mathbf M^{-1} \cdot \mathbf g\).
- Calculate \(p = \mathbf g \cdot \mathbf v\).
- Set \(\mathbf v = (1-\alpha) \mathbf v
+ \alpha \frac{|\mathbf v|}{|\mathbf g|} \mathbf g\).
- If \(p<0\) and number of steps since \(p\) was last negative is larger than certain value, then increase time step \(\Delta t\) and decrease \(\alpha\).
- If \(p>0\), then decrease the time step, freeze the system i.e., \(\mathbf v = \mathbf 0\) and reset \(\alpha = \alpha_0\).
- Return to 1.
Also see Energy-Minimization in Atomic-to-Continuum Scale-Bridging Methods by Eidel et al. 2011.
Definition at line 89 of file solver_fire.h.
template<class VectorType = Vector<double>>
A signal that iterative solvers can execute at the end of every iteration (or in an otherwise periodic fashion) to find out whether we should continue iterating or not. The signal may call one or more slots that each will make this determination by themselves, and the result over all slots (function calls) will be determined by the StateCombiner object.
The arguments passed to the signal are (i) the number of the current iteration; (ii) the value that is used to determine convergence (oftentimes the residual, but in other cases other quantities may be used as long as they converge to zero as the iterate approaches the solution of the linear system); and (iii) a vector that corresponds to the current best guess for the solution at the point where the signal is called. Note that some solvers do not update the approximate solution in every iteration but only after convergence or failure has been determined (GMRES is an example); in such cases, the vector passed as the last argument to the signal is simply the best approximate at the time the signal is called, but not the vector that will be returned if the signal's return value indicates that the iteration should be terminated.
Definition at line 470 of file solver.h.