svZeroDSolver
Loading...
Searching...
No Matches
ParameterHolder Class Reference

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>

Inheritance diagram for ParameterHolder:
[legend]

Public Member Functions

 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).

Public Attributes

const std::vector< std::pair< std::string, InputParameter > > input_param_properties
 Properties of the input parameters for this component [(name, InputParameter), ...].

Protected Attributes

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.

Detailed Description

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.

Constructor & Destructor Documentation

◆ ParameterHolder()

ParameterHolder::ParameterHolder ( const std::vector< std::pair< std::string, InputParameter > > & props)
explicit

Construct a ParameterHolder.

Parameters
propsParameter name/spec pairs for this component, used to initialize params_/params_vec_ with default values

Member Function Documentation

◆ 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
nameParameter name
valueParameter value

◆ 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
nameParameter name
valueParameter value

Member Data Documentation

◆ 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: