1#ifndef LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_SOLVERFACTORY_IMPLEMENTATION_H
2#define LINEARALGEBRA_SRC_MOLPRO_LINALG_ITSOLV_SOLVERFACTORY_IMPLEMENTATION_H
4#include "OptimizeSDOptions.h"
5#include <molpro/linalg/itsolv/LinearEigensystemDavidson.h>
6#include <molpro/linalg/itsolv/LinearEigensystemRSPT.h>
7#include <molpro/linalg/itsolv/LinearEquationsDavidson.h>
8#include <molpro/linalg/itsolv/NonLinearEquationsDIIS.h>
9#include <molpro/linalg/itsolv/OptimizeBFGS.h>
10#include <molpro/linalg/itsolv/SolverFactory.h>
11#include <molpro/linalg/itsolv/subspace/SubspaceSolverDIIS.h>
12#include <molpro/linalg/itsolv/subspace/SubspaceSolverOptBFGS.h>
13#include <molpro/linalg/itsolv/subspace/SubspaceSolverOptSD.h>
17template <
class R,
class Q,
class P>
18std::unique_ptr<IterativeSolver<R, Q, P>>
34template <
class R,
class Q,
class P>
35std::unique_ptr<LinearEigensystem<R, Q, P>>
40 auto solver = std::make_unique<LinearEigensystemDavidson<R, Q, P>>(
handlers);
45 auto solver = std::make_unique<LinearEigensystemRSPT<R, Q, P>>(
handlers);
49 throw std::logic_error(
"SolverFactory failed to cast to solver");
52template <
class R,
class Q,
class P>
53std::unique_ptr<LinearEquations<R, Q, P>>
56 auto solver = std::make_unique<LinearEquationsDavidson<R, Q, P>>(
handlers);
61template <
class R,
class Q,
class P>
62std::unique_ptr<NonLinearEquations<R, Q, P>>
67 auto solver = std::make_unique<NonLinearEquationsDIIS<R, Q, P>>(
handlers);
71 throw std::runtime_error(
"Unimplemented solver method");
74template <
class R,
class Q,
class P>
75std::unique_ptr<Optimize<R, Q, P>>
80 auto solver = std::make_unique<OptimizeBFGS<R, Q, P>>(
handlers);
85 auto solver = std::make_unique<OptimizeSD<R, Q, P>>(
handlers);
89 throw std::runtime_error(
"Unimplemented solver method");
92template <
class R,
class Q,
class P>
93std::unique_ptr<IterativeSolver<R, Q, P>>
96 if (
method ==
"LinearEigensystem") {
98 }
else if (
method ==
"LinearEquations") {
100 }
else if (
method ==
"NonLinearEquations") {
102 }
else if (
method ==
"Optimize") {
105 throw std::runtime_error(
"Method = " +
method +
", is not implemented");
Class, containing a collection of array handlers used in IterativeSolver Provides a Builder sub-class...
Definition ArrayHandlers.h:25
virtual std::unique_ptr< IterativeSolver< R, Q, P > > create(const std::string &method, const options_map &options, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >())
Definition SolverFactory-implementation.h:94
virtual std::unique_ptr< IterativeSolver< R, Q, P > > create(const Options &options, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers)
Definition SolverFactory-implementation.h:19
4-parameter interpolation of a 1-dimensional function given two points for which function values and ...
Definition helper.h:14
std::unique_ptr< LinearEigensystem< R, Q, P > > create_LinearEigensystem(const LinearEigensystemOptions &options, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >())
Definition SolverFactory.h:111
std::map< std::string, std::string > options_map
Definition options_map.h:8
const std::shared_ptr< const molpro::Options > options()
Get the Options object associated with iterative-solver.
Definition linalg_options.cpp:4
Allows setting and getting of options for LinearEigensystemDavidson instance via IterativeSolver base...
Definition LinearEigensystemDavidsonOptions.h:38
Allows setting and getting of options for LinearEigensystemRSPT instance via IterativeSolver base cla...
Definition LinearEigensystemRSPTOptions.h:9
Allows setting and getting of options for LinearEquationsDavidson instance via IterativeSolver base c...
Definition LinearEquationsDavidsonOptions.h:13
Allows setting and getting of options for NonLinearEquationsDIIS instance via IterativeSolver base cl...
Definition NonLinearEquationsDIISOptions.h:9
Allows setting and getting of options for OptimizeBFGS instance via IterativeSolver base class.
Definition OptimizeBFGSOptions.h:9
Allows setting and getting of options for OptimizeBFGS instance via IterativeSolver base class.
Definition OptimizeSDOptions.h:9
Access point for different options in iterative solvers.
Definition Options.h:20