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_UTILS_INEXACTNEWTON_H
00043 #define NOX_DIRECTION_UTILS_INEXACTNEWTON_H
00044
00045 #include "NOX_Common.H"
00046 #include "Teuchos_RCP.hpp"
00047
00048
00049 namespace Teuchos {
00050 class ParameterList;
00051 }
00052 namespace NOX {
00053 class Utils;
00054 class GlobalData;
00055 namespace Abstract {
00056 class Vector;
00057 class Group;
00058 }
00059 namespace Solver {
00060 class Generic;
00061 }
00062 }
00063
00064 namespace NOX {
00065 namespace Direction {
00066 namespace Utils {
00067
00069
00178 class InexactNewton {
00179
00180 public:
00181
00183 InexactNewton(const Teuchos::RCP<NOX::GlobalData>& gd,
00184 Teuchos::ParameterList& directionSublist);
00185
00187 virtual ~InexactNewton();
00188
00190 virtual bool reset(const Teuchos::RCP<NOX::GlobalData>& gd,
00191 Teuchos::ParameterList& directionSublist);
00192
00195
00198 virtual double computeForcingTerm(const NOX::Abstract::Group& soln,
00199 const NOX::Abstract::Group& oldSoln,
00200 int niter,
00201 const NOX::Solver::Generic& solver,
00202 double eta_last = -1.0);
00203
00204 private:
00205
00207 void throwError(const string& functionName, const string& errorMsg);
00208
00209 private:
00210
00212 Teuchos::RCP<NOX::GlobalData> globalDataPtr;
00213
00215 Teuchos::RCP<NOX::Utils> printing;
00216
00218 enum ForcingTermType {
00220 Constant,
00222 Type1,
00224 Type2
00225 };
00226
00228 ForcingTermType forcingTermMethod;
00229
00231
00235 Teuchos::ParameterList* paramsPtr;
00236
00238 Teuchos::RCP<NOX::Abstract::Vector> predRhs;
00239
00241 Teuchos::RCP<NOX::Abstract::Vector> stepDir;
00242
00244 double eta_k;
00245
00247 double eta_min;
00248
00250 double eta_max;
00251
00253 double eta_initial;
00254
00256 string method;
00257
00259 string directionMethod;
00260
00262 double alpha;
00263
00265 double gamma;
00266
00268 bool setTolerance;
00269 };
00270 }
00271 }
00272 }
00273 #endif