Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperTrapezoidalAppActionComposite.hpp
Go to the documentation of this file.
1 //@HEADER
2 // *****************************************************************************
3 // Tempus: Time Integration and Sensitivity Analysis Package
4 //
5 // Copyright 2017 NTESS and the Tempus contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 //@HEADER
9 
10 #ifndef Tempus_StepperTrapezoidalAppActionComposite_hpp
11 #define Tempus_StepperTrapezoidalAppActionComposite_hpp
12 
13 #include "Tempus_config.hpp"
15 #include "Tempus_TimeStepControl.hpp"
16 #include <vector>
17 
18 namespace Tempus {
19 
25 template <class Scalar>
27  : virtual public Tempus::StepperTrapezoidalAppAction<Scalar> {
28  public:
31 
34 
36  virtual void execute(
40  actLoc)
41  {
42  for (auto& a : appActions_) a->execute(sh, stepper, actLoc);
43  }
44 
45  // Add AppAction to the AppAction vector.
48  {
49  appActions_.push_back(appAction);
50  }
51 
52  // Clear the AppAction vector.
54  {
55  appActions_.clear();
56  }
57 
58  // Return the size of the AppAction vector.
59  std::size_t getSize() const { return appActions_.size(); }
60 
61  private:
62  std::vector<Teuchos::RCP<StepperTrapezoidalAppAction<Scalar> > > appActions_;
63 };
64 
65 } // namespace Tempus
66 #endif // Tempus_StepperTrapezoidalAppActionComposite_hpp
Trapezoidal method time stepper.
StepperTrapezoidalAppActionComposite()
Default constructor.
This composite AppAction loops over added AppActions.
ACTION_LOCATION
Indicates the location of application action (see algorithm).
virtual void execute(Teuchos::RCP< SolutionHistory< Scalar > > sh, Teuchos::RCP< StepperTrapezoidal< Scalar > > stepper, const typename StepperTrapezoidalAppAction< Scalar >::ACTION_LOCATION actLoc)
Execute application action for Subcycling Stepper.
std::vector< Teuchos::RCP< StepperTrapezoidalAppAction< Scalar > > > appActions_
Application Action for StepperTrapezoidal.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
virtual ~StepperTrapezoidalAppActionComposite()
Destructor.
void addTrapezoidalAppAction(Teuchos::RCP< StepperTrapezoidalAppAction< Scalar > > appAction)