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_Multiphysics_Group.H,v $ 00033 // $Author: rppawlo $ 00034 // $Date: 2007/08/01 20:50:40 $ 00035 // $Revision: 1.6 $ 00036 // ************************************************************************ 00037 //@HEADER 00038 00039 #ifndef NOX_MULTIPHYSICS_GROUP_H 00040 #define NOX_MULTIPHYSICS_GROUP_H 00041 00042 #include "NOX_Abstract_Group.H" // Base class 00043 #include "NOX_MultiVector.H" 00044 #include "NOX_Common.H" // for string 00045 #include "NOX.H" // for NOX::Solver::Manager 00046 #include "Teuchos_RCP.hpp" 00047 00048 namespace NOX { 00049 namespace Parameter { 00050 class List; 00051 } 00052 namespace Abstract { 00053 class MultiVector; 00054 } 00055 } 00056 00057 namespace NOX { 00058 namespace Multiphysics { 00059 00080 class Group : public NOX::Abstract::Group { 00081 00082 public: 00083 00085 00089 Group( const Teuchos::RCP< vector<Teuchos::RCP<NOX::Solver::Generic> > >& solvers, 00090 const Teuchos::RCP<NOX::StatusTest::Generic>& t, 00091 const Teuchos::RCP<Teuchos::ParameterList>& p); 00092 00094 Group( const Group & grp, NOX::CopyType typ ); 00095 00097 virtual ~Group(); 00098 00106 virtual NOX::Abstract::Group & operator=(const NOX::Abstract::Group& source); 00107 00108 virtual NOX::Abstract::Group & operator=(const NOX::Multiphysics::Group& source); 00109 00111 00113 00124 virtual void setX(const NOX::Abstract::Vector& y); 00125 00127 00146 virtual void computeX(const NOX::Abstract::Group& grp, 00147 const NOX::Abstract::Vector& d, double step); 00148 00150 00161 virtual NOX::Abstract::Group::ReturnType computeF(); 00162 00163 00172 00174 virtual bool isF() const; 00175 00182 00184 virtual const NOX::Abstract::Vector& getX() const; 00185 00187 virtual const NOX::Abstract::Vector& getF() const; 00188 00190 00191 virtual double getNormF() const; 00192 00194 virtual const NOX::Abstract::Vector& getGradient() const; 00195 00197 virtual const NOX::Abstract::Vector& getNewton() const; 00198 00200 00214 virtual Teuchos::RCP<NOX::Abstract::Group> 00215 clone(NOX::CopyType type = NOX::DeepCopy) const; 00216 00218 00219 protected: 00220 00222 virtual void resetIsValid(); 00223 00224 protected: 00225 00227 Teuchos::RCP<vector<Teuchos::RCP<NOX::Solver::Generic> > > solversVecPtr; 00228 00234 bool isValidRHS; 00235 00237 double normRHS; 00238 00239 }; 00240 } // namespace Multiphysics 00241 } // namespace NOX 00242 00243 #endif