00001 //@HEADER 00002 // ************************************************************************ 00003 // 00004 // NOX: An Object-Oriented Nonlinear Solver Package 00005 // Copyright (2002) Sandia Corporation 00006 // 00007 // LOCA: Library of Continuation Algorithms Package 00008 // Copyright (2005) Sandia Corporation 00009 // 00010 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00011 // license for use of this work by or on behalf of the U.S. Government. 00012 // 00013 // This library is free software; you can redistribute it and/or modify 00014 // it under the terms of the GNU Lesser General Public License as 00015 // published by the Free Software Foundation; either version 2.1 of the 00016 // License, or (at your option) any later version. 00017 // 00018 // This library is distributed in the hope that it will be useful, but 00019 // WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00021 // Lesser General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU Lesser General Public 00024 // License along with this library; if not, write to the Free Software 00025 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00026 // USA 00027 // 00028 // Questions? Contact Roger Pawlowski (rppawlo@sandia.gov) or 00029 // Eric Phipps (etphipp@sandia.gov), Sandia National Laboratories. 00030 // ************************************************************************ 00031 // CVS Information 00032 // $Source: /space/CVS/Trilinos/packages/nox/src/NOX_LineSearch_NonlinearCG.H,v $ 00033 // $Author: rhoope $ 00034 // $Date: 2007/08/28 06:30:35 $ 00035 // $Revision: 1.9 $ 00036 // ************************************************************************ 00037 //@HEADER 00038 00039 #ifndef NOX_LINESEARCH_NONLINEARCG_H 00040 #define NOX_LINESEARCH_NONLINEARCG_H 00041 00042 #include "NOX_LineSearch_Generic.H" // base class 00043 #include "Teuchos_RCP.hpp" 00044 00045 // Forward declarations 00046 namespace NOX { 00047 class Utils; 00048 namespace StatusTest { 00049 class FiniteValue; 00050 } 00051 } 00052 00053 namespace NOX { 00054 namespace LineSearch { 00055 00057 00145 class NonlinearCG : public Generic { 00146 00147 public: 00148 00150 NonlinearCG(const Teuchos::RCP<NOX::GlobalData>& gd, 00151 Teuchos::ParameterList& params); 00152 00154 ~NonlinearCG(); 00155 00156 // derived 00157 bool reset(const Teuchos::RCP<NOX::GlobalData>& gd, 00158 Teuchos::ParameterList& params); 00159 00160 // derived 00161 bool compute(NOX::Abstract::Group& newgrp, double& step, 00162 const NOX::Abstract::Vector& dir, 00163 const NOX::Solver::Generic& s); 00164 00165 private: 00166 00168 NOX::Abstract::Vector& computeDirectionalDerivative( 00169 const Abstract::Vector& dir, 00170 const Abstract::Group& grp); 00171 00173 Teuchos::RCP<NOX::Utils> utils; 00174 00176 Teuchos::RCP<NOX::Abstract::Vector> vecPtr; 00177 00179 Teuchos::RCP<NOX::Abstract::Group> grpPtr; 00180 00182 Teuchos::RCP<NOX::StatusTest::FiniteValue> finiteValueTester; 00183 00184 }; 00185 } // namespace LineSearch 00186 } // namespace NOX 00187 #endif