Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
Tempus::TimeStepControlStrategyComposite< Scalar > Class Template Reference

TimeStepControlStrategyComposite loops over a vector of TimeStepControlStrategies. More...

#include <Tempus_TimeStepControlStrategyComposite.hpp>

Inheritance diagram for Tempus::TimeStepControlStrategyComposite< Scalar >:
Tempus::TimeStepControlStrategy< Scalar > Teuchos::Describable Teuchos::VerboseObject< Tempus::TimeStepControlStrategy< Scalar > > Teuchos::LabeledObject Teuchos::VerboseObjectBase

Public Member Functions

 TimeStepControlStrategyComposite ()
 Constructor. More...
 
virtual ~TimeStepControlStrategyComposite ()
 Destructor. More...
 
virtual void setNextTimeStep (const TimeStepControl< Scalar > &tsc, Teuchos::RCP< SolutionHistory< Scalar >> sh, Status &integratorStatus) override
 Determine the time step size. More...
 
void addStrategy (const Teuchos::RCP< TimeStepControlStrategy< Scalar >> &strategy)
 Append strategy to the composite list. More...
 
virtual int size () const
 Size of composite list. More...
 
virtual std::vector
< Teuchos::RCP
< TimeStepControlStrategy
< Scalar > > > 
getStrategies () const
 Return composite list. More...
 
void clearStrategies ()
 Clear the composite list. More...
 
virtual void initialize () const override
 
virtual Teuchos::RCP< const
Teuchos::ParameterList
getValidParameters () const override
 Return ParameterList with current values. More...
 
- Public Member Functions inherited from Tempus::TimeStepControlStrategy< Scalar >
 TimeStepControlStrategy ()
 Constructor. More...
 
virtual ~TimeStepControlStrategy ()
 Destructor. More...
 
virtual void setNextTimeStep (const TimeStepControl< Scalar > &, Teuchos::RCP< SolutionHistory< Scalar > >, Status &)
 Set the time step size. More...
 
virtual bool isInitialized ()
 
virtual void checkInitialized ()
 
virtual void setName (std::string s)
 
virtual std::string getStrategyType () const
 
virtual std::string getStepType () const
 
virtual std::string getName () const
 
- Public Member Functions inherited from Teuchos::Describable
void describe (std::ostream &out, const EVerbosityLevel verbLevel=verbLevel_default) const
 
virtual ~Describable ()
 
 LabeledObject ()
 
virtual ~LabeledObject ()
 
virtual void setObjectLabel (const std::string &objectLabel)
 
virtual std::string getObjectLabel () const
 
DescribableStreamManipulatorState describe (const Describable &describable, const EVerbosityLevel verbLevel=Describable::verbLevel_default)
 
std::ostream & operator<< (std::ostream &os, const DescribableStreamManipulatorState &d)
 
- Public Member Functions inherited from Teuchos::VerboseObject< Tempus::TimeStepControlStrategy< Scalar > >
 VerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectsetVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual const VerboseObjectsetOverridingVerbLevel (const EVerbosityLevel verbLevel) const
 
virtual EVerbosityLevel getVerbLevel () const
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
RCP< const ParameterList
getValidVerboseObjectSublist ()
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
setupVerboseObjectSublist (ParameterList *paramList)
 
TEUCHOSPARAMETERLIST_LIB_DLL_EXPORT
void 
readVerboseObjectSublist (ParameterList *paramList, RCP< FancyOStream > *oStream, EVerbosityLevel *verbLevel)
 
void readVerboseObjectSublist (ParameterList *paramList, VerboseObject< ObjectType > *verboseObject)
 
- Public Member Functions inherited from Teuchos::VerboseObjectBase
virtual ~VerboseObjectBase ()
 
 VerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual const VerboseObjectBasesetOStream (const RCP< FancyOStream > &oStream) const
 
virtual const VerboseObjectBasesetOverridingOStream (const RCP< FancyOStream > &oStream) const
 
virtual VerboseObjectBasesetLinePrefix (const std::string &linePrefix)
 
virtual RCP< FancyOStreamgetOStream () const
 
virtual RCP< FancyOStreamgetOverridingOStream () const
 
virtual std::string getLinePrefix () const
 
virtual OSTab getOSTab (const int tabs=1, const std::string &linePrefix="") const
 

Private Attributes

std::vector< Teuchos::RCP
< TimeStepControlStrategy
< Scalar > > > 
strategies_
 

Overridden from Teuchos::Describable

std::string description () const override
 
