Factory for creating instances of specific solver implementations from the corresponding Options object.
More...
template<
class R,
class Q = R,
class P = std::map<size_t, typename R::value_type>>
class molpro::linalg::itsolv::SolverFactory< R, Q, P >
Factory for creating instances of specific solver implementations from the corresponding Options object.
- Note
- The factory has to be instantiated for specific R,Q and P vector types
Instantiating the factory
Assuming user defined containers are declared in UserDefinedVectors.h than the user can include the following explicit instantiation for the factory in a .cpp file,
#include <molpro/linalg/itsolv/SolverFactory-implementation.h>
#include "UserDefinedVectors.h"
}
Factory for creating instances of specific solver implementations from the corresponding Options obje...
Definition SolverFactory.h:74
4-parameter interpolation of a 1-dimensional function given two points for which function values and ...
Definition helper.h:14
Using the factory
#include <molpro/linalg/itsolv/SolverFactory.h>
#include "UserDefinedVectors.h"
#include "read_user_options.h"
auto handlers = std::make_shared<ArrayHandlers<R, Q, P>>();
solver->solve();
P>(
"max_size_qspace=6, nroots=3, convergence_threshold=1e-4");
eigen_solver.solve();
}
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
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
const std::shared_ptr< const molpro::Options > options()
Get the Options object associated with iterative-solver.
Definition linalg_options.cpp:4
- Examples
- LinearEigensystemDistrArrayExample.cpp, LinearEigensystemExample.cpp, LinearEigensystemMultirootExample.cpp, LinearEquationsExample.cpp, NonLinearEquationsExample.cpp, OptimizeDistrArrayExample.cpp, and OptimizeExample.cpp.
|
| virtual | ~SolverFactory ()=default |
| |
| virtual std::unique_ptr< IterativeSolver< R, Q, P > > | create (const Options &options, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers) |
| |
| virtual std::unique_ptr< LinearEigensystem< R, Q, P > > | create (const LinearEigensystemOptions &options, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| |
| virtual std::unique_ptr< LinearEquations< R, Q, P > > | create (const LinearEquationsOptions &options, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| |
| virtual std::unique_ptr< NonLinearEquations< R, Q, P > > | create (const NonLinearEquationsOptions &options=NonLinearEquationsOptions{}, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| |
| virtual std::unique_ptr< Optimize< R, Q, P > > | create (const OptimizeOptions &options=OptimizeOptions{}, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| |
| 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 > >()) |
| |