Rythmos - Transient Integration for Differential Equations  Version of the Day
 All Classes Functions Variables Typedefs Pages
Rythmos_RKButcherTableauBuilder_decl.hpp
1 //@HEADER
2 // ***********************************************************************
3 //
4 // Rythmos Package
5 // Copyright (2006) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact Todd S. Coffey (tscoffe@sandia.gov)
25 //
26 // ***********************************************************************
27 //@HEADER
28 
29 
30 #ifndef RYTHMOS_RK_BUTCHER_TABLEAU_BUILDER_DECL_HPP
31 #define RYTHMOS_RK_BUTCHER_TABLEAU_BUILDER_DECL_HPP
32 
33 #include "Rythmos_Types.hpp"
34 
35 #include "Rythmos_RKButcherTableauBase.hpp"
36 #include "Teuchos_ObjectBuilder.hpp"
37 #include "Teuchos_ParameterListAcceptor.hpp"
38 
39 
40 
41 
42 namespace Rythmos {
43 
44 template<class Scalar>
45 class RKButcherTableauBuilder :
46  virtual public Teuchos::ParameterListAcceptor
47 {
48  public:
49  RKButcherTableauBuilder();
50  virtual ~RKButcherTableauBuilder() {}
51 
52  void setRKButcherTableauFactory(
53  const RCP<const Teuchos::AbstractFactory<RKButcherTableauBase<Scalar> > > &rkbtFactory,
54  const std::string &rkbtFactoryName
55  );
56 
57  RCP<RKButcherTableauBase<Scalar> > create(
58  const std::string &rkbt_name = ""
59  ) const;
60 
63 
65  void setParameterList(const RCP<Teuchos::ParameterList> & paramList);
66 
68  RCP<Teuchos::ParameterList> getNonconstParameterList();
69 
71  RCP<Teuchos::ParameterList> unsetParameterList();
72 
74  RCP<const ParameterList> getParameterList() const;
75 
77  RCP<const Teuchos::ParameterList> getValidParameters() const;
78 
80  private:
81  Teuchos::ObjectBuilder<RKButcherTableauBase<Scalar> > builder_;
82 
83  void initializeDefaults_();
84 };
85 
86 // Nonmember constructor
87 template<class Scalar>
88 RCP<RKButcherTableauBuilder<Scalar> > rKButcherTableauBuilder();
89 
90 // Nonmember helper function
91 template<class Scalar>
92 RCP<RKButcherTableauBase<Scalar> > createRKBT(const std::string& rkbt_name);
93 
94 
95 } // namespace Rythmos
96 
97 
98 #endif // RYTHMOS_RK_BUTCHER_TABLEAU_BUILDER_DECL_HPP