Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Tempus_RKButcherTableauBuilder_decl.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_RKButcherTableauBuilder_decl_hpp
10 #define Tempus_RKButcherTableauBuilder_decl_hpp
11 
13 #include "Teuchos_ObjectBuilder.hpp"
14 #include "Teuchos_ParameterListAcceptor.hpp"
15 
16 
17 namespace Tempus {
18 
19 /** \brief Runge-Kutta Builder class.
20  * This factory creates RKButcherTableau objects given the description
21  * string from the RKButcherTableau object.
22  *
23  * This was taken and modified from Rythmos' RKButcherTableauBuilder class.
24  */
25 template<class Scalar>
27  virtual public Teuchos::ParameterListAcceptor
28 {
29  public:
32 
34  const Teuchos::RCP<const Teuchos::AbstractFactory<RKButcherTableau<Scalar> > >
35  &rkbtFactory,
36  const std::string &rkbtFactoryName
37  );
38 
39  Teuchos::RCP<RKButcherTableau<Scalar> > create(
40  const std::string &rkbt_name = ""
41  ) const;
42 
43  /** \name Overridden from Teuchos::ParameterListAcceptor */
44  //@{
45  void setParameterList(const Teuchos::RCP<Teuchos::ParameterList> & paramList);
46  Teuchos::RCP<Teuchos::ParameterList> getNonconstParameterList();
47  Teuchos::RCP<Teuchos::ParameterList> unsetParameterList();
48  Teuchos::RCP<const Teuchos::ParameterList> getParameterList() const;
49  Teuchos::RCP<const Teuchos::ParameterList> getValidParameters() const;
50  //@}
51  private:
52  Teuchos::ObjectBuilder<RKButcherTableau<Scalar> > builder_;
53 
54  void initializeDefaults_();
55 };
56 
57 // Nonmember constructor
58 template<class Scalar>
59 Teuchos::RCP<RKButcherTableauBuilder<Scalar> > rKButcherTableauBuilder();
60 
61 // Nonmember helper function
62 template<class Scalar>
63 Teuchos::RCP<RKButcherTableau<Scalar> >
64 createRKBT(const std::string& rkbt_name,
65  Teuchos::RCP<Teuchos::ParameterList> pl);
66 
67 } // namespace Tempus
68 
69 
70 #endif // Tempus_RKButcherTableauBuilder_decl_hpp
Teuchos::RCP< const Teuchos::ParameterList > getValidParameters() const
void setParameterList(const Teuchos::RCP< Teuchos::ParameterList > &paramList)
Teuchos::RCP< RKButcherTableauBuilder< Scalar > > rKButcherTableauBuilder()
void setRKButcherTableauFactory(const Teuchos::RCP< const Teuchos::AbstractFactory< RKButcherTableau< Scalar > > > &rkbtFactory, const std::string &rkbtFactoryName)
Teuchos::RCP< Teuchos::ParameterList > getNonconstParameterList()
Teuchos::RCP< const Teuchos::ParameterList > getParameterList() const
Teuchos::RCP< RKButcherTableau< Scalar > > createRKBT(const std::string &rkbt_name, Teuchos::RCP< Teuchos::ParameterList > pl)
Teuchos::RCP< RKButcherTableau< Scalar > > create(const std::string &rkbt_name="") const
Teuchos::RCP< Teuchos::ParameterList > unsetParameterList()
Runge-Kutta Builder class. This factory creates RKButcherTableau objects given the description string...
Teuchos::ObjectBuilder< RKButcherTableau< Scalar > > builder_