rb_parameters.h
Go to the documentation of this file.00001 // rbOOmit: An implementation of the Certified Reduced Basis method. 00002 // Copyright (C) 2009, 2010 David J. Knezevic 00003 00004 // This file is part of rbOOmit. 00005 00006 // rbOOmit is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License, or (at your option) any later version. 00010 00011 // rbOOmit is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 00020 #ifndef LIBMESH_RB_PARAMETERS_H 00021 #define LIBMESH_RB_PARAMETERS_H 00022 00023 // libMesh includes 00024 #include "libmesh/libmesh_common.h" 00025 00026 // C++ includes 00027 #include <string> 00028 #include <map> 00029 #include <set> 00030 00031 namespace libMesh 00032 { 00033 00041 // ------------------------------------------------------------ 00042 // RBParameters class definition 00043 class RBParameters 00044 { 00045 public: 00046 00050 RBParameters(); 00051 00052 // Define a constant iterator for this class 00053 typedef std::map<std::string, Real>::const_iterator const_iterator; 00054 00058 void clear(); 00059 00063 Real get_value(const std::string& param_name) const; 00064 00069 void set_value(const std::string& param_name, Real value); 00070 00074 unsigned int n_parameters() const; 00075 00079 void get_parameter_names(std::set<std::string>& param_names) const; 00080 00084 const_iterator begin() const; 00085 00089 const_iterator end() const; 00090 00094 bool operator== (const RBParameters& rhs) const; 00095 00099 bool operator!= (const RBParameters& node) const; 00100 00106 std::string get_string(unsigned int precision=6) const; 00107 00111 void print() const; 00112 00113 private: 00114 00118 std::map<std::string, Real> _parameters; 00119 00120 }; 00121 00122 } // namespace libMesh 00123 00124 00125 #endif // LIBMESH_RB_PARAMETERS_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:48 UTC
Hosted By: