rb_parameters.h
Go to the documentation of this file.
1 // rbOOmit: An implementation of the Certified Reduced Basis method.
2 // Copyright (C) 2009, 2010 David J. Knezevic
3 
4 // This file is part of rbOOmit.
5 
6 // rbOOmit is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 
11 // rbOOmit is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 
20 #ifndef LIBMESH_RB_PARAMETERS_H
21 #define LIBMESH_RB_PARAMETERS_H
22 
23 // libMesh includes
24 #include "libmesh/libmesh_common.h"
25 
26 // C++ includes
27 #include <string>
28 #include <map>
29 #include <set>
30 
31 namespace libMesh
32 {
33 
41 // ------------------------------------------------------------
42 // RBParameters class definition
44 {
45 public:
46 
50  RBParameters();
51 
52  // Define a constant iterator for this class
53  typedef std::map<std::string, Real>::const_iterator const_iterator;
54 
58  void clear();
59 
63  Real get_value(const std::string& param_name) const;
64 
69  void set_value(const std::string& param_name, Real value);
70 
74  unsigned int n_parameters() const;
75 
79  void get_parameter_names(std::set<std::string>& param_names) const;
80 
84  const_iterator begin() const;
85 
89  const_iterator end() const;
90 
94  bool operator== (const RBParameters& rhs) const;
95 
99  bool operator!= (const RBParameters& node) const;
100 
106  std::string get_string(unsigned int precision=6) const;
107 
111  void print() const;
112 
113 private:
114 
118  std::map<std::string, Real> _parameters;
119 
120 };
121 
122 } // namespace libMesh
123 
124 
125 #endif // LIBMESH_RB_PARAMETERS_H

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:07 UTC

Hosted By:
SourceForge.net Logo