rb_scm_construction.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_SCM_CONSTRUCTION_H
21 #define LIBMESH_RB_SCM_CONSTRUCTION_H
22 
23 // Configuration data
24 #include "libmesh/libmesh_config.h"
25 
26 // Currently, the RBSCMConstruction is only usable
27 // if SLEPc is enabled.
28 #if defined(LIBMESH_HAVE_SLEPC) && (LIBMESH_HAVE_GLPK)
29 
30 // rbOOmit includes
33 
34 // libMesh includes
36 
37 // C++ includes
38 
39 namespace libMesh
40 {
41 
51 // ------------------------------------------------------------
52 // RBSCMConstruction class definition
53 
54 class RBSCMConstruction : public RBConstructionBase<CondensedEigenSystem>
55 {
56 public:
57 
63  const std::string& name,
64  const unsigned int number);
65 
69  virtual ~RBSCMConstruction ();
70 
75 
80 
85  virtual void clear ();
86 
90  void set_rb_scm_evaluation(RBSCMEvaluation& rb_scm_eval_in);
91 
96 
101 
106  virtual void resize_SCM_vectors ();
107 
112  virtual void process_parameters_file(const std::string& parameters_filename);
113 
117  virtual void print_info();
118 
128  virtual void set_eigensolver_properties(int ) { }
129 
134  void set_RB_system_name(const std::string& new_name)
135  { RB_system_name = new_name; }
136 
141  void set_SCM_training_tolerance(Real SCM_training_tolerance_in) { this->SCM_training_tolerance = SCM_training_tolerance_in; }
142 
147  virtual void perform_SCM_greedy();
148 
157  virtual void attach_deflation_space() {}
158 
159 protected:
160 
165  virtual void add_scaled_symm_Aq(unsigned int q_a, Number scalar);
166 
172  virtual void load_matrix_B() ;
173 
177  virtual void compute_SCM_bounding_box();
178 
184  virtual void evaluate_stability_constant();
185 
190  virtual void enrich_C_J(unsigned int new_C_J_index);
191 
198  virtual std::pair<unsigned int,Real> compute_SCM_bounds_on_training_set();
199 
205 
210  Number Aq_inner_product(unsigned int q,
211  const NumericVector<Number>& v,
212  const NumericVector<Number>& w);
213 
219  virtual Real SCM_greedy_error_indicator(Real LB, Real UB) { return fabs(UB-LB)/fabs(UB); }
220 
221  //----------- PROTECTED DATA MEMBERS -----------//
222 
227 
231  std::string RB_system_name;
232 
233 private:
234 
240 
241 };
242 
243 } // namespace libMesh
244 
245 #endif // LIBMESH_HAVE_SLEPC && LIBMESH_HAVE_GLPK
246 
247 #endif // LIBMESH_RB_SCM_CONSTRUCTION_H

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

Hosted By:
SourceForge.net Logo