rb_eim_evaluation.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_EIM_EVALUATION_H 00021 #define LIBMESH_RB_EIM_EVALUATION_H 00022 00023 // libMesh includes 00024 #include "libmesh/auto_ptr.h" 00025 #include "libmesh/point.h" 00026 #include "libmesh/rb_evaluation.h" 00027 00028 // C++ includes 00029 00030 namespace libMesh 00031 { 00032 00033 class RBParameters; 00034 class RBParametrizedFunction; 00035 00047 // ------------------------------------------------------------ 00048 // RBEIMEvaluation class definition 00049 00050 class RBEIMEvaluation : public RBEvaluation 00051 { 00052 public: 00053 00057 RBEIMEvaluation (); 00058 00062 virtual ~RBEIMEvaluation (); 00063 00067 typedef RBEvaluation Parent; 00068 00072 virtual void clear(); 00073 00078 virtual void resize_data_structures(const unsigned int Nmax, 00079 bool resize_error_bound_data=true); 00080 00085 void attach_parametrized_function(RBParametrizedFunction* pf); 00086 00087 00092 unsigned int get_n_parametrized_functions() const; 00093 00099 Number evaluate_parametrized_function(unsigned int var_index, const Point& p); 00100 00107 virtual Real rb_solve(unsigned int N); 00108 00114 void rb_solve(DenseVector<Number>& EIM_rhs); 00115 00121 void initialize_eim_theta_objects(); 00122 00126 std::vector<RBTheta*> get_eim_theta_objects(); 00127 00133 virtual AutoPtr<RBTheta> build_eim_theta(unsigned int index); 00134 00139 virtual void write_offline_data_to_files(const std::string& directory_name = "offline_data", 00140 const bool write_binary_data=true); 00141 00146 virtual void read_offline_data_from_files(const std::string& directory_name = "offline_data", 00147 bool read_error_bound_data=true, 00148 const bool read_binary_data=true); 00149 00150 //----------- PUBLIC DATA MEMBERS -----------// 00151 00156 DenseMatrix<Number> interpolation_matrix; 00157 00162 std::vector<Point> interpolation_points; 00163 00168 std::vector<unsigned int> interpolation_points_var; 00169 00175 Point extra_interpolation_point; 00176 unsigned int extra_interpolation_point_var; 00177 00182 DenseVector<Number> extra_interpolation_matrix_row; 00183 00184 private: 00185 00190 std::vector<RBParametrizedFunction*> _parametrized_functions; 00191 00196 std::vector<RBTheta*> _rb_eim_theta_objects; 00197 00202 RBThetaExpansion _empty_rb_theta_expansion; 00203 00208 RBParameters _previous_parameters; 00209 00214 unsigned int _previous_N; 00215 00220 Real _previous_error_bound; 00221 00222 }; 00223 00224 } 00225 00226 #endif // LIBMESH_RB_EIM_EVALUATION_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:48 UTC
Hosted By: