libMesh
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Attributes | List of all members
libMesh::RBConstruction Class Reference

This class is part of the rbOOmit framework. More...

#include <rb_construction.h>

Inheritance diagram for libMesh::RBConstruction:
[legend]

Public Types

typedef RBConstruction sys_type
 The type of system. More...
 
typedef RBConstructionBase< LinearImplicitSystemParent
 The type of the parent. More...
 
typedef std::map< std::string, SparseMatrix< Number > * >::iterator matrices_iterator
 Matrix iterator typedefs. More...
 
typedef std::map< std::string, SparseMatrix< Number > * >::const_iterator const_matrices_iterator
 
typedef Number(* ValueFunctionPointer) (const Point &p, const Parameters &Parameters, const std::string &sys_name, const std::string &unknown_name)
 Projects arbitrary functions onto the current solution. More...
 
typedef Gradient(* GradientFunctionPointer) (const Point &p, const Parameters &parameters, const std::string &sys_name, const std::string &unknown_name)
 
typedef std::map< std::string, NumericVector< Number > * >::iterator vectors_iterator
 Vector iterator typedefs. More...
 
typedef std::map< std::string, NumericVector< Number > * >::const_iterator const_vectors_iterator
 

Public Member Functions

 RBConstruction (EquationSystems &es, const std::string &name, const unsigned int number)
 Constructor. More...
 
virtual ~RBConstruction ()
 Destructor. More...
 
virtual void solve_for_matrix_and_rhs (LinearSolver< Number > &input_solver, SparseMatrix< Number > &input_matrix, NumericVector< Number > &input_rhs)
 Assembles & solves the linear system A*x=b for the specified matrix input_matrix and right-hand side rhs. More...
 
void set_rb_evaluation (RBEvaluation &rb_eval_in)
 Set the RBEvaluation object. More...
 
RBEvaluationget_rb_evaluation ()
 Get a reference to the RBEvaluation object. More...
 
bool is_rb_eval_initialized () const
 
RBThetaExpansionget_rb_theta_expansion ()
 Get a reference to the RBThetaExpansion object that that belongs to rb_eval. More...
 
void set_rb_assembly_expansion (RBAssemblyExpansion &rb_assembly_expansion_in)
 Set the rb_assembly_expansion object. More...
 
RBAssemblyExpansionget_rb_assembly_expansion ()
 
sys_typesystem ()
 
virtual void clear () override
 Clear all the data structures associated with the system. More...
 
virtual std::string system_type () const override
 
virtual Real truth_solve (int plot_solution)
 Perform a "truth" solve, i.e. More...
 
virtual Real train_reduced_basis (const bool resize_rb_eval_data=true)
 Train the reduced basis. More...
 
void enrich_basis_from_rhs_terms (const bool resize_rb_eval_data=true)
 This function computes one basis function for each rhs term. More...
 
virtual Real compute_max_error_bound ()
 (i) Compute the a posteriori error bound for each set of parameters in the training set, (ii) set current_parameters to the parameters that maximize the error bound, and (iii) return the maximum error bound. More...
 
const RBParametersget_greedy_parameter (unsigned int i)
 Return the parameters chosen during the i^th step of the Greedy algorithm. More...
 
void set_rel_training_tolerance (Real new_training_tolerance)
 Get/set the relative tolerance for the basis training. More...
 
Real get_rel_training_tolerance ()
 
void set_abs_training_tolerance (Real new_training_tolerance)
 Get/set the absolute tolerance for the basis training. More...
 
Real get_abs_training_tolerance ()
 
void set_normalize_rb_bound_in_greedy (bool normalize_rb_bound_in_greedy_in)
 Get/set the boolean to indicate if we normalize the RB error in the greedy. More...
 
bool get_normalize_rb_bound_in_greedy ()
 
unsigned int get_Nmax () const
 Get/set Nmax, the maximum number of RB functions we are willing to compute. More...
 
virtual void set_Nmax (unsigned int Nmax)
 
virtual void load_basis_function (unsigned int i)
 Load the i^th RB function into the RBConstruction solution vector. More...
 
virtual void load_rb_solution ()
 Load the RB solution from the most recent solve with rb_eval into this system's solution vector. More...
 
SparseMatrix< Number > * get_inner_product_matrix ()
 Get a pointer to inner_product_matrix. More...
 
SparseMatrix< Number > * get_non_dirichlet_inner_product_matrix ()
 Get the non-Dirichlet (or more generally no-constraints) version of the inner-product matrix. More...
 
SparseMatrix< Number > * get_non_dirichlet_inner_product_matrix_if_avail ()
 Get the non-Dirichlet inner-product matrix if it's available, otherwise get the inner-product matrix with constraints. More...
 
SparseMatrix< Number > * get_Aq (unsigned int q)
 Get a pointer to Aq. More...
 
SparseMatrix< Number > * get_non_dirichlet_Aq (unsigned int q)
 Get a pointer to non_dirichlet_Aq. More...
 
SparseMatrix< Number > * get_non_dirichlet_Aq_if_avail (unsigned int q)
 Get a pointer to non_dirichlet_Aq if it's available, otherwise get Aq. More...
 
virtual void initialize_rb_construction (bool skip_matrix_assembly=false, bool skip_vector_assembly=false)
 Allocate all the data structures necessary for the construction stage of the RB method. More...
 
NumericVector< Number > * get_Fq (unsigned int q)
 Get a pointer to Fq. More...
 
NumericVector< Number > * get_non_dirichlet_Fq (unsigned int q)
 Get a pointer to non-Dirichlet Fq. More...
 
NumericVector< Number > * get_non_dirichlet_Fq_if_avail (unsigned int q)
 Get a pointer to non_dirichlet_Fq if it's available, otherwise get Fq. More...
 
NumericVector< Number > * get_output_vector (unsigned int n, unsigned int q_l)
 Get a pointer to the n^th output. More...
 
NumericVector< Number > * get_non_dirichlet_output_vector (unsigned int n, unsigned int q_l)
 Get a pointer to non-Dirichlet output vector. More...
 
virtual void get_all_matrices (std::map< std::string, SparseMatrix< Number > *> &all_matrices)
 Get a map that stores pointers to all of the matrices. More...
 
virtual void get_all_vectors (std::map< std::string, NumericVector< Number > *> &all_vectors)
 Get a map that stores pointers to all of the vectors. More...
 
virtual void get_output_vectors (std::map< std::string, NumericVector< Number > *> &all_vectors)
 Get a map that stores pointers to all of the vectors. More...
 
virtual void assemble_affine_expansion (bool skip_matrix_assembly, bool skip_vector_assembly)
 Assemble the matrices and vectors for this system. More...
 
void assemble_inner_product_matrix (SparseMatrix< Number > *input_matrix, bool apply_dof_constraints=true)
 Assemble the inner product matrix and store it in input_matrix. More...
 
void assemble_Aq_matrix (unsigned int q, SparseMatrix< Number > *input_matrix, bool apply_dof_constraints=true)
 Assemble the q^th affine matrix and store it in input_matrix. More...
 
void assemble_Fq_vector (unsigned int q, NumericVector< Number > *input_vector, bool apply_dof_constraints=true)
 Assemble the q^th affine vector and store it in input_matrix. More...
 
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. More...
 
virtual void write_riesz_representors_to_files (const std::string &riesz_representors_dir, const bool write_binary_residual_representors)
 Write out all the Riesz representor data to files. More...
 
virtual void read_riesz_representors_from_files (const std::string &riesz_representors_dir, const bool write_binary_residual_representors)
 Read in all the Riesz representor data from files. More...
 
virtual void recompute_all_residual_terms (const bool compute_inner_products=true)
 This function computes all of the residual representors, can be useful when restarting a basis training computation. More...
 
virtual void process_parameters_file (const std::string &parameters_filename)
 Read in from the file specified by parameters_filename and set the this system's member variables accordingly. More...
 
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)
 Set the state of this RBConstruction object based on the arguments to this function. More...
 
virtual void print_info ()
 Print out info that describes the current setup of this RBConstruction. More...
 
void print_basis_function_orthogonality ()
 Print out a matrix that shows the orthogonality of the RB basis functions. More...
 
unsigned int get_delta_N () const
 Get delta_N, the number of basis functions we add to the RB space per iteration of the greedy algorithm. More...
 
void set_inner_product_assembly (ElemAssembly &inner_product_assembly_in)
 Set the rb_assembly_expansion object. More...
 
ElemAssemblyget_inner_product_assembly ()
 
void zero_constrained_dofs_on_vector (NumericVector< Number > &vector)
 It is sometimes useful to be able to zero vector entries that correspond to constrained dofs. More...
 
void set_convergence_assertion_flag (bool flag)
 Setter for the flag determining if convergence should be checked after each solve. More...
 
void set_quiet_mode (bool quiet_mode_in)
 Set the quiet_mode flag. More...
 
bool is_quiet () const
 Is the system in quiet mode? More...
 
numeric_index_type get_n_training_samples () const
 Get the total number of training samples. More...
 
numeric_index_type get_local_n_training_samples () const
 Get the total number of training samples local to this processor. More...
 
numeric_index_type get_first_local_training_index () const
 Get the first local index of the training parameters. More...
 
numeric_index_type get_last_local_training_index () const
 Get the last local index of the training parameters. More...
 
virtual void initialize_training_parameters (const RBParameters &mu_min, const RBParameters &mu_max, unsigned int n_training_parameters, std::map< std::string, bool > log_param_scale, bool deterministic=true)
 Initialize the parameter ranges and indicate whether deterministic or random training parameters should be used and whether or not we want the parameters to be scaled logarithmically. More...
 
virtual void load_training_set (std::map< std::string, std::vector< Number >> &new_training_set)
 Overwrite the training parameters with new_training_set. More...
 
void broadcast_parameters (unsigned int proc_id)
 Broadcasts parameters on processor proc_id to all processors. More...
 
void set_training_random_seed (unsigned int seed)
 Set the seed that is used to randomly generate training parameters. More...
 
void set_deterministic_training_parameter_name (const std::string &name)
 In some cases we only want to allow discrete parameter values, instead of parameters that may take any value in a specified interval. More...
 
const std::string & get_deterministic_training_parameter_name () const
 Get the name of the parameter that we will generate deterministic training parameters for. More...
 
void set_deterministic_training_parameter_repeats (unsigned int repeats)
 Set the number of times each sample of the deterministic training parameter is repeated. More...
 
unsigned int get_deterministic_training_parameter_repeats () const
 Get the number of times each sample of the deterministic training parameter is repeated. More...
 
virtual void reinit () override
 Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be used. More...
 
virtual void assemble () override
 Prepares matrix and _dof_map for matrix assembly. More...
 
virtual void restrict_solve_to (const SystemSubset *subset, const SubsetSolveMode subset_solve_mode=SUBSET_ZERO) override
 After calling this method, any solve will be limited to the given subset. More...
 
virtual void solve () override
 Assembles & solves the linear system A*x=b. More...
 
virtual LinearSolver< Number > * get_linear_solver () const override
 
virtual void release_linear_solver (LinearSolver< Number > *) const override
 Releases a pointer to a linear solver acquired by this->get_linear_solver() More...
 
virtual void assembly (bool get_residual, bool get_jacobian, bool apply_heterogeneous_constraints=false, bool apply_no_constraints=false) override
 Assembles a residual in rhs and/or a jacobian in matrix, as requested. More...
 
unsigned int n_linear_iterations () const
 
Real final_linear_residual () const
 
void attach_shell_matrix (ShellMatrix< Number > *shell_matrix)
 This function enables the user to provide a shell matrix, i.e. More...
 
void detach_shell_matrix ()
 Detaches a shell matrix. More...
 
ShellMatrix< Number > * get_shell_matrix ()
 
virtual void disable_cache () override
 Avoids use of any cached data that might affect any solve result. More...
 
virtual std::pair< unsigned int, Realget_linear_solve_parameters () const
 
virtual void assemble_residual_derivatives (const ParameterVector &parameters) override
 Residual parameter derivative function. More...
 
virtual std::pair< unsigned int, Realsensitivity_solve (const ParameterVector &parameters) override
 Assembles & solves the linear system(s) (dR/du)*u_p = -dR/dp, for those parameters contained within parameters. More...
 
virtual std::pair< unsigned int, Realweighted_sensitivity_solve (const ParameterVector &parameters, const ParameterVector &weights) override
 Assembles & solves the linear system(s) (dR/du)*u_w = sum(w_p*-dR/dp), for those parameters p contained within parameters weighted by the values w_p found within weights. More...
 
virtual std::pair< unsigned int, Realadjoint_solve (const QoISet &qoi_indices=QoISet()) override
 Assembles & solves the linear system (dR/du)^T*z = dq/du, for those quantities of interest q specified by qoi_indices. More...
 
virtual std::pair< unsigned int, Realweighted_sensitivity_adjoint_solve (const ParameterVector &parameters, const ParameterVector &weights, const QoISet &qoi_indices=QoISet()) override
 Assembles & solves the linear system(s) (dR/du)^T*z_w = sum(w_p*(d^2q/dudp - d^2R/dudp*z)), for those parameters p contained within parameters, weighted by the values w_p found within weights. More...
 
virtual void adjoint_qoi_parameter_sensitivity (const QoISet &qoi_indices, const ParameterVector &parameters, SensitivityData &sensitivities) override
 Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j]. More...
 
virtual void forward_qoi_parameter_sensitivity (const QoISet &qoi_indices, const ParameterVector &parameters, SensitivityData &sensitivities) override
 Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j]. More...
 
virtual void qoi_parameter_hessian (const QoISet &qoi_indices, const ParameterVector &parameters, SensitivityData &hessian) override
 For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters p, the parameter sensitivity Hessian H_ij is defined as H_ij = (d^2 q)/(d p_i d p_j) This Hessian is the output of this method, where for each q_i, H_jk is stored in hessian.second_derivative(i,j,k). More...
 
virtual void qoi_parameter_hessian_vector_product (const QoISet &qoi_indices, const ParameterVector &parameters, const ParameterVector &vector, SensitivityData &product) override
 For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters p, the parameter sensitivity Hessian H_ij is defined as H_ij = (d^2 q)/(d p_i d p_j) The Hessian-vector product, for a vector v_k in parameter space, is S_j = H_jk v_k This product is the output of this method, where for each q_i, S_j is stored in sensitivities[i][j]. More...
 
SparseMatrix< Number > & add_matrix (const std::string &mat_name)
 Adds the additional matrix mat_name to this system. More...
 
void remove_matrix (const std::string &mat_name)
 Removes the additional matrix mat_name from this system. More...
 
bool have_matrix (const std::string &mat_name) const
 
const SparseMatrix< Number > * request_matrix (const std::string &mat_name) const
 
SparseMatrix< Number > * request_matrix (const std::string &mat_name)
 
const SparseMatrix< Number > & get_matrix (const std::string &mat_name) const
 
SparseMatrix< Number > & get_matrix (const std::string &mat_name)
 
virtual unsigned int n_matrices () const override
 
virtual void assemble_qoi (const QoISet &qoi_indices=QoISet()) override
 Prepares qoi for quantity of interest assembly, then calls user qoi function. More...
 
virtual void assemble_qoi_derivative (const QoISet &qoi_indices=QoISet(), bool include_liftfunc=true, bool apply_constraints=true) override
 Prepares adjoint_rhs for quantity of interest derivative assembly, then calls user qoi derivative function. More...
 
void init ()
 Initializes degrees of freedom on the current mesh. More...
 
virtual void reinit_constraints ()
 Reinitializes the constraints for this system. More...
 
bool is_initialized ()
 
virtual void update ()
 Update the local values to reflect the solution on neighboring processors. More...
 
bool is_adjoint_already_solved () const
 Accessor for the adjoint_already_solved boolean. More...
 
void set_adjoint_already_solved (bool setting)
 Setter for the adjoint_already_solved boolean. More...
 
virtual void qoi_parameter_sensitivity (const QoISet &qoi_indices, const ParameterVector &parameters, SensitivityData &sensitivities)
 Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j]. More...
 
virtual bool compare (const System &other_system, const Real threshold, const bool verbose) const
 
const std::string & name () const
 
