eOn client
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
SteepestDescent.h
Go to the documentation of this file.
1
/*
2
** This file is part of eOn.
3
**
4
** SPDX-License-Identifier: BSD-3-Clause
5
**
6
** Copyright (c) 2010--present, eOn Development Team
7
** All rights reserved.
8
**
9
** Repo:
10
** https://github.com/TheochemUI/eOn
11
*/
12
#pragma once
13
#include "
EonLogger.h
"
14
15
#include "
Eigen.h
"
16
#include "
HelperFunctions.h
"
17
#include "
Matter.h
"
18
#include "
ObjectiveFunction.h
"
19
#include "
Optimizer.h
"
20
#include "
Parameters.h
"
21
22
namespace
eonc
{
23
24
class
SteepestDescent
final :
public
Optimizer
{
25
public
:
26
SteepestDescent
(std::shared_ptr<ObjectiveFunction> a_objf,
27
const
Parameters
&a_params)
28
:
Optimizer
(a_objf,
OptType
::
SD
, a_params),
29
iteration
{0} {}
30
~SteepestDescent
() =
default
;
31
32
int
step
(
double
a_maxMove)
override
;
33
int
run
(
size_t
a_maxIterations,
double
a_maxMove)
override
;
34
35
private
:
36
eonc::log::FileScoped
m_log
{
"sd"
,
"_sd.log"
};
37
Eigen::VectorXd
getStep
(
const
Eigen::VectorXd &a_f);
38
size_t
iteration
{0};
39
Eigen::VectorXd
m_rPrev
;
40
Eigen::VectorXd
m_fPrev
;
41
};
42
43
}
// namespace eonc
44
45
using
eonc::SteepestDescent
;
Eigen.h
EonLogger.h
HelperFunctions.h
Matter.h
ObjectiveFunction.h
Optimizer.h
The optimizer class is used to serve as an abstract class for all optimizers, as well as to call an o...
Parameters.h
eonc::Optimizer::Optimizer
Optimizer(std::shared_ptr< ObjectiveFunction > a_objf, const OptimizerConfig &a_config)
Definition
Optimizer.h:71
eonc::Parameters
Definition
Parameters.h:28
eonc::SteepestDescent
Definition
SteepestDescent.h:24
eonc::SteepestDescent::getStep
Eigen::VectorXd getStep(const Eigen::VectorXd &a_f)
eonc::SteepestDescent::~SteepestDescent
~SteepestDescent()=default
eonc::SteepestDescent::SteepestDescent
SteepestDescent(std::shared_ptr< ObjectiveFunction > a_objf, const Parameters &a_params)
Definition
SteepestDescent.h:26
eonc::SteepestDescent::iteration
size_t iteration
Definition
SteepestDescent.h:38
eonc::SteepestDescent::run
int run(size_t a_maxIterations, double a_maxMove) override
Definition
SteepestDescent.cpp:47
eonc::SteepestDescent::step
int step(double a_maxMove) override
Definition
SteepestDescent.cpp:18
eonc::SteepestDescent::m_fPrev
Eigen::VectorXd m_fPrev
Definition
SteepestDescent.h:40
eonc::SteepestDescent::m_log
eonc::log::FileScoped m_log
Definition
SteepestDescent.h:36
eonc::SteepestDescent::m_rPrev
Eigen::VectorXd m_rPrev
Definition
SteepestDescent.h:39
eonc
RAII resource manager for the ARTn C library with global synchronization.
Definition
ARTnSaddleSearch.cpp:19
eonc::OptType
OptType
Definition
BaseStructures.h:98
eonc::OptType::SD
@ SD
Definition
BaseStructures.h:106
eonc::log::FileScoped
RAII helper for file-based logging in a class.
Definition
EonLogger.h:208
include
eon
SteepestDescent.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf