Base class for chamber sub-components (activation functions, materials, active stress models) that are configured from scalar/vector input parameters read from the JSON input file.
More...
#include <ParameterHolder.h>
|
| | ParameterHolder (const std::vector< std::pair< std::string, InputParameter > > &props) |
| | Construct a ParameterHolder.
|
| void | set_param (const std::string &name, double value) |
| | Set a scalar parameter value by name.
|
| void | set_param_vector (const std::string &name, const std::vector< double > &value) |
| | Set a vector-valued parameter value by name.
|
| virtual void | finalize () |
| | Called once after all parameters have been read from the input file (e.g. by the loader).
|
|
| std::map< std::string, double > | params_ |
| | Map of scalar parameter names to their values.
|
| std::map< std::string, std::vector< double > > | params_vec_ |
| | Map of vector-valued parameter names to their values.
|
Base class for chamber sub-components (activation functions, materials, active stress models) that are configured from scalar/vector input parameters read from the JSON input file.
◆ ParameterHolder()
| ParameterHolder::ParameterHolder |
( |
const std::vector< std::pair< std::string, InputParameter > > & | props | ) |
|
|
explicit |
Construct a ParameterHolder.
- Parameters
-
| props | Parameter name/spec pairs for this component, used to initialize params_/params_vec_ with default values |
◆ finalize()
| virtual void ParameterHolder::finalize |
( |
| ) |
|
|
inlinevirtual |
Called once after all parameters have been read from the input file (e.g. by the loader).
Default no-op; subclasses override to validate the parameters they were given or precompute derived values (e.g. normalization constants).
Reimplemented in FourierActivation, PiecewiseRateActivation, and TwoHillActivation.
◆ set_param()
| void ParameterHolder::set_param |
( |
const std::string & | name, |
|
|
double | value ) |
Set a scalar parameter value by name.
Calling function must validate the parameter name and value.
- Parameters
-
◆ set_param_vector()
| void ParameterHolder::set_param_vector |
( |
const std::string & | name, |
|
|
const std::vector< double > & | value ) |
Set a vector-valued parameter value by name.
Calling function must validate the parameter name and value.
- Parameters
-
◆ input_param_properties
| const std::vector<std::pair<std::string, InputParameter> > ParameterHolder::input_param_properties |
Properties of the input parameters for this component [(name, InputParameter), ...].
◆ params_
| std::map<std::string, double> ParameterHolder::params_ |
|
protected |
Map of scalar parameter names to their values.
◆ params_vec_
| std::map<std::string, std::vector<double> > ParameterHolder::params_vec_ |
|
protected |
Map of vector-valued parameter names to their values.
The documentation for this class was generated from the following files: