Rythmos - Transient Integration for Differential Equations Version of the Day
Rythmos_SimpleIntegrationControlStrategy_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., 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 
00030 #ifndef RYTHMOS_SIMPLE_INTEGRATION_CONTROL_STRATEGY_DECL_HPP
00031 #define RYTHMOS_SIMPLE_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 
00048 template<class Scalar>
00049 class SimpleIntegrationControlStrategy
00050   : virtual public IntegrationControlStrategyBase<Scalar>,
00051     virtual public Teuchos::ParameterListAcceptorDefaultBase
00052 {
00053 public:
00054 
00057 
00059   SimpleIntegrationControlStrategy();
00060 
00062 
00065 
00067   void setParameterList(RCP<ParameterList> const& paramList);
00068 
00070   RCP<const ParameterList> getValidParameters() const;
00071 
00073 
00076 
00078   RCP<IntegrationControlStrategyBase<Scalar> >
00079   cloneIntegrationControlStrategy() const;
00080 
00082   void resetIntegrationControlStrategy(
00083     const TimeRange<Scalar> &integrationTimeDomain
00084     );
00085 
00087   StepControlInfo<Scalar>
00088   getNextStepControlInfo(
00089     const StepperBase<Scalar> &stepper,
00090     const StepControlInfo<Scalar> &stepCtrlInfoLast,
00091     const int timeStepIter
00092     );
00093 
00095 
00096 private:
00097 
00098   bool takeVariableSteps_;
00099   Scalar max_dt_;
00100   int numTimeSteps_;
00101   Scalar fixed_dt_;
00102 
00103   TimeRange<Scalar> integrationTimeDomain_;
00104 
00105   static const std::string takeVariableSteps_name_;
00106   static const bool takeVariableSteps_default_;
00107 
00108   static const std::string max_dt_name_;
00109   static const double max_dt_default_;
00110 
00111   static const std::string numTimeSteps_name_;
00112   static const int numTimeSteps_default_;
00113 
00114   static const std::string fixed_dt_name_;
00115   static const double fixed_dt_default_;
00116 
00117 };
00118 
00119 
00124 template<class Scalar> 
00125 RCP<SimpleIntegrationControlStrategy<Scalar> >
00126 simpleIntegrationControlStrategy();
00127 
00128 
00133 template<class Scalar> 
00134 RCP<SimpleIntegrationControlStrategy<Scalar> >
00135 simpleIntegrationControlStrategy( const RCP<ParameterList> &paramList );
00136 
00137 
00138 
00139 } // namespace Rythmos
00140 
00141 
00142 #endif // RYTHMOS_SIMPLE_INTEGRATION_CONTROL_STRATEGY_DECL_HPP
 All Classes Functions Variables Typedefs Friends