void project_solution (FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
 Projects arbitrary functions onto the current solution. More...
 
void project_solution (FEMFunctionBase< Number > *f, FEMFunctionBase< Gradient > *g=nullptr) const
 Projects arbitrary functions onto the current solution. More...
 
void project_solution (ValueFunctionPointer fptr, GradientFunctionPointer gptr, const Parameters &parameters) const
 
void project_vector (NumericVector< Number > &new_vector, FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, int is_adjoint=-1) const
 Projects arbitrary functions onto a vector of degree of freedom values for the current system. More...
 
void project_vector (NumericVector< Number > &new_vector, FEMFunctionBase< Number > *f, FEMFunctionBase< Gradient > *g=nullptr, int is_adjoint=-1) const
 Projects arbitrary functions onto a vector of degree of freedom values for the current system. More...
 
void project_vector (ValueFunctionPointer fptr, GradientFunctionPointer gptr, const Parameters &parameters, NumericVector< Number > &new_vector, int is_adjoint=-1) const
 Projects arbitrary functions onto a vector of degree of freedom values for the current system. More...
 
void boundary_project_solution (const std::set< boundary_id_type > &b, const std::vector< unsigned int > &variables, FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr)
 Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system. More...
 
void boundary_project_solution (const std::set< boundary_id_type > &b, const std::vector< unsigned int > &variables, ValueFunctionPointer fptr, GradientFunctionPointer gptr, const Parameters &parameters)
 Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system. More...
 
void boundary_project_vector (const std::set< boundary_id_type > &b, const std::vector< unsigned int > &variables, NumericVector< Number > &new_vector, FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, int is_adjoint=-1) const
 Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system. More...
 
void boundary_project_vector (const std::set< boundary_id_type > &b, const std::vector< unsigned int > &variables, ValueFunctionPointer fptr, GradientFunctionPointer gptr, const Parameters &parameters, NumericVector< Number > &new_vector, int is_adjoint=-1) const
 Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system. More...
 
unsigned int number () const
 
void update_global_solution (std::vector< Number > &global_soln) const
 Fill the input vector global_soln so that it contains the global solution on all processors. More...
 
void update_global_solution (std::vector< Number > &global_soln, const processor_id_type dest_proc) const
 Fill the input vector global_soln so that it contains the global solution on processor dest_proc. More...
 
const MeshBaseget_mesh () const
 
MeshBaseget_mesh ()
 
const DofMapget_dof_map () const
 
DofMapget_dof_map ()
 
const EquationSystemsget_equation_systems () const
 
EquationSystemsget_equation_systems ()
 
bool active () const
 
void activate ()
 Activates the system. More...
 
void deactivate ()
 Deactivates the system. More...
 
void set_basic_system_only ()
 Sets the system to be "basic only": i.e. More...
 
vectors_iterator vectors_begin ()
 Beginning of vectors container. More...
 
const_vectors_iterator vectors_begin () const
 Beginning of vectors container. More...
 
vectors_iterator vectors_end ()
 End of vectors container. More...
 
const_vectors_iterator vectors_end () const
 End of vectors container. More...
 
NumericVector< Number > & add_vector (const std::string &vec_name, const bool projections=true, const ParallelType type=PARALLEL)
 Adds the additional vector vec_name to this system. More...
 
void remove_vector (const std::string &vec_name)
 Removes the additional vector vec_name from this system. More...
 
bool & project_solution_on_reinit (void)
 Tells the System whether or not to project the solution vector onto new grids when the system is reinitialized. More...
 
bool have_vector (const std::string &vec_name) const
 
const NumericVector< Number > * request_vector (const std::string &vec_name) const
 
NumericVector< Number > * request_vector (const std::string &vec_name)
 
const NumericVector< Number > * request_vector (const unsigned int vec_num) const
 
NumericVector< Number > * request_vector (const unsigned int vec_num)
 
const NumericVector< Number > & get_vector (const std::string &vec_name) const
 
NumericVector< Number > & get_vector (const std::string &vec_name)
 
const NumericVector< Number > & get_vector (const unsigned int vec_num) const
 
NumericVector< Number > & get_vector (const unsigned int vec_num)
 
const std::string & vector_name (const unsigned int vec_num) const
 
const std::string & vector_name (const NumericVector< Number > &vec_reference) const
 
void set_vector_as_adjoint (const std::string &vec_name, int qoi_num)
 Allows one to set the QoI index controlling whether the vector identified by vec_name represents a solution from the adjoint (qoi_num >= 0) or primal (qoi_num == -1) space. More...
 
int vector_is_adjoint (const std::string &vec_name) const
 
void set_vector_preservation (const std::string &vec_name, bool preserve)
 Allows one to set the boolean controlling whether the vector identified by vec_name should be "preserved": projected to new meshes, saved, etc. More...
 
bool vector_preservation (const std::string &vec_name) const
 
NumericVector< Number > & add_adjoint_solution (unsigned int i=0)
 
NumericVector< Number > & get_adjoint_solution (unsigned int i=0)
 
const NumericVector< Number > & get_adjoint_solution (unsigned int i=0) const
 
NumericVector< Number > & add_sensitivity_solution (unsigned int i=0)
 
NumericVector< Number > & get_sensitivity_solution (unsigned int i=0)
 
const NumericVector< Number > & get_sensitivity_solution (unsigned int i=0) const
 
NumericVector< Number > & add_weighted_sensitivity_adjoint_solution (unsigned int i=0)
 
NumericVector< Number > & get_weighted_sensitivity_adjoint_solution (unsigned int i=0)
 
const NumericVector< Number > & get_weighted_sensitivity_adjoint_solution (unsigned int i=0) const
 
NumericVector< Number > & add_weighted_sensitivity_solution ()
 
NumericVector< Number > & get_weighted_sensitivity_solution ()
 
const NumericVector< Number > & get_weighted_sensitivity_solution () const
 
NumericVector< Number > & add_adjoint_rhs (unsigned int i=0)
 
NumericVector< Number > & get_adjoint_rhs (unsigned int i=0)
 
const NumericVector< Number > & get_adjoint_rhs (unsigned int i=0) const
 
NumericVector< Number > & add_sensitivity_rhs (unsigned int i=0)
 
NumericVector< Number > & get_sensitivity_rhs (unsigned int i=0)
 
const NumericVector< Number > & get_sensitivity_rhs (unsigned int i=0) const
 
unsigned int n_vectors () const
 
unsigned int n_vars () const
 
unsigned int n_variable_groups () const
 
unsigned int n_components () const
 
dof_id_type n_dofs () const
 
dof_id_type n_active_dofs () const
 
dof_id_type n_constrained_dofs () const
 
dof_id_type n_local_constrained_dofs () const
 
dof_id_type n_local_dofs () const
 
unsigned int add_variable (const std::string &var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
 Adds the variable var to the list of variables for this system. More...
 
unsigned int add_variable (const std::string &var, const Order order=FIRST, const FEFamily=LAGRANGE, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
 Adds the variable var to the list of variables for this system. More...
 
unsigned int add_variables (const std::vector< std::string > &vars, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
 Adds the variable var to the list of variables for this system. More...
 
unsigned int add_variables (const std::vector< std::string > &vars, const Order order=FIRST, const FEFamily=LAGRANGE, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
 Adds the variable var to the list of variables for this system. More...
 
const Variablevariable (unsigned int var) const
 Return a constant reference to Variable var. More...
 
const VariableGroupvariable_group (unsigned int vg) const
 Return a constant reference to VariableGroup vg. More...
 
bool has_variable (const std::string &var) const
 
const std::string & variable_name (const unsigned int i) const
 
unsigned short int variable_number (const std::string &var) const
 
void get_all_variable_numbers (std::vector< unsigned int > &all_variable_numbers) const
 Fills all_variable_numbers with all the variable numbers for the variables that have been added to this system. More...
 
unsigned int variable_scalar_number (const std::string &var, unsigned int component) const
 
unsigned int variable_scalar_number (unsigned int var_num, unsigned int component) const
 
const FETypevariable_type (const unsigned int i) const
 
const FETypevariable_type (const std::string &var) const
 
bool identify_variable_groups () const
 
void identify_variable_groups (const bool)
 Toggle automatic VariableGroup identification. More...
 
Real calculate_norm (const NumericVector< Number > &v, unsigned int var, FEMNormType norm_type, std::set< unsigned int > *skip_dimensions=nullptr) const
 
Real calculate_norm (const NumericVector< Number > &v, const SystemNorm &norm, std::set< unsigned int > *skip_dimensions=nullptr) const
 
void read_header (Xdr &io, const std::string &version, const bool read_header=true, const bool read_additional_data=true, const bool read_legacy_format=false)
 Reads the basic data header for this System. More...
 
void read_legacy_data (Xdr &io, const bool read_additional_data=true)
 Reads additional data, namely vectors, for this System. More...
 
template<typename ValType >
void read_serialized_data (Xdr &io, const bool read_additional_data=true)
 Reads additional data, namely vectors, for this System. More...
 
void read_serialized_data (Xdr &io, const bool read_additional_data=true)
 Non-templated version for backward compatibility. More...
 
template<typename InValType >
std::size_t read_serialized_vectors (Xdr &io, const std::vector< NumericVector< Number > *> &vectors) const
 Read a number of identically distributed vectors. More...
 
std::size_t read_serialized_vectors (Xdr &io, const std::vector< NumericVector< Number > *> &vectors) const
 Non-templated version for backward compatibility. More...
 
template<typename InValType >
void read_parallel_data (Xdr &io, const bool read_additional_data)
 Reads additional data, namely vectors, for this System. More...
 
void read_parallel_data (Xdr &io, const bool read_additional_data)
 Non-templated version for backward compatibility. More...
 
void write_header (Xdr &io, const std::string &version, const bool write_additional_data) const
 Writes the basic data header for this System. More...
 
void write_serialized_data (Xdr &io, const bool write_additional_data=true) const
 Writes additional data, namely vectors, for this System. More...
 
std::size_t write_serialized_vectors (Xdr &io, const std::vector< const NumericVector< Number > *> &vectors) const
 Serialize & write a number of identically distributed vectors. More...
 
void write_parallel_data (Xdr &io, const bool write_additional_data) const
 Writes additional data, namely vectors, for this System. More...
 
std::string get_info () const
 
void attach_init_function (void fptr(EquationSystems &es, const std::string &name))
 Register a user function to use in initializing the system. More...
 
void attach_init_object (Initialization &init)
 Register a user class to use to initialize the system. More...
 
void attach_assemble_function (void fptr(EquationSystems &es, const std::string &name))
 Register a user function to use in assembling the system matrix and RHS. More...
 
void attach_assemble_object (Assembly &assemble)
 Register a user object to use in assembling the system matrix and RHS. More...
 
void attach_constraint_function (void fptr(EquationSystems &es, const std::string &name))
 Register a user function for imposing constraints. More...
 
void attach_constraint_object (Constraint &constrain)
 Register a user object for imposing constraints. More...
 
void attach_QOI_function (void fptr(EquationSystems &es, const std::string &name, const QoISet &qoi_indices))
 Register a user function for evaluating the quantities of interest, whose values should be placed in System::qoi. More...
 
void attach_QOI_object (QOI &qoi)
 Register a user object for evaluating the quantities of interest, whose values should be placed in System::qoi. More...
 
void attach_QOI_derivative (void fptr(EquationSystems &es, const std::string &name, const QoISet &qoi_indices, bool include_liftfunc, bool apply_constraints))
 Register a user function for evaluating derivatives of a quantity of interest with respect to test functions, whose values should be placed in System::rhs. More...
 
void attach_QOI_derivative_object (QOIDerivative &qoi_derivative)
 Register a user object for evaluating derivatives of a quantity of interest with respect to test functions, whose values should be placed in System::rhs. More...
 
virtual void user_initialization ()
 Calls user's attached initialization function, or is overridden by the user in derived classes. More...
 
virtual void user_assembly ()
 Calls user's attached assembly function, or is overridden by the user in derived classes. More...
 
virtual void user_constrain ()
 Calls user's attached constraint function, or is overridden by the user in derived classes. More...
 
virtual void user_QOI (const QoISet &qoi_indices)
 Calls user's attached quantity of interest function, or is overridden by the user in derived classes. More...
 
virtual void user_QOI_derivative (const QoISet &qoi_indices=QoISet(), bool include_liftfunc=true, bool apply_constraints=true)
 Calls user's attached quantity of interest derivative function, or is overridden by the user in derived classes. More...
 
virtual void re_update ()
 Re-update the local values when the mesh has changed. More...
 
virtual void restrict_vectors ()
 Restrict vectors after the mesh has coarsened. More...
 
virtual void prolong_vectors ()
 Prolong vectors after the mesh has refined. More...
 
Number current_solution (const dof_id_type global_dof_number) const
 
unsigned int n_qois () const
 Number of currently active quantities of interest. More...
 
Number point_value (unsigned int var, const Point &p, const bool insist_on_success=true) const
 
Number point_value (unsigned int var, const Point &p, const Elem &e) const
 
Number point_value (unsigned int var, const Point &p, const Elem *e) const
 Calls the version of point_value() which takes a reference. More...
 
Gradient point_gradient (unsigned int var, const Point &p, const bool insist_on_success=true) const
 
Gradient point_gradient (unsigned int var, const Point &p, const Elem &e) const
 
Gradient point_gradient (unsigned int var, const Point &p, const Elem *e) const
 Calls the version of point_gradient() which takes a reference. More...
 
Tensor point_hessian (unsigned int var, const Point &p, const bool insist_on_success=true) const
 
Tensor point_hessian (unsigned int var, const Point &p, const Elem &e) const
 
Tensor point_hessian (unsigned int var, const Point &p, const Elem *e) const
 Calls the version of point_hessian() which takes a reference. More...
 
void local_dof_indices (const unsigned int var, std::set< dof_id_type > &var_indices) const
 Fills the std::set with the degrees of freedom on the local processor corresponding the the variable number passed in. More...
 
void zero_variable (NumericVector< Number > &v, unsigned int var_num) const
 Zeroes all dofs in v that correspond to variable number var_num. More...
 
bool & hide_output ()
 
void projection_matrix (SparseMatrix< Number > &proj_mat) const
 This method creates a projection matrix which corresponds to the operation of project_vector between old and new solution spaces. More...
 
const Parallel::Communicatorcomm () const
 
processor_id_type n_processors () const
 
processor_id_type processor_id () const
 
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. More...
 
void initialize_parameters (const RBParametrized &rb_parametrized)
 Initialize the parameter ranges and set current_parameters. More...
 
unsigned int get_n_params () const
 Get the number of parameters. More...
 
unsigned int get_n_continuous_params () const
 Get the number of continuous parameters. More...
 
unsigned int get_n_discrete_params () const
 Get the number of discrete parameters. More...
 
std::set< std::string > get_parameter_names () const
 Get a set that stores the parameter names. More...
 
const RBParametersget_parameters () const
 Get the current parameters. More...
 
void set_parameters (const RBParameters &params)
 Set the current parameters to params. More...
 
const RBParametersget_parameters_min () const
 Get an RBParameters object that specifies the minimum allowable value for each parameter. More...
 
const RBParametersget_parameters_max () const
 Get an RBParameters object that specifies the maximum allowable value for each parameter. More...
 
Real get_parameter_min (const std::string &param_name) const
 Get minimum allowable value of parameter param_name. More...
 
Real get_parameter_max (const std::string &param_name) const
 Get maximum allowable value of parameter param_name. More...
 
void print_parameters () const
 Print the current parameters. More...
 
void write_parameter_data_to_files (const std::string &continuous_param_file_name, const std::string &discrete_param_file_name, const bool write_binary_data)
 Write out the parameter ranges to files. More...
 
void read_parameter_data_from_files (const std::string &continuous_param_file_name, const std::string &discrete_param_file_name, const bool read_binary_data)
 Read in the parameter ranges from files. More...
 
bool is_discrete_parameter (const std::string &mu_name) const
 Is parameter mu_name discrete? More...
 
const std::map< std::string, std::vector< Real > > & get_discrete_parameter_values () const
 Get a const reference to the discrete parameter values. More...
 
void print_discrete_parameter_values () const
 Print out all the discrete parameter values. More...
 

Static Public Member Functions

static std::unique_ptr< DirichletBoundarybuild_zero_dirichlet_boundary_object ()
 It's helpful to be able to generate a DirichletBoundary that stores a ZeroFunction in order to impose Dirichlet boundary conditions. More...
 
static std::string get_info ()
 Gets a string containing the reference information. More...
 
static std::string get_info ()
 Gets a string containing the reference information. More...
 
static void print_info (std::ostream &out=libMesh::out)
 Prints the reference information, by default to libMesh::out. More...
 
static void print_info (std::ostream &out=libMesh::out)
 Prints the reference information, by default to libMesh::out. More...
 
static unsigned int n_objects ()
 Prints the number of outstanding (created, but not yet destroyed) objects. More...
 
static unsigned int n_objects ()
 Prints the number of outstanding (created, but not yet destroyed) objects. More...
 
static void enable_print_counter_info ()
 Methods to enable/disable the reference counter output from print_info() More...
 
static void enable_print_counter_info ()
 Methods to enable/disable the reference counter output from print_info() More...
 
static void disable_print_counter_info ()
 
static void disable_print_counter_info ()
 
static Real get_closest_value (Real value, const std::vector< Real > &list_of_values)
 

Public Attributes

std::vector< Realtraining_error_bounds
 Vector storing the values of the error bound for each parameter in the training set — the parameter giving the largest error bound is chosen for the next snapshot in the Greedy basis training. More...
 
std::unique_ptr< LinearSolver< Number > > inner_product_solver
 We store an extra linear solver object which we can optionally use for solving all systems in which the system matrix is set to inner_product_matrix. More...
 
LinearSolver< Number > * extra_linear_solver
 Also, we store a pointer to an extra linear solver. More...
 
std::unique_ptr< SparseMatrix< Number > > inner_product_matrix
 The inner product matrix. More...
 
std::vector< Numbertruth_outputs
 Vector storing the truth output values from the most recent truth solve. More...
 
std::vector< std::vector< Number > > output_dual_innerprods
 The vector storing the dual norm inner product terms for each output. More...
 
std::vector< std::unique_ptr< NumericVector< Number > > > Fq_representor
 Vector storing the residual representors associated with the right-hand side. More...
 
std::vector< NumberFq_representor_innerprods
 Vectors storing the residual representor inner products to be used in computing the residuals online. More...
 
bool skip_residual_in_train_reduced_basis
 Boolean flag to indicate if we skip residual calculations in train_reduced_basis. More...
 
bool exit_on_repeated_greedy_parameters
 Boolean flag to indicate whether we exit the greedy if we select the same parameters twice in a row. More...
 
bool impose_internal_fluxes
 Boolean flag to indicate whether we impose "fluxes" (i.e. More...
 
bool skip_degenerate_sides
 In some cases meshes are intentionally created with degenerate sides as a way to represent, say, triangles using a hex-only mesh. More...
 
bool compute_RB_inner_product
 Boolean flag to indicate whether we compute the RB_inner_product_matrix. More...
 
bool store_non_dirichlet_operators
 Boolean flag to indicate whether we store a second copy of each affine operator and vector which does not have Dirichlet bcs enforced. More...
 
bool use_empty_rb_solve_in_greedy
 A boolean flag to indicate whether or not we initialize the Greedy algorithm by performing rb_solves on the training set with an "empty" (i.e. More...
 
bool Fq_representor_innerprods_computed
 A boolean flag to indicate whether or not the Fq representor norms have already been computed — used to make sure that we don't recompute them unnecessarily. More...
 
std::unique_ptr< LinearSolver< Number > > linear_solver
 The LinearSolver defines the interface used to solve the linear_implicit system. More...
 
SparseMatrix< Number > * matrix
 The system matrix. More...
 
bool zero_out_matrix_and_rhs
 By default, the system will zero out the matrix and the right hand side. More...
 
NumericVector< Number > * rhs
 The system matrix. More...
 
bool assemble_before_solve
 Flag which tells the system to whether or not to call the user assembly function during each call to solve(). More...
 
bool use_fixed_solution
 A boolean to be set to true by systems using elem_fixed_solution, for optional use by e.g. More...
 
int extra_quadrature_order
 A member int that can be employed to indicate increased or reduced quadrature order. More...
 
std::unique_ptr< NumericVector< Number > > solution
 Data structure to hold solution values. More...
 
std::unique_ptr< NumericVector< Number > > current_local_solution
 All the values I need to compute my contribution to the simulation at hand. More...
 
Real time
 For time-dependent problems, this is the time t at the beginning of the current timestep. More...
 
std::vector< Numberqoi
 Values of the quantities of interest. More...
 
bool verbose_mode
 Public boolean to toggle verbose mode. More...
 

Protected Types

typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
 Data structure to log the information. More...
 
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > Counts
 Data structure to log the information. More...
 

Protected Member Functions

virtual void allocate_data_structures ()
 Helper function that actually allocates all the data structures required by this class. More...
 
virtual void truth_assembly ()
 Assemble the truth matrix and right-hand side for current_parameters. More...
 
virtual std::unique_ptr< DGFEMContextbuild_context ()
 Builds a DGFEMContext object with enough information to do evaluations on each element. More...
 
virtual SparseMatrix< Number > & get_matrix_for_output_dual_solves ()
 Return the matrix for the output residual dual norm solves. More...
 
virtual bool greedy_termination_test (Real abs_greedy_error, Real initial_greedy_error, int count)
 Function that indicates when to terminate the Greedy basis training. More...
 
void update_greedy_param_list ()
 Update the list of Greedily chosen parameters with current_parameters. More...
 
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)
 This function loops over the mesh and applies the specified interior and/or boundary assembly routines, then adds the scaled result to input_matrix and/or input_vector. More...
 
virtual void set_context_solution_vec (NumericVector< Number > &vec)
 Set current_local_solution = vec so that we can access vec from FEMContext during assembly. More...
 
virtual void assemble_misc_matrices ()
 Assemble and store all the inner-product matrix, the constraint matrix (for constrained problems) and the mass matrix (for time-dependent problems). More...
 
virtual void assemble_all_affine_operators ()
 Assemble and store all Q_a affine operators as well as the inner-product matrix. More...
 
virtual void assemble_all_affine_vectors ()
 Assemble and store the affine RHS vectors. More...
 
virtual void assemble_all_output_vectors ()
 Assemble and store the output vectors. More...
 
virtual void compute_output_dual_innerprods ()
 Compute and store the dual norm of each output functional. More...
 
virtual void compute_Fq_representor_innerprods (bool compute_inner_products=true)
 Compute the terms that are combined ‘online’ to determine the dual norm of the residual. More...
 
virtual void enrich_RB_space ()
 Add a new basis function to the RB space. More...
 
virtual void update_system ()
 Update the system after enriching the RB space; this calls a series of functions to update the system properly. More...
 
virtual Real get_RB_error_bound ()
 
virtual void update_RB_system_matrices ()
 Compute the reduced basis matrices for the current basis. More...
 
virtual void update_residual_terms (bool compute_inner_products=true)
 Compute the terms that are combined ‘online’ to determine the dual norm of the residual. More...
 
virtual void init_context (FEMContext &)
 Initialize the FEMContext prior to performing an element loop. More...
 
bool get_convergence_assertion_flag () const
 Getter for the flag determining if convergence should be checked after each solve. More...
 
void check_convergence (LinearSolver< Number > &input_solver)
 Check if the linear solver reports convergence. More...
 
virtual void init_data ()
 Initializes the member data fields associated with the system, so that, e.g., assemble() may be used. More...
 
RBParameters get_params_from_training_set (unsigned int index)
 Return the RBParameters in index index of training set. More...
 
void set_params_from_training_set (unsigned int index)
 Set parameters to the RBParameters stored in index index of the training set. More...
 
virtual void set_params_from_training_set_and_broadcast (unsigned int index)
 Load the specified training parameter and then broadcast to all processors. More...
 
virtual void init_matrices ()
 Initializes the matrices associated with this system. More...
 
void project_vector (NumericVector< Number > &, int is_adjoint=-1) const
 Projects the vector defined on the old mesh onto the new mesh. More...
 
void project_vector (const NumericVector< Number > &, NumericVector< Number > &, int is_adjoint=-1) const
 Projects the vector defined on the old mesh onto the new mesh. More...
 
void increment_constructor_count (const std::string &name)
 Increments the construction counter. More...
 
void increment_constructor_count (const std::string &name)
 Increments the construction counter. More...
 
void increment_destructor_count (const std::string &name)
 Increments the destruction counter. More...
 
void increment_destructor_count (const std::string &name)
 Increments the destruction counter. More...
 

Static Protected Member Functions

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 all processors. More...
 
static void generate_training_parameters_random (const Parallel::Communicator &communicator, std::map< std::string, bool > log_param_scale, std::map< std::string, std::unique_ptr< NumericVector< Number >>> &training_parameters_in, unsigned int n_training_samples_in, const RBParameters &min_parameters, const RBParameters &max_parameters, int training_parameters_random_seed=-1, bool serial_training_set=false)
 Static helper function for generating a randomized set of parameters. More...
 
static void generate_training_parameters_deterministic (const Parallel::Communicator &communicator, std::map< std::string, bool > log_param_scale, std::map< std::string, std::unique_ptr< NumericVector< Number >>> &training_parameters_in, unsigned int n_training_samples_in, const RBParameters &min_parameters, const RBParameters &max_parameters, bool serial_training_set=false)
 Static helper function for generating a deterministic set of parameters. More...
 

Protected Attributes

unsigned int Nmax
 Maximum number of reduced basis functions we are willing to use. More...
 
unsigned int delta_N
 The number of basis functions that we add at each greedy step. More...
 
bool output_dual_innerprods_computed
 A boolean flag to indicate whether or not the output dual norms have already been computed — used to make sure that we don't recompute them unnecessarily. More...
 
bool assert_convergence
 A boolean flag to indicate whether to check for proper convergence after each solve. More...
 
bool quiet_mode
 Flag to indicate whether we print out extra information during the Offline stage. More...
 
bool serial_training_set
 This boolean flag indicates whether or not the training set should be the same on all processors. More...
 
std::unique_ptr< NumericVector< Number > > inner_product_storage_vector
 We keep an extra temporary vector that is useful for performing inner products (avoids unnecessary memory allocation/deallocation). More...
 
unsigned int _n_linear_iterations
 The number of linear iterations required to solve the linear system Ax=b. More...
 
Real _final_linear_residual
 The final residual for the linear system Ax=b. More...
 
ShellMatrix< Number > * _shell_matrix
 User supplies shell matrix or nullptr if no shell matrix is used. More...
 
const SystemSubset_subset
 The current subset on which to solve (or nullptr if none). More...
 
SubsetSolveMode _subset_solve_mode
 If restrict-solve-to-subset mode is active, this member decides what happens with the dofs outside the subset. More...
 
const Parallel::Communicator_communicator
 

Static Protected Attributes

static Counts _counts
 Actually holds the data. More...
 
static Counts _counts
 Actually holds the data. More...
 
static Threads::atomic< unsigned int > _n_objects
 The number of objects. More...
 
static Threads::atomic< unsigned int > _n_objects
 The number of objects. More...
 
static Threads::spin_mutex _mutex
 Mutual exclusion object to enable thread-safe reference counting. More...
 
static Threads::spin_mutex _mutex
 Mutual exclusion object to enable thread-safe reference counting. More...
 
static bool _enable_print_counter
 Flag to control whether reference count information is printed when print_info is called. More...
 
static bool _enable_print_counter
 Flag to control whether reference count information is printed when print_info is called. More...
 

Private Attributes

RBEvaluationrb_eval
 The current RBEvaluation object we are using to perform the Evaluation stage of the reduced basis method. More...
 
RBAssemblyExpansionrb_assembly_expansion
 This member holds the (parameter independent) assembly functors that define the "affine expansion" of the PDE that we are solving. More...
 
ElemAssemblyinner_product_assembly
 Pointer to inner product assembly. More...
 
std::vector< std::unique_ptr< SparseMatrix< Number > > > Aq_vector
 Vector storing the Q_a matrices from the affine expansion. More...
 
std::vector< std::unique_ptr< NumericVector< Number > > > Fq_vector
 Vector storing the Q_f vectors in the affine decomposition of the right-hand side. More...
 
std::vector< std::vector< std::unique_ptr< NumericVector< Number > > > > outputs_vector
 The libMesh vectors that define the output functionals. More...
 
std::vector< std::unique_ptr< SparseMatrix< Number > > > non_dirichlet_Aq_vector
 We may also need a second set of matrices/vectors that do not have the Dirichlet boundary conditions enforced. More...
 
std::vector< std::unique_ptr< NumericVector< Number > > > non_dirichlet_Fq_vector
 
std::vector< std::vector< std::unique_ptr< NumericVector< Number > > > > non_dirichlet_outputs_vector
 
std::unique_ptr< SparseMatrix< Number > > non_dirichlet_inner_product_matrix
 
Real rel_training_tolerance
 Relative and absolute tolerances for training reduced basis using the Greedy scheme. More...
 
Real abs_training_tolerance
 
bool normalize_rb_bound_in_greedy
 This boolean indicates if we normalize the RB error in the greedy using RBEvaluation::get_error_bound_normalization(). More...
 

Detailed Description

This class is part of the rbOOmit framework.

RBConstruction implements the Construction stage of the certified reduced basis method for steady-state elliptic parametrized PDEs.

Author
David J. Knezevic
Date
2009

Definition at line 53 of file rb_construction.h.

Member Typedef Documentation

◆ const_matrices_iterator

typedef std::map<std::string, SparseMatrix<Number> *>::const_iterator libMesh::ImplicitSystem::const_matrices_iterator
inherited

Definition at line 290 of file implicit_system.h.

◆ const_vectors_iterator

typedef std::map<std::string, NumericVector<Number> *>::const_iterator libMesh::System::const_vectors_iterator
inherited

Definition at line 742 of file system.h.

◆ Counts [1/2]

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts
protectedinherited

Data structure to log the information.

The log is identified by the class name.

Definition at line 117 of file reference_counter.h.

◆ Counts [2/2]

typedef std::map<std::string, std::pair<unsigned int, unsigned int> > libMesh::ReferenceCounter::Counts
protectedinherited

Data structure to log the information.

The log is identified by the class name.

Definition at line 117 of file reference_counter.h.

◆ GradientFunctionPointer

typedef Gradient(* libMesh::System::GradientFunctionPointer) (const Point &p, const Parameters &parameters, const std::string &sys_name, const std::string &unknown_name)
inherited

Definition at line 517 of file system.h.

◆ matrices_iterator

typedef std::map<std::string, SparseMatrix<Number> *>::iterator libMesh::ImplicitSystem::matrices_iterator
inherited

Matrix iterator typedefs.

Definition at line 289 of file implicit_system.h.

◆ Parent

The type of the parent.

Definition at line 122 of file rb_construction.h.

◆ sys_type

The type of system.

Definition at line 73 of file rb_construction.h.

◆ ValueFunctionPointer

typedef Number(* libMesh::System::ValueFunctionPointer) (const Point &p, const Parameters &Parameters, const std::string &sys_name, const std::string &unknown_name)
inherited

Projects arbitrary functions onto the current solution.

The function value fptr and its gradient gptr are represented by function pointers. A gradient gptr is only required/used for projecting onto finite element spaces with continuous derivatives.

Definition at line 513 of file system.h.

◆ vectors_iterator

typedef std::map<std::string, NumericVector<Number> *>::iterator libMesh::System::vectors_iterator
inherited

Vector iterator typedefs.

Definition at line 741 of file system.h.

Constructor & Destructor Documentation

◆ RBConstruction()

libMesh::RBConstruction::RBConstruction ( EquationSystems es,
const std::string &  name,
const unsigned int  number 
)

Constructor.

Optionally initializes required data structures.

◆ ~RBConstruction()

virtual libMesh::RBConstruction::~RBConstruction ( )
virtual

Destructor.

Member Function Documentation

◆ activate()

void libMesh::System::activate ( )
inherited

Activates the system.

Only active systems are solved.

Definition at line 2066 of file system.h.

References libMesh::System::_active.

2067 {
2068  _active = true;
2069 }
bool _active
Flag stating if the system is active or not.
Definition: system.h:1920

◆ active()

bool libMesh::System::active ( ) const
inherited
Returns
true if the system is active, false otherwise. An active system will be solved.

Definition at line 2058 of file system.h.

References libMesh::System::_active.

2059 {
2060  return _active;
2061 }
bool _active
Flag stating if the system is active or not.
Definition: system.h:1920

◆ add_adjoint_rhs()

NumericVector<Number>& libMesh::System::add_adjoint_rhs ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's adjoint rhs vectors, by default the one corresponding to the first qoi. Creates the vector if it doesn't already exist.

◆ add_adjoint_solution()

NumericVector<Number>& libMesh::System::add_adjoint_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's adjoint solution vectors, by default the one corresponding to the first qoi. Creates the vector if it doesn't already exist.

◆ add_matrix()

SparseMatrix<Number>& libMesh::ImplicitSystem::add_matrix ( const std::string &  mat_name)
inherited

Adds the additional matrix mat_name to this system.

Only allowed prior to assemble(). All additional matrices have the same sparsity pattern as the matrix used during solution. When not System but the user wants to initialize the mayor matrix, then all the additional matrices, if existent, have to be initialized by the user, too.

◆ add_scaled_Aq()

void libMesh::RBConstruction::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.

If symmetrize==true, then we symmetrize Aq before adding it.

◆ add_scaled_matrix_and_vector()

void libMesh::RBConstruction::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 
)
protected

This function loops over the mesh and applies the specified interior and/or boundary assembly routines, then adds the scaled result to input_matrix and/or input_vector.

If symmetrize==true then we assemble the symmetric part of the matrix, 0.5*(A + A^T)

◆ add_sensitivity_rhs()

NumericVector<Number>& libMesh::System::add_sensitivity_rhs ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's sensitivity rhs vectors, by default the one corresponding to the first parameter. Creates the vector if it doesn't already exist.

◆ add_sensitivity_solution()

NumericVector<Number>& libMesh::System::add_sensitivity_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's solution sensitivity vectors, by default the one corresponding to the first parameter. Creates the vector if it doesn't already exist.

◆ add_variable() [1/2]

unsigned int libMesh::System::add_variable ( const std::string &  var,
const FEType type,
const std::set< subdomain_id_type > *const  active_subdomains = nullptr 
)
inherited

Adds the variable var to the list of variables for this system.

Returns
The index number for the new variable.

Referenced by SimpleRBConstruction::init_data(), and FETest< order, family, elem_type >::setUp().

◆ add_variable() [2/2]

unsigned int libMesh::System::add_variable ( const std::string &  var,
const Order  order = FIRST,
const FEFamily  = LAGRANGE,
const std::set< subdomain_id_type > *const  active_subdomains = nullptr 
)
inherited

Adds the variable var to the list of variables for this system.

Same as before, but assumes LAGRANGE as default value for FEType.family.

◆ add_variables() [1/2]

unsigned int libMesh::System::add_variables ( const std::vector< std::string > &  vars,
const FEType type,
const std::set< subdomain_id_type > *const  active_subdomains = nullptr 
)
inherited

Adds the variable var to the list of variables for this system.

Returns
The index number for the new variable.

◆ add_variables() [2/2]

unsigned int libMesh::System::add_variables ( const std::vector< std::string > &  vars,
const Order  order = FIRST,
const FEFamily  = LAGRANGE,
const std::set< subdomain_id_type > *const  active_subdomains = nullptr 
)
inherited

Adds the variable var to the list of variables for this system.

Same as before, but assumes LAGRANGE as default value for FEType.family.

◆ add_vector()

NumericVector<Number>& libMesh::System::add_vector ( const std::string &  vec_name,
const bool  projections = true,
const ParallelType  type = PARALLEL 
)
inherited

Adds the additional vector vec_name to this system.

All the additional vectors are similarly distributed, like the solution, and initialized to zero.

By default vectors added by add_vector are projected to changed grids by reinit(). To zero them instead (more efficient), pass "false" as the second argument

◆ add_weighted_sensitivity_adjoint_solution()

NumericVector<Number>& libMesh::System::add_weighted_sensitivity_adjoint_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's weighted sensitivity adjoint solution vectors, by default the one corresponding to the first qoi. Creates the vector if it doesn't already exist.

◆ add_weighted_sensitivity_solution()

NumericVector<Number>& libMesh::System::add_weighted_sensitivity_solution ( )
inherited
Returns
A reference to the solution of the last weighted sensitivity solve Creates the vector if it doesn't already exist.

◆ adjoint_qoi_parameter_sensitivity()

virtual void libMesh::ImplicitSystem::adjoint_qoi_parameter_sensitivity ( const QoISet qoi_indices,
const ParameterVector parameters,
SensitivityData sensitivities 
)
overridevirtualinherited

Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j].

Uses adjoint_solve() and the adjoint sensitivity method.

Currently uses finite differenced derivatives (partial q / partial p) and (partial R / partial p).

Reimplemented from libMesh::System.

◆ adjoint_solve()

virtual std::pair<unsigned int, Real> libMesh::ImplicitSystem::adjoint_solve ( const QoISet qoi_indices = QoISet())
overridevirtualinherited

Assembles & solves the linear system (dR/du)^T*z = dq/du, for those quantities of interest q specified by qoi_indices.

Leave qoi_indices empty to solve all adjoint problems.

Returns
A pair with the total number of linear iterations performed and the (sum of the) final residual norms

Reimplemented from libMesh::System.

Reimplemented in libMesh::DifferentiableSystem.

◆ allocate_data_structures()

virtual void libMesh::RBConstruction::allocate_data_structures ( )
protectedvirtual

Helper function that actually allocates all the data structures required by this class.

Reimplemented in libMesh::TransientRBConstruction.

◆ assemble()

virtual void libMesh::LinearImplicitSystem::assemble ( )
overridevirtualinherited

Prepares matrix and _dof_map for matrix assembly.

Does not actually assemble anything. For matrix assembly, use the assemble() in derived classes. Should be overridden in derived classes.

Reimplemented from libMesh::ImplicitSystem.

Reimplemented in libMesh::FrequencySystem, and libMesh::NewmarkSystem.

Definition at line 104 of file linear_implicit_system.h.

References libMesh::ImplicitSystem::assemble().

virtual void assemble() override
Prepares matrix and rhs for system assembly, then calls user assembly function.

◆ assemble_affine_expansion()

virtual void libMesh::RBConstruction::assemble_affine_expansion ( bool  skip_matrix_assembly,
bool  skip_vector_assembly 
)
virtual

Assemble the matrices and vectors for this system.

Optionally skip matrix or vector assembly (e.g. we may want to read data in from disk instead).

Reimplemented in libMesh::TransientRBConstruction.

◆ assemble_all_affine_operators()

virtual void libMesh::RBConstruction::assemble_all_affine_operators ( )
protectedvirtual

Assemble and store all Q_a affine operators as well as the inner-product matrix.

Reimplemented in libMesh::TransientRBConstruction.

◆ assemble_all_affine_vectors()

virtual void libMesh::RBConstruction::assemble_all_affine_vectors ( )
protectedvirtual

Assemble and store the affine RHS vectors.

◆ assemble_all_output_vectors()

virtual void libMesh::RBConstruction::assemble_all_output_vectors ( )
protectedvirtual

Assemble and store the output vectors.

◆ assemble_Aq_matrix()

void libMesh::RBConstruction::assemble_Aq_matrix ( unsigned int  q,
SparseMatrix< Number > *  input_matrix,
bool  apply_dof_constraints = true 
)

Assemble the q^th affine matrix and store it in input_matrix.

◆ assemble_Fq_vector()

void libMesh::RBConstruction::assemble_Fq_vector ( unsigned int  q,
NumericVector< Number > *  input_vector,
bool  apply_dof_constraints = true 
)

Assemble the q^th affine vector and store it in input_matrix.

◆ assemble_inner_product_matrix()

void libMesh::RBConstruction::assemble_inner_product_matrix ( SparseMatrix< Number > *  input_matrix,
bool  apply_dof_constraints = true 
)

Assemble the inner product matrix and store it in input_matrix.

◆ assemble_misc_matrices()

virtual void libMesh::RBConstruction::assemble_misc_matrices ( )
protectedvirtual

Assemble and store all the inner-product matrix, the constraint matrix (for constrained problems) and the mass matrix (for time-dependent problems).

Reimplemented in libMesh::TransientRBConstruction.

◆ assemble_qoi()

virtual void libMesh::ExplicitSystem::assemble_qoi ( const QoISet qoi_indices = QoISet())
overridevirtualinherited

Prepares qoi for quantity of interest assembly, then calls user qoi function.

Can be overridden in derived classes.

Reimplemented from libMesh::System.

Reimplemented in libMesh::FEMSystem.

◆ assemble_qoi_derivative()

virtual void libMesh::ExplicitSystem::assemble_qoi_derivative ( const QoISet qoi_indices = QoISet(),
bool  include_liftfunc = true,
bool  apply_constraints = true 
)
overridevirtualinherited

Prepares adjoint_rhs for quantity of interest derivative assembly, then calls user qoi derivative function.

Can be overridden in derived classes.

Reimplemented from libMesh::System.

Reimplemented in libMesh::FEMSystem.

◆ assemble_residual_derivatives()

virtual void libMesh::ImplicitSystem::assemble_residual_derivatives ( const ParameterVector parameters)
overridevirtualinherited

Residual parameter derivative function.

Uses finite differences by default.

This will assemble the sensitivity rhs vectors to hold -(partial R / partial p_i), making them ready to solve the forward sensitivity equation.

Can be overridden in derived classes.

Reimplemented from libMesh::System.

◆ assembly()

virtual void libMesh::LinearImplicitSystem::assembly ( bool  get_residual,
bool  get_jacobian,
bool  apply_heterogeneous_constraints = false,
bool  apply_no_constraints = false 
)
overridevirtualinherited

Assembles a residual in rhs and/or a jacobian in matrix, as requested.

Reimplemented from libMesh::ImplicitSystem.

◆ attach_assemble_function()

void libMesh::System::attach_assemble_function ( void   fptrEquationSystems &es, const std::string &name)
inherited

Register a user function to use in assembling the system matrix and RHS.

◆ attach_assemble_object()

void libMesh::System::attach_assemble_object ( Assembly assemble)
inherited

Register a user object to use in assembling the system matrix and RHS.

◆ attach_constraint_function()

void libMesh::System::attach_constraint_function ( void   fptrEquationSystems &es, const std::string &name)
inherited

Register a user function for imposing constraints.

◆ attach_constraint_object()

void libMesh::System::attach_constraint_object ( Constraint constrain)
inherited

Register a user object for imposing constraints.

◆ attach_init_function()

void libMesh::System::attach_init_function ( void   fptrEquationSystems &es, const std::string &name)
inherited

Register a user function to use in initializing the system.

◆ attach_init_object()

void libMesh::System::attach_init_object ( Initialization init)
inherited

Register a user class to use to initialize the system.

Note
This is exclusive with the attach_init_function.

◆ attach_QOI_derivative()

void libMesh::System::attach_QOI_derivative ( void   fptrEquationSystems &es, const std::string &name, const QoISet &qoi_indices, bool include_liftfunc, bool apply_constraints)
inherited

Register a user function for evaluating derivatives of a quantity of interest with respect to test functions, whose values should be placed in System::rhs.

◆ attach_QOI_derivative_object()

void libMesh::System::attach_QOI_derivative_object ( QOIDerivative qoi_derivative)
inherited

Register a user object for evaluating derivatives of a quantity of interest with respect to test functions, whose values should be placed in System::rhs.

◆ attach_QOI_function()

void libMesh::System::attach_QOI_function ( void   fptrEquationSystems &es, const std::string &name, const QoISet &qoi_indices)
inherited

Register a user function for evaluating the quantities of interest, whose values should be placed in System::qoi.

◆ attach_QOI_object()

void libMesh::System::attach_QOI_object ( QOI qoi)
inherited

Register a user object for evaluating the quantities of interest, whose values should be placed in System::qoi.

◆ attach_shell_matrix()

void libMesh::LinearImplicitSystem::attach_shell_matrix ( ShellMatrix< Number > *  shell_matrix)
inherited

This function enables the user to provide a shell matrix, i.e.

a matrix that is not stored element-wise, but as a function. When you register your shell matrix using this function, calling solve() will no longer use the matrix member but the registered shell matrix instead. You can reset this behaviour to its original state by supplying a nullptr to this function.

Referenced by libMesh::LinearImplicitSystem::detach_shell_matrix().

◆ boundary_project_solution() [1/2]

void libMesh::System::boundary_project_solution ( const std::set< boundary_id_type > &  b,
const std::vector< unsigned int > &  variables,
FunctionBase< Number > *  f,
FunctionBase< Gradient > *  g = nullptr 
)
inherited

Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system.

Only degrees of freedom which affect the function's trace on a boundary in the set b are affected. Only degrees of freedom associated with the variables listed in the vector variables are projected. The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

◆ boundary_project_solution() [2/2]

void libMesh::System::boundary_project_solution ( const std::set< boundary_id_type > &  b,
const std::vector< unsigned int > &  variables,
ValueFunctionPointer  fptr,
GradientFunctionPointer  gptr,
const Parameters parameters 
)
inherited

Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system.

Only degrees of freedom which affect the function's trace on a boundary in the set b are affected. Only degrees of freedom associated with the variables listed in the vector variables are projected. The function value fptr and its gradient gptr are represented by function pointers. A gradient gptr is only required/used for projecting onto finite element spaces with continuous derivatives.

◆ boundary_project_vector() [1/2]

void libMesh::System::boundary_project_vector ( const std::set< boundary_id_type > &  b,
const std::vector< unsigned int > &  variables,
NumericVector< Number > &  new_vector,
FunctionBase< Number > *  f,
FunctionBase< Gradient > *  g = nullptr,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system.

Only degrees of freedom which affect the function's trace on a boundary in the set b are affected. Only degrees of freedom associated with the variables listed in the vector variables are projected. The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ boundary_project_vector() [2/2]

void libMesh::System::boundary_project_vector ( const std::set< boundary_id_type > &  b,
const std::vector< unsigned int > &  variables,
ValueFunctionPointer  fptr,
GradientFunctionPointer  gptr,
const Parameters parameters,
NumericVector< Number > &  new_vector,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary boundary functions onto a vector of degree of freedom values for the current system.

Only degrees of freedom which affect the function's trace on a boundary in the set b are affected. Only degrees of freedom associated with the variables listed in the vector variables are projected. The function value fptr and its gradient gptr are represented by function pointers. A gradient gptr is only required/used for projecting onto finite element spaces with continuous derivatives.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ broadcast_parameters()

void libMesh::RBConstructionBase< LinearImplicitSystem >::broadcast_parameters ( unsigned int  proc_id)
inherited

Broadcasts parameters on processor proc_id to all processors.

◆ build_context()

virtual std::unique_ptr<DGFEMContext> libMesh::RBConstruction::build_context ( )
protectedvirtual

Builds a DGFEMContext object with enough information to do evaluations on each element.

We use DGFEMContext since it allows for both DG and continuous Galerkin formulations.

◆ build_zero_dirichlet_boundary_object()

static std::unique_ptr<DirichletBoundary> libMesh::RBConstruction::build_zero_dirichlet_boundary_object ( )
static

It's helpful to be able to generate a DirichletBoundary that stores a ZeroFunction in order to impose Dirichlet boundary conditions.

Referenced by SimpleRBConstruction::init_data().

◆ calculate_norm() [1/2]

Real libMesh::System::calculate_norm ( const NumericVector< Number > &  v,
unsigned int  var,
FEMNormType  norm_type,
std::set< unsigned int > *  skip_dimensions = nullptr 
) const
inherited
Returns
A norm of variable var in the vector v, in the specified norm (e.g. L2, L_INF, H1)

◆ calculate_norm() [2/2]

Real libMesh::System::calculate_norm ( const NumericVector< Number > &  v,
const SystemNorm norm,
std::set< unsigned int > *  skip_dimensions = nullptr 
) const
inherited
Returns
A norm of the vector v, using component_norm and component_scale to choose and weight the norms of each variable.

◆ check_convergence()

void libMesh::RBConstruction::check_convergence ( LinearSolver< Number > &  input_solver)
protected

Check if the linear solver reports convergence.

Throw an error when that is not the case.

◆ clear()

virtual void libMesh::RBConstruction::clear ( )
overridevirtual

Clear all the data structures associated with the system.

Reimplemented from libMesh::RBConstructionBase< LinearImplicitSystem >.

Reimplemented in libMesh::TransientSystem< RBConstruction >, libMesh::RBEIMConstruction, and libMesh::TransientRBConstruction.

◆ comm()

const Parallel::Communicator& libMesh::ParallelObject::comm ( ) const
inherited

◆ compare()

virtual bool libMesh::System::compare ( const System other_system,
const Real  threshold,
const bool  verbose 
) const
virtualinherited
Returns
true when the other system contains identical data, up to the given threshold. Outputs some diagnostic info when verbose is set.

◆ compute_Fq_representor_innerprods()

virtual void libMesh::RBConstruction::compute_Fq_representor_innerprods ( bool  compute_inner_products = true)
protectedvirtual

Compute the terms that are combined ‘online’ to determine the dual norm of the residual.

Here we compute the terms associated with the right-hand side. These terms are basis independent, hence we separate them from the rest of the calculations that are done in update_residual_terms. By default, inner product terms are also computed, but you can turn this feature off e.g. if you are already reading in that data from files.

◆ compute_max_error_bound()

virtual Real libMesh::RBConstruction::compute_max_error_bound ( )
virtual

(i) Compute the a posteriori error bound for each set of parameters in the training set, (ii) set current_parameters to the parameters that maximize the error bound, and (iii) return the maximum error bound.

◆ compute_output_dual_innerprods()

virtual void libMesh::RBConstruction::compute_output_dual_innerprods ( )
protectedvirtual

Compute and store the dual norm of each output functional.

◆ current_solution()

Number libMesh::System::current_solution ( const dof_id_type  global_dof_number) const
inherited
Returns
The current solution for the specified global DOF.

◆ deactivate()

void libMesh::System::deactivate ( )
inherited

Deactivates the system.

Only active systems are solved.

Definition at line 2074 of file system.h.

References libMesh::System::_active.

2075 {
2076  _active = false;
2077 }
bool _active
Flag stating if the system is active or not.
Definition: system.h:1920

◆ detach_shell_matrix()

void libMesh::LinearImplicitSystem::detach_shell_matrix ( )
inherited

Detaches a shell matrix.

Same as attach_shell_matrix(nullptr).

Definition at line 179 of file linear_implicit_system.h.

References libMesh::LinearImplicitSystem::attach_shell_matrix().

179 { attach_shell_matrix(nullptr); }
void attach_shell_matrix(ShellMatrix< Number > *shell_matrix)
This function enables the user to provide a shell matrix, i.e.

◆ disable_cache()

virtual void libMesh::ImplicitSystem::disable_cache ( )
overridevirtualinherited

Avoids use of any cached data that might affect any solve result.

Should be overridden in derived systems.

Reimplemented from libMesh::System.

◆ disable_print_counter_info() [1/2]

static void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

◆ disable_print_counter_info() [2/2]

static void libMesh::ReferenceCounter::disable_print_counter_info ( )
staticinherited

◆ enable_print_counter_info() [1/2]

static void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

Methods to enable/disable the reference counter output from print_info()

◆ enable_print_counter_info() [2/2]

static void libMesh::ReferenceCounter::enable_print_counter_info ( )
staticinherited

Methods to enable/disable the reference counter output from print_info()

◆ enrich_basis_from_rhs_terms()

void libMesh::RBConstruction::enrich_basis_from_rhs_terms ( const bool  resize_rb_eval_data = true)

This function computes one basis function for each rhs term.

This is useful in some cases since we can avoid doing a full greedy if we know that we do not have any "left-hand side" parameters, for example.

◆ enrich_RB_space()

virtual void libMesh::RBConstruction::enrich_RB_space ( )
protectedvirtual

Add a new basis function to the RB space.

This is called during train_reduced_basis.

Reimplemented in libMesh::TransientRBConstruction, and libMesh::RBEIMConstruction.

◆ final_linear_residual()

Real libMesh::LinearImplicitSystem::final_linear_residual ( ) const
inherited
Returns
The final residual for the linear system solve.

Definition at line 163 of file linear_implicit_system.h.

References libMesh::LinearImplicitSystem::_final_linear_residual.

163 { return _final_linear_residual; }
Real _final_linear_residual
The final residual for the linear system Ax=b.

◆ forward_qoi_parameter_sensitivity()

virtual void libMesh::ImplicitSystem::forward_qoi_parameter_sensitivity ( const QoISet qoi_indices,
const ParameterVector parameters,
SensitivityData sensitivities 
)
overridevirtualinherited

Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j].

Uses the forward sensitivity method.

Currently uses finite differenced derivatives (partial q / partial p) and (partial R / partial p).

Reimplemented from libMesh::System.

◆ generate_training_parameters_deterministic()

static void libMesh::RBConstructionBase< LinearImplicitSystem >::generate_training_parameters_deterministic ( const Parallel::Communicator communicator,
std::map< std::string, bool >  log_param_scale,
std::map< std::string, std::unique_ptr< NumericVector< Number >>> &  training_parameters_in,
unsigned int  n_training_samples_in,
const RBParameters min_parameters,
const RBParameters max_parameters,
bool  serial_training_set = false 
)
staticprotectedinherited

Static helper function for generating a deterministic set of parameters.

Only works with 1 or 2 parameters (as defined by the lengths of min/max parameters vectors), otherwise throws an error.

◆ generate_training_parameters_random()

static void libMesh::RBConstructionBase< LinearImplicitSystem >::generate_training_parameters_random ( const Parallel::Communicator communicator,
std::map< std::string, bool >  log_param_scale,
std::map< std::string, std::unique_ptr< NumericVector< Number >>> &  training_parameters_in,
unsigned int  n_training_samples_in,
const RBParameters min_parameters,
const RBParameters max_parameters,
int  training_parameters_random_seed = -1,
bool  serial_training_set = false 
)
staticprotectedinherited

Static helper function for generating a randomized set of parameters.

◆ get_abs_training_tolerance()

Real libMesh::RBConstruction::get_abs_training_tolerance ( )

Definition at line 193 of file rb_construction.h.

References abs_training_tolerance.

◆ get_adjoint_rhs() [1/2]

NumericVector<Number>& libMesh::System::get_adjoint_rhs ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's adjoint rhs vectors, by default the one corresponding to the first qoi. This what the user's QoI derivative code should assemble when setting up an adjoint problem

◆ get_adjoint_rhs() [2/2]

const NumericVector<Number>& libMesh::System::get_adjoint_rhs ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's adjoint rhs vectors, by default the one corresponding to the first qoi.

◆ get_adjoint_solution() [1/2]

NumericVector<Number>& libMesh::System::get_adjoint_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's adjoint solution vectors, by default the one corresponding to the first qoi.

◆ get_adjoint_solution() [2/2]

const NumericVector<Number>& libMesh::System::get_adjoint_solution ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's adjoint solution vectors, by default the one corresponding to the first qoi.

◆ get_all_matrices()

virtual void libMesh::RBConstruction::get_all_matrices ( std::map< std::string, SparseMatrix< Number > *> &  all_matrices)
virtual

Get a map that stores pointers to all of the matrices.

Reimplemented in libMesh::TransientRBConstruction.

◆ get_all_variable_numbers()

void libMesh::System::get_all_variable_numbers ( std::vector< unsigned int > &  all_variable_numbers) const
inherited

Fills all_variable_numbers with all the variable numbers for the variables that have been added to this system.

◆ get_all_vectors()

virtual void libMesh::RBConstruction::get_all_vectors ( std::map< std::string, NumericVector< Number > *> &  all_vectors)
virtual

Get a map that stores pointers to all of the vectors.

◆ get_Aq()

SparseMatrix<Number>* libMesh::RBConstruction::get_Aq ( unsigned int  q)

Get a pointer to Aq.

◆ get_closest_value()

static Real libMesh::RBParametrized::get_closest_value ( Real  value,
const std::vector< Real > &  list_of_values 
)
staticinherited
Returns
The closest entry to value from list_of_values.

◆ get_convergence_assertion_flag()

bool libMesh::RBConstruction::get_convergence_assertion_flag ( ) const
protected

Getter for the flag determining if convergence should be checked after each solve.

◆ get_delta_N()

unsigned int libMesh::RBConstruction::get_delta_N ( ) const

Get delta_N, the number of basis functions we add to the RB space per iteration of the greedy algorithm.

For steady-state systems, this should be 1, but can be more than 1 for time-dependent systems.

Definition at line 411 of file rb_construction.h.

References delta_N.

411 { return delta_N; }
unsigned int delta_N
The number of basis functions that we add at each greedy step.

◆ get_deterministic_training_parameter_name()

const std::string& libMesh::RBConstructionBase< LinearImplicitSystem >::get_deterministic_training_parameter_name ( ) const
inherited

Get the name of the parameter that we will generate deterministic training parameters for.

◆ get_deterministic_training_parameter_repeats()

unsigned int libMesh::RBConstructionBase< LinearImplicitSystem >::get_deterministic_training_parameter_repeats ( ) const
inherited

Get the number of times each sample of the deterministic training parameter is repeated.

◆ get_discrete_parameter_values()

const std::map<std::string, std::vector<Real> >& libMesh::RBParametrized::get_discrete_parameter_values ( ) const
inherited

Get a const reference to the discrete parameter values.

◆ get_dof_map() [1/2]

const DofMap & libMesh::System::get_dof_map ( ) const
inherited
Returns
A constant reference to this system's _dof_map.

Definition at line 2042 of file system.h.

References libMesh::System::_dof_map.

Referenced by SimpleRBConstruction::init_data(), and FETest< order, family, elem_type >::setUp().

2043 {
2044  return *_dof_map;
2045 }
std::unique_ptr< DofMap > _dof_map
Data structure describing the relationship between nodes, variables, etc...
Definition: system.h:1877

◆ get_dof_map() [2/2]

DofMap & libMesh::System::get_dof_map ( )
inherited
Returns
A writable reference to this system's _dof_map.

Definition at line 2050 of file system.h.

References libMesh::System::_dof_map.

2051 {
2052  return *_dof_map;
2053 }
std::unique_ptr< DofMap > _dof_map
Data structure describing the relationship between nodes, variables, etc...
Definition: system.h:1877

◆ get_equation_systems() [1/2]

const EquationSystems& libMesh::System::get_equation_systems ( ) const
inherited
Returns
A constant reference to this system's parent EquationSystems object.

Definition at line 705 of file system.h.

References libMesh::System::_equation_systems.

Referenced by libMesh::WrappedFunction< Output >::WrappedFunction().

705 { return _equation_systems; }
EquationSystems & _equation_systems
Constant reference to the EquationSystems object used for the simulation.
Definition: system.h:1883

◆ get_equation_systems() [2/2]

EquationSystems& libMesh::System::get_equation_systems ( )
inherited
Returns
A reference to this system's parent EquationSystems object.

Definition at line 710 of file system.h.

References libMesh::System::_equation_systems.

710 { return _equation_systems; }
EquationSystems & _equation_systems
Constant reference to the EquationSystems object used for the simulation.
Definition: system.h:1883

◆ get_first_local_training_index()

numeric_index_type libMesh::RBConstructionBase< LinearImplicitSystem >::get_first_local_training_index ( ) const
inherited

Get the first local index of the training parameters.

◆ get_Fq()

NumericVector<Number>* libMesh::RBConstruction::get_Fq ( unsigned int  q)

Get a pointer to Fq.

◆ get_global_max_error_pair()

static void libMesh::RBConstructionBase< LinearImplicitSystem >::get_global_max_error_pair ( const Parallel::Communicator communicator,
std::pair< numeric_index_type, Real > &  error_pair 
)
staticprotectedinherited

Static function to return the error pair (index,error) that is corresponds to the largest error on all processors.

◆ get_greedy_parameter()

const RBParameters& libMesh::RBConstruction::get_greedy_parameter ( unsigned int  i)

Return the parameters chosen during the i^th step of the Greedy algorithm.

◆ get_info() [1/3]

static std::string libMesh::ReferenceCounter::get_info ( )
staticinherited

Gets a string containing the reference information.

◆ get_info() [2/3]

static std::string libMesh::ReferenceCounter::get_info ( )
staticinherited

Gets a string containing the reference information.

◆ get_info() [3/3]

std::string libMesh::System::get_info ( ) const
inherited
Returns
A string containing information about the system.

◆ get_inner_product_assembly()

ElemAssembly& libMesh::RBConstruction::get_inner_product_assembly ( )
Returns
A reference to the inner product assembly object

◆ get_inner_product_matrix()

SparseMatrix<Number>* libMesh::RBConstruction::get_inner_product_matrix ( )

Get a pointer to inner_product_matrix.

Accessing via this function, rather than directly through the class member allows us to do error checking (e.g. inner_product_matrix is not defined in low-memory mode).

◆ get_last_local_training_index()

numeric_index_type libMesh::RBConstructionBase< LinearImplicitSystem >::get_last_local_training_index ( ) const
inherited

Get the last local index of the training parameters.

◆ get_linear_solve_parameters()

virtual std::pair<unsigned int, Real> libMesh::ImplicitSystem::get_linear_solve_parameters ( ) const
virtualinherited
Returns
An integer corresponding to the upper iteration count limit and a Real corresponding to the convergence tolerance to be used in linear adjoint and/or sensitivity solves

Reimplemented in libMesh::NonlinearImplicitSystem, and libMesh::DifferentiableSystem.

◆ get_linear_solver()

virtual LinearSolver<Number>* libMesh::LinearImplicitSystem::get_linear_solver ( ) const
overridevirtualinherited
Returns
A pointer to a linear solver appropriate for use in adjoint and/or sensitivity solves

Reimplemented from libMesh::ImplicitSystem.

◆ get_local_n_training_samples()

numeric_index_type libMesh::RBConstructionBase< LinearImplicitSystem >::get_local_n_training_samples ( ) const
inherited

Get the total number of training samples local to this processor.

◆ get_matrix() [1/2]

const SparseMatrix<Number>& libMesh::ImplicitSystem::get_matrix ( const std::string &  mat_name) const
inherited
Returns
A const reference to this system's additional matrix named mat_name.

None of these matrices is involved in the solution process. Access is only granted when the matrix is already properly initialized.

◆ get_matrix() [2/2]

SparseMatrix<Number>& libMesh::ImplicitSystem::get_matrix ( const std::string &  mat_name)
inherited
Returns
A writable reference to this system's additional matrix named mat_name.

None of these matrices is involved in the solution process. Access is only granted when the matrix is already properly initialized.

◆ get_matrix_for_output_dual_solves()

virtual SparseMatrix<Number>& libMesh::RBConstruction::get_matrix_for_output_dual_solves ( )
protectedvirtual

Return the matrix for the output residual dual norm solves.

By default we use the inner product matrix for steady state problems.

Reimplemented in libMesh::TransientRBConstruction.

◆ get_mesh() [1/2]

const MeshBase & libMesh::System::get_mesh ( ) const
inherited
Returns
A constant reference to this systems's _mesh.

Definition at line 2026 of file system.h.

References libMesh::System::_mesh.

Referenced by AssemblyA0::boundary_assembly(), AssemblyA1::boundary_assembly(), and AssemblyA2::boundary_assembly().

2027 {
2028  return _mesh;
2029 }
MeshBase & _mesh
Constant reference to the mesh data structure used for the simulation.
Definition: system.h:1889

◆ get_mesh() [2/2]

MeshBase & libMesh::System::get_mesh ( )
inherited
Returns
A reference to this systems's _mesh.

Definition at line 2034 of file system.h.

References libMesh::System::_mesh.

2035 {
2036  return _mesh;
2037 }
MeshBase & _mesh
Constant reference to the mesh data structure used for the simulation.
Definition: system.h:1889

◆ get_n_continuous_params()

unsigned int libMesh::RBParametrized::get_n_continuous_params ( ) const
inherited

Get the number of continuous parameters.

◆ get_n_discrete_params()

unsigned int libMesh::RBParametrized::get_n_discrete_params ( ) const
inherited

Get the number of discrete parameters.

◆ get_n_params()

unsigned int libMesh::RBParametrized::get_n_params ( ) const
inherited

Get the number of parameters.

◆ get_n_training_samples()

numeric_index_type libMesh::RBConstructionBase< LinearImplicitSystem >::get_n_training_samples ( ) const
inherited

Get the total number of training samples.

◆ get_Nmax()

unsigned int libMesh::RBConstruction::get_Nmax ( ) const

Get/set Nmax, the maximum number of RB functions we are willing to compute.

Definition at line 206 of file rb_construction.h.

References Nmax.

206 { return Nmax; }
unsigned int Nmax
Maximum number of reduced basis functions we are willing to use.

◆ get_non_dirichlet_Aq()

SparseMatrix<Number>* libMesh::RBConstruction::get_non_dirichlet_Aq ( unsigned int  q)

Get a pointer to non_dirichlet_Aq.

◆ get_non_dirichlet_Aq_if_avail()

SparseMatrix<Number>* libMesh::RBConstruction::get_non_dirichlet_Aq_if_avail ( unsigned int  q)

Get a pointer to non_dirichlet_Aq if it's available, otherwise get Aq.

◆ get_non_dirichlet_Fq()

NumericVector<Number>* libMesh::RBConstruction::get_non_dirichlet_Fq ( unsigned int  q)

Get a pointer to non-Dirichlet Fq.

◆ get_non_dirichlet_Fq_if_avail()

NumericVector<Number>* libMesh::RBConstruction::get_non_dirichlet_Fq_if_avail ( unsigned int  q)

Get a pointer to non_dirichlet_Fq if it's available, otherwise get Fq.

◆ get_non_dirichlet_inner_product_matrix()

SparseMatrix<Number>* libMesh::RBConstruction::get_non_dirichlet_inner_product_matrix ( )

Get the non-Dirichlet (or more generally no-constraints) version of the inner-product matrix.

This is useful for performing multiplications on vectors that already have constraints enforced.

◆ get_non_dirichlet_inner_product_matrix_if_avail()

SparseMatrix<Number>* libMesh::RBConstruction::get_non_dirichlet_inner_product_matrix_if_avail ( )

Get the non-Dirichlet inner-product matrix if it's available, otherwise get the inner-product matrix with constraints.

◆ get_non_dirichlet_output_vector()

NumericVector<Number>* libMesh::RBConstruction::get_non_dirichlet_output_vector ( unsigned int  n,
unsigned int  q_l 
)

Get a pointer to non-Dirichlet output vector.

◆ get_normalize_rb_bound_in_greedy()

bool libMesh::RBConstruction::get_normalize_rb_bound_in_greedy ( )

Definition at line 200 of file rb_construction.h.

References normalize_rb_bound_in_greedy.

bool normalize_rb_bound_in_greedy
This boolean indicates if we normalize the RB error in the greedy using RBEvaluation::get_error_bound...

◆ get_output_vector()

NumericVector<Number>* libMesh::RBConstruction::get_output_vector ( unsigned int  n,
unsigned int  q_l 
)

Get a pointer to the n^th output.

◆ get_output_vectors()

virtual void libMesh::RBConstruction::get_output_vectors ( std::map< std::string, NumericVector< Number > *> &  all_vectors)
virtual

Get a map that stores pointers to all of the vectors.

◆ get_parameter_max()

Real libMesh::RBParametrized::get_parameter_max ( const std::string &  param_name) const
inherited

Get maximum allowable value of parameter param_name.

◆ get_parameter_min()

Real libMesh::RBParametrized::get_parameter_min ( const std::string &  param_name) const
inherited

Get minimum allowable value of parameter param_name.

◆ get_parameter_names()

std::set<std::string> libMesh::RBParametrized::get_parameter_names ( ) const
inherited

Get a set that stores the parameter names.

◆ get_parameters()

const RBParameters& libMesh::RBParametrized::get_parameters ( ) const
inherited

Get the current parameters.

Referenced by SimpleRBEvaluation::get_stability_lower_bound().

◆ get_parameters_max()

const RBParameters& libMesh::RBParametrized::get_parameters_max ( ) const
inherited

Get an RBParameters object that specifies the maximum allowable value for each parameter.

◆ get_parameters_min()

const RBParameters& libMesh::RBParametrized::get_parameters_min ( ) const
inherited

Get an RBParameters object that specifies the minimum allowable value for each parameter.

◆ get_params_from_training_set()

RBParameters libMesh::RBConstructionBase< LinearImplicitSystem >::get_params_from_training_set ( unsigned int  index)
protectedinherited

Return the RBParameters in index index of training set.

◆ get_rb_assembly_expansion()

RBAssemblyExpansion& libMesh::RBConstruction::get_rb_assembly_expansion ( )
Returns
A reference to the rb_assembly_expansion object

◆ get_RB_error_bound()

virtual Real libMesh::RBConstruction::get_RB_error_bound ( )
protectedvirtual
Returns
The RB error bound for the current parameters.

Used in the Greedy algorithm to select the next parameter.

Reimplemented in libMesh::RBEIMConstruction.

◆ get_rb_evaluation()

RBEvaluation& libMesh::RBConstruction::get_rb_evaluation ( )

Get a reference to the RBEvaluation object.

◆ get_rb_theta_expansion()

RBThetaExpansion& libMesh::RBConstruction::get_rb_theta_expansion ( )

Get a reference to the RBThetaExpansion object that that belongs to rb_eval.

◆ get_rel_training_tolerance()

Real libMesh::RBConstruction::get_rel_training_tolerance ( )

Definition at line 186 of file rb_construction.h.

References rel_training_tolerance.

186 { return rel_training_tolerance; }
Real rel_training_tolerance
Relative and absolute tolerances for training reduced basis using the Greedy scheme.

◆ get_sensitivity_rhs() [1/2]

NumericVector<Number>& libMesh::System::get_sensitivity_rhs ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's sensitivity rhs vectors, by default the one corresponding to the first parameter. By default these vectors are built by the library, using finite differences, when assemble_residual_derivatives() is called.

When assembled, this vector should hold -(partial R / partial p_i)

◆ get_sensitivity_rhs() [2/2]

const NumericVector<Number>& libMesh::System::get_sensitivity_rhs ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's sensitivity rhs vectors, by default the one corresponding to the first parameter.

◆ get_sensitivity_solution() [1/2]

NumericVector<Number>& libMesh::System::get_sensitivity_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's solution sensitivity vectors, by default the one corresponding to the first parameter.

◆ get_sensitivity_solution() [2/2]

const NumericVector<Number>& libMesh::System::get_sensitivity_solution ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's solution sensitivity vectors, by default the one corresponding to the first parameter.

◆ get_shell_matrix()

ShellMatrix<Number>* libMesh::LinearImplicitSystem::get_shell_matrix ( )
inherited
Returns
A pointer to the currently attached shell matrix, if any, otherwise nullptr.

Definition at line 185 of file linear_implicit_system.h.

References libMesh::LinearImplicitSystem::_shell_matrix.

185 { return _shell_matrix; }
ShellMatrix< Number > * _shell_matrix
User supplies shell matrix or nullptr if no shell matrix is used.

◆ get_vector() [1/4]

const NumericVector<Number>& libMesh::System::get_vector ( const std::string &  vec_name) const
inherited
Returns
A const reference to this system's additional vector named vec_name. Access is only granted when the vector is already properly initialized.

◆ get_vector() [2/4]

NumericVector<Number>& libMesh::System::get_vector ( const std::string &  vec_name)
inherited
Returns
A writable reference to this system's additional vector named vec_name. Access is only granted when the vector is already properly initialized.

◆ get_vector() [3/4]

const NumericVector<Number>& libMesh::System::get_vector ( const unsigned int  vec_num) const
inherited
Returns
A const reference to this system's additional vector number vec_num (where the vectors are counted starting with 0).

◆ get_vector() [4/4]

NumericVector<Number>& libMesh::System::get_vector ( const unsigned int  vec_num)
inherited
Returns
A writable reference to this system's additional vector number vec_num (where the vectors are counted starting with 0).

◆ get_weighted_sensitivity_adjoint_solution() [1/2]

NumericVector<Number>& libMesh::System::get_weighted_sensitivity_adjoint_solution ( unsigned int  i = 0)
inherited
Returns
A reference to one of the system's weighted sensitivity adjoint solution vectors, by default the one corresponding to the first qoi.

◆ get_weighted_sensitivity_adjoint_solution() [2/2]

const NumericVector<Number>& libMesh::System::get_weighted_sensitivity_adjoint_solution ( unsigned int  i = 0) const
inherited
Returns
A reference to one of the system's weighted sensitivity adjoint solution vectors, by default the one corresponding to the first qoi.

◆ get_weighted_sensitivity_solution() [1/2]

NumericVector<Number>& libMesh::System::get_weighted_sensitivity_solution ( )
inherited
Returns
A reference to the solution of the last weighted sensitivity solve

◆ get_weighted_sensitivity_solution() [2/2]

const NumericVector<Number>& libMesh::System::get_weighted_sensitivity_solution ( ) const
inherited
Returns
A reference to the solution of the last weighted sensitivity solve

◆ greedy_termination_test()

virtual bool libMesh::RBConstruction::greedy_termination_test ( Real  abs_greedy_error,
Real  initial_greedy_error,
int  count 
)
protectedvirtual

Function that indicates when to terminate the Greedy basis training.

Override in subclasses to specialize.

Reimplemented in libMesh::TransientRBConstruction.

◆ has_variable()

bool libMesh::System::has_variable ( const std::string &  var) const
inherited
Returns
true if a variable named var exists in this System

◆ have_matrix()

bool libMesh::ImplicitSystem::have_matrix ( const std::string &  mat_name) const
inherited
Returns
true if this System has a matrix associated with the given name, false otherwise.

Definition at line 403 of file implicit_system.h.

References libMesh::ImplicitSystem::_matrices.

404 {
405  return (_matrices.count(mat_name));
406 }
std::map< std::string, SparseMatrix< Number > * > _matrices
Some systems need an arbitrary number of matrices.

◆ have_vector()

bool libMesh::System::have_vector ( const std::string &  vec_name) const
inherited
Returns
true if this System has a vector associated with the given name, false otherwise.

Definition at line 2218 of file system.h.

References libMesh::System::_vectors.

2219 {
2220  return (_vectors.count(vec_name));
2221 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ hide_output()

bool& libMesh::System::hide_output ( )
inherited
Returns
A writable reference to a boolean that determines if this system can be written to file or not. If set to true, then EquationSystems::write will ignore this system.

Definition at line 1655 of file system.h.

References libMesh::System::_hide_output.

1655 { return _hide_output; }
bool _hide_output
Are we allowed to write this system to file? If _hide_output is true, then EquationSystems::write wil...
Definition: system.h:2002

◆ identify_variable_groups() [1/2]

bool libMesh::System::identify_variable_groups ( ) const
inherited
Returns
true when VariableGroup structures should be automatically identified, false otherwise.

Definition at line 2194 of file system.h.

References libMesh::System::_identify_variable_groups.

2195 {
2197 }
bool _identify_variable_groups
true when VariableGroup structures should be automatically identified, false otherwise.
Definition: system.h:1970

◆ identify_variable_groups() [2/2]

void libMesh::System::identify_variable_groups ( const bool  ivg)
inherited

Toggle automatic VariableGroup identification.

Definition at line 2202 of file system.h.

References libMesh::System::_identify_variable_groups.

2203 {
2205 }
bool _identify_variable_groups
true when VariableGroup structures should be automatically identified, false otherwise.
Definition: system.h:1970

◆ increment_constructor_count() [1/2]

void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
protectedinherited

Increments the construction counter.

Should be called in the constructor of any derived class that will be reference counted.

Definition at line 181 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().

182 {
183  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
184  std::pair<unsigned int, unsigned int> & p = _counts[name];
185 
186  p.first++;
187 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ increment_constructor_count() [2/2]

void libMesh::ReferenceCounter::increment_constructor_count ( const std::string &  name)
protectedinherited

Increments the construction counter.

Should be called in the constructor of any derived class that will be reference counted.

Definition at line 181 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().

182 {
183  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
184  std::pair<unsigned int, unsigned int> & p = _counts[name];
185 
186  p.first++;
187 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ increment_destructor_count() [1/2]

void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
protectedinherited

Increments the destruction counter.

Should be called in the destructor of any derived class that will be reference counted.

Definition at line 194 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().

195 {
196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
197  std::pair<unsigned int, unsigned int> & p = _counts[name];
198 
199  p.second++;
200 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ increment_destructor_count() [2/2]

void libMesh::ReferenceCounter::increment_destructor_count ( const std::string &  name)
protectedinherited

Increments the destruction counter.

Should be called in the destructor of any derived class that will be reference counted.

Definition at line 194 of file reference_counter.h.

References libMesh::ReferenceCounter::_counts, libMesh::Quality::name(), and libMesh::Threads::spin_mtx.

Referenced by libMesh::ReferenceCountedObject< RBParametrized >::~ReferenceCountedObject().

195 {
196  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
197  std::pair<unsigned int, unsigned int> & p = _counts[name];
198 
199  p.second++;
200 }
std::string name(const ElemQuality q)
static Counts _counts
Actually holds the data.
spin_mutex spin_mtx
A convenient spin mutex object which can be used for obtaining locks.

◆ init()

void libMesh::System::init ( )
inherited

Initializes degrees of freedom on the current mesh.

Sets the

◆ init_context()

virtual void libMesh::RBConstruction::init_context ( FEMContext )
protectedvirtual

Initialize the FEMContext prior to performing an element loop.

Reimplement this in derived classes in order to call FE::get_*() as the particular physics requires.

Reimplemented in SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, and ElasticityRBConstruction.

Definition at line 707 of file rb_construction.h.

707 {}

◆ init_data()

virtual void libMesh::RBConstructionBase< LinearImplicitSystem >::init_data ( )
protectedvirtualinherited

Initializes the member data fields associated with the system, so that, e.g., assemble() may be used.

Reimplemented from libMesh::LinearImplicitSystem.

Reimplemented in libMesh::RBEIMConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, and ElasticityRBConstruction.

Referenced by SimpleRBConstruction::init_data().

◆ init_matrices()

virtual void libMesh::ImplicitSystem::init_matrices ( )
protectedvirtualinherited

Initializes the matrices associated with this system.

◆ initialize_parameters() [1/2]

void libMesh::RBParametrized::initialize_parameters ( const RBParameters mu_min_in,
const RBParameters mu_max_in,
const std::map< std::string, std::vector< Real >> &  discrete_parameter_values 
)
inherited

Initialize the parameter ranges and set current_parameters.

◆ initialize_parameters() [2/2]

void libMesh::RBParametrized::initialize_parameters ( const RBParametrized rb_parametrized)
inherited

Initialize the parameter ranges and set current_parameters.

◆ initialize_rb_construction()

virtual void libMesh::RBConstruction::initialize_rb_construction ( bool  skip_matrix_assembly = false,
bool  skip_vector_assembly = false 
)
virtual

Allocate all the data structures necessary for the construction stage of the RB method.

This function also performs matrix and vector assembly of the "truth" affine expansion.

We can optionally skip the matrix or vector assembly steps by setting skip_matrix_assembly = true, or skip_vector_assembly = true, respectively.

Reimplemented in libMesh::RBEIMConstruction, and libMesh::TransientRBConstruction.

◆ initialize_training_parameters()

virtual void libMesh::RBConstructionBase< LinearImplicitSystem >::initialize_training_parameters ( const RBParameters mu_min,
const RBParameters mu_max,
unsigned int  n_training_parameters,
std::map< std::string, bool >  log_param_scale,
bool  deterministic = true 
)
virtualinherited

Initialize the parameter ranges and indicate whether deterministic or random training parameters should be used and whether or not we want the parameters to be scaled logarithmically.

◆ is_adjoint_already_solved()

bool libMesh::System::is_adjoint_already_solved ( ) const
inherited

Accessor for the adjoint_already_solved boolean.

Definition at line 381 of file system.h.

References libMesh::System::adjoint_already_solved.

382  { return adjoint_already_solved;}
bool adjoint_already_solved
Has the adjoint problem already been solved? If the user sets adjoint_already_solved to true...
Definition: system.h:1996

◆ is_discrete_parameter()

bool libMesh::RBParametrized::is_discrete_parameter ( const std::string &  mu_name) const
inherited

Is parameter mu_name discrete?

◆ is_initialized()

bool libMesh::System::is_initialized ( )
inherited
Returns
true iff this system has been initialized.

Definition at line 2082 of file system.h.

References libMesh::System::_is_initialized.

2083 {
2084  return _is_initialized;
2085 }
bool _is_initialized
true when additional vectors and variables do not require immediate initialization, false otherwise.
Definition: system.h:1964

◆ is_quiet()

bool libMesh::RBConstructionBase< LinearImplicitSystem >::is_quiet ( ) const
inherited

Is the system in quiet mode?

Definition at line 98 of file rb_construction_base.h.

99  { return this->quiet_mode; }
bool quiet_mode
Flag to indicate whether we print out extra information during the Offline stage. ...

◆ is_rb_eval_initialized()

bool libMesh::RBConstruction::is_rb_eval_initialized ( ) const
Returns
true if rb_eval is initialized. False, otherwise.

◆ load_basis_function()

virtual void libMesh::RBConstruction::load_basis_function ( unsigned int  i)
virtual

Load the i^th RB function into the RBConstruction solution vector.

Reimplemented in libMesh::RBEIMConstruction.

◆ load_rb_solution()

virtual void libMesh::RBConstruction::load_rb_solution ( )
virtual

Load the RB solution from the most recent solve with rb_eval into this system's solution vector.

Reimplemented in libMesh::TransientRBConstruction, and libMesh::RBEIMConstruction.

◆ load_training_set()

virtual void libMesh::RBConstructionBase< LinearImplicitSystem >::load_training_set ( std::map< std::string, std::vector< Number >> &  new_training_set)
virtualinherited

Overwrite the training parameters with new_training_set.

◆ local_dof_indices()

void libMesh::System::local_dof_indices ( const unsigned int  var,
std::set< dof_id_type > &  var_indices 
) const
inherited

Fills the std::set with the degrees of freedom on the local processor corresponding the the variable number passed in.

◆ n_active_dofs()

dof_id_type libMesh::System::n_active_dofs ( ) const
inherited
Returns
The number of active degrees of freedom for this System.

Definition at line 2210 of file system.h.

References libMesh::System::n_constrained_dofs(), and libMesh::System::n_dofs().

2211 {
2212  return this->n_dofs() - this->n_constrained_dofs();
2213 }
dof_id_type n_dofs() const
dof_id_type n_constrained_dofs() const

◆ n_components()

unsigned int libMesh::System::n_components ( ) const
inherited
Returns
The total number of scalar components in the system's variables. This will equal n_vars() in the case of all scalar-valued variables.

Definition at line 2114 of file system.h.

References libMesh::System::_variables, libMesh::Variable::first_scalar_number(), and libMesh::Variable::n_components().

2115 {
2116  if (_variables.empty())
2117  return 0;
2118 
2119  const Variable & last = _variables.back();
2120  return last.first_scalar_number() + last.n_components();
2121 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ n_constrained_dofs()

dof_id_type libMesh::System::n_constrained_dofs ( ) const
inherited
Returns
The total number of constrained degrees of freedom in the system.

Referenced by libMesh::System::n_active_dofs().

◆ n_dofs()

dof_id_type libMesh::System::n_dofs ( ) const
inherited
Returns
The number of degrees of freedom in the system

Referenced by libMesh::System::n_active_dofs().

◆ n_linear_iterations()

unsigned int libMesh::LinearImplicitSystem::n_linear_iterations ( ) const
inherited
Returns
The number of iterations taken for the most recent linear solve.

Definition at line 158 of file linear_implicit_system.h.

References libMesh::LinearImplicitSystem::_n_linear_iterations.

158 { return _n_linear_iterations; }
unsigned int _n_linear_iterations
The number of linear iterations required to solve the linear system Ax=b.

◆ n_local_constrained_dofs()

dof_id_type libMesh::System::n_local_constrained_dofs ( ) const
inherited
Returns
The number of constrained degrees of freedom on this processor.

◆ n_local_dofs()

dof_id_type libMesh::System::n_local_dofs ( ) const
inherited
Returns
The number of degrees of freedom local to this processor

◆ n_matrices()

unsigned int libMesh::ImplicitSystem::n_matrices ( ) const
overridevirtualinherited
Returns
The number of matrices handled by this system

Reimplemented from libMesh::System.

Definition at line 410 of file implicit_system.h.

References libMesh::ImplicitSystem::_matrices.

411 {
412  return cast_int<unsigned int>(_matrices.size());
413 }
std::map< std::string, SparseMatrix< Number > * > _matrices
Some systems need an arbitrary number of matrices.

◆ n_objects() [1/2]

static unsigned int libMesh::ReferenceCounter::n_objects ( )
staticinherited

Prints the number of outstanding (created, but not yet destroyed) objects.

Definition at line 83 of file reference_counter.h.

References libMesh::ReferenceCounter::_n_objects.

84  { return _n_objects; }
static Threads::atomic< unsigned int > _n_objects
The number of objects.

◆ n_objects() [2/2]

static unsigned int libMesh::ReferenceCounter::n_objects ( )
staticinherited

Prints the number of outstanding (created, but not yet destroyed) objects.

Definition at line 83 of file reference_counter.h.

References libMesh::ReferenceCounter::_n_objects.

84  { return _n_objects; }
static Threads::atomic< unsigned int > _n_objects
The number of objects.

◆ n_processors()

processor_id_type libMesh::ParallelObject::n_processors ( ) const
inherited
Returns
The number of processors in the group.

Definition at line 93 of file parallel_object.h.

References libMesh::ParallelObject::_communicator, and libMesh::Parallel::Communicator::size().

Referenced by libMesh::MeshBase::partition().

94  { return cast_int<processor_id_type>(_communicator.size()); }
processor_id_type size() const
Definition: communicator.h:175
const Parallel::Communicator & _communicator

◆ n_qois()

unsigned int libMesh::System::n_qois ( ) const
inherited

Number of currently active quantities of interest.

Definition at line 2271 of file system.h.

References libMesh::System::qoi.

Referenced by libMesh::SensitivityData::allocate_data(), and libMesh::SensitivityData::allocate_hessian_data().

2272 {
2273  return cast_int<unsigned int>(this->qoi.size());
2274 }
std::vector< Number > qoi
Values of the quantities of interest.
Definition: system.h:1551

◆ n_variable_groups()

unsigned int libMesh::System::n_variable_groups ( ) const
inherited
Returns
The number of VariableGroup variable groups in the system

Definition at line 2106 of file system.h.

References libMesh::System::_variable_groups.

2107 {
2108  return cast_int<unsigned int>(_variable_groups.size());
2109 }
std::vector< VariableGroup > _variable_groups
The VariableGroup in this System.
Definition: system.h:1909

◆ n_vars()

unsigned int libMesh::System::n_vars ( ) const
inherited
Returns
The number of variables in the system

Definition at line 2098 of file system.h.

References libMesh::System::_variables.

2099 {
2100  return cast_int<unsigned int>(_variables.size());
2101 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ n_vectors()

unsigned int libMesh::System::n_vectors ( ) const
inherited
Returns
The number of vectors (in addition to the solution) handled by this system This is the size of the _vectors map

Definition at line 2226 of file system.h.

References libMesh::System::_vectors.

2227 {
2228  return cast_int<unsigned int>(_vectors.size());
2229 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ name()

const std::string & libMesh::System::name ( ) const
inherited
Returns
The system name.

Definition at line 2010 of file system.h.

References libMesh::System::_sys_name.

2011 {
2012  return _sys_name;
2013 }
const std::string _sys_name
A name associated with this system.
Definition: system.h:1894

◆ number()

unsigned int libMesh::System::number ( ) const
inherited
Returns
The system number.

Definition at line 2018 of file system.h.

References libMesh::System::_sys_number.

2019 {
2020  return _sys_number;
2021 }
const unsigned int _sys_number
The number associated with this system.
Definition: system.h:1899

◆ point_gradient() [1/3]

Gradient libMesh::System::point_gradient ( unsigned int  var,
const Point p,
const bool  insist_on_success = true 
) const
inherited
Returns
The gradient of the solution variable var at the physical point p in the mesh, similarly to point_value.

◆ point_gradient() [2/3]

Gradient libMesh::System::point_gradient ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited
Returns
The gradient of the solution variable var at the physical point p in local Elem e in the mesh, similarly to point_value.

◆ point_gradient() [3/3]

Gradient libMesh::System::point_gradient ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited

Calls the version of point_gradient() which takes a reference.

This function exists only to prevent people from calling the version of point_gradient() that has a boolean third argument, which would result in unnecessary PointLocator calls.

◆ point_hessian() [1/3]

Tensor libMesh::System::point_hessian ( unsigned int  var,
const Point p,
const bool  insist_on_success = true 
) const
inherited
Returns
The second derivative tensor of the solution variable var at the physical point p in the mesh, similarly to point_value.

◆ point_hessian() [2/3]

Tensor libMesh::System::point_hessian ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited
Returns
The second derivative tensor of the solution variable var at the physical point p in local Elem e in the mesh, similarly to point_value.

◆ point_hessian() [3/3]

Tensor libMesh::System::point_hessian ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited

Calls the version of point_hessian() which takes a reference.

This function exists only to prevent people from calling the version of point_hessian() that has a boolean third argument, which would result in unnecessary PointLocator calls.

◆ point_value() [1/3]

Number libMesh::System::point_value ( unsigned int  var,
const Point p,
const bool  insist_on_success = true 
) const
inherited
Returns
The value of the solution variable var at the physical point p in the mesh, without knowing a priori which element contains p.
Note
This function uses MeshBase::sub_point_locator(); users may or may not want to call MeshBase::clear_point_locator() afterward. Also, point_locator() is expensive (N log N for initial construction, log N for evaluations). Avoid using this function in any context where you are already looping over elements.

Because the element containing p may lie on any processor, this function is parallel-only.

By default this method expects the point to reside inside the domain and will abort if no element can be found which contains p. The optional parameter insist_on_success can be set to false to allow the method to return 0 when the point is not located.

◆ point_value() [2/3]

Number libMesh::System::point_value ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited
Returns
The value of the solution variable var at the physical point p contained in local Elem e

This version of point_value can be run in serial, but assumes e is in the local mesh partition or is algebraically ghosted.

◆ point_value() [3/3]

Number libMesh::System::point_value ( unsigned int  var,
const Point p,
const Elem e 
) const
inherited

Calls the version of point_value() which takes a reference.

This function exists only to prevent people from calling the version of point_value() that has a boolean third argument, which would result in unnecessary PointLocator calls.

◆ print_basis_function_orthogonality()

void libMesh::RBConstruction::print_basis_function_orthogonality ( )

Print out a matrix that shows the orthogonality of the RB basis functions.

This is a helpful debugging tool, e.g. orthogonality can be degraded due to finite precision arithmetic.

◆ print_discrete_parameter_values()

void libMesh::RBParametrized::print_discrete_parameter_values ( ) const
inherited

Print out all the discrete parameter values.

◆ print_info() [1/3]

static void libMesh::ReferenceCounter::print_info ( std::ostream &  out = libMesh::out)
staticinherited

Prints the reference information, by default to libMesh::out.

◆ print_info() [2/3]

static void libMesh::ReferenceCounter::print_info ( std::ostream &  out = libMesh::out)
staticinherited

Prints the reference information, by default to libMesh::out.

◆ print_info() [3/3]

virtual void libMesh::RBConstruction::print_info ( )
virtual

Print out info that describes the current setup of this RBConstruction.

Reimplemented in libMesh::TransientRBConstruction, and libMesh::RBEIMConstruction.

◆ print_parameters()

void libMesh::RBParametrized::print_parameters ( ) const
inherited

Print the current parameters.

◆ process_parameters_file()

virtual void libMesh::RBConstruction::process_parameters_file ( const std::string &  parameters_filename)
virtual

Read in from the file specified by parameters_filename and set the this system's member variables accordingly.

Reimplemented in libMesh::TransientRBConstruction, and libMesh::RBEIMConstruction.

◆ processor_id()

processor_id_type libMesh::ParallelObject::processor_id ( ) const
inherited

◆ project_solution() [1/3]

void libMesh::System::project_solution ( FunctionBase< Number > *  f,
FunctionBase< Gradient > *  g = nullptr 
) const
inherited

Projects arbitrary functions onto the current solution.

The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

Referenced by FETest< order, family, elem_type >::setUp().

◆ project_solution() [2/3]

void libMesh::System::project_solution ( FEMFunctionBase< Number > *  f,
FEMFunctionBase< Gradient > *  g = nullptr 
) const
inherited

Projects arbitrary functions onto the current solution.

The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

◆ project_solution() [3/3]

void libMesh::System::project_solution ( ValueFunctionPointer  fptr,
GradientFunctionPointer  gptr,
const Parameters parameters 
) const
inherited

◆ project_solution_on_reinit()

bool& libMesh::System::project_solution_on_reinit ( void  )
inherited

Tells the System whether or not to project the solution vector onto new grids when the system is reinitialized.

The solution will be projected unless project_solution_on_reinit() = false is called.

Definition at line 787 of file system.h.

References libMesh::System::_solution_projection.

788  { return _solution_projection; }
bool _solution_projection
Holds true if the solution vector should be projected onto a changed grid, false if it should be zero...
Definition: system.h:1952

◆ project_vector() [1/5]

void libMesh::System::project_vector ( NumericVector< Number > &  new_vector,
FunctionBase< Number > *  f,
FunctionBase< Gradient > *  g = nullptr,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary functions onto a vector of degree of freedom values for the current system.

The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ project_vector() [2/5]

void libMesh::System::project_vector ( NumericVector< Number > &  new_vector,
FEMFunctionBase< Number > *  f,
FEMFunctionBase< Gradient > *  g = nullptr,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary functions onto a vector of degree of freedom values for the current system.

The function value f and its gradient g are user-provided cloneable functors. A gradient g is only required/used for projecting onto finite element spaces with continuous derivatives. If non-default Parameters are to be used, they can be provided in the parameters argument.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ project_vector() [3/5]

void libMesh::System::project_vector ( ValueFunctionPointer  fptr,
GradientFunctionPointer  gptr,
const Parameters parameters,
NumericVector< Number > &  new_vector,
int  is_adjoint = -1 
) const
inherited

Projects arbitrary functions onto a vector of degree of freedom values for the current system.

The function value fptr and its gradient gptr are represented by function pointers. A gradient gptr is only required/used for projecting onto finite element spaces with continuous derivatives.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ project_vector() [4/5]

void libMesh::System::project_vector ( NumericVector< Number > &  ,
int  is_adjoint = -1 
) const
protectedinherited

Projects the vector defined on the old mesh onto the new mesh.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ project_vector() [5/5]

void libMesh::System::project_vector ( const NumericVector< Number > &  ,
NumericVector< Number > &  ,
int  is_adjoint = -1 
) const
protectedinherited

Projects the vector defined on the old mesh onto the new mesh.

The original vector is unchanged and the new vector is passed through the second argument.

Constrain the new vector using the requested adjoint rather than primal constraints if is_adjoint is non-negative.

◆ projection_matrix()

void libMesh::System::projection_matrix ( SparseMatrix< Number > &  proj_mat) const
inherited

This method creates a projection matrix which corresponds to the operation of project_vector between old and new solution spaces.

Heterogeneous Dirichlet boundary conditions are not taken into account here; if this matrix is used for prolongation (mesh refinement) on a side with a heterogeneous BC, the newly created degrees of freedom on that side will still match the coarse grid approximation of the BC, not the fine grid approximation.

◆ prolong_vectors()

virtual void libMesh::System::prolong_vectors ( )
virtualinherited

Prolong vectors after the mesh has refined.

◆ qoi_parameter_hessian()

virtual void libMesh::ImplicitSystem::qoi_parameter_hessian ( const QoISet qoi_indices,
const ParameterVector parameters,
SensitivityData hessian 
)
overridevirtualinherited

For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters p, the parameter sensitivity Hessian H_ij is defined as H_ij = (d^2 q)/(d p_i d p_j) This Hessian is the output of this method, where for each q_i, H_jk is stored in hessian.second_derivative(i,j,k).

Note that in some cases only current_local_solution is used during assembly, and, therefore, if solution has been altered without update() being called, then the user must call update() before calling this function.

Reimplemented from libMesh::System.

◆ qoi_parameter_hessian_vector_product()

virtual void libMesh::ImplicitSystem::qoi_parameter_hessian_vector_product ( const QoISet qoi_indices,
const ParameterVector parameters,
const ParameterVector vector,
SensitivityData product 
)
overridevirtualinherited

For each of the system's quantities of interest q in qoi[qoi_indices], and for a vector of parameters p, the parameter sensitivity Hessian H_ij is defined as H_ij = (d^2 q)/(d p_i d p_j) The Hessian-vector product, for a vector v_k in parameter space, is S_j = H_jk v_k This product is the output of this method, where for each q_i, S_j is stored in sensitivities[i][j].

Reimplemented from libMesh::System.

◆ qoi_parameter_sensitivity()

virtual void libMesh::System::qoi_parameter_sensitivity ( const QoISet qoi_indices,
const ParameterVector parameters,
SensitivityData sensitivities 
)
virtualinherited

Solves for the derivative of each of the system's quantities of interest q in qoi[qoi_indices] with respect to each parameter in parameters, placing the result for qoi i and parameter j into sensitivities[i][j].

Note
parameters is a const vector, not a vector-of-const; parameter values in this vector need to be mutable for finite differencing to work.

Automatically chooses the forward method for problems with more quantities of interest than parameters, or the adjoint method otherwise.

This method is only usable in derived classes which override an implementation.

◆ re_update()

virtual void libMesh::System::re_update ( )
virtualinherited

Re-update the local values when the mesh has changed.

This method takes the data updated by update() and makes it up-to-date on the current mesh.

Reimplemented in libMesh::TransientSystem< RBConstruction >.

◆ read_header()

void libMesh::System::read_header ( Xdr io,
const std::string &  version,
const bool  read_header = true,
const bool  read_additional_data = true,
const bool  read_legacy_format = false 
)
inherited

Reads the basic data header for this System.

◆ read_legacy_data()

void libMesh::System::read_legacy_data ( Xdr io,
const bool  read_additional_data = true 
)
inherited

Reads additional data, namely vectors, for this System.

Deprecated:
The ability to read XDR data files in the old (aka "legacy") XDR format has been deprecated for many years, this capability may soon disappear altogether.

◆ read_parallel_data() [1/2]

template<typename InValType >
void libMesh::System::read_parallel_data ( Xdr io,
const bool  read_additional_data 
)
inherited

Reads additional data, namely vectors, for this System.

This method may safely be called on a distributed-memory mesh. This method will read an individual file for each processor in the simulation where the local solution components for that processor are stored.

◆ read_parallel_data() [2/2]

void libMesh::System::read_parallel_data ( Xdr io,
const bool  read_additional_data 
)
inherited

Non-templated version for backward compatibility.

Reads additional data, namely vectors, for this System. This method may safely be called on a distributed-memory mesh. This method will read an individual file for each processor in the simulation where the local solution components for that processor are stored.

Definition at line 1292 of file system.h.

1294  { read_parallel_data<Number>(io, read_additional_data); }

◆ read_parameter_data_from_files()

void libMesh::RBParametrized::read_parameter_data_from_files ( const std::string &  continuous_param_file_name,
const std::string &  discrete_param_file_name,
const bool  read_binary_data 
)
inherited

Read in the parameter ranges from files.

◆ read_riesz_representors_from_files()

virtual void libMesh::RBConstruction::read_riesz_representors_from_files ( const std::string &  riesz_representors_dir,
const bool  write_binary_residual_representors 
)
virtual

Read in all the Riesz representor data from files.

directory_name specifies which directory to read from. io_flag specifies whether we read in all data, or only a basis (in)dependent subset.

Reimplemented in libMesh::TransientRBConstruction.

◆ read_serialized_data() [1/2]

template<typename ValType >
void libMesh::System::read_serialized_data ( Xdr io,
const bool  read_additional_data = true 
)
inherited

Reads additional data, namely vectors, for this System.

This method may safely be called on a distributed-memory mesh.

◆ read_serialized_data() [2/2]

void libMesh::System::read_serialized_data ( Xdr io,
const bool  read_additional_data = true 
)
inherited

Non-templated version for backward compatibility.

Reads additional data, namely vectors, for this System. This method may safely be called on a distributed-memory mesh.

Definition at line 1250 of file system.h.

1252  { read_serialized_data<Number>(io, read_additional_data); }

◆ read_serialized_vectors() [1/2]

template<typename InValType >
std::size_t libMesh::System::read_serialized_vectors ( Xdr io,
const std::vector< NumericVector< Number > *> &  vectors 
) const
inherited

Read a number of identically distributed vectors.

This method allows for optimization for the multiple vector case by only communicating the metadata once.

◆ read_serialized_vectors() [2/2]

std::size_t libMesh::System::read_serialized_vectors ( Xdr io,
const std::vector< NumericVector< Number > *> &  vectors 
) const
inherited

Non-templated version for backward compatibility.

Read a number of identically distributed vectors. This method allows for optimization for the multiple vector case by only communicating the metadata once.

Definition at line 1270 of file system.h.

1272  { return read_serialized_vectors<Number>(io, vectors); }

◆ recompute_all_residual_terms()

virtual void libMesh::RBConstruction::recompute_all_residual_terms ( const bool  compute_inner_products = true)
virtual

This function computes all of the residual representors, can be useful when restarting a basis training computation.

If compute_inner_products is false, we just compute the residual Riesz representors, whereas if true, we also compute all the corresponding inner product terms.

◆ reinit()

virtual void libMesh::LinearImplicitSystem::reinit ( )
overridevirtualinherited

Reinitializes the member data fields associated with the system, so that, e.g., assemble() may be used.

Reimplemented from libMesh::ImplicitSystem.

Reimplemented in libMesh::NewmarkSystem.

◆ reinit_constraints()

virtual void libMesh::System::reinit_constraints ( )
virtualinherited

Reinitializes the constraints for this system.

◆ release_linear_solver()

virtual void libMesh::LinearImplicitSystem::release_linear_solver ( LinearSolver< Number > *  ) const
overridevirtualinherited

Releases a pointer to a linear solver acquired by this->get_linear_solver()

Reimplemented from libMesh::ImplicitSystem.

◆ remove_matrix()

void libMesh::ImplicitSystem::remove_matrix ( const std::string &  mat_name)
inherited

Removes the additional matrix mat_name from this system.

◆ remove_vector()

void libMesh::System::remove_vector ( const std::string &  vec_name)
inherited

Removes the additional vector vec_name from this system.

◆ request_matrix() [1/2]

const SparseMatrix<Number>* libMesh::ImplicitSystem::request_matrix ( const std::string &  mat_name) const
inherited
Returns
A const pointer to this system's additional matrix named mat_name, or nullptr if no matrix by that name exists.

◆ request_matrix() [2/2]

SparseMatrix<Number>* libMesh::ImplicitSystem::request_matrix ( const std::string &  mat_name)
inherited
Returns
A writable pointer to this system's additional matrix named mat_name, or nullptr if no matrix by that name exists.

◆ request_vector() [1/4]

const NumericVector<Number>* libMesh::System::request_vector ( const std::string &  vec_name) const
inherited
Returns
A const pointer to the vector if this System has a vector associated with the given name, nullptr otherwise.

◆ request_vector() [2/4]

NumericVector<Number>* libMesh::System::request_vector ( const std::string &  vec_name)
inherited
Returns
A pointer to the vector if this System has a vector associated with the given name, nullptr otherwise.

◆ request_vector() [3/4]

const NumericVector<Number>* libMesh::System::request_vector ( const unsigned int  vec_num) const
inherited
Returns
A const pointer to this system's additional vector number vec_num (where the vectors are counted starting with 0), or nullptr if the system has no such vector.

◆ request_vector() [4/4]

NumericVector<Number>* libMesh::System::request_vector ( const unsigned int  vec_num)
inherited
Returns
A writable pointer to this system's additional vector number vec_num (where the vectors are counted starting with 0), or nullptr if the system has no such vector.

◆ restrict_solve_to()

virtual void libMesh::LinearImplicitSystem::restrict_solve_to ( const SystemSubset subset,
const SubsetSolveMode  subset_solve_mode = SUBSET_ZERO 
)
overridevirtualinherited

After calling this method, any solve will be limited to the given subset.

To disable this mode, call this method with subset being a nullptr.

Reimplemented from libMesh::System.

◆ restrict_vectors()

virtual void libMesh::System::restrict_vectors ( )
virtualinherited

Restrict vectors after the mesh has coarsened.

◆ sensitivity_solve()

virtual std::pair<unsigned int, Real> libMesh::ImplicitSystem::sensitivity_solve ( const ParameterVector parameters)
overridevirtualinherited

Assembles & solves the linear system(s) (dR/du)*u_p = -dR/dp, for those parameters contained within parameters.

Returns
A pair with the total number of linear iterations performed and the (sum of the) final residual norms

Reimplemented from libMesh::System.

◆ set_abs_training_tolerance()

void libMesh::RBConstruction::set_abs_training_tolerance ( Real  new_training_tolerance)

Get/set the absolute tolerance for the basis training.

Definition at line 191 of file rb_construction.h.

References abs_training_tolerance.

192  {this->abs_training_tolerance = new_training_tolerance; }

◆ set_adjoint_already_solved()

void libMesh::System::set_adjoint_already_solved ( bool  setting)
inherited

Setter for the adjoint_already_solved boolean.

Definition at line 387 of file system.h.

References libMesh::System::adjoint_already_solved.

388  { adjoint_already_solved = setting;}
bool adjoint_already_solved
Has the adjoint problem already been solved? If the user sets adjoint_already_solved to true...
Definition: system.h:1996

◆ set_basic_system_only()

void libMesh::System::set_basic_system_only ( )
inherited

Sets the system to be "basic only": i.e.

advanced system components such as ImplicitSystem matrices may not be initialized. This is useful for efficiency in certain utility programs that never use System::solve(). This method must be called after the System or derived class is created but before it is initialized; e.g. from within EquationSystems::read()

Definition at line 2090 of file system.h.

References libMesh::System::_basic_system_only.

2091 {
2092  _basic_system_only = true;
2093 }
bool _basic_system_only
Holds true if the components of more advanced system types (e.g.
Definition: system.h:1958

◆ set_context_solution_vec()

virtual void libMesh::RBConstruction::set_context_solution_vec ( NumericVector< Number > &  vec)
protectedvirtual

Set current_local_solution = vec so that we can access vec from FEMContext during assembly.

Override in subclasses if different behavior is required.

◆ set_convergence_assertion_flag()

void libMesh::RBConstruction::set_convergence_assertion_flag ( bool  flag)

Setter for the flag determining if convergence should be checked after each solve.

◆ set_deterministic_training_parameter_name()

void libMesh::RBConstructionBase< LinearImplicitSystem >::set_deterministic_training_parameter_name ( const std::string &  name)
inherited

In some cases we only want to allow discrete parameter values, instead of parameters that may take any value in a specified interval.

Here we provide a method to set the d Set the discrete values for parameter mu that are allowed in the training set. This must be called before the training set is generated. Set the name of the parameter that we will generate deterministic training parameters for. Defaults to "NONE".

◆ set_deterministic_training_parameter_repeats()

void libMesh::RBConstructionBase< LinearImplicitSystem >::set_deterministic_training_parameter_repeats ( unsigned int  repeats)
inherited

Set the number of times each sample of the deterministic training parameter is repeated.

◆ set_inner_product_assembly()

void libMesh::RBConstruction::set_inner_product_assembly ( ElemAssembly inner_product_assembly_in)

Set the rb_assembly_expansion object.

Referenced by SimpleRBConstruction::init_data().

◆ set_Nmax()

virtual void libMesh::RBConstruction::set_Nmax ( unsigned int  Nmax)
virtual

◆ set_normalize_rb_bound_in_greedy()

void libMesh::RBConstruction::set_normalize_rb_bound_in_greedy ( bool  normalize_rb_bound_in_greedy_in)

Get/set the boolean to indicate if we normalize the RB error in the greedy.

Definition at line 198 of file rb_construction.h.

References normalize_rb_bound_in_greedy.

199  {this->normalize_rb_bound_in_greedy = normalize_rb_bound_in_greedy_in; }
bool normalize_rb_bound_in_greedy
This boolean indicates if we normalize the RB error in the greedy using RBEvaluation::get_error_bound...

◆ set_parameters()

void libMesh::RBParametrized::set_parameters ( const RBParameters params)
inherited

Set the current parameters to params.

Referenced by SimpleRBEvaluation::get_stability_lower_bound().

◆ set_params_from_training_set()

void libMesh::RBConstructionBase< LinearImplicitSystem >::set_params_from_training_set ( unsigned int  index)
protectedinherited

Set parameters to the RBParameters stored in index index of the training set.

◆ set_params_from_training_set_and_broadcast()

virtual void libMesh::RBConstructionBase< LinearImplicitSystem >::set_params_from_training_set_and_broadcast ( unsigned int  index)
protectedvirtualinherited

Load the specified training parameter and then broadcast to all processors.

◆ set_quiet_mode()

void libMesh::RBConstructionBase< LinearImplicitSystem >::set_quiet_mode ( bool  quiet_mode_in)
inherited

Set the quiet_mode flag.

If quiet == false then we print out a lot of extra information during the Offline stage.

Definition at line 92 of file rb_construction_base.h.

93  { this->quiet_mode = quiet_mode_in; }
bool quiet_mode
Flag to indicate whether we print out extra information during the Offline stage. ...

◆ set_rb_assembly_expansion()

void libMesh::RBConstruction::set_rb_assembly_expansion ( RBAssemblyExpansion rb_assembly_expansion_in)

Set the rb_assembly_expansion object.

Referenced by SimpleRBConstruction::init_data().

◆ set_rb_construction_parameters()

void libMesh::RBConstruction::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 
)

Set the state of this RBConstruction object based on the arguments to this function.

◆ set_rb_evaluation()

void libMesh::RBConstruction::set_rb_evaluation ( RBEvaluation rb_eval_in)

Set the RBEvaluation object.

◆ set_rel_training_tolerance()

void libMesh::RBConstruction::set_rel_training_tolerance ( Real  new_training_tolerance)

Get/set the relative tolerance for the basis training.

Definition at line 184 of file rb_construction.h.

References rel_training_tolerance.

185  {this->rel_training_tolerance = new_training_tolerance; }
Real rel_training_tolerance
Relative and absolute tolerances for training reduced basis using the Greedy scheme.

◆ set_training_random_seed()

void libMesh::RBConstructionBase< LinearImplicitSystem >::set_training_random_seed ( unsigned int  seed)
inherited

Set the seed that is used to randomly generate training parameters.

◆ set_vector_as_adjoint()

void libMesh::System::set_vector_as_adjoint ( const std::string &  vec_name,
int  qoi_num 
)
inherited

Allows one to set the QoI index controlling whether the vector identified by vec_name represents a solution from the adjoint (qoi_num >= 0) or primal (qoi_num == -1) space.

This becomes significant if those spaces have differing heterogeneous Dirichlet constraints.

qoi_num == -2 can be used to indicate a vector which should not be affected by constraints during projection operations.

◆ set_vector_preservation()

void libMesh::System::set_vector_preservation ( const std::string &  vec_name,
bool  preserve 
)
inherited

Allows one to set the boolean controlling whether the vector identified by vec_name should be "preserved": projected to new meshes, saved, etc.

◆ solve()

virtual void libMesh::LinearImplicitSystem::solve ( )
overridevirtualinherited

Assembles & solves the linear system A*x=b.

Reimplemented from libMesh::ExplicitSystem.

Reimplemented in libMesh::FrequencySystem.

◆ solve_for_matrix_and_rhs()

virtual void libMesh::RBConstruction::solve_for_matrix_and_rhs ( LinearSolver< Number > &  input_solver,
SparseMatrix< Number > &  input_matrix,
NumericVector< Number > &  input_rhs 
)
virtual

Assembles & solves the linear system A*x=b for the specified matrix input_matrix and right-hand side rhs.

◆ system()

sys_type& libMesh::RBConstruction::system ( )
Returns
A reference to *this.

Definition at line 117 of file rb_construction.h.

117 { return *this; }

◆ system_type()

virtual std::string libMesh::RBConstruction::system_type ( ) const
overridevirtual
Returns
A string indicating the type of the system.

Reimplemented from libMesh::LinearImplicitSystem.

Reimplemented in libMesh::TransientSystem< RBConstruction >.

◆ train_reduced_basis()

virtual Real libMesh::RBConstruction::train_reduced_basis ( const bool  resize_rb_eval_data = true)
virtual

Train the reduced basis.

This is the crucial function in the Offline stage: it generates the reduced basis using the "Greedy algorithm." Each stage of the Greedy algorithm involves solving the reduced basis over a large training set and selecting the parameter at which the reduced basis error bound is largest, then performing a truth_solve at that parameter and enriching the reduced basis with the corresponding snapshot.

resize_rb_eval_data is a boolean flag to indicate whether or not we call rb_eval->resize_data_structures(Nmax). True by default, but we may set it to false if, for example, we are continuing from a previous training run and don't want to clobber the existing rb_eval data.

Returns
The final maximum a posteriori error bound on the training set.

Reimplemented in libMesh::RBEIMConstruction, and libMesh::TransientRBConstruction.

◆ truth_assembly()

virtual void libMesh::RBConstruction::truth_assembly ( )
protectedvirtual

Assemble the truth matrix and right-hand side for current_parameters.

Reimplemented in libMesh::TransientRBConstruction.

◆ truth_solve()

virtual Real libMesh::RBConstruction::truth_solve ( int  plot_solution)
virtual

Perform a "truth" solve, i.e.

solve the finite element system at at the parameters currently set in the system. This is used extensively in training the reduced basis, since "truth snapshots" are employed as basis functions.

Reimplemented in libMesh::RBEIMConstruction, and libMesh::TransientRBConstruction.

◆ update()

virtual void libMesh::System::update ( )
virtualinherited

Update the local values to reflect the solution on neighboring processors.

Reimplemented in SolidSystem.

◆ update_global_solution() [1/2]

void libMesh::System::update_global_solution ( std::vector< Number > &  global_soln) const
inherited

Fill the input vector global_soln so that it contains the global solution on all processors.

Requires communication with all other processors.

◆ update_global_solution() [2/2]

void libMesh::System::update_global_solution ( std::vector< Number > &  global_soln,
const processor_id_type  dest_proc 
) const
inherited

Fill the input vector global_soln so that it contains the global solution on processor dest_proc.

Requires communication with all other processors.

◆ update_greedy_param_list()

void libMesh::RBConstruction::update_greedy_param_list ( )
protected

Update the list of Greedily chosen parameters with current_parameters.

◆ update_RB_system_matrices()

virtual void libMesh::RBConstruction::update_RB_system_matrices ( )
protectedvirtual

Compute the reduced basis matrices for the current basis.

Reimplemented in libMesh::TransientRBConstruction, and libMesh::RBEIMConstruction.

◆ update_residual_terms()

virtual void libMesh::RBConstruction::update_residual_terms ( bool  compute_inner_products = true)
protectedvirtual

Compute the terms that are combined ‘online’ to determine the dual norm of the residual.

By default, inner product terms are also computed, but you can turn this feature off e.g. if you are already reading in that data from files.

Reimplemented in libMesh::TransientRBConstruction.

◆ update_system()

virtual void libMesh::RBConstruction::update_system ( )
protectedvirtual

Update the system after enriching the RB space; this calls a series of functions to update the system properly.

Reimplemented in libMesh::TransientRBConstruction, and libMesh::RBEIMConstruction.

◆ user_assembly()

virtual void libMesh::System::user_assembly ( )
virtualinherited

Calls user's attached assembly function, or is overridden by the user in derived classes.

◆ user_constrain()

virtual void libMesh::System::user_constrain ( )
virtualinherited

Calls user's attached constraint function, or is overridden by the user in derived classes.

◆ user_initialization()

virtual void libMesh::System::user_initialization ( )
virtualinherited

Calls user's attached initialization function, or is overridden by the user in derived classes.

◆ user_QOI()

virtual void libMesh::System::user_QOI ( const QoISet qoi_indices)
virtualinherited

Calls user's attached quantity of interest function, or is overridden by the user in derived classes.

◆ user_QOI_derivative()

virtual void libMesh::System::user_QOI_derivative ( const QoISet qoi_indices = QoISet(),
bool  include_liftfunc = true,
bool  apply_constraints = true 
)
virtualinherited

Calls user's attached quantity of interest derivative function, or is overridden by the user in derived classes.

◆ variable()

const Variable & libMesh::System::variable ( unsigned int  var) const
inherited

Return a constant reference to Variable var.

Definition at line 2126 of file system.h.

References libMesh::System::_variables.

2127 {
2128  libmesh_assert_less (i, _variables.size());
2129 
2130  return _variables[i];
2131 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ variable_group()

const VariableGroup & libMesh::System::variable_group ( unsigned int  vg) const
inherited

Return a constant reference to VariableGroup vg.

Definition at line 2136 of file system.h.

References libMesh::System::_variable_groups.

2137 {
2138  libmesh_assert_less (vg, _variable_groups.size());
2139 
2140  return _variable_groups[vg];
2141 }
std::vector< VariableGroup > _variable_groups
The VariableGroup in this System.
Definition: system.h:1909

◆ variable_name()

const std::string & libMesh::System::variable_name ( const unsigned int  i) const
inherited
Returns
The name of variable i.

Definition at line 2146 of file system.h.

References libMesh::System::_variables.

2147 {
2148  libmesh_assert_less (i, _variables.size());
2149 
2150  return _variables[i].name();
2151 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ variable_number()

unsigned short int libMesh::System::variable_number ( const std::string &  var) const
inherited
Returns
The variable number associated with the user-specified variable named var.

Referenced by libMesh::System::variable_scalar_number(), and libMesh::System::variable_type().

◆ variable_scalar_number() [1/2]

unsigned int libMesh::System::variable_scalar_number ( const std::string &  var,
unsigned int  component 
) const
inherited
Returns
An index, starting from 0 for the first component of the first variable, and incrementing for each component of each (potentially vector-valued) variable in the system in order. For systems with only scalar-valued variables, this will be the same as variable_number(var)

Irony: currently our only non-scalar-valued variable type is SCALAR.

Definition at line 2157 of file system.h.

References libMesh::System::variable_number().

2159 {
2160  return variable_scalar_number(this->variable_number(var), component);
2161 }
unsigned int variable_scalar_number(const std::string &var, unsigned int component) const
Definition: system.h:2157
unsigned short int variable_number(const std::string &var) const

◆ variable_scalar_number() [2/2]

unsigned int libMesh::System::variable_scalar_number ( unsigned int  var_num,
unsigned int  component 
) const
inherited
Returns
An index, starting from 0 for the first component of the first variable, and incrementing for each component of each (potentially vector-valued) variable in the system in order. For systems with only scalar-valued variables, this will be the same as var_num

Irony: currently our only non-scalar-valued variable type is SCALAR.

Definition at line 2167 of file system.h.

References libMesh::System::_variables.

2169 {
2170  return _variables[var_num].first_scalar_number() + component;
2171 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ variable_type() [1/2]

const FEType & libMesh::System::variable_type ( const unsigned int  i) const
inherited
Returns
The finite element type variable number i.

Definition at line 2176 of file system.h.

References libMesh::System::_variables.

Referenced by FETest< order, family, elem_type >::setUp().

2177 {
2178  libmesh_assert_less (i, _variables.size());
2179 
2180  return _variables[i].type();
2181 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904

◆ variable_type() [2/2]

const FEType & libMesh::System::variable_type ( const std::string &  var) const
inherited
Returns
The finite element type for variable var.

Definition at line 2186 of file system.h.

References libMesh::System::_variables, and libMesh::System::variable_number().

2187 {
2188  return _variables[this->variable_number(var)].type();
2189 }
std::vector< Variable > _variables
The Variable in this System.
Definition: system.h:1904
unsigned short int variable_number(const std::string &var) const

◆ vector_is_adjoint()

int libMesh::System::vector_is_adjoint ( const std::string &  vec_name) const
inherited
Returns
The integer describing whether the vector identified by vec_name represents a solution from an adjoint (non-negative) or the primal (-1) space.

◆ vector_name() [1/2]

const std::string& libMesh::System::vector_name ( const unsigned int  vec_num) const
inherited
Returns
The name of this system's additional vector number vec_num (where the vectors are counted starting with 0).

◆ vector_name() [2/2]

const std::string& libMesh::System::vector_name ( const NumericVector< Number > &  vec_reference) const
inherited
Returns
The name of a system vector, given a reference to that vector

◆ vector_preservation()

bool libMesh::System::vector_preservation ( const std::string &  vec_name) const
inherited
Returns
The boolean describing whether the vector identified by vec_name should be "preserved": projected to new meshes, saved, etc.

◆ vectors_begin() [1/2]

System::vectors_iterator libMesh::System::vectors_begin ( )
inherited

Beginning of vectors container.

Definition at line 2238 of file system.h.

References libMesh::System::_vectors.

2239 {
2240  return _vectors.begin();
2241 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ vectors_begin() [2/2]

System::const_vectors_iterator libMesh::System::vectors_begin ( ) const
inherited

Beginning of vectors container.

Definition at line 2244 of file system.h.

References libMesh::System::_vectors.

2245 {
2246  return _vectors.begin();
2247 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ vectors_end() [1/2]

System::vectors_iterator libMesh::System::vectors_end ( )
inherited

End of vectors container.

Definition at line 2250 of file system.h.

References libMesh::System::_vectors.

2251 {
2252  return _vectors.end();
2253 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ vectors_end() [2/2]

System::const_vectors_iterator libMesh::System::vectors_end ( ) const
inherited

End of vectors container.

Definition at line 2256 of file system.h.

References libMesh::System::_vectors.

2257 {
2258  return _vectors.end();
2259 }
std::map< std::string, NumericVector< Number > *> _vectors
Some systems need an arbitrary number of vectors.
Definition: system.h:1928

◆ weighted_sensitivity_adjoint_solve()

virtual std::pair<unsigned int, Real> libMesh::ImplicitSystem::weighted_sensitivity_adjoint_solve ( const ParameterVector parameters,
const ParameterVector weights,
const QoISet qoi_indices = QoISet() 
)
overridevirtualinherited

Assembles & solves the linear system(s) (dR/du)^T*z_w = sum(w_p*(d^2q/dudp - d^2R/dudp*z)), for those parameters p contained within parameters, weighted by the values w_p found within weights.

Assumes that adjoint_solve has already calculated z for each qoi in qoi_indices.

Returns
A pair with the total number of linear iterations performed and the (sum of the) final residual norms

Reimplemented from libMesh::System.

◆ weighted_sensitivity_solve()

virtual std::pair<unsigned int, Real> libMesh::ImplicitSystem::weighted_sensitivity_solve ( const ParameterVector parameters,
const ParameterVector weights 
)
overridevirtualinherited

Assembles & solves the linear system(s) (dR/du)*u_w = sum(w_p*-dR/dp), for those parameters p contained within parameters weighted by the values w_p found within weights.

Returns
A pair with the total number of linear iterations performed and the (sum of the) final residual norms

Reimplemented from libMesh::System.

◆ write_header()

void libMesh::System::write_header ( Xdr io,
const std::string &  version,
const bool  write_additional_data 
) const
inherited

Writes the basic data header for this System.

◆ write_parallel_data()

void libMesh::System::write_parallel_data ( Xdr io,
const bool  write_additional_data 
) const
inherited

Writes additional data, namely vectors, for this System.

This method may safely be called on a distributed-memory mesh. This method will create an individual file for each processor in the simulation where the local solution components for that processor will be stored.

◆ write_parameter_data_to_files()

void libMesh::RBParametrized::write_parameter_data_to_files ( const std::string &  continuous_param_file_name,
const std::string &  discrete_param_file_name,
const bool  write_binary_data 
)
inherited

Write out the parameter ranges to files.

◆ write_riesz_representors_to_files()

virtual void libMesh::RBConstruction::write_riesz_representors_to_files ( const std::string &  riesz_representors_dir,
const bool  write_binary_residual_representors 
)
virtual

Write out all the Riesz representor data to files.

residual_representors_dir specifies which directory to write to. write_binary_residual_representors specifies whether we write binary or ASCII data.

Reimplemented in libMesh::TransientRBConstruction.

◆ write_serialized_data()

void libMesh::System::write_serialized_data ( Xdr io,
const bool  write_additional_data = true 
) const
inherited

Writes additional data, namely vectors, for this System.

This method may safely be called on a distributed-memory mesh.

◆ write_serialized_vectors()

std::size_t libMesh::System::write_serialized_vectors ( Xdr io,
const std::vector< const NumericVector< Number > *> &  vectors 
) const
inherited

Serialize & write a number of identically distributed vectors.

This method allows for optimization for the multiple vector case by only communicating the metadata once.

◆ zero_constrained_dofs_on_vector()

void libMesh::RBConstruction::zero_constrained_dofs_on_vector ( NumericVector< Number > &  vector)

It is sometimes useful to be able to zero vector entries that correspond to constrained dofs.

◆ zero_variable()

void libMesh::System::zero_variable ( NumericVector< Number > &  v,
unsigned int  var_num 
) const
inherited

Zeroes all dofs in v that correspond to variable number var_num.

Member Data Documentation

◆ _communicator

const Parallel::Communicator& libMesh::ParallelObject::_communicator
protectedinherited

◆ _counts [1/2]

Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

◆ _counts [2/2]

Counts libMesh::ReferenceCounter::_counts
staticprotectedinherited

◆ _enable_print_counter [1/2]

bool libMesh::ReferenceCounter::_enable_print_counter
staticprotectedinherited

Flag to control whether reference count information is printed when print_info is called.

Definition at line 141 of file reference_counter.h.

◆ _enable_print_counter [2/2]

bool libMesh::ReferenceCounter::_enable_print_counter
staticprotectedinherited

Flag to control whether reference count information is printed when print_info is called.

Definition at line 141 of file reference_counter.h.

◆ _final_linear_residual

Real libMesh::LinearImplicitSystem::_final_linear_residual
protectedinherited

The final residual for the linear system Ax=b.

Definition at line 198 of file linear_implicit_system.h.

Referenced by libMesh::LinearImplicitSystem::final_linear_residual().

◆ _mutex [1/2]

Threads::spin_mutex libMesh::ReferenceCounter::_mutex
staticprotectedinherited

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 135 of file reference_counter.h.

◆ _mutex [2/2]

Threads::spin_mutex libMesh::ReferenceCounter::_mutex
staticprotectedinherited

Mutual exclusion object to enable thread-safe reference counting.

Definition at line 135 of file reference_counter.h.

◆ _n_linear_iterations

unsigned int libMesh::LinearImplicitSystem::_n_linear_iterations
protectedinherited

The number of linear iterations required to solve the linear system Ax=b.

Definition at line 193 of file linear_implicit_system.h.

Referenced by libMesh::LinearImplicitSystem::n_linear_iterations().

◆ _n_objects [1/2]

Threads::atomic<unsigned int> libMesh::ReferenceCounter::_n_objects
staticprotectedinherited

The number of objects.

Print the reference count information when the number returns to 0.

Definition at line 130 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().

◆ _n_objects [2/2]

Threads::atomic<unsigned int> libMesh::ReferenceCounter::_n_objects
staticprotectedinherited

The number of objects.

Print the reference count information when the number returns to 0.

Definition at line 130 of file reference_counter.h.

Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().

◆ _shell_matrix

ShellMatrix<Number>* libMesh::LinearImplicitSystem::_shell_matrix
protectedinherited

User supplies shell matrix or nullptr if no shell matrix is used.

Definition at line 203 of file linear_implicit_system.h.

Referenced by libMesh::LinearImplicitSystem::get_shell_matrix().

◆ _subset

const SystemSubset* libMesh::LinearImplicitSystem::_subset
protectedinherited

The current subset on which to solve (or nullptr if none).

Definition at line 208 of file linear_implicit_system.h.

◆ _subset_solve_mode

SubsetSolveMode libMesh::LinearImplicitSystem::_subset_solve_mode
protectedinherited

If restrict-solve-to-subset mode is active, this member decides what happens with the dofs outside the subset.

Definition at line 214 of file linear_implicit_system.h.

◆ abs_training_tolerance

Real libMesh::RBConstruction::abs_training_tolerance
private

Definition at line 802 of file rb_construction.h.

Referenced by get_abs_training_tolerance(), and set_abs_training_tolerance().

◆ Aq_vector

std::vector<std::unique_ptr<SparseMatrix<Number> > > libMesh::RBConstruction::Aq_vector
private

Vector storing the Q_a matrices from the affine expansion.

Definition at line 773 of file rb_construction.h.

◆ assemble_before_solve

bool libMesh::System::assemble_before_solve
inherited

Flag which tells the system to whether or not to call the user assembly function during each call to solve().

By default, every call to solve() begins with a call to the user assemble, so this flag is true. (For explicit systems, "solving" the system occurs during the assembly step, so this flag is always true for explicit systems.)

You will only want to set this to false if you need direct control over when the system is assembled, and are willing to track the state of its assembly yourself. An example of such a case is an implicit system with multiple right hand sides. In this instance, a single assembly would likely be followed with multiple calls to solve.

The frequency system and Newmark system have their own versions of this flag, called _finished_assemble, which might be able to be replaced with this more general concept.

Definition at line 1470 of file system.h.

Referenced by libMesh::System::disable_cache().

◆ assert_convergence

bool libMesh::RBConstruction::assert_convergence
protected

A boolean flag to indicate whether to check for proper convergence after each solve.

Definition at line 746 of file rb_construction.h.

◆ compute_RB_inner_product

bool libMesh::RBConstruction::compute_RB_inner_product

Boolean flag to indicate whether we compute the RB_inner_product_matrix.

This is false by default in RBConstruction since (in the default implementation) the RB inner-product matrix will just be the identity. But we may need the inner-product matrix subclasses.

Definition at line 539 of file rb_construction.h.

◆ current_local_solution

std::unique_ptr<NumericVector<Number> > libMesh::System::current_local_solution
inherited

All the values I need to compute my contribution to the simulation at hand.

Think of this as the current solution with any ghost values needed from other processors. This vector is necessarily larger than the solution vector in the case of a parallel simulation. The update() member is used to synchronize the contents of the solution and current_local_solution vectors.

Definition at line 1528 of file system.h.

Referenced by FETest< order, family, elem_type >::testGradU(), FETest< order, family, elem_type >::testGradUComp(), and FETest< order, family, elem_type >::testU().

◆ delta_N

unsigned int libMesh::RBConstruction::delta_N
protected

The number of basis functions that we add at each greedy step.

This defaults to 1 in the steady case.

Definition at line 733 of file rb_construction.h.

Referenced by get_delta_N(), and libMesh::TransientRBConstruction::set_delta_N().

◆ exit_on_repeated_greedy_parameters

bool libMesh::RBConstruction::exit_on_repeated_greedy_parameters

Boolean flag to indicate whether we exit the greedy if we select the same parameters twice in a row.

In some problems this indicates that the greedy has "saturated" typically due to numerical rounding effects.

Definition at line 516 of file rb_construction.h.

◆ extra_linear_solver

LinearSolver<Number>* libMesh::RBConstruction::extra_linear_solver

Also, we store a pointer to an extra linear solver.

This can be useful if we want to pass in the linear solver from somewhere else. For example, if a solver is already primed elsewhere then it can be more efficient to use that solver.

Definition at line 465 of file rb_construction.h.

◆ extra_quadrature_order

int libMesh::System::extra_quadrature_order
inherited

A member int that can be employed to indicate increased or reduced quadrature order.

Note
For FEMSystem users, by default, when calling the user-defined residual functions, the FEMSystem will first set up an appropriate FEType::default_quadrature_rule() object for performing the integration. This rule will integrate elements of order up to 2*p+1 exactly (where p is the sum of the base FEType and local p refinement levels), but if additional (or reduced) quadrature accuracy is desired then this extra_quadrature_order (default 0) will be added.

Definition at line 1501 of file system.h.

◆ Fq_representor

std::vector<std::unique_ptr<NumericVector<Number> > > libMesh::RBConstruction::Fq_representor

Vector storing the residual representors associated with the right-hand side.

These are basis independent and hence stored here, whereas the Aq_representors are stored in RBEvaluation

Definition at line 490 of file rb_construction.h.

◆ Fq_representor_innerprods

std::vector<Number> libMesh::RBConstruction::Fq_representor_innerprods

Vectors storing the residual representor inner products to be used in computing the residuals online.

We store the Fq representor norms here because they are independent of a reduced basis space. The basis dependent representors are stored in RBEvaluation.

Definition at line 499 of file rb_construction.h.

◆ Fq_representor_innerprods_computed

bool libMesh::RBConstruction::Fq_representor_innerprods_computed

A boolean flag to indicate whether or not the Fq representor norms have already been computed — used to make sure that we don't recompute them unnecessarily.

Definition at line 560 of file rb_construction.h.

◆ Fq_vector

std::vector<std::unique_ptr<NumericVector<Number> > > libMesh::RBConstruction::Fq_vector
private

Vector storing the Q_f vectors in the affine decomposition of the right-hand side.

Definition at line 779 of file rb_construction.h.

◆ impose_internal_fluxes

bool libMesh::RBConstruction::impose_internal_fluxes

Boolean flag to indicate whether we impose "fluxes" (i.e.

element boundary contributions to the weak form) on internal element boundaries in the assembly routines.

Definition at line 523 of file rb_construction.h.

◆ inner_product_assembly

ElemAssembly* libMesh::RBConstruction::inner_product_assembly
private

Pointer to inner product assembly.

Definition at line 768 of file rb_construction.h.

◆ inner_product_matrix

std::unique_ptr<SparseMatrix<Number> > libMesh::RBConstruction::inner_product_matrix

The inner product matrix.

Definition at line 470 of file rb_construction.h.

◆ inner_product_solver

std::unique_ptr<LinearSolver<Number> > libMesh::RBConstruction::inner_product_solver

We store an extra linear solver object which we can optionally use for solving all systems in which the system matrix is set to inner_product_matrix.

Definition at line 457 of file rb_construction.h.

◆ inner_product_storage_vector

std::unique_ptr<NumericVector<Number> > libMesh::RBConstructionBase< LinearImplicitSystem >::inner_product_storage_vector
protectedinherited

We keep an extra temporary vector that is useful for performing inner products (avoids unnecessary memory allocation/deallocation).

Definition at line 254 of file rb_construction_base.h.

◆ linear_solver

std::unique_ptr<LinearSolver<Number> > libMesh::LinearImplicitSystem::linear_solver
inherited

The LinearSolver defines the interface used to solve the linear_implicit system.

This class handles all the details of interfacing with various linear algebra packages like PETSc or LASPACK.

Definition at line 152 of file linear_implicit_system.h.

◆ matrix

SparseMatrix<Number>* libMesh::ImplicitSystem::matrix
inherited

The system matrix.

Implicit systems are characterized by the need to solve the linear system Ax=b. This is the system matrix A.

Definition at line 357 of file implicit_system.h.

◆ Nmax

unsigned int libMesh::RBConstruction::Nmax
protected

Maximum number of reduced basis functions we are willing to use.

Definition at line 727 of file rb_construction.h.

Referenced by get_Nmax().

◆ non_dirichlet_Aq_vector

std::vector<std::unique_ptr<SparseMatrix<Number> > > libMesh::RBConstruction::non_dirichlet_Aq_vector
private

We may also need a second set of matrices/vectors that do not have the Dirichlet boundary conditions enforced.

Definition at line 792 of file rb_construction.h.

◆ non_dirichlet_Fq_vector

std::vector<std::unique_ptr<NumericVector<Number> > > libMesh::RBConstruction::non_dirichlet_Fq_vector
private

Definition at line 793 of file rb_construction.h.

◆ non_dirichlet_inner_product_matrix

std::unique_ptr<SparseMatrix<Number> > libMesh::RBConstruction::non_dirichlet_inner_product_matrix
private

Definition at line 795 of file rb_construction.h.

◆ non_dirichlet_outputs_vector

std::vector<std::vector<std::unique_ptr<NumericVector<Number> > > > libMesh::RBConstruction::non_dirichlet_outputs_vector
private

Definition at line 794 of file rb_construction.h.

◆ normalize_rb_bound_in_greedy

bool libMesh::RBConstruction::normalize_rb_bound_in_greedy
private

This boolean indicates if we normalize the RB error in the greedy using RBEvaluation::get_error_bound_normalization().

Definition at line 808 of file rb_construction.h.

Referenced by get_normalize_rb_bound_in_greedy(), and set_normalize_rb_bound_in_greedy().

◆ output_dual_innerprods

std::vector<std::vector<Number > > libMesh::RBConstruction::output_dual_innerprods

The vector storing the dual norm inner product terms for each output.

Definition at line 482 of file rb_construction.h.

◆ output_dual_innerprods_computed

bool libMesh::RBConstruction::output_dual_innerprods_computed
protected

A boolean flag to indicate whether or not the output dual norms have already been computed — used to make sure that we don't recompute them unnecessarily.

Definition at line 740 of file rb_construction.h.

◆ outputs_vector

std::vector<std::vector<std::unique_ptr<NumericVector<Number> > > > libMesh::RBConstruction::outputs_vector
private

The libMesh vectors that define the output functionals.

Each row corresponds to the affine expansion of an output.

Definition at line 785 of file rb_construction.h.

◆ qoi

std::vector<Number> libMesh::System::qoi
inherited

Values of the quantities of interest.

This vector needs to be both resized and filled by the user before any quantity of interest assembly is done and before any sensitivities are calculated.

Definition at line 1551 of file system.h.

Referenced by libMesh::DifferentiableSystem::attach_qoi(), and libMesh::System::n_qois().

◆ quiet_mode

bool libMesh::RBConstructionBase< LinearImplicitSystem >::quiet_mode
protectedinherited

Flag to indicate whether we print out extra information during the Offline stage.

Definition at line 239 of file rb_construction_base.h.

◆ rb_assembly_expansion

RBAssemblyExpansion* libMesh::RBConstruction::rb_assembly_expansion
private

This member holds the (parameter independent) assembly functors that define the "affine expansion" of the PDE that we are solving.

Definition at line 763 of file rb_construction.h.

◆ rb_eval

RBEvaluation* libMesh::RBConstruction::rb_eval
private

The current RBEvaluation object we are using to perform the Evaluation stage of the reduced basis method.

Definition at line 757 of file rb_construction.h.

◆ rel_training_tolerance

Real libMesh::RBConstruction::rel_training_tolerance
private

Relative and absolute tolerances for training reduced basis using the Greedy scheme.

Definition at line 801 of file rb_construction.h.

Referenced by get_rel_training_tolerance(), and set_rel_training_tolerance().

◆ rhs

NumericVector<Number>* libMesh::ExplicitSystem::rhs
inherited

The system matrix.

Implicit systems are characterized by the need to solve the linear system Ax=b. This is the right-hand-side vector b.

Definition at line 105 of file explicit_system.h.

◆ serial_training_set

bool libMesh::RBConstructionBase< LinearImplicitSystem >::serial_training_set
protectedinherited

This boolean flag indicates whether or not the training set should be the same on all processors.

By default it is false, but in the case of the Empirical Interpolation Method (RBEIMConstruction), for example, we need the training set to be identical on all processors.

Definition at line 247 of file rb_construction_base.h.

◆ skip_degenerate_sides

bool libMesh::RBConstruction::skip_degenerate_sides

In some cases meshes are intentionally created with degenerate sides as a way to represent, say, triangles using a hex-only mesh.

In this situation we should detect and skip any degenerate sides in order to prevent zero or negative element Jacobian errors.

Definition at line 531 of file rb_construction.h.

◆ skip_residual_in_train_reduced_basis

bool libMesh::RBConstruction::skip_residual_in_train_reduced_basis

Boolean flag to indicate if we skip residual calculations in train_reduced_basis.

This should only be used in special cases, e.g. when we know a priori that we want exactly one basis function and hence we do not need the residual based error indicator.

Definition at line 508 of file rb_construction.h.

◆ solution

std::unique_ptr<NumericVector<Number> > libMesh::System::solution
inherited

Data structure to hold solution values.

Definition at line 1516 of file system.h.

◆ store_non_dirichlet_operators

bool libMesh::RBConstruction::store_non_dirichlet_operators

Boolean flag to indicate whether we store a second copy of each affine operator and vector which does not have Dirichlet bcs enforced.

Definition at line 546 of file rb_construction.h.

◆ time

Real libMesh::System::time
inherited

For time-dependent problems, this is the time t at the beginning of the current timestep.

Note
For DifferentiableSystem users: do not access this time during an assembly! Use the DiffContext::time value instead to get correct results.

Definition at line 1538 of file system.h.

◆ training_error_bounds

std::vector<Real> libMesh::RBConstruction::training_error_bounds

Vector storing the values of the error bound for each parameter in the training set — the parameter giving the largest error bound is chosen for the next snapshot in the Greedy basis training.

Definition at line 450 of file rb_construction.h.

◆ truth_outputs

std::vector<Number > libMesh::RBConstruction::truth_outputs

Vector storing the truth output values from the most recent truth solve.

Definition at line 476 of file rb_construction.h.

◆ use_empty_rb_solve_in_greedy

bool libMesh::RBConstruction::use_empty_rb_solve_in_greedy

A boolean flag to indicate whether or not we initialize the Greedy algorithm by performing rb_solves on the training set with an "empty" (i.e.

N=0) reduced basis space.

Definition at line 553 of file rb_construction.h.

◆ use_fixed_solution

bool libMesh::System::use_fixed_solution
inherited

A boolean to be set to true by systems using elem_fixed_solution, for optional use by e.g.

stabilized methods. False by default.

Note
For FEMSystem users, if this variable is set to true, it must be before init_data() is called.

Definition at line 1486 of file system.h.

◆ verbose_mode

bool libMesh::RBParametrized::verbose_mode
inherited

Public boolean to toggle verbose mode.

Definition at line 170 of file rb_parametrized.h.

◆ zero_out_matrix_and_rhs

bool libMesh::ImplicitSystem::zero_out_matrix_and_rhs
inherited

By default, the system will zero out the matrix and the right hand side.

If this flag is false, it is the responsibility of the client code to take care of setting these to zero before assembly begins

Definition at line 364 of file implicit_system.h.


The documentation for this class was generated from the following file: