Thyra Version of the Day
Loading...
Searching...
No Matches
Thyra_DefaultNonlinearSolverBuilder.hpp
1// @HEADER
2// *****************************************************************************
3// Thyra: Interfaces and Support for Abstract Numerical Algorithms
4//
5// Copyright 2004 NTESS and the Thyra contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#ifndef THYRA_DEFAULT_NONLINEAR_SOLVER_BUILDER_HPP
11#define THYRA_DEFAULT_NONLINEAR_SOLVER_BUILDER_HPP
12
13#include "Thyra_NonlinearSolverBuilderBase.hpp"
14#include "Teuchos_AbstractFactory.hpp"
15
16
17namespace Thyra {
18
19
30 : public Thyra::NonlinearSolverBuilderBase<double>
31{
32public:
33
36
39
42
45 const RCP<const AbstractFactory<Thyra::NonlinearSolverBase<double> > >
46 &nonlinearSolverFactory,
47 const std::string &nonlinearSolverTypeName
48 );
49
53 std::string getNonlinearSolverName() const;
54
56
59
61 void setParameterList(RCP<ParameterList> const& paramList);
70
72
75
78 createNonlinearSolver(const std::string &nonlinearSolverTypeName) const;
79
81
82private:
83
84 // //////////////////////////////////////
85 // Private types
86
89
90 // //////////////////////////////////////
91 // Private data members
92
93 RCP<ParameterList> paramList_;
94 mutable RCP<const ParameterList> validParamList_;
95 Array<std::string> validNonlinearSolverNames_;
96 Array<ns_fcty_t> nonlinearSolverArray_;
97 std::string defaultNonlinearSolverName_;
98
99 // //////////////////////////////////////
100 // Private member functions
101
102 void initializeDefaults();
103
104};
105
106
107} // namespace Thyra
108
109
113template<class NonlinearSolverType, class Scalar>
114void setNonlinearSolverFactory(
115 const std::string &nonlinearSolverTypeName,
116 const Ptr<DefaultNonlinearSolverBuilder<Scalar> > &defaultNonlinearSolverBuilder
117 )
118{
120}
121
122
123#endif // THYRA_DEFAULT_NONLINEAR_SOLVER_BUILDER_HPP
Concrete subclass of Thyra::NonlinearSolverBuilderBase for creating NonlinearSolverBase objects and P...
void setNonlinearSolverFactory(const RCP< const AbstractFactory< Thyra::NonlinearSolverBase< double > > > &nonlinearSolverFactory, const std::string &nonlinearSolverTypeName)
Set a new NonlinearSolverBase factory object.
RCP< ParameterList > unsetParameterList()
RCP< const ParameterList > getParameterList() const
RCP< const ParameterList > getValidParameters() const
void setParameterList(RCP< ParameterList > const &paramList)
virtual Teuchos::RCP< NonlinearSolverBase< Scalar > > createNonlinearSolver(const std::string &nonlinearSolverTypeName) const
std::string getNonlinearSolverName() const
Get the name of the NonlinearSolver type that will be created on the next call to this->createNonline...
RCP< ParameterList > getNonconstParameterList()
Base class for all nonlinear equation solvers.
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)