libMesh
|
This class is part of the rbOOmit framework. More...
#include <rb_parameters.h>
Classes | |
class | const_iterator |
Define a constant iterator for iterating over the map of parameters. More... | |
Public Member Functions | |
RBParameters () | |
Constructor. More... | |
RBParameters (RBParameters &&)=default | |
The special functions can be defaulted for this class, as it does not manage any memory itself. More... | |
RBParameters (const RBParameters &)=default | |
RBParameters & | operator= (const RBParameters &)=default |
RBParameters & | operator= (RBParameters &&)=default |
~RBParameters ()=default | |
RBParameters (const std::map< std::string, Real > ¶meter_map) | |
Constructor. More... | |
std::map< std::string, std::vector< RBParameter > >::const_iterator | begin () const |
Return const_iterators to the internal parameter map, as a convenient way to access the parameter names and values. More... | |
std::map< std::string, std::vector< RBParameter > >::const_iterator | end () const |
std::map< std::string, std::vector< RBParameter > >::const_iterator | extra_begin () const |
std::map< std::string, std::vector< RBParameter > >::const_iterator | extra_end () const |
const_iterator | begin_serialized () const |
Get const_iterator access to the parameters stored in this RBParameters object. More... | |
const_iterator | end_serialized () const |
const_iterator | begin_serialized_extra () const |
Get const_iterator access to the extra parameters stored in this RBParameters object. More... | |
const_iterator | end_serialized_extra () const |
void | clear () |
Clear this object. More... | |
bool | has_value (const std::string ¶m_name) const |
bool | has_extra_value (const std::string ¶m_name) const |
Real | get_value (const std::string ¶m_name) const |
Get the value of the specified parameter, throw an error if it does not exist. More... | |
const RBParameter & | get_vector_value (const std::string ¶m_name) const |
Real | get_value (const std::string ¶m_name, const Real &default_val) const |
Get the value of the specified parameter, returning the provided default value if it does not exist. More... | |
const RBParameter & | get_vector_value (const std::string ¶m_name, const RBParameter &default_val) const |
Real | get_sample_value (const std::string ¶m_name, std::size_t sample_idx) const |
Get the value of the specified parameter at the specified sample, throwing an error if it does not exist. More... | |
const RBParameter & | get_sample_vector_value (const std::string ¶m_name, std::size_t sample_idx) const |
Real | get_sample_value (const std::string ¶m_name, std::size_t sample_idx, const Real &default_val) const |
Get the value of the specified parameter at the specified sample, returning the provided default value if either the parameter is not defined or the sample is invalid. More... | |
const RBParameter & | get_sample_vector_value (const std::string ¶m_name, std::size_t sample_idx, const RBParameter &default_val) const |
void | set_value (const std::string ¶m_name, Real value) |
Set the value of the specified parameter. More... | |
void | set_value (const std::string ¶m_name, const RBParameter &value) |
void | set_value (const std::string ¶m_name, std::size_t index, Real value) |
Set the value of the specified parameter at the specified sample index. More... | |
void | set_value (const std::string ¶m_name, std::size_t index, const RBParameter &value) |
void | push_back_value (const std::string ¶m_name, Real value) |
Similar to set_value(name, index, value) but instead of specifying a particular index, just appends one more. More... | |
void | push_back_value (const std::string ¶m_name, const RBParameter &value) |
void | push_back_extra_value (const std::string ¶m_name, Real value) |
Same as push_back_value(), but for "extra" parameters. More... | |
void | push_back_extra_value (const std::string ¶m_name, const RBParameter &value) |
Real | get_extra_value (const std::string ¶m_name) const |
Get the value of the specified extra parameter, throwing an error if it does not exist. More... | |
const RBParameter & | get_extra_vector_value (const std::string ¶m_name) const |
Real | get_extra_value (const std::string ¶m_name, const Real &default_val) const |
Get the value of the specified extra parameter, returning the provided default value if it does not exist. More... | |
const RBParameter & | get_extra_vector_value (const std::string ¶m_name, const RBParameter &default_val) const |
Real | get_extra_sample_value (const std::string ¶m_name, std::size_t sample_idx) const |
Get the value of the specified "extra" parameter at the specified sample index, throwing an error if it does not exist. More... | |
const RBParameter & | get_extra_sample_vector_value (const std::string ¶m_name, std::size_t sample_idx) const |
Real | get_extra_sample_value (const std::string ¶m_name, std::size_t sample_idx, const Real &default_val) const |
Get the value of the specified extra parameter at the specified sample index, returning the provided default value if either the parameter is not defined or the sample index is invalid. More... | |
const RBParameter & | get_extra_sample_vector_value (const std::string ¶m_name, std::size_t sample_idx, const RBParameter &default_val) const |
void | set_extra_value (const std::string ¶m_name, Real value) |
Set the value of the specified extra parameter. More... | |
void | set_extra_value (const std::string ¶m_name, const RBParameter &value) |
void | set_extra_value (const std::string ¶m_name, std::size_t index, Real value) |
Set the value of the specified extra parameter at the specified sample index. More... | |
void | set_extra_value (const std::string ¶m_name, std::size_t index, const RBParameter &value) |
unsigned int | n_parameters () const |
Get the number of parameters that have been added. More... | |
void | set_n_samples (unsigned int n_samples) |
Set the number of samples this RBParameters object is intended to represent, in the case that there are no actual parameters stored on it. More... | |
unsigned int | n_samples () const |
Returns the number of samples stored for all parameters. More... | |
std::set< std::string > | get_parameter_names () const |
std::set< std::string > | get_extra_parameter_names () const |
void | erase_parameter (const std::string ¶m_name) |
Erase param_name from _parameters. More... | |
void | erase_extra_parameter (const std::string ¶m_name) |
Erase param_name from _extra_parameters. More... | |
bool | operator== (const RBParameters &rhs) const |
Two RBParameters are equal if they have the same _parameters map. More... | |
bool | operator!= (const RBParameters &rhs) const |
RBParameters & | operator+= (const RBParameters &rhs) |
Append "rhs" to "*this". More... | |
std::string | get_string (unsigned precision=6, int max_values=5) const |
Get a string that specifies the contents of this RBParameters object. More... | |
void | print (unsigned precision=6, int max_values=5) const |
Print the parameters. More... | |
Private Member Functions | |
void | set_value_helper (std::map< std::string, std::vector< RBParameter >> &map, const std::string ¶m_name, const std::size_t index, RBParameter value) |
Helper function for the 3-parameter versions of set_value() and set_extra_value(). More... | |
Private Attributes | |
unsigned int | _n_samples |
The number of samples represented by this RBParameters object, in the case where there are no parameters actually stored on it. More... | |
std::map< std::string, std::vector< RBParameter > > | _parameters |
Actual parameter values (in std::vector<RBParameter> form) across a vector of samples. More... | |
std::map< std::string, std::vector< RBParameter > > | _extra_parameters |
Extra parameter vectors not used for RB training. More... | |
This class is part of the rbOOmit framework.
This class defines a set of parameters indexed by strings. Multiple samples can be defined, where a sample is a set of values for each parameter. The parameters themselves can be multi-valued, e.g. for storing a matrix-type parameter.
Definition at line 52 of file rb_parameters.h.
libMesh::RBParameters::RBParameters | ( | ) |
Constructor.
Initializes the _n_samples parameter to 1 for backwards compatibility, but the set_n_samples() function can always be called later to update this value.
Definition at line 33 of file rb_parameters.C.
|
default |
The special functions can be defaulted for this class, as it does not manage any memory itself.
|
default |
|
default |
libMesh::RBParameters::RBParameters | ( | const std::map< std::string, Real > & | parameter_map | ) |
Constructor.
Set parameters based on the std::map parameter_map
.
It sets the values as the 0th entry of the sample-vector corresponding to each parameter name.
Definition at line 38 of file rb_parameters.C.
References _parameters.
std::map< std::string, std::vector< RBParameter > >::const_iterator libMesh::RBParameters::begin | ( | ) | const |
Return const_iterators to the internal parameter map, as a convenient way to access the parameter names and values.
For example: for (const auto & [param_name, sample_vec] : my_parameters)
Definition at line 366 of file rb_parameters.C.
References _parameters.
RBParameters::const_iterator libMesh::RBParameters::begin_serialized | ( | ) | const |
Get const_iterator access to the parameters stored in this RBParameters object.
This gives serialized access to all the individual Real values in the nested vector<vector<Real>>. Use this in a for loop with the following syntax, for example: for (const auto &[key,val] : as_range(rb_parameters.begin_serialized(), rb_parameters.end_serialized())
Definition at line 386 of file rb_parameters.C.
References _parameters.
Referenced by libMesh::RBParametrized::initialize_parameters(), RBParametersTest::testIterators(), and RBParametersTest::testIteratorsWithSamples().
RBParameters::const_iterator libMesh::RBParameters::begin_serialized_extra | ( | ) | const |
Get const_iterator access to the extra parameters stored in this RBParameters object.
This gives serialized access to all the individual Real values in the nested vector<vector<Real>>. Use this in a for loop with the following syntax, for example: for (const auto &[key,val] : as_range(rb_parameters.begin_serialized_extra(), rb_parameters.end_serialized_extra())
Definition at line 398 of file rb_parameters.C.
References _extra_parameters.
void libMesh::RBParameters::clear | ( | ) |
Clear this object.
Definition at line 48 of file rb_parameters.C.
References _extra_parameters, _n_samples, and _parameters.
Referenced by libMesh::RBParametrized::clear().
std::map< std::string, std::vector< RBParameter > >::const_iterator libMesh::RBParameters::end | ( | ) | const |
Definition at line 371 of file rb_parameters.C.
References _parameters.
RBParameters::const_iterator libMesh::RBParameters::end_serialized | ( | ) | const |
Definition at line 391 of file rb_parameters.C.
References _parameters.
Referenced by libMesh::RBParametrized::initialize_parameters(), RBParametersTest::testIterators(), and RBParametersTest::testIteratorsWithSamples().
RBParameters::const_iterator libMesh::RBParameters::end_serialized_extra | ( | ) | const |
Definition at line 403 of file rb_parameters.C.
References _extra_parameters.
void libMesh::RBParameters::erase_extra_parameter | ( | const std::string & | param_name | ) |
Erase param_name
from _extra_parameters.
If param_name
is not present in _extra_parameters, then do nothing.
Definition at line 361 of file rb_parameters.C.
References _extra_parameters.
void libMesh::RBParameters::erase_parameter | ( | const std::string & | param_name | ) |
Erase param_name
from _parameters.
If param_name
is not present in _parameters, then do nothing.
Definition at line 356 of file rb_parameters.C.
References _parameters.
std::map< std::string, std::vector< RBParameter > >::const_iterator libMesh::RBParameters::extra_begin | ( | ) | const |
Definition at line 376 of file rb_parameters.C.
References _extra_parameters.
std::map< std::string, std::vector< RBParameter > >::const_iterator libMesh::RBParameters::extra_end | ( | ) | const |
Definition at line 381 of file rb_parameters.C.
References _extra_parameters.
std::set< std::string > libMesh::RBParameters::get_extra_parameter_names | ( | ) | const |
Note that instead of creating a new set of strings here, it's better to iterate over the RBParameters extra object directly, using the iterators from the extra_begin()/extra_end() functions. The .first will provide the parameter name, .second can be ignored as needed.
Definition at line 348 of file rb_parameters.C.
References _extra_parameters.
Real libMesh::RBParameters::get_extra_sample_value | ( | const std::string & | param_name, |
std::size_t | sample_idx | ||
) | const |
Get the value of the specified "extra" parameter at the specified sample index, throwing an error if it does not exist.
Definition at line 256 of file rb_parameters.C.
References _extra_parameters.
Referenced by RBParametersTest::testAppend().
Real libMesh::RBParameters::get_extra_sample_value | ( | const std::string & | param_name, |
std::size_t | sample_idx, | ||
const Real & | default_val | ||
) | const |
Get the value of the specified extra parameter at the specified sample index, returning the provided default value if either the parameter is not defined or the sample index is invalid.
Definition at line 272 of file rb_parameters.C.
References _extra_parameters.
const RBParameter & libMesh::RBParameters::get_extra_sample_vector_value | ( | const std::string & | param_name, |
std::size_t | sample_idx | ||
) | const |
Definition at line 265 of file rb_parameters.C.
References _extra_parameters.
const RBParameter & libMesh::RBParameters::get_extra_sample_vector_value | ( | const std::string & | param_name, |
std::size_t | sample_idx, | ||
const RBParameter & | default_val | ||
) | const |
Definition at line 283 of file rb_parameters.C.
References _extra_parameters.
Real libMesh::RBParameters::get_extra_value | ( | const std::string & | param_name | ) | const |
Get the value of the specified extra parameter, throwing an error if it does not exist.
Definition at line 223 of file rb_parameters.C.
References _extra_parameters.
Real libMesh::RBParameters::get_extra_value | ( | const std::string & | param_name, |
const Real & | default_val | ||
) | const |
Get the value of the specified extra parameter, returning the provided default value if it does not exist.
Definition at line 242 of file rb_parameters.C.
References _extra_parameters.
const RBParameter & libMesh::RBParameters::get_extra_vector_value | ( | const std::string & | param_name | ) | const |
Definition at line 234 of file rb_parameters.C.
References _extra_parameters.
const RBParameter& libMesh::RBParameters::get_extra_vector_value | ( | const std::string & | param_name, |
const RBParameter & | default_val | ||
) | const |
std::set< std::string > libMesh::RBParameters::get_parameter_names | ( | ) | const |
Note that instead of creating a new set of strings here, it's better to iterate over the RBParameters object directly, using the iterators from the begin()/end() functions. The .first will provide the parameter name, .second can be ignored as needed.
Definition at line 340 of file rb_parameters.C.
References _parameters.
Real libMesh::RBParameters::get_sample_value | ( | const std::string & | param_name, |
std::size_t | sample_idx | ||
) | const |
Get the value of the specified parameter at the specified sample, throwing an error if it does not exist.
The Real-returning version throws an error if the parameter exists but contains multiple values.
Definition at line 97 of file rb_parameters.C.
References _parameters.
Referenced by ShiftedGaussian::evaluate(), get_value(), RBParametersTest::testAppend(), RBParametersTest::testMultiValued(), and RBParametersTest::testNSamples().
Real libMesh::RBParameters::get_sample_value | ( | const std::string & | param_name, |
std::size_t | sample_idx, | ||
const Real & | default_val | ||
) | const |
Get the value of the specified parameter at the specified sample, returning the provided default value if either the parameter is not defined or the sample is invalid.
The Real-returning version throws an error if the parameter exists but contains multiple values.
Definition at line 113 of file rb_parameters.C.
References _parameters.
const RBParameter & libMesh::RBParameters::get_sample_vector_value | ( | const std::string & | param_name, |
std::size_t | sample_idx | ||
) | const |
Definition at line 106 of file rb_parameters.C.
References _parameters.
Referenced by get_vector_value(), and RBParametersTest::testMultiValued().
const RBParameter & libMesh::RBParameters::get_sample_vector_value | ( | const std::string & | param_name, |
std::size_t | sample_idx, | ||
const RBParameter & | default_val | ||
) | const |
Definition at line 123 of file rb_parameters.C.
References _parameters.
std::string libMesh::RBParameters::get_string | ( | unsigned | precision = 6 , |
int | max_values = 5 |
||
) | const |
Get a string that specifies the contents of this RBParameters object.
precision
specifies the number of digits of precision we use in scientific notation in the string. max_values
is the max number of values to print out if the parameter is vector-valued. Set to negative value to print all.
Definition at line 435 of file rb_parameters.C.
References _parameters, and libMesh::index_range().
Referenced by print().
Real libMesh::RBParameters::get_value | ( | const std::string & | param_name | ) | const |
Get the value of the specified parameter, throw an error if it does not exist.
Here we assume that there is only one sample, throw an error otherwise. The Real-returning version also throws an error if the parameter exists but contains multiple values.
Definition at line 65 of file rb_parameters.C.
References get_sample_value(), and n_samples().
Referenced by libMesh::RBDataSerialization::add_parameter_ranges_to_builder(), libMesh::RBSCMConstruction::enrich_C_J(), ThetaA1::evaluate(), ThetaA2::evaluate(), Gxyz::evaluate(), ThetaA3::evaluate(), ThetaA0::evaluate(), ThetaF0::evaluate(), ThetaF1::evaluate(), ThetaF2::evaluate(), ThetaPointLoadX::evaluate(), ThetaPointLoadY::evaluate(), ThetaPointLoadZ::evaluate(), ThetaEIM::evaluate(), libMesh::RBConstructionBase< CondensedEigenSystem >::generate_training_parameters_deterministic(), libMesh::RBConstructionBase< CondensedEigenSystem >::generate_training_parameters_random(), libMesh::RBParametrized::get_parameter_max(), libMesh::RBParametrized::get_parameter_min(), scale_mesh_and_plot(), RBParametersTest::testMultiValued(), RBParametersTest::testNSamples(), RBParametersTest::testOldConstructor(), RBParametersTest::testScalar(), and libMesh::RBParametrized::write_parameter_ranges_to_file().
Real libMesh::RBParameters::get_value | ( | const std::string & | param_name, |
const Real & | default_val | ||
) | const |
Get the value of the specified parameter, returning the provided default value if it does not exist.
If the value does exist, we assume that there is only one sample, and throw an error otherwise. The Real-returning version also throws an error if the parameter exists but contains multiple values.
Definition at line 81 of file rb_parameters.C.
References get_sample_value(), and n_samples().
const RBParameter & libMesh::RBParameters::get_vector_value | ( | const std::string & | param_name | ) | const |
Definition at line 73 of file rb_parameters.C.
References get_sample_vector_value(), and n_samples().
const RBParameter & libMesh::RBParameters::get_vector_value | ( | const std::string & | param_name, |
const RBParameter & | default_val | ||
) | const |
Definition at line 89 of file rb_parameters.C.
References get_sample_vector_value(), and n_samples().
bool libMesh::RBParameters::has_extra_value | ( | const std::string & | param_name | ) | const |
Definition at line 60 of file rb_parameters.C.
References _extra_parameters.
Referenced by RBParametersTest::testAppend().
bool libMesh::RBParameters::has_value | ( | const std::string & | param_name | ) | const |
Definition at line 55 of file rb_parameters.C.
References _parameters.
Referenced by RBParametersTest::testAppend(), RBParametersTest::testOldConstructor(), and RBParametersTest::testScalar().
unsigned int libMesh::RBParameters::n_parameters | ( | ) | const |
Get the number of parameters that have been added.
Definition at line 310 of file rb_parameters.C.
References _parameters.
Referenced by libMesh::RBConstructionBase< CondensedEigenSystem >::broadcast_parameters(), libMesh::RBParametrized::check_if_valid_params(), libMesh::RBConstructionBase< CondensedEigenSystem >::generate_training_parameters_deterministic(), libMesh::RBConstructionBase< CondensedEigenSystem >::generate_training_parameters_random(), libMesh::RBParametrized::get_n_params(), libMesh::RBParametrized::initialize_parameters(), RBParametersTest::testNSamples(), libMesh::RBEIMConstruction::train_eim_approximation_with_greedy(), and libMesh::RBEIMConstruction::train_eim_approximation_with_POD().
unsigned int libMesh::RBParameters::n_samples | ( | ) | const |
Returns the number of samples stored for all parameters.
For simplicity, we require all parameters to store the same number of "samples" ("sample" here may refer to, e.g., time step or load step) and in debug mode we actually verify that is the case.
Definition at line 320 of file rb_parameters.C.
References _n_samples, and _parameters.
Referenced by libMesh::RBConstructionBase< CondensedEigenSystem >::broadcast_parameters(), ShiftedGaussian::evaluate(), libMesh::RBTheta::evaluate(), ThetaConstant::evaluate(), get_value(), get_vector_value(), libMesh::RBParametrized::initialize_parameters(), main(), operator+=(), set_n_samples(), RBParametersTest::testNSamples(), and RBParametersTest::testOldConstructor().
bool libMesh::RBParameters::operator!= | ( | const RBParameters & | rhs | ) | const |
Definition at line 416 of file rb_parameters.C.
RBParameters & libMesh::RBParameters::operator+= | ( | const RBParameters & | rhs | ) |
Append "rhs" to "*this".
Both RBParameters objects must have the same n_samples(), otherwise an error is thrown. If some of the parameter names overlap, then the values from rhs overwrite *this. Both parameters and "extra" parameters are appended.
Definition at line 421 of file rb_parameters.C.
References _extra_parameters, _parameters, and n_samples().
|
default |
|
default |
bool libMesh::RBParameters::operator== | ( | const RBParameters & | rhs | ) | const |
Two RBParameters are equal if they have the same _parameters map.
Definition at line 410 of file rb_parameters.C.
References _extra_parameters, and _parameters.
void libMesh::RBParameters::print | ( | unsigned | precision = 6 , |
int | max_values = 5 |
||
) | const |
Print the parameters.
Definition at line 473 of file rb_parameters.C.
References get_string(), and libMesh::out.
Referenced by libMesh::RBParametrized::print_parameters().
void libMesh::RBParameters::push_back_extra_value | ( | const std::string & | param_name, |
Real | value | ||
) |
Same as push_back_value(), but for "extra" parameters.
Definition at line 209 of file rb_parameters.C.
References _extra_parameters, and value.
Referenced by RBParametersTest::testAppend().
void libMesh::RBParameters::push_back_extra_value | ( | const std::string & | param_name, |
const RBParameter & | value | ||
) |
Definition at line 216 of file rb_parameters.C.
References _extra_parameters, and value.
void libMesh::RBParameters::push_back_value | ( | const std::string & | param_name, |
Real | value | ||
) |
Similar to set_value(name, index, value) but instead of specifying a particular index, just appends one more.
Calling push_back_value() many times is more efficient than calling set_value(name, index, value) many times because it takes advantage of the std::vector's size-doubling t reduce allocations.
Definition at line 195 of file rb_parameters.C.
References _parameters, and value.
Referenced by main(), RBParametersTest::testAppend(), RBParametersTest::testMultiValued(), and RBParametersTest::testNSamples().
void libMesh::RBParameters::push_back_value | ( | const std::string & | param_name, |
const RBParameter & | value | ||
) |
Definition at line 202 of file rb_parameters.C.
References _parameters, and value.
void libMesh::RBParameters::set_extra_value | ( | const std::string & | param_name, |
Real | value | ||
) |
Set the value of the specified extra parameter.
If param_name doesn't already exist, it is added to the extra parameters.
Definition at line 294 of file rb_parameters.C.
References _extra_parameters, and value.
Referenced by libMesh::RBConstructionBase< CondensedEigenSystem >::get_params_from_training_set().
void libMesh::RBParameters::set_extra_value | ( | const std::string & | param_name, |
const RBParameter & | value | ||
) |
Definition at line 302 of file rb_parameters.C.
References _extra_parameters, and value.
void libMesh::RBParameters::set_extra_value | ( | const std::string & | param_name, |
std::size_t | index, | ||
Real | value | ||
) |
Set the value of the specified extra parameter at the specified sample index.
The sample index can refer to, e.g., load or time steps.
Definition at line 185 of file rb_parameters.C.
References _extra_parameters, set_value_helper(), and value.
void libMesh::RBParameters::set_extra_value | ( | const std::string & | param_name, |
std::size_t | index, | ||
const RBParameter & | value | ||
) |
Definition at line 190 of file rb_parameters.C.
References _extra_parameters, set_value_helper(), and value.
void libMesh::RBParameters::set_n_samples | ( | unsigned int | n_samples | ) |
Set the number of samples this RBParameters object is intended to represent, in the case that there are no actual parameters stored on it.
Note: this value will only be used in the no-parameters case; if there are actual parameters specified in this class, the number set via this API is ignored. All parameters stored within the RBParameters object must have n_samples() samples.
Definition at line 315 of file rb_parameters.C.
References _n_samples, and n_samples().
Referenced by RBParametersTest::testNSamples().
void libMesh::RBParameters::set_value | ( | const std::string & | param_name, |
Real | value | ||
) |
Set the value of the specified parameter.
If param_name doesn't already exist, it is added to the RBParameters object. For backwards compatibility, calling this function sets up "param_name" to be a single-entry vector with "value" as the only entry.
Definition at line 131 of file rb_parameters.C.
References _parameters, and value.
Referenced by libMesh::RBConstructionBase< CondensedEigenSystem >::get_params_from_training_set(), libMesh::RBParametrized::initialize_parameters(), libMesh::RBDataDeserialization::load_parameter_ranges(), main(), libMesh::RBSCMConstruction::process_parameters_file(), libMesh::RBEIMConstruction::process_parameters_file(), libMesh::RBConstruction::process_parameters_file(), libMesh::RBParametrized::read_parameter_ranges_from_file(), RBParametersTest::testIterators(), RBParametersTest::testIteratorsWithSamples(), RBParametersTest::testMultiValued(), RBParametersTest::testNSamples(), RBParametersTest::testRBParametrized(), and RBParametersTest::testScalar().
void libMesh::RBParameters::set_value | ( | const std::string & | param_name, |
const RBParameter & | value | ||
) |
Definition at line 139 of file rb_parameters.C.
References _parameters, and value.
void libMesh::RBParameters::set_value | ( | const std::string & | param_name, |
std::size_t | index, | ||
Real | value | ||
) |
Set the value of the specified parameter at the specified sample index.
The sample index can refer to, e.g., load or time steps.
Definition at line 175 of file rb_parameters.C.
References _parameters, set_value_helper(), and value.
void libMesh::RBParameters::set_value | ( | const std::string & | param_name, |
std::size_t | index, | ||
const RBParameter & | value | ||
) |
Definition at line 180 of file rb_parameters.C.
References _parameters, set_value_helper(), and value.
|
private |
Helper function for the 3-parameter versions of set_value() and set_extra_value().
Definition at line 148 of file rb_parameters.C.
References value.
Referenced by set_extra_value(), and set_value().
|
private |
Extra parameter vectors not used for RB training.
Each vector is indexed by a name.
Definition at line 468 of file rb_parameters.h.
Referenced by begin_serialized_extra(), clear(), end_serialized_extra(), erase_extra_parameter(), extra_begin(), extra_end(), get_extra_parameter_names(), get_extra_sample_value(), get_extra_sample_vector_value(), get_extra_value(), get_extra_vector_value(), has_extra_value(), operator+=(), operator==(), push_back_extra_value(), and set_extra_value().
|
private |
The number of samples represented by this RBParameters object, in the case where there are no parameters actually stored on it.
If there are parameters stored on this RBParameters object, then the n_samples() API returns that number of samples instead.
Definition at line 453 of file rb_parameters.h.
Referenced by clear(), n_samples(), and set_n_samples().
|
private |
Actual parameter values (in std::vector<RBParameter> form) across a vector of samples.
Each vector is indexed by a name. Note that the number of samples in the outer vector should be the same across all parameters, however, this is not necessary for the inner "value-vector".
Definition at line 462 of file rb_parameters.h.
Referenced by begin(), begin_serialized(), clear(), end(), end_serialized(), erase_parameter(), get_parameter_names(), get_sample_value(), get_sample_vector_value(), get_string(), has_value(), n_parameters(), n_samples(), operator+=(), operator==(), push_back_value(), RBParameters(), and set_value().