Loading...
Searching...
No Matches
eonc::LBFGS Class Referencefinal

#include <LBFGS.h>

Inheritance diagram for eonc::LBFGS:

Public Member Functions

 LBFGS (std::shared_ptr< ObjectiveFunction > a_objf, const Parameters &a_params)
 ~LBFGS ()=default
int step (double a_maxMove) override
int run (size_t a_maxIterations, double a_maxMove) override
int update (const Eigen::VectorXd &a_r1, const Eigen::VectorXd &a_r0, const Eigen::VectorXd &a_f1, const Eigen::VectorXd &a_f0, double a_e1, double a_e0)
void reset ()
Public Member Functions inherited from eonc::Optimizer
 Optimizer (std::shared_ptr< ObjectiveFunction > a_objf, const OptimizerConfig &a_config)
 Optimizer (std::shared_ptr< ObjectiveFunction > a_objf, OptType a_optype, const OptimizerConfig &a_config)
 Optimizer (std::shared_ptr< ObjectiveFunction > a_objf, const Parameters &a_params)
 Optimizer (std::shared_ptr< ObjectiveFunction > a_objf, OptType a_optype, const Parameters &a_params)
virtual ~Optimizer ()=default

Private Member Functions

Eigen::VectorXd getStep (double a_maxMove, const Eigen::VectorXd &a_f)
Eigen::Vector3d micRij (const Eigen::VectorXd &pos, int i, int j) const
bool usesPrecon () const
Eigen::MatrixXd buildPrecon (const Eigen::VectorXd &pos) const
Eigen::VectorXd applyH0 (const Eigen::VectorXd &q, double H0, const Eigen::VectorXd &pos) const
Eigen::VectorXd hessianStep (double a_maxMove, const Eigen::VectorXd &a_f)

Private Attributes

int m_iteration {0}
int m_memory {0}
std::deque< Eigen::VectorXd > m_s
std::deque< Eigen::VectorXd > m_y
std::deque< double > m_rho
std::deque< double > m_eHist
Eigen::VectorXd m_rPrev
Eigen::VectorXd m_fPrev
double m_ePrev {0.0}
eonc::log::FileScoped m_log {"lbfgs", "_lbfgs.log"}

Additional Inherited Members

Protected Attributes inherited from eonc::Optimizer
const OptimizerConfig m_optConfig
std::shared_ptr< ObjectiveFunction > m_objf

Detailed Description

Definition at line 25 of file LBFGS.h.

Constructor & Destructor Documentation

◆ LBFGS()

eonc::LBFGS::LBFGS ( std::shared_ptr< ObjectiveFunction > a_objf,
const Parameters & a_params )
inline

Definition at line 28 of file LBFGS.h.