void describe (Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const override
 

Additional Inherited Members

- Static Public Member Functions inherited from Teuchos::VerboseObject< Tempus::TimeStepControlStrategy< Scalar > >
static void setDefaultVerbLevel (const EVerbosityLevel defaultVerbLevel)
 
static EVerbosityLevel getDefaultVerbLevel ()
 
- Static Public Member Functions inherited from Teuchos::VerboseObjectBase
static void setDefaultOStream (const RCP< FancyOStream > &defaultOStream)
 
static RCP< FancyOStreamgetDefaultOStream ()
 
- Static Public Attributes inherited from Teuchos::Describable
static const EVerbosityLevel verbLevel_default
 
- Protected Member Functions inherited from Tempus::TimeStepControlStrategy< Scalar >
virtual void setStrategyType (std::string s)
 
virtual void setStepType (std::string s)
 
- Protected Member Functions inherited from Teuchos::VerboseObject< Tempus::TimeStepControlStrategy< Scalar > >
void initializeVerboseObject (const EVerbosityLevel verbLevel=VERB_DEFAULT, const RCP< FancyOStream > &oStream=Teuchos::null)
 
- Protected Member Functions inherited from Teuchos::VerboseObjectBase
void initializeVerboseObjectBase (const RCP< FancyOStream > &oStream=Teuchos::null)
 
virtual void informUpdatedVerbosityState () const
 
- Protected Attributes inherited from Tempus::TimeStepControlStrategy< Scalar >
std::string strategyType_
 Strategy type. More...
 
std::string stepType_
 Step Type - "Constant" or "Variable". More...
 
std::string name_
 Name of strategy. More...
 
bool isInitialized_
 Bool if strategy is initialized. More...
 

Detailed Description

template<class Scalar>
class Tempus::TimeStepControlStrategyComposite< Scalar >

TimeStepControlStrategyComposite loops over a vector of TimeStepControlStrategies.

Essentially, this is an and case if each strategies do a min $ \Delta t = \min_{i \leq N} \{ \Delta t_i \}$

The assumption is that each strategy will simply update (or override) the step size dt with metadata->setDt(dt) sequentially.

Examples of TimeStepControlStrategy:

Note: The ordering in the TimeStepControlStrategyComposite list is very important. The final TimeStepControlStrategy from the composite could negate all previous step size updates.

Definition at line 43 of file Tempus_TimeStepControlStrategyComposite.hpp.

Constructor & Destructor Documentation

template<class Scalar >
Tempus::TimeStepControlStrategyComposite< Scalar >::TimeStepControlStrategyComposite ( )
inline

Constructor.

Definition at line 47 of file Tempus_TimeStepControlStrategyComposite.hpp.

template<class Scalar >
virtual Tempus::TimeStepControlStrategyComposite< Scalar >::~TimeStepControlStrategyComposite ( )
inlinevirtual

Destructor.

Definition at line 55 of file Tempus_TimeStepControlStrategyComposite.hpp.

Member Function Documentation

template<class Scalar >
virtual void Tempus::TimeStepControlStrategyComposite< Scalar >::setNextTimeStep ( const TimeStepControl< Scalar > &  tsc,
Teuchos::RCP< SolutionHistory< Scalar >>  sh,
Status integratorStatus 
)
inlineoverridevirtual

Determine the time step size.

Definition at line 58 of file Tempus_TimeStepControlStrategyComposite.hpp.

template<class Scalar >
std::string Tempus::TimeStepControlStrategyComposite< Scalar >::description ( ) const
inlineoverridevirtual

Reimplemented from Teuchos::Describable.

Definition at line 67 of file Tempus_TimeStepControlStrategyComposite.hpp.

template<class Scalar >
void Tempus::TimeStepControlStrategyComposite< Scalar >::describe ( Teuchos::FancyOStream out,
const Teuchos::EVerbosityLevel  verbLevel 
) const
inlineoverridevirtual

Reimplemented from Teuchos::Describable.

Definition at line 72 of file Tempus_TimeStepControlStrategyComposite.hpp.

template<class Scalar >
void Tempus::TimeStepControlStrategyComposite< Scalar >::addStrategy ( const Teuchos::RCP< TimeStepControlStrategy< Scalar >> &  strategy)
inline

Append strategy to the composite list.

Definition at line 100 of file Tempus_TimeStepControlStrategyComposite.hpp.

template<class Scalar >
virtual int Tempus::TimeStepControlStrategyComposite< Scalar >::size ( ) const
inlinevirtual

Size of composite list.

Definition at line 116 of file Tempus_TimeStepControlStrategyComposite.hpp.

template<class Scalar >
virtual std::vector<Teuchos::RCP<TimeStepControlStrategy<Scalar> > > Tempus::TimeStepControlStrategyComposite< Scalar >::getStrategies ( ) const
inlinevirtual

Return composite list.

Definition at line 120 of file Tempus_TimeStepControlStrategyComposite.hpp.

template<class Scalar >
void Tempus::TimeStepControlStrategyComposite< Scalar >::clearStrategies ( )
inline

Clear the composite list.

Definition at line 126 of file Tempus_TimeStepControlStrategyComposite.hpp.

template<class Scalar >
virtual void Tempus::TimeStepControlStrategyComposite< Scalar >::initialize ( ) const
inlineoverridevirtual
template<class Scalar >
virtual Teuchos::RCP<const Teuchos::ParameterList> Tempus::TimeStepControlStrategyComposite< Scalar >::getValidParameters ( ) const
inlineoverridevirtual

Return ParameterList with current values.

Reimplemented from Tempus::TimeStepControlStrategy< Scalar >.

Definition at line 158 of file Tempus_TimeStepControlStrategyComposite.hpp.

Member Data Documentation

template<class Scalar >
std::vector<Teuchos::RCP<TimeStepControlStrategy<Scalar> > > Tempus::TimeStepControlStrategyComposite< Scalar >::strategies_
private

Definition at line 179 of file Tempus_TimeStepControlStrategyComposite.hpp.


The documentation for this class was generated from the following file: