libMesh
rb_eim_assembly.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 // rbOOmit includes
21 #include "libmesh/rb_eim_assembly.h"
22 #include "libmesh/rb_eim_construction.h"
23 
24 // libMesh includes
25 #include "libmesh/fem_context.h"
26 #include "libmesh/dof_map.h"
27 #include "libmesh/quadrature.h"
28 #include "libmesh/libmesh_logging.h"
29 #include "libmesh/int_range.h"
30 
31 namespace libMesh
32 {
33 
35  unsigned int basis_function_index_in)
36  :
37  _rb_eim_con(rb_eim_con),
38  _basis_function_index(basis_function_index_in)
39 {
40 }
41 
43 
45  unsigned int comp,
46  std::vector<Number> & values)
47 {
49  _basis_function_index, elem_id, comp, values);
50 
51  libmesh_error_msg_if(values.empty(), "Error: EIM basis function has no entries on this element for this processor");
52 }
53 
55  unsigned int side_index,
56  unsigned int comp,
57  std::vector<Number> & values)
58 {
60  _basis_function_index, elem_id, side_index, comp, values);
61 
62  libmesh_error_msg_if(values.empty(), "Error: EIM basis function has no entries on this element for this processor");
63 }
64 
66  unsigned int comp)
67 {
69  _basis_function_index, node_id, comp);
70 }
71 
73 {
74  return _rb_eim_con;
75 }
76 
77 }
void get_eim_basis_function_side_values_at_qps(unsigned int basis_function_index, dof_id_type elem_id, unsigned int side_index, unsigned int var, std::vector< Number > &values) const
Same as get_eim_basis_function_values_at_qps() except for side data.
RBEIMEvaluation & get_rb_eim_evaluation()
Get a reference to the RBEvaluation object.
void get_eim_basis_function_values_at_qps(unsigned int basis_function_index, dof_id_type elem_id, unsigned int var, std::vector< Number > &values) const
Fill up values with the basis function values for basis function basis_function_index and variable va...
This class is part of the rbOOmit framework.
void evaluate_basis_function(dof_id_type elem_id, unsigned int var, std::vector< Number > &values)
Return the basis function values for all quadrature points for variable var on element elem_id...
The libMesh namespace provides an interface to certain functionality in the library.
Number get_eim_basis_function_node_local_value(unsigned int basis_function_index, dof_id_type node_id, unsigned int var) const
Same as get_eim_basis_function_values_at_qps() except for node data.
RBEIMConstruction & get_rb_eim_construction()
Get a reference to the RBEIMEvaluation object.
RBEIMAssembly(RBEIMConstruction &rb_eim_eval_in, unsigned int basis_function_index_in)
Constructor.
unsigned int _basis_function_index
The EIM basis function index (from _rb_eim_con&#39;s RBEIMEvaluation) for this assembly object...
Number evaluate_node_basis_function(dof_id_type node_id, unsigned int var)
Same as evaluate_basis_function() except for side data.
RBEIMConstruction & _rb_eim_con
The RBEIMConstruction that the assembly data comes from.
uint8_t dof_id_type
Definition: id_types.h:67
void evaluate_side_basis_function(dof_id_type elem_id, unsigned int side_index, unsigned int var, std::vector< Number > &values)
Same as evaluate_basis_function() except for side data.