00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef NOX_DIRECTION_NEWTON_H
00043 #define NOX_DIRECTION_NEWTON_H
00044
00045 #include "NOX_Direction_Generic.H"
00046 #include "Teuchos_ParameterList.hpp"
00047 #include "Teuchos_RCP.hpp"
00048
00049
00050 namespace NOX {
00051 using std::string;
00052 class Utils;
00053 namespace Parameter {
00054 class UserNorm;
00055 }
00056 }
00057
00058 namespace NOX {
00059 namespace Direction {
00060
00062
00182 class Newton : public Generic {
00183
00184 public:
00185
00187 Newton(const Teuchos::RCP<NOX::GlobalData>& gd,
00188 Teuchos::ParameterList& params);
00189
00191 virtual ~Newton();
00192
00193
00194 virtual bool reset(const Teuchos::RCP<NOX::GlobalData>& gd,
00195 Teuchos::ParameterList& params);
00196
00197
00198 virtual bool compute(NOX::Abstract::Vector& dir, NOX::Abstract::Group& grp,
00199 const NOX::Solver::Generic& solver);
00200
00201
00202 virtual bool compute(NOX::Abstract::Vector& dir, NOX::Abstract::Group& grp,
00203 const NOX::Solver::LineSearchBased& solver);
00204
00205 protected:
00206
00209 virtual bool resetForcingTerm(const NOX::Abstract::Group& soln,
00210 const NOX::Abstract::Group& oldSoln,
00211 int niter,
00212 const NOX::Solver::Generic& solver);
00213
00214
00215 private:
00216
00218 void throwError(const string& functionName, const string& errorMsg);
00219
00220
00221 private:
00222
00224 Teuchos::RCP<NOX::GlobalData> globalDataPtr;
00225
00227 Teuchos::RCP<NOX::Utils> utils;
00228
00230
00234 Teuchos::ParameterList* paramsPtr;
00235
00237 bool doRescue;
00238
00240 Teuchos::RCP<NOX::Abstract::Vector> predRhs;
00241
00243 Teuchos::RCP<NOX::Abstract::Vector> stepDir;
00244
00246 bool useAdjustableForcingTerm;
00247
00249 double eta_k;
00250
00252 double eta_min;
00253
00255 double eta_max;
00256
00258 double eta_initial;
00259
00261 string method;
00262
00264 double alpha;
00265
00267 double gamma;
00268 };
00269 }
00270 }
00271 #endif