Rythmos - Transient Integration for Differential Equations Version of the Day
Rythmos_RampingIntegrationControlStrategy_decl.hpp
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Todd S. Coffey (tscoffe@sandia.gov)
00025 //
00026 // ***********************************************************************
00027 //@HEADER
00028 
00029 
00030 #ifndef RYTHMOS_RAMPING_INTEGRATION_CONTROL_STRATEGY_DECL_HPP
00031 #define RYTHMOS_RAMPING_INTEGRATION_CONTROL_STRATEGY_DECL_HPP
00032 
00033 
00034 #include "Rythmos_IntegrationControlStrategyBase.hpp"
00035 #include "Rythmos_StepperBase.hpp"
00036 #include "Rythmos_StepControlInfo.hpp"
00037 #include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
00038 
00039 
00040 namespace Rythmos {
00041 
00042 
00047 template<class Scalar>
00048 class RampingIntegrationControlStrategy
00049   : virtual public IntegrationControlStrategyBase<Scalar>,
00050     virtual public Teuchos::ParameterListAcceptorDefaultBase
00051 {
00052 public:
00053 
00056 
00058   RampingIntegrationControlStrategy();
00059 
00061 
00064 
00066   void setParameterList(RCP<ParameterList> const& paramList);
00067 
00069   RCP<const ParameterList> getValidParameters() const;
00070 
00072 
00075 
00077   RCP<IntegrationControlStrategyBase<Scalar> >
00078   cloneIntegrationControlStrategy() const;
00079 
00081   void resetIntegrationControlStrategy(
00082     const TimeRange<Scalar> &integrationTimeDomain
00083     );
00084 
00086   StepControlInfo<Scalar>
00087   getNextStepControlInfo(
00088     const StepperBase<Scalar> &stepper,
00089     const StepControlInfo<Scalar> &stepCtrlInfoLast,
00090     const int timeStepIter
00091     );
00092 
00094 
00095 private:
00096 
00097   int num_ramping_steps_;
00098   Scalar initial_dt_;
00099   Scalar max_dt_;
00100   Scalar ramping_factor_;
00101 
00102   Scalar current_dt_;
00103 
00104   TimeRange<Scalar> integrationTimeDomain_;
00105 
00106   static const std::string num_ramping_steps_name_;
00107   static const int num_ramping_steps_default_;
00108 
00109   static const std::string initial_dt_name_;
00110   static const double initial_dt_default_;
00111 
00112   static const std::string max_dt_name_;
00113   static const double max_dt_default_;
00114 
00115   static const std::string ramping_factor_name_;
00116   static const double ramping_factor_default_;
00117 
00118 };
00119 
00120 
00125 template<class Scalar> 
00126 RCP<RampingIntegrationControlStrategy<Scalar> >
00127 rampingIntegrationControlStrategy();
00128 
00129 
00134 template<class Scalar> 
00135 RCP<RampingIntegrationControlStrategy<Scalar> >
00136 rampingIntegrationControlStrategy( const RCP<ParameterList> &paramList );
00137 
00138 
00139 
00140 } // namespace Rythmos
00141 
00142 
00143 #endif // RYTHMOS_RAMPING_INTEGRATION_CONTROL_STRATEGY_DECL_HPP
 All Classes Functions Variables Typedefs Friends