29 : Optimizer(a_objf, OptType::LBFGS,
31 m_memory{std::min(
32 a_objf->degreesOfFreedom(),
33 static_cast<int>(a_params.optimizer_options().lbfgs.memory))},
34 m_rPrev{Eigen::VectorXd::Zero(a_objf->degreesOfFreedom())},
35 m_fPrev{Eigen::VectorXd::Zero(a_objf->degreesOfFreedom())} {}
Eigen::VectorXd m_fPrev
Definition LBFGS.h:69
Eigen::VectorXd m_rPrev
Definition LBFGS.h:68
int m_memory
Definition LBFGS.h:61
Optimizer(std::shared_ptr< ObjectiveFunction > a_objf, const OptimizerConfig &a_config)
Definition Optimizer.h:73
static OptimizerConfig fromParams(const Parameters &p)
Definition Optimizer.h:57

◆ ~LBFGS()

eonc::LBFGS::~LBFGS ( )
default

Member Function Documentation

◆ applyH0()

Eigen::VectorXd eonc::LBFGS::applyH0 ( const Eigen::VectorXd & q,
double H0,
const Eigen::VectorXd & pos ) const
nodiscardprivate

Definition at line 74 of file LBFGS.cpp.

75 {
76 const auto &cfg = m_optConfig.opts.lbfgs;
77 if (usesPrecon() && pos.size() >= 6 && pos.size() % 3 == 0) {
78 const Eigen::MatrixXd P = buildPrecon(pos);
79 // PartialPivLU, not LDLT: manylinux Eigen + C++20 rewrites
80 // Array==Scalar in LDLT::unblocked as a non-bool comparison.
81 Eigen::PartialPivLU<Eigen::MatrixXd> lu(P);
82 const Eigen::VectorXd z = lu.solve(q);
83 if (z.allFinite()) {
84 return z;
85 }
86 QUILL_LOG_DEBUG(m_log, "[LBFGS] Packwood P failed to factor, using H0 I");
87 }
88 return H0 * q;
89}
bool usesPrecon() const
Definition LBFGS.cpp:61
eonc::log::FileScoped m_log
Definition LBFGS.h:71
Eigen::MatrixXd buildPrecon(const Eigen::VectorXd &pos) const
Definition LBFGS.cpp:68
const OptimizerConfig m_optConfig
Definition Optimizer.h:69

◆ buildPrecon()

Eigen::MatrixXd eonc::LBFGS::buildPrecon ( const Eigen::VectorXd & pos) const
nodiscardprivate

Definition at line 68 of file LBFGS.cpp.

68 {
69 const auto &cfg = m_optConfig.opts.lbfgs;
70 return pairhess::build(pos, cfg.precon, m_optConfig.potential, cfg.precon_A,
71 cfg.precon_mu, cfg.precon_rcut, *m_objf);
72}
std::shared_ptr< ObjectiveFunction > m_objf
Definition Optimizer.h:70
Eigen::MatrixXd build(const Eigen::VectorXd &pos, const std::string &kind, PotType pot, double A, double mu, double rcut_in, ObjectiveFunction &objf)
Analytic pair or model Hessian.

◆ getStep()

Eigen::VectorXd eonc::LBFGS::getStep ( double a_maxMove,
const Eigen::VectorXd & a_f )
nodiscardprivate

Definition at line 137 of file LBFGS.cpp.

137 {
138 const std::string &step = m_optConfig.opts.lbfgs.step;
139 if (step == "newton" || step == "rfo") {
140 return hessianStep(a_maxMove, a_f);
141 }
142 double H0 = m_optConfig.opts.lbfgs.inverse_curvature;
143 Eigen::VectorXd r = m_objf->getPositions();
144 Eigen::VectorXd f = a_f;
145 maybeProjectRigid(f, r, m_optConfig.opts.lbfgs.project_rigid);
146
147 if (m_iteration > 0) {
148 Eigen::VectorXd dr = m_objf->difference(r, m_rPrev);
149 const Eigen::VectorXd y = m_fPrev - f;
150 const double sy = dr.dot(y);
151 const double yy = y.squaredNorm();
152 const double ss = dr.squaredNorm();
153 const double C = eonc::safemath::safe_div(yy, sy, -1.0);
154 if (C < 0) {
155 QUILL_LOG_DEBUG(
156 m_log, "[LBFGS] Negative curvature: {:.4f} eV/A^2 take max move step",
157 C);
158 if (m_optConfig.opts.lbfgs.curvature == "reset") {
159 reset();
160 }
161 return eonc::geometry::maxAtomMotionAppliedV(1000 * f, a_maxMove);
162 }
163
164 if (m_optConfig.opts.lbfgs.auto_scale && sy > 0.0 && yy > 0.0) {
165 const double g_syyy = sy / yy;
166 const double g_sssy = ss / sy;
167 const std::string &h0 = m_optConfig.opts.lbfgs.h0;
168 if (h0 == "ss_sy") {
169 H0 = g_sssy;
170 } else if (h0 == "adaptive") {
171 H0 = std::min(g_syyy, g_sssy);
172 } else {
173 H0 = g_syyy;
174 }
175 if (m_optConfig.opts.lbfgs.max_inverse_curvature > 0.0) {
176 H0 = std::min(H0, m_optConfig.opts.lbfgs.max_inverse_curvature);
177 }
178 QUILL_LOG_DEBUG(m_log, "[LBFGS] H0={:.4e} ({} scale)", H0, h0);
179 }
180 }
181
182 const std::optional<double> known =
183 m_iteration == 0 && m_optConfig.opts.lbfgs.auto_scale
184 ? m_objf->knownCurvature()
185 : std::nullopt;
186 if (known && std::isfinite(*known) && *known > 0.0) {
187 H0 = 1.0 / *known;
188 if (m_optConfig.opts.lbfgs.max_inverse_curvature > 0.0) {
189 H0 = std::min(H0, m_optConfig.opts.lbfgs.max_inverse_curvature);
190 }
191 QUILL_LOG_DEBUG(m_log, "[LBFGS] H0={:.4e} (known curvature)", H0);
192 } else if (m_iteration == 0 && m_optConfig.opts.lbfgs.auto_scale &&
193 m_objf->supportsFiniteDifferenceCurvature()) {
194 m_objf->setPositions(r + m_optConfig.finiteDifference *
195 eonc::safemath::safe_normalized(a_f));
196 Eigen::VectorXd dg = m_objf->getGradient(true) + a_f;
197 const double C = dg.dot(eonc::safemath::safe_normalized(a_f)) /
198 m_optConfig.finiteDifference;
199 H0 = eonc::safemath::safe_recip(C, -1.0);
200 m_objf->setPositions(r);
201 if (H0 < 0) {
202 QUILL_LOG_WARNING(m_log,
203 "[LBFGS] Negative curvature calculated via FD: {:.4e} "
204 "eV/A^2, take max move step",
205 C);
206 reset();
207 return eonc::geometry::maxAtomMotionAppliedV(1000 * a_f, a_maxMove);
208 }
209 QUILL_LOG_DEBUG(m_log, "[LBFGS] Curvature calculated via FD: {:.4e} eV/A^2",
210 C);
211 }
212
213 const auto idx =
214 twoLoopIndex(static_cast<int>(m_s.size()),
215 static_cast<int>(m_optConfig.opts.lbfgs.extra_updates));
216 const int loopmax = static_cast<int>(idx.size());
217 std::vector<double> a(static_cast<size_t>(loopmax));
218
219 Eigen::VectorXd q = -f;
220
221 for (int k = loopmax - 1; k >= 0; k--) {
222 const int i = idx[static_cast<size_t>(k)];
223 a[static_cast<size_t>(k)] =
224 m_rho[static_cast<size_t>(i)] * m_s[static_cast<size_t>(i)].dot(q);
225 q -= a[static_cast<size_t>(k)] * m_y[static_cast<size_t>(i)];
226 }
227
228 Eigen::VectorXd z = applyH0(q, H0, r);
229
230 for (int k = 0; k < loopmax; k++) {
231 const int i = idx[static_cast<size_t>(k)];
232 const double b =
233 m_rho[static_cast<size_t>(i)] * m_y[static_cast<size_t>(i)].dot(z);
234 z += m_s[static_cast<size_t>(i)] * (a[static_cast<size_t>(k)] - b);
235 }
236
237 Eigen::VectorXd d = -z;
238
239 double distance = eonc::geometry::maxAtomMotionV(d);
240 if (distance >= a_maxMove && m_optConfig.opts.lbfgs.distance_reset) {
241 QUILL_LOG_DEBUG(m_log,
242 "[LBFGS] reset memory, proposed step too large: {:.4f}",
243 distance);
244 reset();
245 return eonc::geometry::maxAtomMotionAppliedV(H0 * f, a_maxMove);
246 }
247
248 double vd = eonc::safemath::safe_normalized(d).dot(
249 eonc::safemath::safe_normalized(f));
250 if (vd > 1.0)
251 vd = 1.0;
252 if (vd < -1.0)
253 vd = -1.0;
254 double angle = eonc::safemath::safe_acos(vd) * (180.0 / eonc::helpers::pi);
255 if (angle > 90.0 && m_optConfig.opts.lbfgs.angle_reset) {
256 QUILL_LOG_DEBUG(m_log,
257 "[LBFGS] reset memory, angle between LBFGS angle and "
258 "force too large: {:.4f}",
259 angle);
260 reset();
261 return eonc::geometry::maxAtomMotionAppliedV(H0 * f, a_maxMove);
262 }
263
264 maybeProjectRigid(d, r, m_optConfig.opts.lbfgs.project_rigid);
265 return eonc::geometry::maxAtomMotionAppliedV(d, a_maxMove);
266}
std::deque< double > m_rho
Definition LBFGS.h:65
int m_iteration
Definition LBFGS.h:60
std::deque< Eigen::VectorXd > m_y
Definition LBFGS.h:64
std::deque< Eigen::VectorXd > m_s
Definition LBFGS.h:63
int step(double a_maxMove) override
Definition LBFGS.cpp:367
Eigen::VectorXd hessianStep(double a_maxMove, const Eigen::VectorXd &a_f)
Definition LBFGS.cpp:91
void reset()
Definition LBFGS.cpp:268
Eigen::VectorXd applyH0(const Eigen::VectorXd &q, double H0, const Eigen::VectorXd &pos) const
Definition LBFGS.cpp:74
VectorXd maxAtomMotionAppliedV(const VectorXd v1, double maxMotion)
double maxAtomMotionV(const VectorXd v1)
constexpr double pi
constexpr double safe_div(double num, double denom, double fallback=0.0)
Definition SafeMath.h:21
double safe_acos(double x)
Definition SafeMath.h:34
constexpr double safe_recip(double x, double fallback=0.0)
Definition SafeMath.h:29

◆ hessianStep()

Eigen::VectorXd eonc::LBFGS::hessianStep ( double a_maxMove,
const Eigen::VectorXd & a_f )
nodiscardprivate

Definition at line 91 of file LBFGS.cpp.

92 {
93 Eigen::VectorXd r = m_objf->getPositions();
94 Eigen::VectorXd f = a_f;
95 if (!usesPrecon()) {
97 m_optConfig.opts.lbfgs.inverse_curvature * f, a_maxMove);
98 }
99 maybeProjectRigid(f, r, m_optConfig.opts.lbfgs.project_rigid);
100 const Eigen::VectorXd g = -f;
101 Eigen::MatrixXd H = buildPrecon(r);
102 Eigen::VectorXd d;
103 if (m_optConfig.opts.lbfgs.step == "rfo") {
104 // Banerjee, Adams, Simons, Shepard, J. Phys. Chem. 1985.
105 // Baker, J. Comput. Chem. 1986. Lowest mode of the augmented Hessian.
106 const int n = static_cast<int>(H.rows());
107 Eigen::MatrixXd A = Eigen::MatrixXd::Zero(n + 1, n + 1);
108 A.topLeftCorner(n, n) = H;
109 A.col(n).head(n) = g;
110 A.row(n).head(n) = g.transpose();
111 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> es(A);
112 if (es.info() != Eigen::Success) {
113 return eonc::geometry::maxAtomMotionAppliedV(f, a_maxMove);
114 }
115 const Eigen::VectorXd v = es.eigenvectors().col(0);
116 if (std::abs(v(n)) < 1.0e-14) {
117 return eonc::geometry::maxAtomMotionAppliedV(f, a_maxMove);
118 }
119 d = v.head(n) / v(n);
120 } else {
121 // Regularized Newton: H + mu I with mu = max(0, eps - lambda_min).
122 Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> es(H);
123 if (es.info() != Eigen::Success) {
124 return eonc::geometry::maxAtomMotionAppliedV(f, a_maxMove);
125 }
126 Eigen::VectorXd ev = es.eigenvalues();
127 const double lmin = ev.minCoeff();
128 const double mu = (lmin < 1.0e-8) ? (1.0e-8 - lmin) : 0.0;
129 ev.array() += mu;
130 d = -es.eigenvectors() *
131 (es.eigenvectors().transpose() * g).cwiseQuotient(ev);
132 }
133 maybeProjectRigid(d, r, m_optConfig.opts.lbfgs.project_rigid);
134 return eonc::geometry::maxAtomMotionAppliedV(d, a_maxMove);
135}

