libMesh
|
This class is part of the rbOOmit framework. More...
#include <rb_construction_base.h>
Public Types | |
typedef RBConstructionBase< Base > | sys_type |
The type of system. More... | |
Public Member Functions | |
RBConstructionBase (EquationSystems &es, const std::string &name, const unsigned int number) | |
Constructor. More... | |
virtual | ~RBConstructionBase () |
Destructor. More... | |
sys_type & | system () |
virtual void | clear () |
Clear all the data structures associated with the system. 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... | |
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 RBParameters & | get_parameters () const |
Get the current parameters. More... | |
void | set_parameters (const RBParameters ¶ms) |
Set the current parameters to params . More... | |
const RBParameters & | get_parameters_min () const |
Get an RBParameters object that specifies the minimum allowable value for each parameter. More... | |
const RBParameters & | get_parameters_max () const |
Get an RBParameters object that specifies the maximum allowable value for each parameter. More... | |
Real | get_parameter_min (const std::string ¶m_name) const |
Get minimum allowable value of parameter param_name . More... | |
Real | get_parameter_max (const std::string ¶m_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 Real | get_closest_value (Real value, const std::vector< Real > &list_of_values) |
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 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 | disable_print_counter_info () |
Public Attributes | |
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... | |
Protected Member Functions | |
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... | |
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... | |
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 | |
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... | |
Static Protected Attributes | |
static Counts | _counts |
Actually holds the data. 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 bool | _enable_print_counter = true |
Flag to control whether reference count information is printed when print_info is called. More... | |
Private Member Functions | |
void | write_parameter_ranges_to_file (const std::string &file_name, const bool write_binary) |
Write out the parameter ranges to file. More... | |
void | write_discrete_parameter_values_to_file (const std::string &file_name, const bool write_binary_data) |
Write out the discrete parameter values to file. More... | |
void | read_parameter_ranges_from_file (const std::string &file_name, const bool read_binary, RBParameters ¶m_min, RBParameters ¶m_max) |
Read in the parameter ranges from file. More... | |
void | read_discrete_parameter_values_from_file (const std::string &file_name, const bool read_binary_data, std::map< std::string, std::vector< Real >> &discrete_parameter_values_in) |
Read in the discrete parameter values from file, if we have any. More... | |
bool | valid_params (const RBParameters ¶ms) |
Helper function to check that params is valid. More... | |
Static Private Member Functions | |
static bool | is_value_in_list (Real value, const std::vector< Real > &list_of_values, Real tol) |
Helper function to check if the specified value is in the list of values (within a tolerance given by tol ). More... | |
Private Attributes | |
bool | training_parameters_initialized |
Boolean flag to indicate whether or not the parameter ranges have been initialized. More... | |
std::map< std::string, std::unique_ptr< NumericVector< Number > > > | training_parameters |
The training samples. More... | |
int | training_parameters_random_seed |
If < 0, use std::time() * processor_id() to seed the random number generator for the training parameters (default). More... | |
bool | parameters_initialized |
Flag indicating whether the parameters have been initialized. More... | |
RBParameters | parameters |
Vector storing the current parameters. More... | |
RBParameters | parameters_min |
Vectors that define the ranges (min and max) for the parameters. More... | |
RBParameters | parameters_max |
std::map< std::string, std::vector< Real > > | _discrete_parameter_values |
Map that defines the allowable values of any discrete parameters. More... | |
This class is part of the rbOOmit framework.
This is the base class for the Construction stage of the certified reduced basis (RB) method. We template the Base class so that we can derive from the appropriate libMesh System type (e.g. LinearImplicitSystem for standard reduced basis, EigenSystem for SCM) at compile time.
Definition at line 54 of file rb_construction_base.h.
|
protectedinherited |
Data structure to log the information.
The log is identified by the class name.
Definition at line 117 of file reference_counter.h.
typedef RBConstructionBase<Base> libMesh::RBConstructionBase< Base >::sys_type |
The type of system.
Definition at line 74 of file rb_construction_base.h.
libMesh::RBConstructionBase< Base >::RBConstructionBase | ( | EquationSystems & | es, |
const std::string & | name, | ||
const unsigned int | number | ||
) |
Constructor.
Initializes required data structures.
Definition at line 46 of file rb_construction_base.C.
|
virtual |
void libMesh::RBConstructionBase< Base >::broadcast_parameters | ( | unsigned int | proc_id | ) |
Broadcasts parameters on processor proc_id to all processors.
Definition at line 600 of file rb_construction_base.C.
|
virtual |
Clear all the data structures associated with the system.
Reimplemented from libMesh::RBParametrized.
Reimplemented in libMesh::RBConstruction, libMesh::TransientSystem< RBConstruction >, libMesh::RBSCMConstruction, libMesh::RBEIMConstruction, and libMesh::TransientRBConstruction.
Definition at line 65 of file rb_construction_base.C.
|
staticinherited |
Definition at line 106 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
Referenced by libMesh::LibMeshInit::LibMeshInit().
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
|
staticprotected |
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.
Definition at line 412 of file rb_construction_base.C.
|
staticprotected |
Static helper function for generating a randomized set of parameters.
Definition at line 300 of file rb_construction_base.C.
|
staticinherited |
value
from list_of_values
. Definition at line 433 of file rb_parametrized.C.
References std::abs(), distance(), libMesh::Real, and value.
Referenced by libMesh::RBParametrized::is_value_in_list().
const std::string& libMesh::RBConstructionBase< Base >::get_deterministic_training_parameter_name | ( | ) | const |
Get the name of the parameter that we will generate deterministic training parameters for.
unsigned int libMesh::RBConstructionBase< Base >::get_deterministic_training_parameter_repeats | ( | ) | const |
Get the number of times each sample of the deterministic training parameter is repeated.
|
inherited |
Get a const reference to the discrete parameter values.
Definition at line 381 of file rb_parametrized.C.
References libMesh::RBParametrized::_discrete_parameter_values, and libMesh::RBParametrized::parameters_initialized.
Referenced by libMesh::RBDataSerialization::add_parameter_ranges_to_builder(), libMesh::RBParametrized::get_n_discrete_params(), libMesh::RBParametrized::initialize_parameters(), libMesh::RBParametrized::print_discrete_parameter_values(), libMesh::RBParametrized::valid_params(), and libMesh::RBParametrized::write_discrete_parameter_values_to_file().
numeric_index_type libMesh::RBConstructionBase< Base >::get_first_local_training_index | ( | ) | const |
Get the first local index of the training parameters.
Definition at line 116 of file rb_construction_base.C.
|
staticprotected |
Static function to return the error pair (index,error) that is corresponds to the largest error on all processors.
Definition at line 85 of file rb_construction_base.C.
|
staticinherited |
Gets a string containing the reference information.
Definition at line 47 of file reference_counter.C.
References libMesh::ReferenceCounter::_counts, and libMesh::Quality::name().
Referenced by libMesh::ReferenceCounter::print_info().
numeric_index_type libMesh::RBConstructionBase< Base >::get_last_local_training_index | ( | ) | const |
Get the last local index of the training parameters.
Definition at line 123 of file rb_construction_base.C.
numeric_index_type libMesh::RBConstructionBase< Base >::get_local_n_training_samples | ( | ) | const |
Get the total number of training samples local to this processor.
Definition at line 109 of file rb_construction_base.C.
|
inherited |
Get the number of continuous parameters.
Definition at line 125 of file rb_parametrized.C.
References libMesh::RBParametrized::get_n_discrete_params(), libMesh::RBParametrized::get_n_params(), libMesh::libmesh_assert(), and libMesh::RBParametrized::parameters_initialized.
Referenced by libMesh::RBDataSerialization::add_parameter_ranges_to_builder(), and libMesh::RBParametrized::write_parameter_ranges_to_file().
|
inherited |
Get the number of discrete parameters.
Definition at line 135 of file rb_parametrized.C.
References libMesh::RBParametrized::get_discrete_parameter_values(), and libMesh::RBParametrized::parameters_initialized.
Referenced by libMesh::RBDataSerialization::add_parameter_ranges_to_builder(), libMesh::RBParametrized::get_n_continuous_params(), and libMesh::RBParametrized::write_discrete_parameter_values_to_file().
|
inherited |
Get the number of parameters.
Definition at line 115 of file rb_parametrized.C.
References libMesh::RBParameters::n_parameters(), libMesh::RBParametrized::parameters_initialized, libMesh::RBParametrized::parameters_max, and libMesh::RBParametrized::parameters_min.
Referenced by libMesh::RBConstruction::compute_max_error_bound(), libMesh::RBEIMTheta::evaluate(), libMesh::RBParametrized::get_n_continuous_params(), libMesh::RBSCMConstruction::print_info(), libMesh::RBConstruction::print_info(), and libMesh::RBParametrized::valid_params().
numeric_index_type libMesh::RBConstructionBase< Base >::get_n_training_samples | ( | ) | const |
|
inherited |
Get maximum allowable value of parameter param_name
.
Definition at line 198 of file rb_parametrized.C.
References libMesh::RBParameters::get_value(), libMesh::RBParametrized::parameters_initialized, and libMesh::RBParametrized::parameters_max.
Referenced by libMesh::RBSCMConstruction::print_info(), libMesh::RBConstruction::print_info(), and libMesh::RBParametrized::valid_params().
|
inherited |
Get minimum allowable value of parameter param_name
.
Definition at line 190 of file rb_parametrized.C.
References libMesh::RBParameters::get_value(), libMesh::RBParametrized::parameters_initialized, and libMesh::RBParametrized::parameters_min.
Referenced by libMesh::RBSCMConstruction::print_info(), libMesh::RBConstruction::print_info(), and libMesh::RBParametrized::valid_params().
|
inherited |
Get a set that stores the parameter names.
Definition at line 144 of file rb_parametrized.C.
References libMesh::RBParameters::get_parameter_names(), libMesh::RBParametrized::parameters_initialized, and libMesh::RBParametrized::parameters_min.
Referenced by libMesh::RBDataSerialization::add_parameter_ranges_to_builder().
|
inherited |
Get the current parameters.
Definition at line 166 of file rb_parametrized.C.
References libMesh::RBParametrized::parameters, and libMesh::RBParametrized::parameters_initialized.
Referenced by libMesh::TransientRBConstruction::add_scaled_mass_matrix(), libMesh::TransientRBEvaluation::cache_online_residual_terms(), libMesh::RBEIMConstruction::compute_best_fit_error(), libMesh::RBEvaluation::compute_residual_dual_norm(), libMesh::RBSCMConstruction::compute_SCM_bounds_on_training_set(), libMesh::RBSCMConstruction::enrich_C_J(), libMesh::RBEIMConstruction::enrich_RB_space(), libMesh::RBEIMTheta::evaluate(), libMesh::RBEIMEvaluation::evaluate_parametrized_function(), libMesh::RBSCMConstruction::evaluate_stability_constant(), libMesh::RBConstruction::get_RB_error_bound(), libMesh::RBSCMEvaluation::get_SCM_LB(), libMesh::RBSCMEvaluation::get_SCM_UB(), SimpleRBEvaluation::get_stability_lower_bound(), libMesh::RBConstruction::greedy_termination_test(), libMesh::RBSCMEvaluation::legacy_read_offline_data_from_files(), libMesh::TransientRBConstruction::mass_matrix_scaled_matvec(), libMesh::RBSCMConstruction::print_info(), libMesh::RBConstruction::print_info(), libMesh::RBParametrized::print_parameters(), libMesh::RBSCMConstruction::process_parameters_file(), libMesh::TransientRBEvaluation::rb_solve(), libMesh::RBEvaluation::rb_solve(), libMesh::RBEIMEvaluation::rb_solve(), libMesh::RBSCMEvaluation::save_current_parameters(), libMesh::TransientRBConstruction::truth_assembly(), libMesh::RBConstruction::truth_assembly(), libMesh::TransientRBConstruction::truth_solve(), libMesh::RBEIMConstruction::truth_solve(), libMesh::RBConstruction::truth_solve(), libMesh::TransientRBEvaluation::uncached_compute_residual_dual_norm(), and libMesh::RBConstruction::update_greedy_param_list().
|
inherited |
Get an RBParameters object that specifies the maximum allowable value for each parameter.
Definition at line 182 of file rb_parametrized.C.
References libMesh::RBParametrized::parameters_initialized, and libMesh::RBParametrized::parameters_max.
Referenced by libMesh::RBDataSerialization::add_parameter_ranges_to_builder(), libMesh::RBParametrized::initialize_parameters(), libMesh::RBSCMConstruction::process_parameters_file(), libMesh::RBConstruction::set_rb_construction_parameters(), and libMesh::RBParametrized::write_parameter_ranges_to_file().
|
inherited |
Get an RBParameters object that specifies the minimum allowable value for each parameter.
Definition at line 174 of file rb_parametrized.C.
References libMesh::RBParametrized::parameters_initialized, and libMesh::RBParametrized::parameters_min.
Referenced by libMesh::RBDataSerialization::add_parameter_ranges_to_builder(), libMesh::RBParametrized::initialize_parameters(), libMesh::RBSCMConstruction::process_parameters_file(), libMesh::RBConstruction::set_rb_construction_parameters(), and libMesh::RBParametrized::write_parameter_ranges_to_file().
|
protected |
Return the RBParameters in index index
of training set.
Definition at line 136 of file rb_construction_base.C.
|
inlineprotectedinherited |
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().
|
inlineprotectedinherited |
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().
|
protectedvirtual |
Initializes the member data fields associated with the system, so that, e.g., assemble()
may be used.
Reimplemented in libMesh::RBEIMConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, and ElasticityRBConstruction.
Definition at line 74 of file rb_construction_base.C.
|
inherited |
Initialize the parameter ranges and set current_parameters.
Definition at line 60 of file rb_parametrized.C.
References libMesh::RBParametrized::_discrete_parameter_values, libMesh::RBParameters::get_value(), libMesh::RBParameters::n_parameters(), libMesh::RBParametrized::parameters_initialized, libMesh::RBParametrized::parameters_max, libMesh::RBParametrized::parameters_min, libMesh::Real, libMesh::RBParametrized::set_parameters(), and libMesh::RBParameters::set_value().
Referenced by libMesh::RBConstruction::enrich_basis_from_rhs_terms(), libMesh::RBParametrized::initialize_parameters(), libMesh::RBEIMConstruction::initialize_parametrized_functions_in_training_set(), libMesh::RBDataDeserialization::load_parameter_ranges(), libMesh::RBSCMConstruction::perform_SCM_greedy(), libMesh::RBSCMConstruction::process_parameters_file(), libMesh::RBParametrized::read_parameter_data_from_files(), libMesh::RBConstruction::set_rb_construction_parameters(), and libMesh::RBConstruction::train_reduced_basis().
|
inherited |
Initialize the parameter ranges and set current_parameters.
Definition at line 108 of file rb_parametrized.C.
References libMesh::RBParametrized::get_discrete_parameter_values(), libMesh::RBParametrized::get_parameters_max(), libMesh::RBParametrized::get_parameters_min(), and libMesh::RBParametrized::initialize_parameters().
|
virtual |
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.
Definition at line 181 of file rb_construction_base.C.
|
inherited |
Is parameter mu_name
discrete?
Definition at line 373 of file rb_parametrized.C.
References libMesh::RBParametrized::_discrete_parameter_values, and libMesh::RBParametrized::parameters_initialized.
Referenced by libMesh::RBDataSerialization::add_parameter_ranges_to_builder(), libMesh::RBConstruction::print_info(), libMesh::RBParametrized::valid_params(), and libMesh::RBParametrized::write_parameter_ranges_to_file().
|
inline |
|
staticprivateinherited |
Helper function to check if the specified value is in the list of values (within a tolerance given by tol
).
Definition at line 453 of file rb_parametrized.C.
References std::abs(), libMesh::RBParametrized::get_closest_value(), libMesh::Real, and value.
Referenced by libMesh::RBParametrized::valid_params().
|
virtual |
Overwrite the training parameters with new_training_set.
Definition at line 257 of file rb_construction_base.C.
|
inlinestaticinherited |
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.
|
inherited |
Print out all the discrete parameter values.
Definition at line 389 of file rb_parametrized.C.
References libMesh::RBParametrized::get_discrete_parameter_values(), libMesh::out, and value.
Referenced by libMesh::RBSCMConstruction::print_info(), and libMesh::RBConstruction::print_info().
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
Definition at line 87 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
|
inherited |
Print the current parameters.
Definition at line 206 of file rb_parametrized.C.
References libMesh::RBParametrized::get_parameters(), libMesh::RBParametrized::parameters_initialized, and libMesh::RBParameters::print().
Referenced by libMesh::RBConstruction::train_reduced_basis().
|
privateinherited |
Read in the discrete parameter values from file, if we have any.
Definition at line 340 of file rb_parametrized.C.
References libMesh::DECODE, and libMesh::READ.
Referenced by libMesh::RBParametrized::read_parameter_data_from_files().
|
inherited |
Read in the parameter ranges from files.
Definition at line 284 of file rb_parametrized.C.
References libMesh::RBParametrized::initialize_parameters(), libMesh::RBParametrized::read_discrete_parameter_values_from_file(), and libMesh::RBParametrized::read_parameter_ranges_from_file().
Referenced by libMesh::RBEvaluation::legacy_read_offline_data_from_files(), and libMesh::RBSCMEvaluation::legacy_read_offline_data_from_files().
|
privateinherited |
Read in the parameter ranges from file.
Initialize parameters to the "minimum" parameter values.
Definition at line 303 of file rb_parametrized.C.
References libMesh::Xdr::close(), libMesh::DECODE, libMesh::READ, libMesh::Real, and libMesh::RBParameters::set_value().
Referenced by libMesh::RBParametrized::read_parameter_data_from_files().
void libMesh::RBConstructionBase< Base >::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.
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".
void libMesh::RBConstructionBase< Base >::set_deterministic_training_parameter_repeats | ( | unsigned int | repeats | ) |
Set the number of times each sample of the deterministic training parameter is repeated.
|
inherited |
Set the current parameters to params
.
Definition at line 155 of file rb_parametrized.C.
References libMesh::RBParametrized::parameters, libMesh::RBParametrized::parameters_initialized, and libMesh::RBParametrized::valid_params().
Referenced by libMesh::RBEIMConstruction::compute_best_fit_error(), libMesh::RBSCMConstruction::compute_SCM_bounds_on_training_set(), libMesh::RBEIMConstruction::enrich_RB_space(), libMesh::RBEIMTheta::evaluate(), libMesh::RBConstruction::get_RB_error_bound(), SimpleRBEvaluation::get_stability_lower_bound(), libMesh::RBParametrized::initialize_parameters(), libMesh::RBSCMEvaluation::reload_current_parameters(), libMesh::RBSCMEvaluation::set_current_parameters_from_C_J(), and libMesh::RBEIMConstruction::truth_solve().
|
protected |
Set parameters to the RBParameters stored in index index
of the training set.
Definition at line 130 of file rb_construction_base.C.
|
protectedvirtual |
Load the specified training parameter and then broadcast to all processors.
Definition at line 160 of file rb_construction_base.C.
|
inline |
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.
void libMesh::RBConstructionBase< Base >::set_training_random_seed | ( | unsigned int | seed | ) |
Set the seed that is used to randomly generate training parameters.
Definition at line 630 of file rb_construction_base.C.
|
inline |
Definition at line 79 of file rb_construction_base.h.
|
privateinherited |
Helper function to check that params
is valid.
Definition at line 402 of file rb_parametrized.C.
References libMesh::RBParametrized::get_discrete_parameter_values(), libMesh::RBParametrized::get_n_params(), libMesh::RBParametrized::get_parameter_max(), libMesh::RBParametrized::get_parameter_min(), libMesh::RBParametrized::is_discrete_parameter(), libMesh::RBParametrized::is_value_in_list(), libMesh::RBParameters::n_parameters(), libMesh::out, libMesh::TOLERANCE, libMesh::Quality::valid(), and libMesh::RBParametrized::verbose_mode.
Referenced by libMesh::RBParametrized::set_parameters().
|
privateinherited |
Write out the discrete parameter values to file.
Definition at line 255 of file rb_parametrized.C.
References libMesh::ENCODE, libMesh::RBParametrized::get_discrete_parameter_values(), libMesh::RBParametrized::get_n_discrete_params(), libMesh::Real, and libMesh::WRITE.
Referenced by libMesh::RBParametrized::write_parameter_data_to_files().
|
inherited |
Write out the parameter ranges to files.
Definition at line 214 of file rb_parametrized.C.
References libMesh::RBParametrized::write_discrete_parameter_values_to_file(), and libMesh::RBParametrized::write_parameter_ranges_to_file().
Referenced by libMesh::RBEvaluation::legacy_write_offline_data_to_files(), and libMesh::RBSCMEvaluation::legacy_write_offline_data_to_files().
|
privateinherited |
Write out the parameter ranges to file.
Definition at line 222 of file rb_parametrized.C.
References libMesh::Xdr::close(), libMesh::ENCODE, libMesh::RBParametrized::get_n_continuous_params(), libMesh::RBParametrized::get_parameters_max(), libMesh::RBParametrized::get_parameters_min(), libMesh::RBParametrized::is_discrete_parameter(), libMesh::Real, and libMesh::WRITE.
Referenced by libMesh::RBParametrized::write_parameter_data_to_files().
|
staticprotectedinherited |
Actually holds the data.
Definition at line 122 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info(), libMesh::ReferenceCounter::increment_constructor_count(), and libMesh::ReferenceCounter::increment_destructor_count().
|
privateinherited |
Map that defines the allowable values of any discrete parameters.
Definition at line 235 of file rb_parametrized.h.
Referenced by libMesh::RBParametrized::get_discrete_parameter_values(), libMesh::RBParametrized::initialize_parameters(), and libMesh::RBParametrized::is_discrete_parameter().
|
staticprotectedinherited |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 141 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
|
staticprotectedinherited |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 135 of file reference_counter.h.
|
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().
|
protected |
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.
|
privateinherited |
Vector storing the current parameters.
Definition at line 224 of file rb_parametrized.h.
Referenced by libMesh::RBParametrized::clear(), libMesh::RBParametrized::get_parameters(), libMesh::RBParametrized::RBParametrized(), and libMesh::RBParametrized::set_parameters().
|
privateinherited |
Flag indicating whether the parameters have been initialized.
Definition at line 219 of file rb_parametrized.h.
Referenced by libMesh::RBParametrized::clear(), libMesh::RBParametrized::get_discrete_parameter_values(), libMesh::RBParametrized::get_n_continuous_params(), libMesh::RBParametrized::get_n_discrete_params(), libMesh::RBParametrized::get_n_params(), libMesh::RBParametrized::get_parameter_max(), libMesh::RBParametrized::get_parameter_min(), libMesh::RBParametrized::get_parameter_names(), libMesh::RBParametrized::get_parameters(), libMesh::RBParametrized::get_parameters_max(), libMesh::RBParametrized::get_parameters_min(), libMesh::RBParametrized::initialize_parameters(), libMesh::RBParametrized::is_discrete_parameter(), libMesh::RBParametrized::print_parameters(), and libMesh::RBParametrized::set_parameters().
|
privateinherited |
Definition at line 230 of file rb_parametrized.h.
Referenced by libMesh::RBParametrized::clear(), libMesh::RBParametrized::get_n_params(), libMesh::RBParametrized::get_parameter_max(), libMesh::RBParametrized::get_parameters_max(), libMesh::RBParametrized::initialize_parameters(), and libMesh::RBParametrized::RBParametrized().
|
privateinherited |
Vectors that define the ranges (min and max) for the parameters.
Definition at line 229 of file rb_parametrized.h.
Referenced by libMesh::RBParametrized::clear(), libMesh::RBParametrized::get_n_params(), libMesh::RBParametrized::get_parameter_min(), libMesh::RBParametrized::get_parameter_names(), libMesh::RBParametrized::get_parameters_min(), libMesh::RBParametrized::initialize_parameters(), and libMesh::RBParametrized::RBParametrized().
|
protected |
Flag to indicate whether we print out extra information during the Offline stage.
Definition at line 239 of file rb_construction_base.h.
Referenced by libMesh::RBConstructionBase< CondensedEigenSystem >::is_quiet(), and libMesh::RBConstructionBase< CondensedEigenSystem >::set_quiet_mode().
|
protected |
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.
|
private |
The training samples.
Definition at line 268 of file rb_construction_base.h.
|
private |
Boolean flag to indicate whether or not the parameter ranges have been initialized.
Definition at line 263 of file rb_construction_base.h.
|
private |
If < 0, use std::time() * processor_id() to seed the random number generator for the training parameters (default).
If >= 0, use the provided value * processor_id() as the random number generator seed.
Definition at line 276 of file rb_construction_base.h.
|
inherited |
Public boolean to toggle verbose mode.
Definition at line 170 of file rb_parametrized.h.
Referenced by libMesh::RBParametrized::valid_params().