rb_parametrized.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_PARAMETRIZED_H 00021 #define LIBMESH_RB_PARAMETRIZED_H 00022 00023 // rbOOmit includes 00024 #include "libmesh/rb_parameters.h" 00025 00026 // libMesh includes 00027 #include "libmesh/reference_counted_object.h" 00028 00029 // C++ includes 00030 #include <vector> 00031 00032 namespace libMesh 00033 { 00034 00043 // ------------------------------------------------------------ 00044 // RBParametrized class definition 00045 class RBParametrized : public ReferenceCountedObject<RBParametrized> 00046 { 00047 public: 00048 00052 RBParametrized (); 00053 00057 virtual ~RBParametrized (); 00058 00063 virtual void clear (); 00064 00068 void initialize_parameters(const RBParameters& mu_min_in, 00069 const RBParameters& mu_max_in, 00070 const RBParameters& mu_in); 00071 00075 void initialize_parameters(const RBParametrized& rb_parametrized); 00076 00081 virtual void initialize_parameters(const std::string& parameters_filename); 00082 00086 unsigned int get_n_params() const; 00087 00091 const RBParameters& get_parameters() const; 00092 00096 void set_parameters(const RBParameters& params); 00097 00102 const RBParameters& get_parameters_min() const; 00103 00108 const RBParameters& get_parameters_max() const; 00109 00113 Real get_parameter_min(const std::string& param_name) const; 00114 00118 Real get_parameter_max(const std::string& param_name) const; 00119 00123 void print_parameters() const; 00124 00128 void write_parameter_ranges_to_file(const std::string& file_name, 00129 const bool write_binary); 00130 00135 void read_parameter_ranges_from_file(const std::string& file_name, 00136 const bool read_binary); 00137 00141 bool verbose_mode; 00142 00143 private: 00144 00148 bool valid_params(const RBParameters& params); 00149 00150 //--------------- PRIVATE DATA MEMBERS ---------------// 00151 00155 bool parameters_initialized; 00156 00160 RBParameters parameters; 00161 00165 RBParameters parameters_min; 00166 RBParameters parameters_max; 00167 00168 }; 00169 00170 } // namespace libMesh 00171 00172 00173 #endif // LIBMESH_RB_PARAMETRIZED_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:48 UTC
Hosted By: