30 #ifndef RYTHMOS_TIME_STEP_NONLINEAR_SOLVER_DECL_HPP
31 #define RYTHMOS_TIME_STEP_NONLINEAR_SOLVER_DECL_HPP
33 #include "Rythmos_Types.hpp"
34 #include "Thyra_NonlinearSolverBase.hpp"
49 template <
class Scalar>
54 typedef Teuchos::ScalarTraits<Scalar>
ST;
58 typedef Teuchos::ScalarTraits<ScalarMag>
SMT;
89 const RCP<
const Thyra::ModelEvaluator<Scalar> > &model
92 RCP<const Thyra::ModelEvaluator<Scalar> >
getModel()
const;
94 Thyra::SolveStatus<Scalar>
solve(
95 Thyra::VectorBase<Scalar> *x,
96 const Thyra::SolveCriteria<Scalar> *solveCriteria,
97 Thyra::VectorBase<Scalar> *delta = NULL
102 RCP<Thyra::NonlinearSolverBase<Scalar> >
109 RCP<Thyra::LinearOpWithSolveBase<Scalar> >
112 RCP<const Thyra::LinearOpWithSolveBase<Scalar> >
get_W()
const;
122 RCP<ParameterList> paramList_;
123 RCP<const Thyra::ModelEvaluator<Scalar> > model_;
124 RCP<Thyra::LinearOpWithSolveBase<Scalar> > J_;
125 RCP<Thyra::VectorBase<Scalar> > current_x_;
129 int defaultMaxIters_;
130 double nonlinearSafetyFactor_;
131 double linearSafetyFactor_;
132 double RMinFraction_;
133 bool throwOnLinearSolveFailure_;
137 static const std::string DefaultTol_name_;
138 static const double DefaultTol_default_;
140 static const std::string DefaultMaxIters_name_;
141 static const int DefaultMaxIters_default_;
143 static const std::string NonlinearSafetyFactor_name_;
144 static const double NonlinearSafetyFactor_default_;
146 static const std::string LinearSafetyFactor_name_;
147 static const double LinearSafetyFactor_default_;
149 static const std::string RMinFraction_name_;
150 static const double RMinFraction_default_;
152 static const std::string ThrownOnLinearSolveFailure_name_;
153 static const bool ThrownOnLinearSolveFailure_default_;
162 template <
class Scalar>
163 RCP<TimeStepNonlinearSolver<Scalar> > timeStepNonlinearSolver();
170 template <
class Scalar>
171 RCP<TimeStepNonlinearSolver<Scalar> >
172 timeStepNonlinearSolver(
const RCP<ParameterList> &pl);
177 #endif // RYTHMOS_TIME_STEP_NONLINEAR_SOLVER_DECL_HPP
Teuchos::ScalarTraits< ScalarMag > SMT
Simple undampended Newton solver designed to solve time step equations in accurate times-tepping meth...
RCP< const Thyra::LinearOpWithSolveBase< Scalar > > get_W() const
RCP< ParameterList > getNonconstParameterList()
void setModel(const RCP< const Thyra::ModelEvaluator< Scalar > > &model)
RCP< const Thyra::VectorBase< Scalar > > get_current_x() const
void set_W_is_current(bool W_is_current)
bool is_W_current() const
RCP< ParameterList > unsetParameterList()
ST::magnitudeType ScalarMag
RCP< const Thyra::ModelEvaluator< Scalar > > getModel() const
RCP< Thyra::NonlinearSolverBase< Scalar > > cloneNonlinearSolver() const
Thyra::SolveStatus< Scalar > solve(Thyra::VectorBase< Scalar > *x, const Thyra::SolveCriteria< Scalar > *solveCriteria, Thyra::VectorBase< Scalar > *delta=NULL)
RCP< const ParameterList > getParameterList() const
RCP< Thyra::LinearOpWithSolveBase< Scalar > > get_nonconst_W(const bool forceUpToDate)
Teuchos::ScalarTraits< Scalar > ST
RCP< const ParameterList > getValidParameters() const
void setParameterList(RCP< ParameterList > const ¶mList)
bool supportsCloning() const
TimeStepNonlinearSolver()
Sets parameter defaults .