libMesh
rb_eim_assembly.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_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 Elem;
38 class RBParameters;
39 class RBEIMConstruction;
40 
50 {
51 public:
52 
56  RBEIMAssembly(RBEIMConstruction & rb_eim_con_in,
57  unsigned int basis_function_index_in);
58 
62  virtual ~RBEIMAssembly();
63 
69  virtual void evaluate_basis_function(unsigned int var,
70  const Elem & element,
71  const std::vector<Point> & points,
72  std::vector<Number> & values);
73 
78 
83 
87  FEBase & get_fe();
88 
89 private:
90 
94  void initialize_fe();
95 
100 
104  unsigned int _basis_function_index;
105 
111  std::unique_ptr<NumericVector<Number>> _ghosted_basis_function;
112 
116  std::unique_ptr<FEBase> _fe;
117 
118 };
119 
120 }
121 
122 #endif // LIBMESH_RB_EIM_ASSEMBLY_H
libMesh::RBEIMAssembly::get_fe
FEBase & get_fe()
Retrieve the FE object.
Definition: rb_eim_assembly.C:106
libMesh::RBEIMAssembly::_rb_eim_con
RBEIMConstruction & _rb_eim_con
The RBEIMConstruction object that this RBEIMAssembly is based on.
Definition: rb_eim_assembly.h:99
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::FEGenericBase
This class forms the foundation from which generic finite elements may be derived.
Definition: exact_error_estimator.h:39
libMesh::RBEIMAssembly::get_ghosted_basis_function
NumericVector< Number > & get_ghosted_basis_function()
Get a reference to the ghosted_basis_function.
Definition: rb_eim_assembly.C:101
libMesh::RBEIMAssembly
This class provides functionality required to define an assembly object that arises from an "Empirica...
Definition: rb_eim_assembly.h:49
libMesh::NumericVector< Number >
libMesh::RBEIMAssembly::_ghosted_basis_function
std::unique_ptr< NumericVector< Number > > _ghosted_basis_function
The basis function that we sample to evaluate the empirical interpolation approximation.
Definition: rb_eim_assembly.h:111
libMesh::RBEIMAssembly::RBEIMAssembly
RBEIMAssembly(RBEIMConstruction &rb_eim_con_in, unsigned int basis_function_index_in)
Constructor.
Definition: rb_eim_assembly.C:35
libMesh::RBEIMAssembly::evaluate_basis_function
virtual void evaluate_basis_function(unsigned int var, const Elem &element, const std::vector< Point > &points, std::vector< Number > &values)
Evaluate variable var_number of this object's EIM basis function at the points points,...
Definition: rb_eim_assembly.C:65
libMesh::RBEIMAssembly::_fe
std::unique_ptr< FEBase > _fe
We store an FE object so we can easily reinit in evaluate_basis_function.
Definition: rb_eim_assembly.h:116
libMesh::ElemAssembly
ElemAssembly provides a per-element (interior and boundary) assembly functionality.
Definition: elem_assembly.h:38
libMesh::RBEIMAssembly::~RBEIMAssembly
virtual ~RBEIMAssembly()
Destructor.
Definition: rb_eim_assembly.C:61
libMesh::Elem
This is the base class from which all geometric element types are derived.
Definition: elem.h:100
libMesh::RBEIMAssembly::get_rb_eim_construction
RBEIMConstruction & get_rb_eim_construction()
Get a reference to the RBEIMConstruction object.
Definition: rb_eim_assembly.C:96
libMesh::RBEIMConstruction
This class is part of the rbOOmit framework.
Definition: rb_eim_construction.h:48
libMesh::RBEIMAssembly::initialize_fe
void initialize_fe()
Initialize the FE object.
Definition: rb_eim_assembly.C:111
libMesh::RBEIMAssembly::_basis_function_index
unsigned int _basis_function_index
The EIM basis function index (from rb_eim_eval) for this assembly object.
Definition: rb_eim_assembly.h:104