rb_eim_evaluation.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_EIM_EVALUATION_H
21 #define LIBMESH_RB_EIM_EVALUATION_H
22 
23 // libMesh includes
24 #include "libmesh/auto_ptr.h"
25 #include "libmesh/point.h"
26 #include "libmesh/rb_evaluation.h"
27 #include "libmesh/elem.h"
28 #include "libmesh/serial_mesh.h"
29 
30 // C++ includes
31 
32 namespace libMesh
33 {
34 
35 class RBParameters;
36 class RBParametrizedFunction;
37 
49 // ------------------------------------------------------------
50 // RBEIMEvaluation class definition
51 
53 {
54 public:
55 
60  LIBMESH_CAN_DEFAULT_TO_COMMWORLD);
61 
65  virtual ~RBEIMEvaluation ();
66 
71 
75  virtual void clear();
76 
81  virtual void resize_data_structures(const unsigned int Nmax,
82  bool resize_error_bound_data=true);
83 
89 
90 
95  unsigned int get_n_parametrized_functions() const;
96 
104  Number evaluate_parametrized_function(unsigned int var_index,
105  const Point& p,
106  const Elem& elem);
107 
114  virtual Real rb_solve(unsigned int N);
115 
121  void rb_solve(DenseVector<Number>& EIM_rhs);
122 
129 
133  std::vector<RBTheta*> get_eim_theta_objects();
134 
140  virtual AutoPtr<RBTheta> build_eim_theta(unsigned int index);
141 
146  virtual void write_offline_data_to_files(const std::string& directory_name = "offline_data",
147  const bool write_binary_data=true);
148 
153  virtual void read_offline_data_from_files(const std::string& directory_name = "offline_data",
154  bool read_error_bound_data=true,
155  const bool read_binary_data=true);
156 
157  //----------- PUBLIC DATA MEMBERS -----------//
158 
164 
169  std::vector<Point> interpolation_points;
170 
175  std::vector<unsigned int> interpolation_points_var;
176 
181  std::vector<Elem*> interpolation_points_elem;
182 
191 
197 
198 private:
199 
204  void write_out_interpolation_points_elem(const std::string directory_name);
205 
209  void read_in_interpolation_points_elem(const std::string directory_name);
210 
215  std::vector<RBParametrizedFunction*> _parametrized_functions;
216 
221  std::vector<RBTheta*> _rb_eim_theta_objects;
222 
228 
234 
239  unsigned int _previous_N;
240 
246 
252 
253 };
254 
255 }
256 
257 #endif // LIBMESH_RB_EIM_EVALUATION_H

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

Hosted By:
SourceForge.net Logo