Program Listing for File steepest.hpp#

↰ Return to documentation for file (source/pele/steepest.hpp)

#ifndef _PELE_STEEPEST_DESCENT_H__
#define _PELE_STEEPEST_DESCENT_H__


#include <memory>
#include <vector>

#include "array.hpp"
#include "base_potential.hpp"

// Eigen linear algebra library
#include <Eigen/Dense>

#include "eigen_interface.hpp"

// line search methods
#include "backtracking.hpp"
#include "bracketing.hpp"
#include "linesearch.hpp"
#include "more_thuente.hpp"
#include "nwpele.hpp"
#include "optimizer.hpp"

namespace pele {


class Steepest_Descent : public GradientOptimizer {
 private:
  double m_initial_step;  // initial step size for steepest descent
  std::shared_ptr<LineSearch> line_search_method;

 public:
  Steepest_Descent(std::shared_ptr<pele::BasePotential> potential,
                   const pele::Array<double> x0, double tol = 1e-4,
                   double initial_step = 1)
      : GradientOptimizer(potential, x0, tol),
        m_initial_step(initial_step)
            line_search_method(std::make_shared<BacktrackingLineSearch>){};
  virtual ~Steepest_Descent(){};
};

}  // namespace pele

#endif  // end _PELE_STEEPEST_DESCENT_H__