libMesh
rb_eim_theta.C
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 #include "libmesh/rb_eim_theta.h"
21 #include "libmesh/rb_parameters.h"
22 #include "libmesh/rb_eim_evaluation.h"
23 
24 namespace libMesh
25 {
26 
27 RBEIMTheta::RBEIMTheta(RBEIMEvaluation & rb_eim_eval_in, unsigned int index_in)
28  :
29  rb_eim_eval(rb_eim_eval_in),
30  index(index_in)
31 {
32 }
33 
35 {
37  {
38  // In this case the parameters related to the EIM are a subset of
39  // the parameters from the associated RB problem, hence we need to "pull out"
40  // the parameters related to the EIM
41  RBParameters mu_eim;
44  for ( ; it != it_end; ++it)
45  {
46  std::string param_name = it->first;
47  mu_eim.set_value(param_name, mu.get_value(param_name));
48  }
50  }
51  else
52  {
54  }
55 
57 
59 }
60 
61 }
DenseVector< Number > RB_solution
The RB solution vector.
Real get_value(const std::string &param_name) const
Get the value of the specific parameter.
Definition: rb_parameters.C:45
unsigned int get_n_params() const
Get the number of parameters.
unsigned int n_parameters() const
Get the number of parameters that have been added.
Definition: rb_parameters.C:62
unsigned int index
The index of the RB_solution vector that we pick out from rb_eim_eval to provide the value of the eva...
Definition: rb_eim_theta.h:67
The libMesh namespace provides an interface to certain functionality in the library.
RBEIMEvaluation & rb_eim_eval
The RBEIMEvaluation object that this RBEIMTheta is based on.
Definition: rb_eim_theta.h:61
virtual Real rb_solve(unsigned int N) libmesh_override
Calculate the EIM approximation to parametrized_function using the first N EIM basis functions...
void set_parameters(const RBParameters &params)
Set the current parameters to params.
const_iterator end() const
Get a constant iterator to the end of this RBParameters object.
Definition: rb_parameters.C:85
RBEIMTheta(RBEIMEvaluation &rb_eim_eval_in, unsigned int index_in)
Constructor.
Definition: rb_eim_theta.C:27
This class is part of the rbOOmit framework.
Definition: rb_parameters.h:42
void set_value(const std::string &param_name, Real value)
Set the value of the specified parameter.
Definition: rb_parameters.C:57
virtual Number evaluate(const RBParameters &mu) libmesh_override
Evaluate this RBEIMTheta object at the parameter mu.
Definition: rb_eim_theta.C:34
const_iterator begin() const
Get a constant iterator to beginning of this RBParameters object.
Definition: rb_parameters.C:80
const RBParameters & get_parameters() const
Get the current parameters.
virtual unsigned int get_n_basis_functions() const
Get the current number of basis functions.
std::map< std::string, Real >::const_iterator const_iterator
Definition: rb_parameters.h:57
This class is part of the rbOOmit framework.