◆ micRij()

Eigen::Vector3d eonc::LBFGS::micRij ( const Eigen::VectorXd & pos,
int i,
int j ) const
nodiscardprivate

Definition at line 55 of file LBFGS.cpp.

55 {
56 Eigen::Vector3d dr = pos.segment<3>(3 * i) - pos.segment<3>(3 * j);
57 m_objf->minimumImage(dr);
58 return dr;
59}

◆ reset()

void eonc::LBFGS::reset ( )

Definition at line 268 of file LBFGS.cpp.

268 {
269 m_s.clear();
270 m_y.clear();
271 m_rho.clear();
272 m_eHist.clear();
273}
std::deque< double > m_eHist
Definition LBFGS.h:66

◆ run()

int eonc::LBFGS::run ( size_t a_maxIterations,
double a_maxMove )
nodiscardoverridevirtual

Implements eonc::Optimizer.

Definition at line 425 of file LBFGS.cpp.

425 {
426 int status;
427 while (!m_objf->isConverged() && m_iteration < a_maxSteps) {
428 status = step(a_maxMove);
429 if (status < 0)
430 return -1;
431 }
432 return m_objf->isConverged() ? 1 : 0;
433}

◆ step()

int eonc::LBFGS::step ( double a_maxMove)
nodiscardoverridevirtual

