Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_StepperSubcyclingAppActionComposite.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ****************************************************************************
3 // Tempus: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
9 #ifndef Tempus_StepperSubcyclingAppActionComposite_hpp
10 #define Tempus_StepperSubcyclingAppActionComposite_hpp
11 
12 #include "Tempus_config.hpp"
14 #include "Tempus_TimeStepControl.hpp"
15 #include <vector>
16 
17 namespace Tempus {
18 
24 template <class Scalar>
26  : virtual public Tempus::StepperSubcyclingAppAction<Scalar> {
27  public:
30 
33 
35  virtual void execute(
39  {
40  for (auto& a : appActions_) a->execute(sh, stepper, actLoc);
41  }
42 
43  // Add AppAction to the AppAction vector.
46  {
47  appActions_.push_back(appAction);
48  }
49 
50  // Clear the AppAction vector.
52  {
53  appActions_.clear();
54  }
55 
56  // Return the size of the AppAction vector.
57  std::size_t getSize() const { return appActions_.size(); }
58 
59  private:
60  std::vector<Teuchos::RCP<StepperSubcyclingAppAction<Scalar> > > appActions_;
61 };
62 
63 } // namespace Tempus
64 #endif // Tempus_StepperSubcyclingAppActionComposite_hpp
StepperSubcyclingAppActionComposite()
Default constructor.
Application Action for StepperSubcycling.
virtual ~StepperSubcyclingAppActionComposite()
Destructor.
virtual void execute(Teuchos::RCP< SolutionHistory< Scalar > > sh, Teuchos::RCP< StepperSubcycling< Scalar > > stepper, const typename StepperSubcyclingAppAction< Scalar >::ACTION_LOCATION actLoc)
Execute application action for Subcycling Stepper.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
ACTION_LOCATION
Indicates the location of application action (see algorithm).
std::vector< Teuchos::RCP< StepperSubcyclingAppAction< Scalar > > > appActions_
void addSubcyclingAppAction(Teuchos::RCP< StepperSubcyclingAppAction< Scalar > > appAction)
This composite AppAction loops over added AppActions.