|
Rythmos - Transient Integration for Differential Equations
Version of the Day
|
00001 //@HEADER 00002 // *********************************************************************** 00003 // 00004 // Rythmos Package 00005 // Copyright (2006) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 00023 // USA 00024 // Questions? Contact Todd S. Coffey (tscoffe@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 //@HEADER 00028 00029 #ifndef Rythmos_STEPPER_BASE_DECL_H 00030 #define Rythmos_STEPPER_BASE_DECL_H 00031 00032 00033 #include "Rythmos_InterpolationBufferBase.hpp" 00034 #include "Rythmos_StepperSupportTypes.hpp" 00035 #include "Rythmos_Types.hpp" 00036 #include "Teuchos_Describable.hpp" 00037 #include "Thyra_ModelEvaluator.hpp" 00038 00039 00040 namespace Rythmos { 00041 00042 namespace { 00043 const std::string RythmosStepControlSettings_name = "Step Control Settings"; 00044 } 00045 00077 template<class Scalar> 00078 class StepperBase : virtual public InterpolationBufferBase<Scalar> 00079 { 00080 public: 00081 00089 virtual bool supportsCloning() const; 00090 00111 virtual RCP<StepperBase<Scalar> > cloneStepperAlgorithm() const; 00112 00118 virtual bool isImplicit() const; 00119 00130 virtual bool acceptsModel() const; 00131 00166 virtual void setModel( 00167 const RCP<const Thyra::ModelEvaluator<Scalar> >& model 00168 ) = 0; 00169 00170 00181 virtual void setNonconstModel( 00182 const RCP<Thyra::ModelEvaluator<Scalar> >& model 00183 ) = 0; 00184 00188 virtual bool modelIsConst() const { return true; } 00189 00190 // 2009/09/05: rabartl: ToDo: Make setModel(const model) and modelIsConst() 00191 // pure virtual and make all subclasses implement them. All subclasses will 00192 // need to use the Teuchos::ConstNonconstObjectContainer class to make this 00193 // work. See Rythmos::ForwardSensitivityStepper and Rythmos::BackwardEuler 00194 // to see how this works. 00195 00203 virtual RCP<const Thyra::ModelEvaluator<Scalar> > 00204 getModel() const = 0; 00205 00208 virtual RCP<Thyra::ModelEvaluator<Scalar> > 00209 getNonconstModel() = 0; 00210 00229 virtual void setInitialCondition( 00230 const Thyra::ModelEvaluatorBase::InArgs<Scalar> &initialCondition 00231 ) = 0; 00232 00239 virtual Thyra::ModelEvaluatorBase::InArgs<Scalar> 00240 getInitialCondition() const = 0; 00241 00278 virtual Scalar takeStep(Scalar dt, StepSizeType stepType) = 0; 00279 00291 virtual const StepStatus<Scalar> getStepStatus() const = 0; 00292 00306 virtual void setStepControlData(const StepperBase & stepper); 00307 00308 }; 00309 00310 00315 template<class Scalar> 00316 bool isInitialized( const StepperBase<Scalar>& stepper ); 00317 00318 00319 } // namespace Rythmos 00320 00321 #endif //Rythmos_STEPPER_BASE_DECL_H
1.7.6.1