00001 // $Id: LOCA_MultiContinuation_ArcLengthConstraint.H,v 1.9 2007/06/21 16:22:52 rhoope Exp $ 00002 // $Source: /space/CVS/Trilinos/packages/nox/src-loca/src/LOCA_MultiContinuation_ArcLengthConstraint.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_ArcLengthConstraint.H,v $ 00036 // $Author: rhoope $ 00037 // $Date: 2007/06/21 16:22:52 $ 00038 // $Revision: 1.9 $ 00039 // ************************************************************************ 00040 //@HEADER 00041 00042 #ifndef LOCA_MULTICONTINUATION_ARCLENGTHCONSTRAINT_H 00043 #define LOCA_MULTICONTINUATION_ARCLENGTHCONSTRAINT_H 00044 00045 #include "LOCA_MultiContinuation_ConstraintInterfaceMVDX.H" // base class 00046 #include "NOX_Abstract_MultiVector.H" // for dense matrix 00047 00048 // forward declarations 00049 namespace LOCA { 00050 class GlobalData; 00051 namespace MultiContinuation { 00052 class ArcLengthGroup; 00053 } 00054 } 00055 00056 namespace LOCA { 00057 00058 namespace MultiContinuation { 00059 00078 class ArcLengthConstraint : 00079 public LOCA::MultiContinuation::ConstraintInterfaceMVDX { 00080 00081 public: 00082 00084 ArcLengthConstraint( 00085 const Teuchos::RCP<LOCA::GlobalData>& global_data, 00086 const Teuchos::RCP<LOCA::MultiContinuation::ArcLengthGroup>& grp); 00087 00089 ArcLengthConstraint(const ArcLengthConstraint& source, 00090 NOX::CopyType type = NOX::DeepCopy); 00091 00093 ~ArcLengthConstraint(); 00094 00096 virtual void setArcLengthGroup(const Teuchos::RCP<LOCA::MultiContinuation::ArcLengthGroup>& grp); 00097 00103 00105 virtual void copy(const ConstraintInterface& source); 00106 00108 virtual 00109 Teuchos::RCP<LOCA::MultiContinuation::ConstraintInterface> 00110 clone(NOX::CopyType type = NOX::DeepCopy) const; 00111 00113 virtual int numConstraints() const; 00114 00116 virtual void setX(const NOX::Abstract::Vector& y); 00117 00119 virtual void setParam(int paramID, double val); 00120 00122 virtual void setParams( 00123 const vector<int>& paramIDs, 00124 const NOX::Abstract::MultiVector::DenseMatrix& vals); 00125 00127 virtual NOX::Abstract::Group::ReturnType 00128 computeConstraints(); 00129 00131 virtual NOX::Abstract::Group::ReturnType 00132 computeDX(); 00133 00135 00140 virtual NOX::Abstract::Group::ReturnType 00141 computeDP(const vector<int>& paramIDs, 00142 NOX::Abstract::MultiVector::DenseMatrix& dgdp, 00143 bool isValidG); 00144 00146 virtual bool isConstraints() const; 00147 00149 virtual bool isDX() const; 00150 00152 virtual const NOX::Abstract::MultiVector::DenseMatrix& 00153 getConstraints() const; 00154 00156 virtual const NOX::Abstract::MultiVector* 00157 getDX() const; 00158 00163 virtual bool isDXZero() const; 00164 00166 00167 private: 00168 00170 ArcLengthConstraint& operator=(const ArcLengthConstraint& source); 00171 00172 protected: 00173 00175 Teuchos::RCP<LOCA::GlobalData> globalData; 00176 00178 Teuchos::RCP< 00179 LOCA::MultiContinuation::ArcLengthGroup> arcLengthGroup; 00180 00182 NOX::Abstract::MultiVector::DenseMatrix constraints; 00183 00185 bool isValidConstraints; 00186 00188 vector<int> conParamIDs; 00189 00190 }; // Class ArcLengthConstraint 00191 00192 } // namespace MultiContinuation 00193 00194 } // namespace LOCA 00195 00196 #endif // LOCA_MULTICONTINUATION_ARCLENGTHCONSTRAINT_H