10 #ifndef Tempus_TimeEventBase_decl_hpp 
   11 #define Tempus_TimeEventBase_decl_hpp 
   15 #include "Teuchos_VerboseObject.hpp" 
   17 #include "Tempus_config.hpp" 
   35 template <
class Scalar>
 
   41       name_(
"TimeEventBase"),
 
   43       defaultTol_(std::numeric_limits<Scalar>::epsilon() * Scalar(100.0)),
 
   63   virtual bool isTime(Scalar time)
 const { 
return false; }
 
  112   virtual bool eventInRange(Scalar time1, Scalar time2)
 const { 
return false; }
 
  124   virtual bool isIndex(
int index)
 const { 
return false; }
 
  176     auto l_out = Teuchos::fancyOStream(out.
getOStream());
 
  178     l_out->setOutputToRootOnly(0);
 
  180     *l_out << 
"TimeEventBase name = " << 
getName() << std::endl;
 
  250         Teuchos::parameterList(
"Time Event Base");
 
  272 #endif  // Tempus_TimeEventBase_decl_hpp 
virtual bool getLandOnExactly() const 
Return if the time events need to be landed on exactly. 
 
virtual std::string getType() const 
Return the type of TimeEvent. 
 
virtual void describe(Teuchos::FancyOStream &out, const Teuchos::EVerbosityLevel verbLevel) const 
Describe member data. 
 
virtual Scalar getDefaultTime() const 
Return the default time used for TimeEvents. 
 
const Scalar defaultTol_
Default tolerance. 
 
virtual void setType(std::string s)
 
const int defaultIndex_
Default index. 
 
virtual void setName(std::string name)
Set the name of the TimeEvent. 
 
virtual int indexOfNextEvent(int index) const 
Return the index of the next event following the input index. 
 
virtual bool eventInRange(Scalar time1, Scalar time2) const 
Test if an event occurs within the time range. 
 
ParameterList & set(std::string const &name, T &&value, std::string const &docString="", RCP< const ParameterEntryValidator > const &validator=null)
 
virtual Scalar timeToNextEvent(Scalar time) const 
How much time until the next event. 
 
std::string name_
Name to identify the TimeEvent. 
 
virtual bool isTime(Scalar time) const 
Test if time is near an event (within tolerance). 
 
virtual int getDefaultIndex() const 
Return the default index used by TimeEvents. 
 
const Scalar defaultTime_
Default time. 
 
virtual Scalar getDefaultTol() const 
Return the default tolerance used by TimeEvents. 
 
virtual bool isIndex(int index) const 
Test if index is an event. 
 
std::string timeEventType_
Time Event type. 
 
virtual Scalar timeOfNextEvent(Scalar time) const 
Return the time of the next event following the input time. 
 
virtual Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const 
Return ParameterList with current values. 
 
This class defines time events which can be used to "trigger" an action. 
 
virtual bool eventInRangeIndex(int index1, int index2) const 
Test if an event occurs within the index range. 
 
virtual std::string getName() const 
Return the name of the TimeEvent. 
 
RCP< std::basic_ostream< char_type, traits_type > > getOStream()
 
virtual Scalar getAbsTol() const 
Return the absolute tolerance. 
 
virtual ~TimeEventBase()
Destructor. 
 
virtual int indexToNextEvent(int index) const 
How many indices until the next event. 
 
ParameterList & setName(const std::string &name)
 
TimeEventBase()
Constructor.