Line data Source code
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_ASSEMBLY_H 21 : #define LIBMESH_RB_EIM_ASSEMBLY_H 22 : 23 : // rbOOmit includes 24 : #include "libmesh/elem_assembly.h" 25 : 26 : // libMesh includes 27 : #include "libmesh/numeric_vector.h" 28 : #include "libmesh/point.h" 29 : #include "libmesh/fe.h" 30 : 31 : // C++ includes 32 : #include <memory> 33 : 34 : namespace libMesh 35 : { 36 : 37 : class RBParameters; 38 : class RBEIMConstruction; 39 : 40 : /** 41 : * This class provides functionality required to define an assembly 42 : * object that arises from an "Empirical Interpolation Method" (EIM) 43 : * approximation. 44 : * 45 : * \author David J. Knezevic 46 : * \date 2012 47 : */ 48 0 : class RBEIMAssembly : public ElemAssembly 49 : { 50 : public: 51 : 52 : /** 53 : * Constructor. 54 : */ 55 : RBEIMAssembly(RBEIMConstruction & rb_eim_eval_in, 56 : unsigned int basis_function_index_in); 57 : 58 : /** 59 : * Special functions. 60 : * - This class contains a reference, so it can't be default 61 : * copy/move-assigned. 62 : * - The destructor is defaulted out of line. 63 : */ 64 : RBEIMAssembly (RBEIMAssembly &&) = default; 65 : RBEIMAssembly (const RBEIMAssembly &) = default; 66 : RBEIMAssembly & operator= (const RBEIMAssembly &) = delete; 67 : RBEIMAssembly & operator= (RBEIMAssembly &&) = delete; 68 : virtual ~RBEIMAssembly(); 69 : 70 : /** 71 : * Return the basis function values for all quadrature points for variable \p var 72 : * on element \p elem_id. 73 : */ 74 : void evaluate_basis_function(dof_id_type elem_id, 75 : unsigned int var, 76 : std::vector<Number> & values); 77 : 78 : /** 79 : * Same as evaluate_basis_function() except for side data. 80 : */ 81 : void evaluate_side_basis_function(dof_id_type elem_id, 82 : unsigned int side_index, 83 : unsigned int var, 84 : std::vector<Number> & values); 85 : 86 : /** 87 : * Same as evaluate_basis_function() except for side data. 88 : */ 89 : Number evaluate_node_basis_function(dof_id_type node_id, 90 : unsigned int var); 91 : 92 : /** 93 : * Get a reference to the RBEIMEvaluation object. 94 : */ 95 : RBEIMConstruction & get_rb_eim_construction(); 96 : 97 : private: 98 : 99 : /** 100 : * The RBEIMConstruction that the assembly data comes from. 101 : */ 102 : RBEIMConstruction & _rb_eim_con; 103 : 104 : /** 105 : * The EIM basis function index (from _rb_eim_con's RBEIMEvaluation) for this assembly object. 106 : */ 107 : unsigned int _basis_function_index; 108 : }; 109 : 110 : } 111 : 112 : #endif // LIBMESH_RB_EIM_ASSEMBLY_H