Implements eonc::Optimizer.

Definition at line 367 of file LBFGS.cpp.

367 {
368 int status = 0;
369 Eigen::VectorXd r = m_objf->getPositions();
370 Eigen::VectorXd f = -m_objf->getGradient();
371 const std::string &accept = m_optConfig.opts.lbfgs.accept;
372 const bool energyAccept = accept == "energy" || accept == "nonmonotone";
373 const bool needE = energyAccept || m_optConfig.opts.lbfgs.secant == "zhangxu";
374 const double e0 = needE ? m_objf->getEnergy() : 0.0;
375
376 if (m_iteration > 0) {
377 status = update(r, m_rPrev, f, m_fPrev, e0, m_ePrev);
378 }
379 if (status < 0)
380 return -1;
381
382 Eigen::VectorXd dr = getStep(a_maxMove, f);
383 if (energyAccept) {
384 constexpr double max_erise = 1.0e-8;
385 double ref = e0;
386 if (accept == "nonmonotone" && !m_eHist.empty()) {
387 ref = *std::max_element(m_eHist.begin(), m_eHist.end());
388 }
389 double alpha = 1.0;
390 bool accepted = false;
391 double e_acc = e0;
392 for (int dec = 0; dec < 10; ++dec) {
393 m_objf->setPositions(r + alpha * dr);
394 e_acc = m_objf->getEnergy();
395 if (e_acc - ref <= max_erise) {
396 accepted = true;
397 break;
398 }
399 alpha *= 0.5;
400 }
401 if (!accepted) {
402 m_objf->setPositions(r);
403 reset();
404 m_objf->setPositions(
405 r + eonc::geometry::maxAtomMotionAppliedV(0.1 * f, a_maxMove));
406 e_acc = m_objf->getEnergy();
407 }
408 m_eHist.push_back(e_acc);
409 if (m_eHist.size() > 5) {
410 m_eHist.pop_front();
411 }
412 } else {
413 m_objf->setPositions(r + dr);
414 }
415
416 m_rPrev = r;
417 m_fPrev = f;
418 m_ePrev = e0;
419
420 m_iteration++;
421
422 return m_objf->isConverged() ? 1 : 0;
423}
int update(const Eigen::VectorXd &a_r1, const Eigen::VectorXd &a_r0, const Eigen::VectorXd &a_f1, const Eigen::VectorXd &a_f0, double a_e1, double a_e0)
Definition LBFGS.cpp:275
double m_ePrev
Definition LBFGS.h:70
Eigen::VectorXd getStep(double a_maxMove, const Eigen::VectorXd &a_f)
Definition LBFGS.cpp:137

