rb_scm_evaluation.h
Go to the documentation of this file.00001 00002 // rbOOmit: An implementation of the Certified Reduced Basis method. 00003 // Copyright (C) 2009, 2010 David J. Knezevic 00004 00005 // This file is part of rbOOmit. 00006 00007 // rbOOmit is free software; you can redistribute it and/or 00008 // modify it under the terms of the GNU Lesser General Public 00009 // License as published by the Free Software Foundation; either 00010 // version 2.1 of the License, or (at your option) any later version. 00011 00012 // rbOOmit is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Lesser General Public License for more details. 00016 00017 // You should have received a copy of the GNU Lesser General Public 00018 // License along with this library; if not, write to the Free Software 00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00020 00021 #ifndef LIBMESH_RB_SCM_EVALUATION_H 00022 #define LIBMESH_RB_SCM_EVALUATION_H 00023 00024 // rbOOmit includes 00025 #include "libmesh/rb_parametrized.h" 00026 #include "libmesh/rb_theta_expansion.h" 00027 00028 // libMesh includes 00029 00030 // C++ includes 00031 00032 namespace libMesh 00033 { 00034 00045 // ------------------------------------------------------------ 00046 // RBSCMEvaluation class definition 00047 00048 class RBSCMEvaluation : public RBParametrized 00049 { 00050 public: 00051 00055 RBSCMEvaluation (); 00056 00060 virtual ~RBSCMEvaluation (); 00061 00065 void set_rb_theta_expansion(RBThetaExpansion& rb_theta_expansion_in); 00066 00070 RBThetaExpansion& get_rb_theta_expansion(); 00071 00075 virtual Real get_SCM_LB(); 00076 00080 virtual Real get_SCM_UB(); 00081 00088 Real get_C_J_stability_constraint(unsigned int j) const; 00089 00096 void set_C_J_stability_constraint(unsigned int j, Real stability_constraint_in); 00097 00103 Real get_SCM_UB_vector(unsigned int j, unsigned int q); 00104 00110 void set_SCM_UB_vector(unsigned int j, unsigned int q, Real y_q); 00111 00115 unsigned int get_C_J_size() 00116 { return libmesh_cast_int<unsigned int>(C_J.size()); } 00117 00121 const RBParameters& get_C_J_entry(unsigned int j); 00122 00126 Real get_C_J_stability_value(unsigned int j) { return C_J_stability_vector[j]; } 00127 00131 Real get_B_min(unsigned int i) const; 00132 Real get_B_max(unsigned int i) const; 00133 00137 void set_B_min(unsigned int i, Real B_min_val); 00138 void set_B_max(unsigned int i, Real B_max_val); 00139 00144 virtual void save_current_parameters(); 00145 00150 virtual void reload_current_parameters(); 00151 00155 virtual void set_current_parameters_from_C_J(unsigned int C_J_index); 00156 00161 virtual void write_offline_data_to_files(const std::string& directory_name = "offline_data", 00162 const bool write_binary_data = true); 00163 00168 virtual void read_offline_data_from_files(const std::string& directory_name = "offline_data", 00169 const bool read_binary_data = true); 00170 00171 //----------- PUBLIC DATA MEMBERS -----------// 00172 00176 std::vector<Real> B_min; 00177 std::vector<Real> B_max; 00178 00183 std::vector< RBParameters > C_J; 00184 00189 std::vector<Real> C_J_stability_vector; 00190 00197 std::vector< std::vector<Real> > SCM_UB_vectors; 00198 00199 private: 00200 00205 RBParameters saved_parameters; 00206 00212 RBThetaExpansion* rb_theta_expansion; 00213 00214 }; 00215 00216 } 00217 00218 #endif // LIBMESH_RB_SCM_EVALUATION_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:48 UTC
Hosted By: