Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_StepperOperatorSplitObserverBase.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_StepperOperatorSplitObserverBase_hpp
10 #define Tempus_StepperOperatorSplitObserverBase_hpp
11 
12 #include "Tempus_config.hpp"
13 #include "Tempus_SolutionHistory.hpp"
15 
16 
17 namespace Tempus {
18 
19 /** \brief Base observer for StepperOperatorSplit.
20  *
21  * This class provides a means to observe values (e.g., solution variables
22  * through SolutionHistory, and stepper member data through the Stepper),
23  * and cannot modify them.
24  *
25  * Users deriving from this class can observer a lot of data, and it is
26  * expected that users will NOT modify any of that data. If the user
27  * wishes to modify the solution and/or stepper data during the
28  * Stepper::takeStep, they should use the Modifier class (with care!).
29  *
30  */
31 template<class Scalar>
33  : virtual public Tempus::StepperOperatorSplitAppAction<Scalar>
34 {
35 private:
36 
37  /* \brief Adaptor execute function
38  *
39  * This is an adaptor function to bridge between the AppAction
40  * interface and this derived interface. It is meant to be private
41  * and non-virtual as deriving from this class should only need to
42  * implement the observe function.
43  *
44  * For the Observer interface, this adaptor simply "applies" constantness
45  * to the arguments.
46  */
47  void execute(
48  Teuchos::RCP<SolutionHistory<Scalar> > sh,
49  Teuchos::RCP<StepperOperatorSplit<Scalar> > stepper,
51  { this->observe(sh, stepper, actLoc); }
52 
53 public:
54 
55  /// Observe OperatorSplit Stepper.
56  virtual void observe(
57  Teuchos::RCP<const SolutionHistory<Scalar> > /* sh */,
58  Teuchos::RCP<const StepperOperatorSplit<Scalar> > /* stepper */,
60 
61 };
62 
63 } // namespace Tempus
64 
65 #endif // Tempus_StepperOperatorSplitObserverBase_hpp
void execute(Teuchos::RCP< SolutionHistory< Scalar > > sh, Teuchos::RCP< StepperOperatorSplit< Scalar > > stepper, const typename StepperOperatorSplitAppAction< Scalar >::ACTION_LOCATION actLoc)
Execute application action for OperatorSplit Stepper.
OperatorSplit stepper loops through the Stepper list.
virtual void observe(Teuchos::RCP< const SolutionHistory< Scalar > >, Teuchos::RCP< const StepperOperatorSplit< Scalar > >, const typename StepperOperatorSplitAppAction< Scalar >::ACTION_LOCATION actLoc)=0
Observe OperatorSplit Stepper.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
StepperOperatorSplitAppAction class for StepperOperatorSplit.