◆ update()

int eonc::LBFGS::update ( const Eigen::VectorXd & a_r1,
const Eigen::VectorXd & a_r0,
const Eigen::VectorXd & a_f1,
const Eigen::VectorXd & a_f0,
double a_e1,
double a_e0 )
nodiscard

Definition at line 275 of file LBFGS.cpp.

277 {
278 Eigen::VectorXd s0 = m_objf->difference(a_r1, a_r0);
279
280 // y0 is the change in the gradient, not the force
281 Eigen::VectorXd y0 = a_f0 - a_f1;
282 double sy = s0.dot(y0);
283 const auto &cfg = m_optConfig.opts.lbfgs;
284 const std::string &curv = cfg.curvature;
285 const double H0 = std::max(cfg.inverse_curvature, 1.0e-16);
286 const double ss = s0.squaredNorm();
287
288 if (cfg.secant == "zhangxu" && ss > kLbfgsEps) {
289 // Zhang, Deng, Chen, JOTA 102, 147 (1999); Zhang and Xu, JOTA 2001.
290 // t = 6(f_k - f_{k+1}) + 3(g_k + g_{k+1})·s, ŷ = y + (t - y·s)/||s||^2 s.
291 // Forces f = -g, so (g_k + g_{k+1})·s = -(f0 + f1)·s.
292 const double t = 6.0 * (a_e0 - a_e1) - 3.0 * (a_f0 + a_f1).dot(s0);
293 const double theta = t - sy;
294 y0 += (theta / ss) * s0;
295 sy = s0.dot(y0);
296 QUILL_LOG_DEBUG(m_log, "[LBFGS] Zhang-Xu θ={:.4e} s·ŷ={:.4e}", theta, sy);
297 }
298
299 double sBs = ss / H0;
300 if (usesPrecon() && a_r1.size() >= 6 && a_r1.size() % 3 == 0) {
301 const Eigen::MatrixXd P = buildPrecon(a_r1);
302 sBs = s0.dot(P * s0);
303 }
304
305 const double gnorm = a_f1.norm();
306 const double sn = std::sqrt(ss);
307 const double yn = y0.norm();
308
309 if (curv == "cautious") {
310 // Li and Fukushima, J. Comput. Appl. Math. 129, 15 (2001).
311 const double thresh =
312 cfg.cautious_eps * ss *
313 std::pow(std::max(gnorm, 1.0e-30), cfg.cautious_alpha);
314 if (sy < thresh) {
315 QUILL_LOG_DEBUG(m_log, "[LBFGS] Li-Fukushima skip, s·y={:.4e} < {:.4e}",
316 sy, thresh);
317 return 0;
318 }
319 } else if (std::abs(sy) < kLbfgsEps || (curv != "reset" && sy < 0.2 * sBs)) {
320 if (curv == "skip") {
321 QUILL_LOG_DEBUG(m_log, "[LBFGS] skip pair, s·y={:.4e}", sy);
322 return 0;
323 }
324 if (curv == "damped" && sBs > sy) {
325 const double theta = std::clamp(0.8 * sBs / (sBs - sy), 0.0, 1.0);
326 const Eigen::VectorXd B0s =
327 (usesPrecon() && a_r1.size() >= 6 && a_r1.size() % 3 == 0)
328 ? Eigen::VectorXd(buildPrecon(a_r1) * s0)
329 : Eigen::VectorXd(s0 / H0);
330 y0 = theta * y0 + (1.0 - theta) * B0s;
331 sy = s0.dot(y0);
332 QUILL_LOG_DEBUG(m_log, "[LBFGS] Powell damp θ={:.3f} s·ŷ={:.4e}", theta,
333 sy);
334 } else if (std::abs(sy) < kLbfgsEps) {
335 QUILL_LOG_WARNING(m_log,
336 "[LBFGS] s0.y0 too small ({:.4e}), resetting memory",
337 s0.dot(y0));
338 reset();
339 return 0;
340 }
341 }
342
343 if (!std::isfinite(sy)) {
344 QUILL_LOG_WARNING(m_log, "[LBFGS] non-finite s·y, resetting memory");
345 reset();
346 return 0;
347 }
348 // Relative overlap skip belongs to skip/damped/cautious. reset
349 // keeps the ASE rule: only |s·y| < kLbfgsEps drops the pair.
350 if (curv != "reset" && sy <= 1.0e-8 * sn * yn) {
351 QUILL_LOG_DEBUG(m_log, "[LBFGS] overlap skip, s·y={:.4e}", sy);
352 return 0;
353 }
354
355 m_rho.push_back(eonc::safemath::safe_recip(sy, 0.0));
356 m_s.push_back(std::move(s0));
357 m_y.push_back(std::move(y0));
358
359 if (static_cast<int>(m_s.size()) > m_memory) {
360 m_s.pop_front();
361 m_y.pop_front();
362 m_rho.pop_front();
363 }
364 return 0;
365}

◆ usesPrecon()

bool eonc::LBFGS::usesPrecon ( ) const
nodiscardprivate

Definition at line 61 of file LBFGS.cpp.

61 {
62 const std::string &p = m_optConfig.opts.lbfgs.precon;
63 return p == "exp" || p == "c1" || p == "lindh" || p == "lindh_full" ||
64 p == "pair" || p == "pair_abs" || p == "pair_full" || p == "fischer" ||
65 p == "schlegel" || p == "swart";
66}

Member Data Documentation

◆ m_eHist

std::deque<double> eonc::LBFGS::m_eHist
private

Definition at line 66 of file LBFGS.h.

◆ m_ePrev

double eonc::LBFGS::m_ePrev {0.0}
private

Definition at line 70 of file LBFGS.h.

70{0.0};

◆ m_fPrev

Eigen::VectorXd eonc::LBFGS::m_fPrev
private

Definition at line 69 of file LBFGS.h.

◆ m_iteration

int eonc::LBFGS::m_iteration {0}
private

Definition at line 60 of file LBFGS.h.

60{0};

◆ m_log

eonc::log::FileScoped eonc::LBFGS::m_log {"lbfgs", "_lbfgs.log"}
private

Definition at line 71 of file LBFGS.h.

71{"lbfgs", "_lbfgs.log"};

◆ m_memory

int eonc::LBFGS::m_memory {0}
private

Definition at line 61 of file LBFGS.h.

61{0};

◆ m_rho

std::deque<double> eonc::LBFGS::m_rho
private

Definition at line 65 of file LBFGS.h.

◆ m_rPrev

Eigen::VectorXd eonc::LBFGS::m_rPrev
private

Definition at line 68 of file LBFGS.h.

◆ m_s

std::deque<Eigen::VectorXd> eonc::LBFGS::m_s
private

Definition at line 63 of file LBFGS.h.

◆ m_y

std::deque<Eigen::VectorXd> eonc::LBFGS::m_y
private

Definition at line 64 of file LBFGS.h.


The documentation for this class was generated from the following files:
  • /home/runner/work/eOn/eOn/include/eon/LBFGS.h
  • /home/runner/work/eOn/eOn/client/LBFGS.cpp