20 #ifndef LIBMESH_RB_CONSTRUCTION_H 21 #define LIBMESH_RB_CONSTRUCTION_H 38 class RBThetaExpansion;
39 class RBAssemblyExpansion;
62 const std::string &
name,
63 const unsigned int number);
128 virtual void clear ()
override;
268 bool skip_vector_assembly=
false);
317 bool skip_vector_assembly);
348 const bool write_binary_residual_representors);
357 const bool write_binary_residual_representors);
380 bool deterministic_training_in,
381 unsigned int training_parameters_random_seed_in,
383 unsigned int Nmax_in,
384 Real rel_training_tolerance_in,
385 Real abs_training_tolerance_in,
386 bool normalize_rb_error_bound_in_greedy_in,
389 std::map<std::string, std::vector<Real>> discrete_parameter_values_in,
390 std::map<std::string,bool> log_scaling);
595 Real initial_greedy_error,
615 bool symmetrize=
false,
616 bool apply_dof_constraints=
true);
773 std::vector<std::unique_ptr<SparseMatrix<Number>>>
Aq_vector;
779 std::vector<std::unique_ptr<NumericVector<Number>>>
Fq_vector;
814 #endif // LIBMESH_RB_CONSTRUCTION_H virtual void update_residual_terms(bool compute_inner_products=true)
bool normalize_rb_bound_in_greedy
virtual void initialize_rb_construction(bool skip_matrix_assembly=false, bool skip_vector_assembly=false)
Manages multiples systems of equations.
virtual void write_riesz_representors_to_files(const std::string &riesz_representors_dir, const bool write_binary_residual_representors)
std::vector< Real > training_error_bounds
virtual void set_Nmax(unsigned int Nmax)
virtual void read_riesz_representors_from_files(const std::string &riesz_representors_dir, const bool write_binary_residual_representors)
std::vector< std::unique_ptr< NumericVector< Number > > > Fq_representor
NumericVector< Number > * get_Fq(unsigned int q)
virtual std::string system_type() const override
SparseMatrix< Number > * get_non_dirichlet_Aq_if_avail(unsigned int q)
SparseMatrix< Number > * get_Aq(unsigned int q)
virtual bool greedy_termination_test(Real abs_greedy_error, Real initial_greedy_error, int count)
RBConstruction(EquationSystems &es, const std::string &name, const unsigned int number)
virtual std::unique_ptr< DGFEMContext > build_context()
bool compute_RB_inner_product
virtual void process_parameters_file(const std::string ¶meters_filename)
SparseMatrix< Number > * get_non_dirichlet_Aq(unsigned int q)
virtual void assemble_all_affine_operators()
virtual void truth_assembly()
void enrich_basis_from_rhs_terms(const bool resize_rb_eval_data=true)
std::vector< std::vector< Number > > output_dual_innerprods
Real get_abs_training_tolerance()
virtual void recompute_all_residual_terms(const bool compute_inner_products=true)
bool get_convergence_assertion_flag() const
bool skip_degenerate_sides
RBConstructionBase< LinearImplicitSystem > Parent
void add_scaled_Aq(Number scalar, unsigned int q_a, SparseMatrix< Number > *input_matrix, bool symmetrize)
std::unique_ptr< SparseMatrix< Number > > inner_product_matrix
const RBParameters & get_greedy_parameter(unsigned int i)
virtual void assemble_affine_expansion(bool skip_matrix_assembly, bool skip_vector_assembly)
std::vector< Number > Fq_representor_innerprods
virtual Real compute_max_error_bound()
NumericVector< Number > * get_non_dirichlet_Fq(unsigned int q)
virtual void init_context(FEMContext &)
NumericVector< Number > * get_non_dirichlet_Fq_if_avail(unsigned int q)
virtual void clear() override
std::vector< std::unique_ptr< NumericVector< Number > > > non_dirichlet_Fq_vector
void assemble_inner_product_matrix(SparseMatrix< Number > *input_matrix, bool apply_dof_constraints=true)
LinearSolver< Number > * extra_linear_solver
virtual void load_basis_function(unsigned int i)
bool impose_internal_fluxes
bool Fq_representor_innerprods_computed
bool use_empty_rb_solve_in_greedy
Real get_rel_training_tolerance()
unsigned int number() const
virtual void compute_Fq_representor_innerprods(bool compute_inner_products=true)
virtual void assemble_all_affine_vectors()
virtual void update_RB_system_matrices()
void set_rb_assembly_expansion(RBAssemblyExpansion &rb_assembly_expansion_in)
virtual ~RBConstruction()
virtual void assemble_all_output_vectors()
std::unique_ptr< SparseMatrix< Number > > non_dirichlet_inner_product_matrix
void update_greedy_param_list()
Real rel_training_tolerance
void print_basis_function_orthogonality()
unsigned int get_Nmax() const
static std::unique_ptr< DirichletBoundary > build_zero_dirichlet_boundary_object()
void set_rb_construction_parameters(unsigned int n_training_samples_in, bool deterministic_training_in, unsigned int training_parameters_random_seed_in, bool quiet_mode_in, unsigned int Nmax_in, Real rel_training_tolerance_in, Real abs_training_tolerance_in, bool normalize_rb_error_bound_in_greedy_in, RBParameters mu_min_in, RBParameters mu_max_in, std::map< std::string, std::vector< Real >> discrete_parameter_values_in, std::map< std::string, bool > log_scaling)
Real abs_training_tolerance
SparseMatrix< Number > * get_inner_product_matrix()
RBThetaExpansion & get_rb_theta_expansion()
void assemble_Fq_vector(unsigned int q, NumericVector< Number > *input_vector, bool apply_dof_constraints=true)
virtual void enrich_RB_space()
virtual void load_rb_solution()
virtual Real truth_solve(int plot_solution)
virtual void set_context_solution_vec(NumericVector< Number > &vec)
virtual void update_system()
unsigned int get_delta_N() const
virtual void allocate_data_structures()
SparseMatrix< Number > * get_non_dirichlet_inner_product_matrix()
void set_inner_product_assembly(ElemAssembly &inner_product_assembly_in)
virtual void get_all_matrices(std::map< std::string, SparseMatrix< Number > *> &all_matrices)
std::vector< std::unique_ptr< SparseMatrix< Number > > > Aq_vector
void add_scaled_matrix_and_vector(Number scalar, ElemAssembly *elem_assembly, SparseMatrix< Number > *input_matrix, NumericVector< Number > *input_vector, bool symmetrize=false, bool apply_dof_constraints=true)
ElemAssembly & get_inner_product_assembly()
bool skip_residual_in_train_reduced_basis
void set_convergence_assertion_flag(bool flag)
virtual Real get_RB_error_bound()
bool is_rb_eval_initialized() const
virtual SparseMatrix< Number > & get_matrix_for_output_dual_solves()
virtual void compute_output_dual_innerprods()
RBEvaluation & get_rb_evaluation()
virtual void print_info()
void set_abs_training_tolerance(Real new_training_tolerance)
bool store_non_dirichlet_operators
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
ElemAssembly * inner_product_assembly
RBAssemblyExpansion & get_rb_assembly_expansion()
void check_convergence(LinearSolver< Number > &input_solver)
std::unique_ptr< LinearSolver< Number > > inner_product_solver
void set_normalize_rb_bound_in_greedy(bool normalize_rb_bound_in_greedy_in)
std::vector< std::unique_ptr< NumericVector< Number > > > Fq_vector
std::vector< Number > truth_outputs
virtual void assemble_misc_matrices()
std::vector< std::unique_ptr< SparseMatrix< Number > > > non_dirichlet_Aq_vector
void set_rel_training_tolerance(Real new_training_tolerance)
std::vector< std::vector< std::unique_ptr< NumericVector< Number > > > > non_dirichlet_outputs_vector
void assemble_Aq_matrix(unsigned int q, SparseMatrix< Number > *input_matrix, bool apply_dof_constraints=true)
RBAssemblyExpansion * rb_assembly_expansion
virtual void get_output_vectors(std::map< std::string, NumericVector< Number > *> &all_vectors)
const std::string & name() const
void set_rb_evaluation(RBEvaluation &rb_eval_in)
SparseMatrix< Number > * get_non_dirichlet_inner_product_matrix_if_avail()
NumericVector< Number > * get_non_dirichlet_output_vector(unsigned int n, unsigned int q_l)
bool exit_on_repeated_greedy_parameters
bool output_dual_innerprods_computed
virtual void solve_for_matrix_and_rhs(LinearSolver< Number > &input_solver, SparseMatrix< Number > &input_matrix, NumericVector< Number > &input_rhs)
virtual Real train_reduced_basis(const bool resize_rb_eval_data=true)
NumericVector< Number > * get_output_vector(unsigned int n, unsigned int q_l)
Manages consistently variables, degrees of freedom, and coefficient vectors for explicit systems...
virtual void get_all_vectors(std::map< std::string, NumericVector< Number > *> &all_vectors)
bool get_normalize_rb_bound_in_greedy()
std::vector< std::vector< std::unique_ptr< NumericVector< Number > > > > outputs_vector
void zero_constrained_dofs_on_vector(NumericVector< Number > &vector)