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_LINESEARCH_MORETHUENTE_H
00043 #define NOX_LINESEARCH_MORETHUENTE_H
00044
00045 #include "NOX_LineSearch_Generic.H"
00046
00047 #include "NOX_LineSearch_Utils_Printing.H"
00048 #include "NOX_LineSearch_Utils_Counters.H"
00049 #include "NOX_LineSearch_Utils_Slope.H"
00050 #include "Teuchos_RCP.hpp"
00051
00052
00053 namespace NOX {
00054 namespace MeritFunction {
00055 class Generic;
00056 }
00057 }
00058
00059 namespace NOX {
00060 namespace LineSearch {
00061
00063
00199 class MoreThuente : public Generic {
00200
00201 public:
00202
00204 MoreThuente(const Teuchos::RCP<NOX::GlobalData>& gd,
00205 Teuchos::ParameterList& params);
00206
00208 ~MoreThuente();
00209
00210
00211 bool reset(const Teuchos::RCP<NOX::GlobalData>& gd,
00212 Teuchos::ParameterList& params);
00213
00214
00215 bool compute(NOX::Abstract::Group& newgrp, double& step,
00216 const NOX::Abstract::Vector& dir,
00217 const NOX::Solver::Generic& s);
00218
00219
00220 private:
00221
00223
00369 int cvsrch(NOX::Abstract::Group& newgrp, double& step,
00370 const NOX::Abstract::Group& oldgrp,
00371 const NOX::Abstract::Vector& dir,
00372 const Solver::Generic& s);
00373
00374
00376
00440 int cstep(double& stx, double& fx, double& dx,
00441 double& sty, double& fy, double& dy,
00442 double& stp, double& fp, double& dp,
00443 bool& brackt, double stmin, double stmax);
00444
00446 double max(double a, double b);
00447
00449 double min(double a, double b);
00450
00452 double absmax(double a, double b, double c);
00453
00454
00455 private:
00456
00458 Teuchos::RCP<NOX::GlobalData> globalDataPtr;
00459
00461 NOX::LineSearch::Utils::Printing print;
00462
00464 NOX::LineSearch::Utils::Counters counter;
00465
00467 NOX::LineSearch::Utils::Slope slope;
00468
00470 Teuchos::ParameterList* paramsPtr;
00471
00473 double ftol;
00475 double gtol;
00477 double xtol;
00479 double stpmin;
00481 double stpmax;
00483 int maxfev;
00484
00486 enum RecoveryStepType {
00488 Constant,
00490 LastComputedStep
00491 };
00492
00494 RecoveryStepType recoveryStepType;
00495
00497 double defaultstep;
00499 double recoverystep;
00500
00502 enum SufficientDecreaseCondition {ArmijoGoldstein, AredPred};
00503
00505 SufficientDecreaseCondition suffDecrCond;
00506
00508 bool useOptimizedSlopeCalc;
00509
00511 Teuchos::RCP<NOX::MeritFunction::Generic> meritFuncPtr;
00512
00513 };
00514 }
00515 }
00516 #endif