Go to the documentation of this file.
   21 #include "libmesh/rb_eim_assembly.h" 
   22 #include "libmesh/rb_eim_construction.h" 
   23 #include "libmesh/rb_evaluation.h" 
   26 #include "libmesh/fem_context.h" 
   27 #include "libmesh/dof_map.h" 
   28 #include "libmesh/quadrature.h" 
   29 #include "libmesh/libmesh_logging.h" 
   30 #include "libmesh/int_range.h" 
   36                              unsigned int basis_function_index_in)
 
   37   : _rb_eim_con(rb_eim_con_in),
 
   38     _basis_function_index(basis_function_index_in),
 
   39     _ghosted_basis_function(
NumericVector<
Number>::build(rb_eim_con_in.get_explicit_system().comm()))
 
   43 #ifdef LIBMESH_ENABLE_GHOSTED 
   67                                             const std::vector<Point> & points,
 
   68                                             std::vector<Number> & values)
 
   70   LOG_SCOPE(
"evaluate_basis_function", 
"RBEIMAssembly");
 
   72   const std::vector<std::vector<Real>> & phi = 
get_fe().
get_phi();
 
   78   std::vector<dof_id_type> dof_indices_var;
 
   81   dof_map.
dof_indices (&element, dof_indices_var, var);
 
   85   unsigned int n_points = points.size();
 
   86   values.resize(n_points);
 
   88   for (
unsigned int pt_index=0; pt_index<n_points; pt_index++)
 
   90       values[pt_index] = 0.;
 
   92         values[pt_index] += (*_ghosted_basis_function)(dof_indices_var[i]) * phi[i][pt_index];
 
  115   const unsigned int dim =
 
  
FEBase & get_fe()
Retrieve the FE object.
 
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
Fills the vector di with the global degree of freedom indices for the element.
 
RBEIMConstruction & _rb_eim_con
The RBEIMConstruction object that this RBEIMAssembly is based on.
 
IntRange< std::size_t > index_range(const std::vector< T > &vec)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
 
The libMesh namespace provides an interface to certain functionality in the library.
 
This class forms the foundation from which generic finite elements may be derived.
 
unsigned int mesh_dimension() const
 
NumericVector< Number > & get_ghosted_basis_function()
Get a reference to the ghosted_basis_function.
 
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
 
std::unique_ptr< NumericVector< Number > > _ghosted_basis_function
The basis function that we sample to evaluate the empirical interpolation approximation.
 
dof_id_type n_local_dofs() const
 
RBEIMAssembly(RBEIMConstruction &rb_eim_con_in, unsigned int basis_function_index_in)
Constructor.
 
const MeshBase & get_mesh() const
 
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
 
RBEvaluation & get_rb_evaluation()
Get a reference to the RBEvaluation object.
 
const FEType & variable_type(const unsigned int c) const
 
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,...
 
const std::vector< dof_id_type > & get_send_list() const
 
std::unique_ptr< FEBase > _fe
We store an FE object so we can easily reinit in evaluate_basis_function.
 
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
 
virtual ~RBEIMAssembly()
Destructor.
 
This class handles the numbering of degrees of freedom on a mesh.
 
This is the base class from which all geometric element types are derived.
 
ExplicitSystem & get_explicit_system()
Get the ExplicitSystem associated with this system.
 
const DofMap & get_dof_map() const
 
dof_id_type n_dofs() const
 
const std::vector< std::vector< OutputShape > > & get_phi() const
 
RBEIMConstruction & get_rb_eim_construction()
Get a reference to the RBEIMConstruction object.
 
virtual void reinit(const Elem *elem, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)=0
This is at the core of this class.
 
NumericVector< Number > & get_basis_function(unsigned int i)
Get a reference to the i^th basis function.
 
This class is part of the rbOOmit framework.
 
void initialize_fe()
Initialize the FE object.
 
unsigned int _basis_function_index
The EIM basis function index (from rb_eim_eval) for this assembly object.