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... | |
RBConstructionBase (RBConstructionBase &&)=default | |
Special functions. More... | |
RBConstructionBase & | operator= (RBConstructionBase &&)=delete |
RBConstructionBase (const RBConstructionBase &)=delete | |
RBConstructionBase & | operator= (const RBConstructionBase &)=delete |
virtual | ~RBConstructionBase () |
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 number of global 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, const unsigned int n_global_training_samples, const std::map< std::string, bool > &log_param_scale, const bool deterministic=true) |
Initialize the parameter ranges and indicate whether deterministic or random training parameters should be used and whether or not we want the parameters to be scaled logarithmically. More... | |
virtual void | load_training_set (const std::map< std::string, std::vector< RBParameter >> &new_training_set) |
Overwrite the training parameters with new_training_set. More... | |
void | set_training_parameter_values (const std::string ¶m_name, const std::vector< RBParameter > &values) |
Overwrite the local training samples for param_name using values . More... | |
void | broadcast_parameters (const unsigned int proc_id) |
Broadcasts parameters from processor proc_id to all processors. More... | |
void | set_training_random_seed (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 | 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... | |
bool | set_parameters (const RBParameters ¶ms) |
Set the current parameters to params The parameters are checked for validity; an error is thrown if the number of parameters or samples is different than expected. 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 std::pair< std::size_t, std::size_t > | generate_training_parameters_random (const Parallel::Communicator &communicator, const std::map< std::string, bool > &log_param_scale, std::map< std::string, std::vector< RBParameter >> &local_training_parameters_in, const unsigned int n_global_training_samples_in, const RBParameters &min_parameters, const RBParameters &max_parameters, const int training_parameters_random_seed=-1, const bool serial_training_set=false) |
Static helper function for generating a randomized set of parameters. More... | |
static std::pair< std::size_t, std::size_t > | generate_training_parameters_deterministic (const Parallel::Communicator &communicator, const std::map< std::string, bool > &log_param_scale, std::map< std::string, std::vector< RBParameter >> &local_training_parameters_in, const unsigned int n_global_training_samples_in, const RBParameters &min_parameters, const RBParameters &max_parameters, const bool serial_training_set=false) |
Static helper function for generating a deterministic set of parameters. More... | |
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_stream=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 global_index) |
Return the RBParameters in index global_index of the global training set. More... | |
void | set_params_from_training_set (unsigned int global_index) |
Set parameters to the RBParameters stored in index global_index of the global training set. More... | |
virtual void | set_params_from_training_set_and_broadcast (unsigned int global_index) |
Load the specified training parameter and then broadcast to all processors. More... | |
void | increment_constructor_count (const std::string &name) noexcept |
Increments the construction counter. More... | |
void | increment_destructor_count (const std::string &name) noexcept |
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... | |
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 Attributes | |
bool | _training_parameters_initialized |
Boolean flag to indicate whether or not the parameter ranges have been initialized. More... | |
std::map< std::string, std::vector< RBParameter > > | _training_parameters |
The training samples for each parameter. More... | |
numeric_index_type | _first_local_index |
The first sample-vector index from the global vector which is stored in the _training_parameters on this processor. More... | |
numeric_index_type | _n_local_training_samples |
numeric_index_type | _n_global_training_samples |
int | _training_parameters_random_seed |
If < 0, use std::time() * processor_id() to seed the random number generator for the training parameters (default). 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 55 of file rb_construction_base.h.
|
protectedinherited |
Data structure to log the information.
The log is identified by the class name.
Definition at line 119 of file reference_counter.h.
typedef RBConstructionBase<Base> libMesh::RBConstructionBase< Base >::sys_type |
The type of system.
Definition at line 82 of file rb_construction_base.h.
libMesh::RBConstructionBase< Base >::RBConstructionBase | ( | EquationSystems & | es, |
const std::string & | name, | ||
const unsigned int | number | ||
) |
Constructor.
Definition at line 95 of file rb_construction_base.C.
|
default |
Special functions.
|
delete |
|
virtualdefault |
void libMesh::RBConstructionBase< Base >::broadcast_parameters | ( | const unsigned int | proc_id | ) |
Broadcasts parameters from processor proc_id to all processors.
This broadcasts the RBParameters object from .get_parameters(), and then sets it on all processors with .set_parameters().
Definition at line 712 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::RBEIMConstruction, libMesh::TransientSystem< RBConstruction >, libMesh::RBSCMConstruction, and libMesh::TransientRBConstruction.
Definition at line 113 of file rb_construction_base.C.
Referenced by libMesh::RBEIMConstruction::clear().
|
staticinherited |
Definition at line 100 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
Definition at line 94 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter.
|
static |
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. The parameter n_global_training_samples_in
is the total number of parameters to generate, and they will be split across all the processors (unless serial_training_set=true) in the local_training_parameters_in
map.
Definition at line 564 of file rb_construction_base.C.
|
static |
Static helper function for generating a randomized set of parameters.
The parameter n_global_training_samples_in
is the total number of parameters to generate, and they will be split across all the processors (unless serial_training_set=true) in the local_training_parameters_in
map.
Definition at line 464 of file rb_construction_base.C.
|
staticinherited |
value
from list_of_values
. Definition at line 443 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.
|
inherited |
Get a const reference to the discrete parameter values.
Definition at line 370 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::check_if_valid_params(), libMesh::RBParametrized::get_n_discrete_params(), libMesh::RBParametrized::initialize_parameters(), libMesh::RBParametrized::print_discrete_parameter_values(), 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 184 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 133 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 206 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 168 of file rb_construction_base.C.
|
inherited |
Get the number of continuous parameters.
Definition at line 112 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 121 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 103 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::RBParametrized::check_if_valid_params(), libMesh::RBEIMConstruction::compute_max_eim_error(), libMesh::RBConstruction::compute_max_error_bound(), libMesh::RBParametrized::get_n_continuous_params(), libMesh::RBSCMConstruction::print_info(), libMesh::RBEIMConstruction::print_info(), libMesh::RBConstruction::print_info(), libMesh::RBEIMEvaluation::set_eim_error_indicator_active(), and libMesh::RBConstruction::train_reduced_basis_with_POD().
numeric_index_type libMesh::RBConstructionBase< Base >::get_n_training_samples | ( | ) | const |
Get the number of global training samples.
Definition at line 146 of file rb_construction_base.C.
|
inherited |
Get maximum allowable value of parameter param_name
.
Definition at line 183 of file rb_parametrized.C.
References libMesh::RBParameters::get_value(), libMesh::RBParametrized::parameters_initialized, and libMesh::RBParametrized::parameters_max.
Referenced by libMesh::RBParametrized::check_if_valid_params(), libMesh::RBSCMConstruction::print_info(), libMesh::RBEIMConstruction::print_info(), and libMesh::RBConstruction::print_info().
|
inherited |
Get minimum allowable value of parameter param_name
.
Definition at line 176 of file rb_parametrized.C.
References libMesh::RBParameters::get_value(), libMesh::RBParametrized::parameters_initialized, and libMesh::RBParametrized::parameters_min.
Referenced by libMesh::RBParametrized::check_if_valid_params(), libMesh::RBSCMConstruction::print_info(), libMesh::RBEIMConstruction::print_info(), and libMesh::RBConstruction::print_info().
|
inherited |
Get a set that stores the parameter names.
Definition at line 129 of file rb_parametrized.C.
References libMesh::RBParametrized::parameters_initialized, and libMesh::RBParametrized::parameters_min.
|
inherited |
Get the current parameters.
Definition at line 155 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::RBEvaluation::compute_residual_dual_norm(), libMesh::RBSCMConstruction::compute_SCM_bounds_on_training_set(), libMesh::RBSCMConstruction::enrich_C_J(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_interiors(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_nodes(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_sides(), libMesh::RBEvaluation::eval_output_dual_norm(), 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::RBEIMConstruction::initialize_parametrized_functions_in_training_set(), libMesh::RBSCMEvaluation::legacy_read_offline_data_from_files(), libMesh::TransientRBConstruction::mass_matrix_scaled_matvec(), libMesh::RBConstruction::preevaluate_thetas(), libMesh::RBSCMConstruction::print_info(), libMesh::RBEIMConstruction::print_info(), libMesh::RBConstruction::print_info(), libMesh::RBParametrized::print_parameters(), libMesh::RBSCMConstruction::process_parameters_file(), libMesh::TransientRBEvaluation::rb_solve(), libMesh::RBEvaluation::rb_solve(), libMesh::RBSCMEvaluation::save_current_parameters(), libMesh::RBEIMConstruction::train_eim_approximation_with_greedy(), libMesh::RBEIMConstruction::train_eim_approximation_with_POD(), libMesh::TransientRBConstruction::truth_assembly(), libMesh::RBConstruction::truth_assembly(), libMesh::TransientRBConstruction::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 169 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::RBEIMConstruction::set_rb_construction_parameters(), 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 162 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::RBEIMConstruction::set_rb_construction_parameters(), libMesh::RBConstruction::set_rb_construction_parameters(), and libMesh::RBParametrized::write_parameter_ranges_to_file().
|
protected |
Return the RBParameters in index global_index
of the global training set.
Why do we use an index here? RBParameters supports loading the full sample set. This seems probably unnecessary now to load individually. Maybe it's a memory issue?
Definition at line 224 of file rb_construction_base.C.
|
inlineprotectednoexceptinherited |
Increments the construction counter.
Should be called in the constructor of any derived class that will be reference counted.
Definition at line 183 of file reference_counter.h.
References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), libMesh::Quality::name(), and libMesh::Threads::spin_mtx.
Referenced by libMesh::ReferenceCountedObject< RBParametrized >::ReferenceCountedObject().
|
inlineprotectednoexceptinherited |
Increments the destruction counter.
Should be called in the destructor of any derived class that will be reference counted.
Definition at line 207 of file reference_counter.h.
References libMesh::err, libMesh::BasicOStreamProxy< charT, traits >::get(), 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 SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, SimpleRBConstruction, ElasticityRBConstruction, SimpleEIMConstruction, and SimpleEIMConstruction.
Definition at line 122 of file rb_construction_base.C.
|
inherited |
Initialize the parameter ranges and set current_parameters.
Parameter ranges are inclusive. The input min/max RBParameters should have exactly 1 sample each. Vector-valued samples are not currently supported for the min/max parameters or for discrete parameters.
Definition at line 53 of file rb_parametrized.C.
References libMesh::RBParametrized::_discrete_parameter_values, libMesh::RBParameters::begin_serialized(), libMesh::RBParameters::end_serialized(), libMesh::RBParameters::n_parameters(), libMesh::RBParameters::n_samples(), libMesh::Quality::name(), 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::RBDataDeserialization::load_parameter_ranges(), libMesh::RBSCMConstruction::perform_SCM_greedy(), libMesh::RBSCMConstruction::process_parameters_file(), libMesh::RBParametrized::read_parameter_data_from_files(), libMesh::RBEIMConstruction::set_rb_construction_parameters(), libMesh::RBConstruction::set_rb_construction_parameters(), RBParametersTest::testRBParametrized(), libMesh::RBEIMConstruction::train_eim_approximation_with_greedy(), libMesh::RBEIMConstruction::train_eim_approximation_with_POD(), libMesh::RBConstruction::train_reduced_basis_with_greedy(), and libMesh::RBConstruction::train_reduced_basis_with_POD().
|
inherited |
Initialize the parameter ranges and set current_parameters.
Definition at line 96 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.
n_global_training_samples
is the total number of samples to generate, which will be distributed across all the processors.
Definition at line 285 of file rb_construction_base.C.
|
inherited |
Is parameter mu_name
discrete?
Definition at line 363 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::RBEIMConstruction::print_info(), libMesh::RBConstruction::print_info(), and libMesh::RBParametrized::write_parameter_ranges_to_file().
|
inline |
Is the system in quiet mode?
Definition at line 106 of file rb_construction_base.h.
|
virtual |
Overwrite the training parameters with new_training_set.
This training set is assumed to contain only the samples local to this processor.
Definition at line 371 of file rb_construction_base.C.
|
inlinestaticinherited |
Prints the number of outstanding (created, but not yet destroyed) objects.
Definition at line 85 of file reference_counter.h.
References libMesh::ReferenceCounter::_n_objects.
Referenced by libMesh::LibMeshInit::~LibMeshInit().
|
delete |
|
delete |
|
inherited |
Print out all the discrete parameter values.
Definition at line 377 of file rb_parametrized.C.
References libMesh::RBParametrized::get_discrete_parameter_values(), libMesh::Quality::name(), libMesh::out, and value.
Referenced by libMesh::RBSCMConstruction::print_info(), libMesh::RBEIMConstruction::print_info(), and libMesh::RBConstruction::print_info().
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
Definition at line 81 of file reference_counter.C.
References libMesh::ReferenceCounter::_enable_print_counter, and libMesh::ReferenceCounter::get_info().
Referenced by libMesh::LibMeshInit::~LibMeshInit().
|
inherited |
Print the current parameters.
Definition at line 190 of file rb_parametrized.C.
References libMesh::RBParametrized::get_parameters(), libMesh::RBParametrized::parameters_initialized, and libMesh::RBParameters::print().
Referenced by libMesh::RBEIMConstruction::train_eim_approximation_with_greedy(), and libMesh::RBConstruction::train_reduced_basis_with_greedy().
|
inherited |
Read in the parameter ranges from files.
Definition at line 274 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::RBSCMEvaluation::legacy_read_offline_data_from_files(), and libMesh::RBEvaluation::legacy_read_offline_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".
|
inherited |
Set the current parameters to params
The parameters are checked for validity; an error is thrown if the number of parameters or samples is different than expected.
We
Definition at line 141 of file rb_parametrized.C.
References libMesh::RBParametrized::check_if_valid_params(), libMesh::RBParametrized::parameters, and libMesh::RBParametrized::parameters_initialized.
Referenced by libMesh::RBSCMConstruction::compute_SCM_bounds_on_training_set(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_interiors(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_nodes(), libMesh::RBEIMConstruction::enrich_eim_approximation_on_sides(), 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 RBParametersTest::testRBParametrized().
|
protected |
Set parameters to the RBParameters stored in index global_index
of the global training set.
Definition at line 218 of file rb_construction_base.C.
|
protectedvirtual |
Load the specified training parameter and then broadcast to all processors.
Definition at line 263 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 100 of file rb_construction_base.h.
void libMesh::RBConstructionBase< Base >::set_training_parameter_values | ( | const std::string & | param_name, |
const std::vector< RBParameter > & | values | ||
) |
Overwrite the local training samples for param_name
using values
.
This assumes that values.size() matches get_local_n_training_samples().
Definition at line 448 of file rb_construction_base.C.
void libMesh::RBConstructionBase< Base >::set_training_random_seed | ( | int | seed | ) |
Set the seed that is used to randomly generate training parameters.
Definition at line 772 of file rb_construction_base.C.
|
inline |
Definition at line 87 of file rb_construction_base.h.
|
inherited |
Write out the parameter ranges to files.
Definition at line 197 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::RBSCMEvaluation::legacy_write_offline_data_to_files(), and libMesh::RBEvaluation::legacy_write_offline_data_to_files().
|
staticprotectedinherited |
Actually holds the data.
Definition at line 124 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::get_info().
|
staticprotectedinherited |
Flag to control whether reference count information is printed when print_info is called.
Definition at line 143 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info(), and libMesh::ReferenceCounter::print_info().
|
private |
The first sample-vector index from the global vector which is stored in the _training_parameters on this processor.
_n_local_training_samples is equivalent to the .size() of any vector in _training_parameters.
Definition at line 299 of file rb_construction_base.h.
|
staticprotectedinherited |
Mutual exclusion object to enable thread-safe reference counting.
Definition at line 137 of file reference_counter.h.
|
private |
Definition at line 301 of file rb_construction_base.h.
|
private |
Definition at line 300 of file rb_construction_base.h.
|
staticprotectedinherited |
The number of objects.
Print the reference count information when the number returns to 0.
Definition at line 132 of file reference_counter.h.
Referenced by libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter(), and libMesh::ReferenceCounter::~ReferenceCounter().
|
private |
The training samples for each parameter.
When serial_training_set is true, the map contains all samples of all parameters. Otherwise, the sample vectors will only contain the values for the local samples as defined by _first_local_index and _n_local_training_samples. Mapped from parameter_name -> sample_vector -> value_vector.
Definition at line 292 of file rb_construction_base.h.
|
private |
Boolean flag to indicate whether or not the parameter ranges have been initialized.
Definition at line 283 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 309 of file rb_construction_base.h.
|
protected |
We keep an extra temporary vector that is useful for performing inner products (avoids unnecessary memory allocation/deallocation).
Definition at line 274 of file rb_construction_base.h.
|
protected |
Flag to indicate whether we print out extra information during the Offline stage.
Definition at line 259 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 267 of file rb_construction_base.h.
|
inherited |
Public boolean to toggle verbose mode.
Definition at line 191 of file rb_parametrized.h.
Referenced by libMesh::RBParametrized::check_if_valid_params().