20 #ifndef LIBMESH_RB_PARAMETERS_H 21 #define LIBMESH_RB_PARAMETERS_H 24 #include "libmesh/libmesh_common.h" 79 RBParameters(
const std::map<std::string, Real> & parameter_map);
112 const std::size_t sample_vec_index,
113 const std::size_t value_vec_index)
174 return !(other == *
this);
227 bool has_value(
const std::string & param_name)
const;
427 std::string
get_string(
unsigned int precision=6)
const;
440 void set_value_helper(std::map<std::string, std::vector<RBParameter>> & map,
441 const std::string & param_name,
442 const std::size_t index,
472 #endif // LIBMESH_RB_PARAMETERS_H Real get_value(const std::string ¶m_name) const
Get the value of the specified parameter, throw an error if it does not exist.
bool operator!=(const RBParameters &rhs) 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 ...
const_iterator(const MapIter &it, const std::size_t sample_vec_index, const std::size_t value_vec_index)
bool has_value(const std::string ¶m_name) const
std::set< std::string > get_parameter_names() const
RBParameters & operator=(const RBParameters &)=default
void erase_extra_parameter(const std::string ¶m_name)
Erase param_name from _extra_parameters.
std::string get_string(unsigned int precision=6) const
Get a string that specifies the contents of this RBParameters object.
const RBParameter & get_extra_sample_vector_value(const std::string ¶m_name, std::size_t sample_idx) const
const_iterator begin_serialized() const
Get const_iterator access to the parameters stored in this RBParameters object.
std::map< std::string, std::vector< RBParameter > >::const_iterator extra_begin() const
std::map< std::string, std::vector< RBParameter > >::const_iterator end() const
std::map< std::string, std::vector< RBParameter > > _parameters
Actual parameter values (in std::vector<RBParameter> form) across a vector of samples.
unsigned int _n_samples
The number of samples represented by this RBParameters object, in the case where there are no paramet...
void print() const
Print the parameters.
std::map< std::string, std::vector< RBParameter > >::const_iterator MapIter
bool operator==(const RBParameters &rhs) const
Two RBParameters are equal if they have the same _parameters map.
const RBParameter & get_vector_value(const std::string ¶m_name) const
std::map< std::string, std::vector< RBParameter > > _extra_parameters
Extra parameter vectors not used for RB training.
The libMesh namespace provides an interface to certain functionality in the library.
RBParameters & operator+=(const RBParameters &rhs)
Append "rhs" to "*this".
const_iterator & operator++()
const RBParameter & get_extra_vector_value(const std::string ¶m_name) const
std::forward_iterator_tag iterator_category
std::ptrdiff_t difference_type
RBParameters()
Constructor.
std::map< std::string, std::vector< RBParameter > >::const_iterator extra_end() const
unsigned int n_parameters() const
Get the number of parameters that have been added.
const value_type & operator*() const
std::set< std::string > get_extra_parameter_names() const
Define a constant iterator for iterating over the map of parameters.
std::size_t _sample_vec_index
const RBParameter & get_sample_vector_value(const std::string ¶m_name, std::size_t sample_idx) const
std::vector< Real > RBParameter
Typedef for an individual RB parameter.
This class is part of the rbOOmit framework.
const_iterator end_serialized_extra() const
bool has_extra_value(const std::string ¶m_name) const
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().
unsigned int n_samples() const
Returns the number of samples stored for all parameters.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void set_extra_value(const std::string ¶m_name, Real value)
Set the value of the specified extra parameter.
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 ex...
const_iterator begin_serialized_extra() const
Get const_iterator access to the extra parameters stored in this RBParameters object.
void push_back_extra_value(const std::string ¶m_name, Real value)
Same as push_back_value(), but for "extra" parameters.
void set_value(const std::string ¶m_name, Real value)
Set the value of the specified parameter.
void clear()
Clear this object.
const_iterator end_serialized() const
void erase_parameter(const std::string ¶m_name)
Erase param_name from _parameters.
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.
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.
std::size_t _value_vec_index
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 a...
std::pair< std::string, Real > value_type
bool operator==(const const_iterator &other) const
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 nam...
bool operator!=(const const_iterator &other) const