eOn 3.2.0
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
,
OptimizerConfig
::fromParams(a_params)),
29
m_rPrev
{Eigen::VectorXd::Zero(a_objf->degreesOfFreedom())},
30
m_fPrev
{Eigen::VectorXd::Zero(a_objf->degreesOfFreedom())} {}
31
~SteepestDescent
() =
default
;
32
33
int
step
(
double
a_maxMove)
override
;
34
int
run
(
size_t
a_maxIterations,
double
a_maxMove)
override
;
35
36
private
:
37
eonc::log::FileScoped
m_log
{
"sd"
,
"_sd.log"
};
38
Eigen::VectorXd
getStep
(
const
Eigen::VectorXd &a_f);
39
size_t
iteration
{0};
40
Eigen::VectorXd
m_rPrev
;
41
Eigen::VectorXd
m_fPrev
;
42
};
43
44
}
// namespace eonc
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:73
eonc::Parameters
Definition
Parameters.h:35
eonc::SteepestDescent::getStep
Eigen::VectorXd getStep(const Eigen::VectorXd &a_f)
eonc::SteepestDescent::~SteepestDescent
~SteepestDescent()=default
eonc::SteepestDescent::run
int run(size_t a_maxIterations, double a_maxMove) override
Definition
SteepestDescent.cpp:49
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:39
eonc::SteepestDescent::m_fPrev
Eigen::VectorXd m_fPrev
Definition
SteepestDescent.h:41
eonc::SteepestDescent::m_log
eonc::log::FileScoped m_log
Definition
SteepestDescent.h:37
eonc::SteepestDescent::m_rPrev
Eigen::VectorXd m_rPrev
Definition
SteepestDescent.h:40
eonc::SteepestDescent::step
int step(double a_maxMove) override
Definition
SteepestDescent.cpp:20
eonc
RAII resource manager for the ARTn C library with global synchronization.
Definition
ARTnSaddleSearch.cpp:23
eonc::OptType
OptType
Definition
BaseStructures.h:103
eonc::OptType::SD
@ SD
Definition
BaseStructures.h:111
eonc::OptimizerConfig
Declaration of the optimizer class.
Definition
Optimizer.h:51
eonc::log::FileScoped
RAII helper for file-based logging in a class.
Definition
EonLogger.h:207
include
eon
SteepestDescent.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf