Loading...
Searching...
No Matches
SubstrateFactor.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) gpridge developers
3// See LICENSE for details.
4
5#ifndef GPR_NEB_SUBSTRATE_FACTOR_H_
6#define GPR_NEB_SUBSTRATE_FACTOR_H_
7
8#include <Eigen/Dense>
9
10namespace gpr::neb {
11
16inline Eigen::LLT<Eigen::MatrixXd> factorSubstrate(
17 const Eigen::MatrixXd& hessian)
18{
19 return Eigen::LLT<Eigen::MatrixXd>(hessian);
20}
21
23inline Eigen::VectorXd substrateStep(const Eigen::MatrixXd& hessian,
24 const Eigen::VectorXd& force)
25{
26 auto factor = factorSubstrate(hessian);
27 if (factor.info() != Eigen::Success) return {};
28 return factor.solve(force);
29}
30
31} // namespace gpr::neb
32
33#endif // GPR_NEB_SUBSTRATE_FACTOR_H_
The nudged elastic band: path, GP-NEB driver, configuration and result, acquisition,...
Eigen::VectorXd substrateStep(const Eigen::MatrixXd &hessian, const Eigen::VectorXd &force)
One substrate step, H^{-1} force, from that factor.
Eigen::LLT< Eigen::MatrixXd > factorSubstrate(const Eigen::MatrixXd &hessian)