libMesh
rb_scm_construction.C
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 // Configuration data
21 #include "libmesh/libmesh_config.h"
22 
23 // Currently, the RBSCMConstruction should only be available
24 // if SLEPc support is enabled.
25 #if defined(LIBMESH_HAVE_SLEPC) && (LIBMESH_HAVE_GLPK)
26 
27 #include "libmesh/rb_scm_construction.h"
28 #include "libmesh/rb_construction.h"
29 #include "libmesh/rb_scm_evaluation.h"
30 
31 #include "libmesh/libmesh_logging.h"
32 #include "libmesh/numeric_vector.h"
33 #include "libmesh/sparse_matrix.h"
34 #include "libmesh/equation_systems.h"
35 #include "libmesh/getpot.h"
36 #include "libmesh/dof_map.h"
37 #include "libmesh/enum_eigen_solver_type.h"
38 
39 // For creating a directory
40 #include <sys/types.h>
41 #include <sys/stat.h>
42 #include <errno.h>
43 
44 namespace libMesh
45 {
46 
48  const std::string & name_in,
49  const unsigned int number_in)
50  : Parent(es, name_in, number_in),
51  SCM_training_tolerance(0.5),
52  RB_system_name(""),
53  rb_scm_eval(nullptr)
54 {
55 
56  // set assemble_before_solve flag to false
57  // so that we control matrix assembly.
58  assemble_before_solve = false;
59 
60  // We symmetrize all operators hence use symmetric solvers
62 
63 }
64 
66 
68 {
69  Parent::clear();
70 }
71 
73 {
74  rb_scm_eval = &rb_scm_eval_in;
75 }
76 
78 {
79  libmesh_error_msg_if(!rb_scm_eval, "Error: RBSCMEvaluation object hasn't been initialized yet");
80 
81  return *rb_scm_eval;
82 }
83 
85 {
87 }
88 
89 void RBSCMConstruction::process_parameters_file(const std::string & parameters_filename)
90 {
91  // First read in data from parameters_filename
92  GetPot infile(parameters_filename);
93  const unsigned int n_training_samples = infile("n_training_samples",1);
94  const bool deterministic_training = infile("deterministic_training",false);
95 
96  // Read in training_parameters_random_seed value. This is used to
97  // seed the RNG when picking the training parameters. By default the
98  // value is -1, which means use std::time to seed the RNG.
99  unsigned int training_parameters_random_seed_in = static_cast<unsigned int>(-1);
100  training_parameters_random_seed_in = infile("training_parameters_random_seed",
101  training_parameters_random_seed_in);
102  set_training_random_seed(static_cast<int>(training_parameters_random_seed_in));
103 
104  // SCM Greedy termination tolerance
105  const Real SCM_training_tolerance_in = infile("SCM_training_tolerance", SCM_training_tolerance);
106  set_SCM_training_tolerance(SCM_training_tolerance_in);
107 
108  // Initialize the parameter ranges and the parameters themselves
109  unsigned int n_continuous_parameters = infile.vector_variable_size("parameter_names");
110  RBParameters mu_min_in;
111  RBParameters mu_max_in;
112  for (unsigned int i=0; i<n_continuous_parameters; i++)
113  {
114  // Read in the parameter names
115  std::string param_name = infile("parameter_names", "NONE", i);
116 
117  {
118  Real min_val = infile(param_name, 0., 0);
119  mu_min_in.set_value(param_name, min_val);
120  }
121 
122  {
123  Real max_val = infile(param_name, 0., 1);
124  mu_max_in.set_value(param_name, max_val);
125  }
126  }
127 
128  std::map<std::string, std::vector<Real>> discrete_parameter_values_in;
129 
130  unsigned int n_discrete_parameters = infile.vector_variable_size("discrete_parameter_names");
131  for (unsigned int i=0; i<n_discrete_parameters; i++)
132  {
133  std::string param_name = infile("discrete_parameter_names", "NONE", i);
134 
135  unsigned int n_vals_for_param = infile.vector_variable_size(param_name);
136  std::vector<Real> vals_for_param(n_vals_for_param);
137  for (unsigned int j=0; j != n_vals_for_param; j++)
138  vals_for_param[j] = infile(param_name, 0., j);
139 
140  discrete_parameter_values_in[param_name] = vals_for_param;
141  }
142 
143  initialize_parameters(mu_min_in, mu_max_in, discrete_parameter_values_in);
144 
145  std::map<std::string,bool> log_scaling;
146  const RBParameters & mu = get_parameters();
147  unsigned int i=0;
148  for (const auto & pr : mu)
149  {
150  const std::string & param_name = pr.first;
151  log_scaling[param_name] = static_cast<bool>(infile("log_scaling", 0, i++));
152  }
153 
155  this->get_parameters_max(),
156  n_training_samples,
157  log_scaling,
158  deterministic_training); // use deterministic parameters
159 }
160 
162 {
163  // Print out info that describes the current setup
164  libMesh::out << std::endl << "RBSCMConstruction parameters:" << std::endl;
165  libMesh::out << "system name: " << this->name() << std::endl;
166  libMesh::out << "SCM Greedy tolerance: " << get_SCM_training_tolerance() << std::endl;
167  if (rb_scm_eval)
168  {
169  libMesh::out << "A_q operators attached: " << get_rb_theta_expansion().get_n_A_terms() << std::endl;
170  }
171  else
172  {
173  libMesh::out << "RBThetaExpansion member is not set yet" << std::endl;
174  }
175  libMesh::out << "Number of parameters: " << get_n_params() << std::endl;
176  for (const auto & pr : get_parameters())
177  {
178  const std::string & param_name = pr.first;
179  libMesh::out << "Parameter " << param_name
180  << ": Min = " << get_parameter_min(param_name)
181  << ", Max = " << get_parameter_max(param_name) << std::endl;
182  }
184  libMesh::out << "n_training_samples: " << get_n_training_samples() << std::endl;
185  libMesh::out << std::endl;
186 }
187 
189 {
190  // Clear SCM data vectors
191  rb_scm_eval->B_min.clear();
192  rb_scm_eval->B_max.clear();
193  rb_scm_eval->C_J.clear();
195  for (auto & vec : rb_scm_eval->SCM_UB_vectors)
196  vec.clear();
197  rb_scm_eval->SCM_UB_vectors.clear();
198 
199  // Resize the bounding box vectors
200  rb_scm_eval->B_min.resize(get_rb_theta_expansion().get_n_A_terms());
201  rb_scm_eval->B_max.resize(get_rb_theta_expansion().get_n_A_terms());
202 }
203 
204 void RBSCMConstruction::add_scaled_symm_Aq(unsigned int q_a, Number scalar)
205 {
206  LOG_SCOPE("add_scaled_symm_Aq()", "RBSCMConstruction");
207  // Load the operators from the RBConstruction
208  EquationSystems & es = this->get_equation_systems();
210  rb_system.add_scaled_Aq(scalar, q_a, &get_matrix_A(), true);
211 }
212 
214 {
215  // Load the operators from the RBConstruction
216  EquationSystems & es = this->get_equation_systems();
218 
219  matrix_B->zero();
220  matrix_B->close();
221  matrix_B->add(1.,*rb_system.get_inner_product_matrix());
222 }
223 
225 {
226  LOG_SCOPE("perform_SCM_greedy()", "RBSCMConstruction");
227 
228  // initialize rb_scm_eval's parameters
230 
231 #ifdef LIBMESH_ENABLE_CONSTRAINTS
232  // Get a list of constrained dofs from rb_system
233  std::set<dof_id_type> constrained_dofs_set;
234  EquationSystems & es = this->get_equation_systems();
236 
237  for (dof_id_type i=0; i<rb_system.n_dofs(); i++)
238  {
239  if (rb_system.get_dof_map().is_constrained_dof(i))
240  {
241  constrained_dofs_set.insert(i);
242  }
243  }
244 
245  // Use these constrained dofs to identify which dofs we want to "get rid of"
246  // (i.e. condense) in our eigenproblems.
247  this->initialize_condensed_dofs(constrained_dofs_set);
248 #endif // LIBMESH_ENABLE_CONSTRAINTS
249 
250  // Copy the inner product matrix over from rb_system to be used as matrix_B
251  load_matrix_B();
252 
254 
256  // This loads the new parameter into current_parameters
257  enrich_C_J(0);
258 
259  unsigned int SCM_iter=0;
260  while (true)
261  {
262  // matrix_A is reinitialized for the current parameters
263  // on each call to evaluate_stability_constant
265 
266  std::pair<unsigned int,Real> SCM_error_pair = compute_SCM_bounds_on_training_set();
267 
268  libMesh::out << "SCM iteration " << SCM_iter
269  << ", max_SCM_error = " << SCM_error_pair.second << std::endl;
270 
271  if (SCM_error_pair.second < SCM_training_tolerance)
272  {
273  libMesh::out << std::endl << "SCM tolerance of " << SCM_training_tolerance << " reached."
274  << std::endl << std::endl;
275  break;
276  }
277 
278  // If we need another SCM iteration, then enrich C_J
279  enrich_C_J(SCM_error_pair.first);
280 
281  libMesh::out << std::endl << "-----------------------------------" << std::endl << std::endl;
282 
283  SCM_iter++;
284  }
285 }
286 
288 {
289  LOG_SCOPE("compute_SCM_bounding_box()", "RBSCMConstruction");
290 
291  // Resize the bounding box vectors
292  rb_scm_eval->B_min.resize(get_rb_theta_expansion().get_n_A_terms());
293  rb_scm_eval->B_max.resize(get_rb_theta_expansion().get_n_A_terms());
294 
295  for (unsigned int q=0; q<get_rb_theta_expansion().get_n_A_terms(); q++)
296  {
297  matrix_A->zero();
298  add_scaled_symm_Aq(q, 1.);
299 
300  // Compute B_min(q)
301  eigen_solver->set_position_of_spectrum(SMALLEST_REAL);
303 
304  solve();
305  // TODO: Assert convergence for eigensolver
306 
307  unsigned int nconv = get_n_converged();
308  if (nconv != 0)
309  {
310  std::pair<Real, Real> eval = get_eigenpair(0);
311 
312  // ensure that the eigenvalue is real
313  libmesh_assert_less (eval.second, TOLERANCE);
314 
315  rb_scm_eval->set_B_min(q, eval.first);
316  libMesh::out << std::endl << "B_min("<<q<<") = " << rb_scm_eval->get_B_min(q) << std::endl;
317  }
318  else
319  libmesh_error_msg("Eigen solver for computing B_min did not converge");
320 
321  // Compute B_max(q)
322  eigen_solver->set_position_of_spectrum(LARGEST_REAL);
324 
325  solve();
326  // TODO: Assert convergence for eigensolver
327 
328  nconv = get_n_converged();
329  if (nconv != 0)
330  {
331  std::pair<Real, Real> eval = get_eigenpair(0);
332 
333  // ensure that the eigenvalue is real
334  libmesh_assert_less (eval.second, TOLERANCE);
335 
336  rb_scm_eval->set_B_max(q,eval.first);
337  libMesh::out << "B_max("<<q<<") = " << rb_scm_eval->get_B_max(q) << std::endl;
338  }
339  else
340  libmesh_error_msg("Eigen solver for computing B_max did not converge");
341  }
342 }
343 
345 {
346  LOG_SCOPE("evaluate_stability_constant()", "RBSCMConstruction");
347 
348  // Get current index of C_J
349  const unsigned int j = cast_int<unsigned int>(rb_scm_eval->C_J.size()-1);
350 
351  eigen_solver->set_position_of_spectrum(SMALLEST_REAL);
352 
353  // We assume B is set in system assembly
354  // For coercive problems, B is set to the inner product matrix
355  // For non-coercive time-dependent problems, B is set to the mass matrix
356 
357  // Set matrix A corresponding to mu_star
358  matrix_A->zero();
359  for (unsigned int q=0; q<get_rb_theta_expansion().get_n_A_terms(); q++)
360  {
362  }
363 
365  solve();
366  // TODO: Assert convergence for eigensolver
367 
368  unsigned int nconv = get_n_converged();
369  if (nconv != 0)
370  {
371  std::pair<Real, Real> eval = get_eigenpair(0);
372 
373  // ensure that the eigenvalue is real
374  libmesh_assert_less (eval.second, TOLERANCE);
375 
376  // Store the coercivity constant corresponding to mu_star
378  libMesh::out << std::endl << "Stability constant for C_J("<<j<<") = "
379  << rb_scm_eval->get_C_J_stability_constraint(j) << std::endl << std::endl;
380 
381  // Compute and store the vector y = (y_1, \ldots, y_Q) for the
382  // eigenvector currently stored in eigen_system.solution.
383  // We use this later to compute the SCM upper bounds.
385 
386  for (unsigned int q=0; q<get_rb_theta_expansion().get_n_A_terms(); q++)
387  {
388  Real norm_Aq2 = libmesh_real( Aq_inner_product(q, *solution, *solution) );
389 
390  rb_scm_eval->set_SCM_UB_vector(j,q,norm_Aq2/norm_B2);
391  }
392  }
393  else
394  libmesh_error_msg("Error: Eigensolver did not converge in evaluate_stability_constant");
395 }
396 
398  const NumericVector<Number> & w) const
399 {
401 
403 }
404 
406  const NumericVector<Number> & v,
407  const NumericVector<Number> & w)
408 {
409  libmesh_error_msg_if(q >= get_rb_theta_expansion().get_n_A_terms(),
410  "Error: We must have q < Q_a in Aq_inner_product.");
411 
412  matrix_A->zero();
413  add_scaled_symm_Aq(q, 1.);
415 
417 }
418 
420 {
421  LOG_SCOPE("compute_SCM_bounds_on_training_set()", "RBSCMConstruction");
422 
423  // Now compute the maximum bound error over training_parameters
424  unsigned int new_C_J_index = 0;
425  Real max_SCM_error = 0.;
426 
428  for (unsigned int i=0; i<get_local_n_training_samples(); i++)
429  {
430  set_params_from_training_set(first_index+i);
432  Real LB = rb_scm_eval->get_SCM_LB();
433  Real UB = rb_scm_eval->get_SCM_UB();
434 
435  Real error_i = SCM_greedy_error_indicator(LB, UB);
436 
437  if (error_i > max_SCM_error)
438  {
439  max_SCM_error = error_i;
440  new_C_J_index = i;
441  }
442  }
443 
444  numeric_index_type global_index = first_index + new_C_J_index;
445  std::pair<numeric_index_type,Real> error_pair(global_index, max_SCM_error);
446  get_global_max_error_pair(this->comm(),error_pair);
447 
448  return error_pair;
449 }
450 
451 void RBSCMConstruction::enrich_C_J(unsigned int new_C_J_index)
452 {
453  LOG_SCOPE("enrich_C_J()", "RBSCMConstruction");
454 
456 
457  rb_scm_eval->C_J.push_back(get_parameters());
458 
459  libMesh::out << std::endl << "SCM: Added mu = (";
460 
461  bool first = true;
462  for (const auto & pr : get_parameters())
463  {
464  if (!first)
465  libMesh::out << ",";
466  const std::string & param_name = pr.first;
467  RBParameters C_J_params = rb_scm_eval->C_J[rb_scm_eval->C_J.size()-1];
468  libMesh::out << C_J_params.get_value(param_name);
469  first = false;
470  }
471  libMesh::out << ")" << std::endl;
472 
473  // Finally, resize C_J_stability_vector and SCM_UB_vectors
474  rb_scm_eval->C_J_stability_vector.push_back(0.);
475 
476  std::vector<Real> zero_vector(get_rb_theta_expansion().get_n_A_terms());
477  rb_scm_eval->SCM_UB_vectors.push_back(zero_vector);
478 }
479 
480 
481 } // namespace libMesh
482 
483 #endif // LIBMESH_HAVE_SLEPC && LIBMESH_HAVE_GLPK
T libmesh_real(T a)
std::vector< Real > B_min
B_min, B_max define the bounding box.
Real get_value(const std::string &param_name) const
Get the value of the specified parameter, throw an error if it does not exist.
Definition: rb_parameters.C:65
numeric_index_type get_first_local_training_index() const
Get the first local index of the training parameters.
virtual Real get_SCM_UB()
Evaluate single SCM upper bound.
This is the EquationSystems class.
Number Aq_inner_product(unsigned int q, const NumericVector< Number > &v, const NumericVector< Number > &w)
Compute the inner product between two vectors using matrix Aq.
SparseMatrix< Number > * matrix_B
A second system matrix for generalized eigenvalue problems.
Definition: eigen_system.h:321
void set_SCM_UB_vector(unsigned int j, unsigned int q, Real y_q)
Set entries of SCM_UB_vector, which stores the vector y, corresponding to the minimizing eigenvectors...
const SparseMatrix< Number > & get_matrix_A() const
Definition: eigen_system.C:333
static constexpr Real TOLERANCE
void vector_mult(NumericVector< T > &dest, const NumericVector< T > &arg) const
Multiplies the matrix by the NumericVector arg and stores the result in NumericVector dest...
Real get_parameter_min(const std::string &param_name) const
Get minimum allowable value of parameter param_name.
Real get_parameter_max(const std::string &param_name) const
Get maximum allowable value of parameter param_name.
Real get_B_min(unsigned int i) const
Get B_min and B_max.
const RBParameters & get_parameters_max() const
Get an RBParameters object that specifies the maximum allowable value for each parameter.
const EquationSystems & get_equation_systems() const
Definition: system.h:721
Real get_SCM_training_tolerance() const
Get/set SCM_training_tolerance: tolerance for SCM greedy.
virtual void enrich_C_J(unsigned int new_C_J_index)
Enrich C_J by adding the element of SCM_training_samples that has the largest gap between alpha_LB an...
unsigned int get_n_A_terms() const
Get Q_a, the number of terms in the affine expansion for the bilinear form.
const Parallel::Communicator & comm() const
virtual void evaluate_stability_constant()
Compute the stability constant for current_parameters by solving a generalized eigenvalue problem ove...
void add_scaled_Aq(Number scalar, unsigned int q_a, SparseMatrix< Number > *input_matrix, bool symmetrize)
Add the scaled q^th affine matrix to input_matrix.
static void get_global_max_error_pair(const Parallel::Communicator &communicator, std::pair< numeric_index_type, Real > &error_pair)
Static function to return the error pair (index,error) that is corresponds to the largest error on al...
The libMesh namespace provides an interface to certain functionality in the library.
virtual T dot(const NumericVector< T > &v) const =0
const T_sys & get_system(std::string_view name) const
RBThetaExpansion & get_rb_theta_expansion()
Get a reference to the rb_theta_expansion.
std::vector< Real > B_max
RBSCMEvaluation * rb_scm_eval
The current RBSCMEvaluation object we are using to perform the Evaluation stage of the SCM...
This class stores the set of RBTheta functor objects that define the "parameter-dependent expansion" ...
std::vector< std::vector< Real > > SCM_UB_vectors
This matrix stores the infimizing vectors y_1( ),...,y_Q_a( ), for each in C_J, which are used in co...
virtual void solve() override
Override to solve the condensed eigenproblem with the dofs in local_non_condensed_dofs_vector strippe...
dof_id_type n_dofs() const
Definition: system.C:121
std::vector< Real > C_J_stability_vector
Vector storing the (truth) stability values at the parameters in C_J.
std::unique_ptr< NumericVector< Number > > inner_product_storage_vector
We keep an extra temporary vector that is useful for performing inner products (avoids unnecessary me...
Real SCM_training_tolerance
Tolerance which controls when to terminate the SCM Greedy.
virtual void add(const numeric_index_type i, const numeric_index_type j, const T value)=0
Add value to the element (i,j).
virtual Real get_SCM_LB()
Evaluate single SCM lower bound.
virtual void print_info()
Print out info that describes the current setup of this RBSCMConstruction.
void set_rb_scm_evaluation(RBSCMEvaluation &rb_scm_eval_in)
Set the RBSCMEvaluation object.
Number B_inner_product(const NumericVector< Number > &v, const NumericVector< Number > &w) const
Compute the inner product between two vectors using the system&#39;s matrix_B.
virtual void initialize_training_parameters(const RBParameters &mu_min, const RBParameters &mu_max, const unsigned int n_global_training_samples, const std::map< std::string, bool > &log_param_scale, const bool deterministic=true)
Initialize the parameter ranges and indicate whether deterministic or random training parameters shou...
void set_training_random_seed(int seed)
Set the seed that is used to randomly generate training parameters.
virtual void load_matrix_B()
Copy over the matrix to store in matrix_B, usually this is the mass or inner-product matrix...
virtual void zero()=0
Set all entries to 0.
const RBParameters & get_parameters_min() const
Get an RBParameters object that specifies the minimum allowable value for each parameter.
dof_id_type numeric_index_type
Definition: id_types.h:99
std::string RB_system_name
The name of the associated RB system.
std::vector< RBParameters > C_J
Vector storing the greedily selected parameters during SCM training.
void set_B_min(unsigned int i, Real B_min_val)
Set B_min and B_max.
SparseMatrix< Number > * get_inner_product_matrix()
Get a pointer to inner_product_matrix.
void set_C_J_stability_constraint(unsigned int j, Real stability_constraint_in)
Set stability constraints (i.e.
virtual Real SCM_greedy_error_indicator(Real LB, Real UB)
Helper function which provides an error indicator to be used in the SCM greedy.
std::unique_ptr< NumericVector< Number > > solution
Data structure to hold solution values.
Definition: system.h:1593
numeric_index_type get_local_n_training_samples() const
Get the total number of training samples local to this processor.
virtual void attach_deflation_space()
Attach the deflation space defined by the specified vector, can be useful in solving constrained eige...
bool is_constrained_dof(const dof_id_type dof) const
Definition: dof_map.h:2258
SparseMatrix< Number > * matrix_A
The system matrix for standard eigenvalue problems.
Definition: eigen_system.h:313
virtual void set_eigensolver_properties(int)
This function is called before truth eigensolves in compute_SCM_bounding_box and evaluate_stability_c...
RBSCMConstruction(EquationSystems &es, const std::string &name_in, const unsigned int number_in)
Constructor.
const RBParameters & get_parameters() const
Get the current parameters.
void initialize_condensed_dofs(const std::set< dof_id_type > &global_condensed_dofs_set=std::set< dof_id_type >())
Loop over the dofs on each processor to initialize the list of non-condensed dofs.
This class is part of the rbOOmit framework.
Definition: rb_parameters.h:52
numeric_index_type get_n_training_samples() const
Get the number of global training samples.
void set_params_from_training_set(unsigned int global_index)
Set parameters to the RBParameters stored in index global_index of the global training set...
RBThetaExpansion & get_rb_theta_expansion()
Get a reference to the RBThetaExpansion object.
virtual std::pair< unsigned int, Real > compute_SCM_bounds_on_training_set()
Compute upper and lower bounds for each SCM training point.
virtual void process_parameters_file(const std::string &parameters_filename)
Read in the parameters from file specified by parameters_filename and set the this system&#39;s member va...
bool set_parameters(const RBParameters &params)
Set the current parameters to params The parameters are checked for validity; an error is thrown if t...
virtual void resize_SCM_vectors()
Clear and resize the SCM data vectors.
virtual void close()=0
Calls the SparseMatrix&#39;s internal assembly routines, ensuring that the values are consistent across p...
void set_SCM_training_tolerance(Real SCM_training_tolerance_in)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void perform_SCM_greedy()
Perform the SCM greedy algorithm to develop a lower bound over the training set.
void set_B_max(unsigned int i, Real B_max_val)
Real get_C_J_stability_constraint(unsigned int j) const
Get stability constraints (i.e.
virtual void add_scaled_symm_Aq(unsigned int q_a, Number scalar)
Add the scaled symmetrized affine matrix from the associated RBSystem to matrix_A.
std::unique_ptr< EigenSolver< Number > > eigen_solver
The EigenSolver, defining which interface, i.e solver package to use.
Definition: eigen_system.h:362
void set_value(const std::string &param_name, Real value)
Set the value of the specified parameter.
virtual void compute_SCM_bounding_box()
Compute the SCM bounding box.
OStreamProxy out
virtual std::pair< Real, Real > get_eigenpair(dof_id_type i) override
Override get_eigenpair() to retrieve the eigenpair for the condensed eigensolve.
RBSCMEvaluation & get_rb_scm_evaluation()
Get a reference to the RBSCMEvaluation object.
Real get_B_max(unsigned int i) const
void set_eigenproblem_type(EigenProblemType ept)
Sets the type of the current eigen problem.
Definition: eigen_system.C:85
This class is part of the rbOOmit framework.
unsigned int get_n_converged() const
Definition: eigen_system.h:130
const std::string & name() const
Definition: system.h:2342
bool assemble_before_solve
Flag which tells the system to whether or not to call the user assembly function during each call to ...
Definition: system.h:1547
void initialize_parameters(const RBParameters &mu_min_in, const RBParameters &mu_max_in, const std::map< std::string, std::vector< Real >> &discrete_parameter_values)
Initialize the parameter ranges and set current_parameters.
const DofMap & get_dof_map() const
Definition: system.h:2374
unsigned int get_n_params() const
Get the number of parameters.
virtual void set_params_from_training_set_and_broadcast(unsigned int global_index)
Load the specified training parameter and then broadcast to all processors.
virtual void clear()
Clear all the data structures associated with the system.
virtual void clear() override
Clear all the data structures associated with the system.
This class is part of the rbOOmit framework.
void print_discrete_parameter_values() const
Print out all the discrete parameter values.
uint8_t dof_id_type
Definition: id_types.h:67