00001 // $Id: LOCA_MultiContinuation_MultiVecConstraint.H,v 1.6 2007/06/21 16:22:52 rhoope Exp $ 00002 // $Source: /space/CVS/Trilinos/packages/nox/src-loca/src/LOCA_MultiContinuation_MultiVecConstraint.H,v $ 00003 00004 //@HEADER 00005 // ************************************************************************ 00006 // 00007 // NOX: An Object-Oriented Nonlinear Solver Package 00008 // Copyright (2002) Sandia Corporation 00009 // 00010 // LOCA: Library of Continuation Algorithms Package 00011 // Copyright (2005) Sandia Corporation 00012 // 00013 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00014 // license for use of this work by or on behalf of the U.S. Government. 00015 // 00016 // This library is free software; you can redistribute it and/or modify 00017 // it under the terms of the GNU Lesser General Public License as 00018 // published by the Free Software Foundation; either version 2.1 of the 00019 // License, or (at your option) any later version. 00020 // 00021 // This library is distributed in the hope that it will be useful, but 00022 // WITHOUT ANY WARRANTY; without even the implied warranty of 00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00024 // Lesser General Public License for more details. 00025 // 00026 // You should have received a copy of the GNU Lesser General Public 00027 // License along with this library; if not, write to the Free Software 00028 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00029 // USA 00030 // 00031 // Questions? Contact Roger Pawlowski (rppawlo@sandia.gov) or 00032 // Eric Phipps (etphipp@sandia.gov), Sandia National Laboratories. 00033 // ************************************************************************ 00034 // CVS Information 00035 // $Source: /space/CVS/Trilinos/packages/nox/src-loca/src/LOCA_MultiContinuation_MultiVecConstraint.H,v $ 00036 // $Author: rhoope $ 00037 // $Date: 2007/06/21 16:22:52 $ 00038 // $Revision: 1.6 $ 00039 // ************************************************************************ 00040 //@HEADER 00041 00042 #ifndef LOCA_MULTICONTINUATION_MULTIVECCONSTRAINT_H 00043 #define LOCA_MULTICONTINUATION_MULTIVECCONSTRAINT_H 00044 00045 #include "LOCA_MultiContinuation_ConstraintInterfaceMVDX.H" // base class 00046 #include "NOX_Abstract_MultiVector.H" // for dense matrix 00047 00048 namespace LOCA { 00049 00050 namespace MultiContinuation { 00051 00057 class MultiVecConstraint : 00058 public LOCA::MultiContinuation::ConstraintInterfaceMVDX { 00059 00060 public: 00061 00063 MultiVecConstraint( 00064 const Teuchos::RCP<const NOX::Abstract::MultiVector>& dx); 00065 00067 MultiVecConstraint(const MultiVecConstraint& source, 00068 NOX::CopyType type = NOX::DeepCopy); 00069 00071 ~MultiVecConstraint(); 00072 00074 virtual void setDx( 00075 const Teuchos::RCP<const NOX::Abstract::MultiVector>& dx); 00076 00082 00084 virtual void copy(const ConstraintInterface& source); 00085 00087 virtual 00088 Teuchos::RCP<LOCA::MultiContinuation::ConstraintInterface> 00089 clone(NOX::CopyType type = NOX::DeepCopy) const; 00090 00092 virtual int numConstraints() const; 00093 00095 virtual void setX(const NOX::Abstract::Vector& y); 00096 00098 virtual void setParam(int paramID, double val); 00099 00101 virtual void setParams( 00102 const vector<int>& paramIDs, 00103 const NOX::Abstract::MultiVector::DenseMatrix& vals); 00104 00106 virtual NOX::Abstract::Group::ReturnType 00107 computeConstraints(); 00108 00110 virtual NOX::Abstract::Group::ReturnType 00111 computeDX(); 00112 00114 00119 virtual NOX::Abstract::Group::ReturnType 00120 computeDP(const vector<int>& paramIDs, 00121 NOX::Abstract::MultiVector::DenseMatrix& dgdp, 00122 bool isValidG); 00123 00125 virtual bool isConstraints() const; 00126 00128 virtual bool isDX() const; 00129 00131 virtual const NOX::Abstract::MultiVector::DenseMatrix& 00132 getConstraints() const; 00133 00135 virtual const NOX::Abstract::MultiVector* 00136 getDX() const; 00137 00142 virtual bool isDXZero() const; 00143 00145 00148 virtual void notifyCompletedStep(); 00149 00151 00152 private: 00153 00155 MultiVecConstraint& operator=(const MultiVecConstraint& source); 00156 00157 protected: 00158 00160 Teuchos::RCP<NOX::Abstract::MultiVector> dx; 00161 00163 Teuchos::RCP<NOX::Abstract::MultiVector> x; 00164 00166 NOX::Abstract::MultiVector::DenseMatrix constraints; 00167 00169 bool isValidConstraints; 00170 00171 }; // Class MultiVecConstraint 00172 00173 } // namespace MultiContinuation 00174 00175 } // namespace LOCA 00176 00177 #endif // LOCA_MULTICONTINUATION_MULTIVECCONSTRAINT_H