00001 // $Id: LOCA_MultiContinuation_AbstractStrategy.H,v 1.8 2007/06/21 16:22:52 rhoope Exp $ 00002 // $Source: /space/CVS/Trilinos/packages/nox/src-loca/src/LOCA_MultiContinuation_AbstractStrategy.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_AbstractStrategy.H,v $ 00036 // $Author: rhoope $ 00037 // $Date: 2007/06/21 16:22:52 $ 00038 // $Revision: 1.8 $ 00039 // ************************************************************************ 00040 //@HEADER 00041 00042 #ifndef LOCA_MULTICONTINUATION_ABSTRACTSTRATEGY_H 00043 #define LOCA_MULTICONTINUATION_ABSTRACTSTRATEGY_H 00044 00045 #include "Teuchos_RCP.hpp" 00046 00047 #include "LOCA_Extended_MultiAbstractGroup.H" // base class 00048 #include "LOCA_Abstract_Iterator.H" // for StepStatus 00049 00050 // forward declarations 00051 namespace LOCA { 00052 namespace MultiContinuation { 00053 class ExtendedVector; 00054 class ExtendedMultiVector; 00055 } 00056 } 00057 00058 namespace LOCA { 00059 00060 namespace MultiContinuation { 00061 00063 00069 class AbstractStrategy : 00070 public virtual LOCA::Extended::MultiAbstractGroup { 00071 00072 public: 00073 00075 AbstractStrategy() {} 00076 00078 virtual ~AbstractStrategy() {} 00079 00081 virtual void copy(const NOX::Abstract::Group& source) = 0; 00082 00084 virtual int getNumParams() const = 0; 00085 00087 00091 virtual void 00092 preProcessContinuationStep( 00093 LOCA::Abstract::Iterator::StepStatus stepStatus) = 0; 00094 00096 00100 virtual void 00101 postProcessContinuationStep( 00102 LOCA::Abstract::Iterator::StepStatus stepStatus) = 0; 00103 00105 virtual NOX::Abstract::Group::ReturnType 00106 computePredictor() = 0; 00107 00109 virtual bool isPredictor() const = 0; 00110 00112 virtual void scaleTangent() = 0; 00113 00115 00119 virtual void 00120 setPredictorTangentDirection( 00121 const LOCA::MultiContinuation::ExtendedVector& v, 00122 int i) = 0; 00123 00125 virtual const LOCA::MultiContinuation::ExtendedMultiVector& 00126 getPredictorTangent() const = 0; 00127 00129 virtual const LOCA::MultiContinuation::ExtendedMultiVector& 00130 getScaledPredictorTangent() const = 0; 00131 00133 virtual void setPrevX(const NOX::Abstract::Vector& y) = 0; 00134 00136 virtual const LOCA::MultiContinuation::ExtendedVector& 00137 getPrevX() const = 0; 00138 00140 virtual void setStepSize(double deltaS, int i = 0) = 0; 00141 00143 virtual double getStepSize(int i = 0) const = 0; 00144 00146 virtual void setContinuationParameter(double val, int i = 0) = 0; 00147 00149 virtual double getContinuationParameter(int i = 0) const = 0; 00150 00152 virtual int getContinuationParameterID(int i = 0) const = 0; 00153 00155 virtual const vector<int>& getContinuationParameterIDs() const = 0; 00156 00158 virtual string getContinuationParameterName(int i = 0) const = 0; 00159 00161 virtual double getStepSizeScaleFactor(int i = 0) const = 0; 00162 00164 virtual void printSolution() const = 0; 00165 00167 virtual double computeScaledDotProduct( 00168 const NOX::Abstract::Vector& x, 00169 const NOX::Abstract::Vector& y) const = 0; 00170 00172 virtual int projectToDrawDimension() const = 0; 00173 00175 virtual void projectToDraw( 00176 const LOCA::MultiContinuation::ExtendedVector& x, 00177 double *px) const = 0; 00178 00180 using NOX::Abstract::Group::operator=; 00181 00182 }; // Class AbstractStrategy 00183 00184 } // Namespace MultiContinuation 00185 00186 } // Namespace LOCA 00187 00188 #endif // LOCA_MULTICONTINUATION_ABSTRACTSTRATEGY_H