00001
00002
00003
00004 #ifndef THYRA_NONLINEARSOLVER_NOX
00005 #define THYRA_NONLINEARSOLVER_NOX
00006
00007 #include "Teuchos_RCP.hpp"
00008 #include "Thyra_NonlinearSolverBase.hpp"
00009
00010 namespace NOX {
00011 class SolverManager;
00012 namespace Thyra {
00013 class Group;
00014 }
00015 namespace StatusTest {
00016 class Generic;
00017 }
00018 namespace Solver {
00019 class Generic;
00020 }
00021 }
00022
00023 namespace Thyra {
00024
00025
00030 class NOXNonlinearSolver : public NonlinearSolverBase<double> {
00031 public:
00032
00033 NOXNonlinearSolver();
00034 ~NOXNonlinearSolver();
00035
00038
00040 void setParameterList(RCP<Teuchos::ParameterList> const& paramList);
00042 RCP<Teuchos::ParameterList> getNonconstParameterList();
00044 RCP<Teuchos::ParameterList> unsetParameterList();
00046 RCP<const Teuchos::ParameterList> getParameterList() const;
00048 RCP<const Teuchos::ParameterList> getValidParameters() const;
00049
00051
00054
00056 void setModel(const RCP< const ModelEvaluator<double> > &model);
00058 RCP< const ModelEvaluator<double> > getModel() const;
00060 SolveStatus<double> solve(
00061 VectorBase<double> *x,
00062 const SolveCriteria<double> *solveCriteria,
00063 VectorBase<double> *delta
00064 );
00066 RCP<const VectorBase<double> > get_current_x() const;
00068 bool is_W_current() const;
00070 RCP< LinearOpWithSolveBase<double> >
00071 get_nonconst_W(const bool forceUpToDate);
00073 RCP< const LinearOpWithSolveBase<double> > get_W() const;
00074
00076
00077 private:
00078
00080 void resetSolver();
00081
00083 RCP<NOX::StatusTest::Generic>
00084 buildStatusTests(Teuchos::ParameterList& p);
00085
00086 private:
00087
00088 RCP<Teuchos::ParameterList> param_list_;
00089 RCP<Teuchos::ParameterList> valid_param_list_;
00090 RCP<const ModelEvaluator<double> > model_;
00091
00092 RCP<NOX::Thyra::Group> nox_group_;
00093 RCP<NOX::StatusTest::Generic> status_test_;
00094 RCP<NOX::Solver::Generic> solver_;
00095
00096 };
00097
00098
00099
00100 }
00101
00102
00103 #endif // THYRA_NONLINEARSOLVER_NOX