Go to the documentation of this file.
20 #ifndef LIBMESH_RB_EIM_CONSTRUCTION_H
21 #define LIBMESH_RB_EIM_CONSTRUCTION_H
24 #include "libmesh/rb_construction.h"
25 #include "libmesh/rb_assembly_expansion.h"
26 #include "libmesh/rb_eim_assembly.h"
29 #include "libmesh/mesh_function.h"
30 #include "libmesh/coupling_matrix.h"
59 const std::string &
name,
60 const unsigned int number);
80 virtual void clear()
override;
104 bool skip_vector_assembly=
false)
override;
348 #endif // LIBMESH_RB_EIM_CONSTRUCTION_H
virtual void process_parameters_file(const std::string ¶meters_filename) override
Read parameters in from file and set up this system accordingly.
virtual Real train_reduced_basis(const bool resize_rb_eval_data=true) override
Override train_reduced_basis to first initialize _parametrized_functions_in_training_set.
Manages consistently variables, degrees of freedom, and coefficient vectors.
virtual void print_info() override
Print out info that describes the current setup of this RBConstruction.
virtual void load_rb_solution() override
Load the RB solution from the most recent solve with rb_eval into this system's solution vector.
virtual void enrich_RB_space() override
Add a new basis function to the RB space.
virtual void update_system() override
Update the system after enriching the RB space; this calls a series of functions to update the system...
virtual void init_explicit_system()=0
Add variables to the ExplicitSystem that is used to store the basis functions.
virtual ~RBEIMConstruction()
Destructor.
RBAssemblyExpansion _empty_rb_assembly_expansion
We initialize RBEIMConstruction so that it has an "empty" RBAssemblyExpansion, because this isn't use...
RBConstruction Parent
The type of the parent.
The libMesh namespace provides an interface to certain functionality in the library.
std::vector< std::unique_ptr< NumericVector< Number > > > _matrix_times_bfs
This vector is used to store inner_product_matrix * basis_function[i] for each i, since we frequently...
virtual Real truth_solve(int plot_solution) override
Load the truth representation of the parametrized function at the current parameters into the solutio...
unsigned int number() const
void initialize_parametrized_functions_in_training_set()
Loop over the training set and compute the parametrized function for each training index.
std::vector< std::vector< dof_id_type > > _dof_map_between_systems
The index map between the explicit system and the implicit system.
std::unique_ptr< MeshFunction > _mesh_function
A mesh function to interpolate on the mesh.
void plot_parametrized_functions_in_training_set(const std::string &pathname)
Plot all the parameterized functions that we are storing in _parametrized_functions_in_training_set.
bool _parametrized_functions_in_training_set_initialized
Boolean flag to indicate whether or not we have called compute_parametrized_functions_in_training_set...
Number evaluate_mesh_function(unsigned int var_number, Point p)
Evaluate the mesh function at the specified point and for the specified variable.
This class stores the set of ElemAssembly functor objects that define the "parameter-independent expa...
virtual void load_basis_function(unsigned int i) override
Load the i^th RB function into the RBConstruction solution vector.
virtual void init_context_with_sys(FEMContext &c, System &sys)
Initialize c based on sys.
void set_explicit_sys_subvector(NumericVector< Number > &dest, unsigned int var, NumericVector< Number > &source)
Load source into the subvector of dest corresponding to var var.
std::unique_ptr< NumericVector< Number > > _ghosted_meshfunction_vector
We also need an extra vector in which we can store a ghosted copy of the vector that we wish to use M...
void set_best_fit_type_flag(const std::string &best_fit_type_string)
Specify which type of "best fit" we use to guide the EIM greedy algorithm.
void set_point_locator_tol(Real point_locator_tol)
Set a point locator tolerance to be used in this class's MeshFunction, and other operations that requ...
void init_dof_map_between_systems()
Set up the index map between the implicit and explicit systems.
A Point defines a location in LIBMESH_DIM dimensional Real space.
Real get_point_locator_tol() const
This class is part of the rbOOmit framework.
std::vector< std::unique_ptr< ElemAssembly > > & get_eim_assembly_objects()
This is the EquationSystems class.
virtual Real compute_best_fit_error()
We compute the best fit of parametrized_function into the EIM space and then evaluate the error in th...
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems.
Real _point_locator_tol
The point locator tolerance.
std::vector< std::unique_ptr< ElemAssembly > > _rb_eim_assembly_objects
The vector of assembly objects that are created to point to this RBEIMConstruction.
std::string _explicit_system_name
We use an ExplicitSystem to store the EIM basis functions.
const std::string & name() const
virtual Real get_RB_error_bound() override
Override to return the best fit error.
RBEIMConstruction(EquationSystems &es, const std::string &name, const unsigned int number)
Constructor.
ExplicitSystem & get_explicit_system()
Get the ExplicitSystem associated with this system.
virtual std::unique_ptr< ElemAssembly > build_eim_assembly(unsigned int bf_index)=0
Build an element assembly object that will access basis function bf_index.
BEST_FIT_TYPE best_fit_type_flag
Enum that indicates which type of "best fit" algorithm we should use.
virtual void update_RB_system_matrices() override
Compute the reduced basis matrices for the current basis.
std::vector< std::unique_ptr< NumericVector< Number > > > _parametrized_functions_in_training_set
The libMesh vectors storing the finite element coefficients of the RB basis functions.
virtual void initialize_eim_assembly_objects()
Build a vector of ElemAssembly objects that accesses the basis functions stored in this RBEIMConstruc...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void initialize_rb_construction(bool skip_matrix_assembly=false, bool skip_vector_assembly=false) override
Initialize this system so that we can perform the Construction stage of the RB method.
virtual void clear() override
Clear this object.
void get_explicit_sys_subvector(NumericVector< Number > &dest, unsigned int var, NumericVector< Number > &localized_source)
Load the subvector of localized_source corresponding to variable var into dest.
virtual void init_data() override
Override to initialize the coupling matrix to decouple variables in this system.
RBEIMConstruction sys_type
The type of system.
This class is part of the rbOOmit framework.
virtual void init_implicit_system()=0
Add one variable to the ImplicitSystem (i.e.
This class provides all data required for a physics package (e.g.