|
svZeroDSolver
|
Base class for activation functions. More...
#include <ActivationFunction.h>
Public Member Functions | |
| ActivationFunction (double cardiac_period, const std::vector< std::pair< std::string, InputParameter > > &input_param_properties) | |
| Construct activation function. | |
| virtual | ~ActivationFunction ()=default |
| Virtual destructor. | |
| virtual double | compute (double time)=0 |
| Compute activation value at given time. | |
| void | set_param (const std::string &name, double value) |
| Set a scalar parameter value by name. | |
| virtual void | finalize () |
| Called after all parameters are set (e.g. by loader). | |
Static Public Member Functions | |
| static std::unique_ptr< ActivationFunction > | create_default (const std::string &type_str, double cardiac_period) |
| Create a default activation function from activation function type. | |
Public Attributes | |
| const std::vector< std::pair< std::string, InputParameter > > | input_param_properties |
| Properties of the input parameters for this activation function [(name, InputParameter), ...]. | |
Protected Attributes | |
| double | cardiac_period_ |
| Time duration of one cardiac cycle. | |
| std::map< std::string, double > | params_ |
| Map of parameter names to their values. | |
Base class for activation functions.
Activation functions compute the activation value (between 0 and 1) at a given time point within a cardiac cycle. These are used to modulate chamber elastance over time.
| ActivationFunction::ActivationFunction | ( | double | cardiac_period, |
| const std::vector< std::pair< std::string, InputParameter > > & | input_param_properties ) |
Construct activation function.
| cardiac_period | Cardiac cycle period |
| input_param_properties | Properties of the input parameters [(name, InputParameter), ...] for this activation function |
|
virtualdefault |
Virtual destructor.
|
pure virtual |
Compute activation value at given time.
| time | Current time |
Implemented in HalfCosineActivation, PiecewiseCosineActivation, and TwoHillActivation.
|
static |
Create a default activation function from activation function type.
| type_str | One of: "half_cosine", "piecewise_cosine", "two_hill" |
| cardiac_period | Cardiac cycle period |
|
inlinevirtual |
Called after all parameters are set (e.g. by loader).
Default no-op. TwoHillActivation overrides to recompute normalization.
Reimplemented in TwoHillActivation.
| void ActivationFunction::set_param | ( | const std::string & | name, |
| double | value ) |
|
protected |
Time duration of one cardiac cycle.
| const std::vector<std::pair<std::string, InputParameter> > ActivationFunction::input_param_properties |
Properties of the input parameters for this activation function [(name, InputParameter), ...].
|
protected |
Map of parameter names to their values.