|
svZeroDSolver
|
Piecewise cosine activation function. More...
#include <ActivationFunction.h>
Public Member Functions | |
| PiecewiseCosineActivation (double cardiac_period) | |
| Construct with default parameter values (loader fills via set_param). | |
| double | compute (double time) override |
| Compute activation value at given time. | |
Public Member Functions inherited from ActivationFunction | |
| ActivationFunction (double cardiac_period, const std::vector< std::pair< std::string, InputParameter > > &input_param_properties) | |
| Construct activation function. | |
| virtual | ~ActivationFunction ()=default |
| Virtual destructor. | |
| 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). | |
Additional Inherited Members | |
Static Public Member Functions inherited from ActivationFunction | |
| 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 inherited from ActivationFunction | |
| const std::vector< std::pair< std::string, InputParameter > > | input_param_properties |
| Properties of the input parameters for this activation function [(name, InputParameter), ...]. | |
Protected Attributes inherited from ActivationFunction | |
| double | cardiac_period_ |
| Time duration of one cardiac cycle. | |
| std::map< std::string, double > | params_ |
| Map of parameter names to their values. | |
Piecewise cosine activation function.
This implements the activation function from the LinearElastanceChamber (Regazzoni chamber model). The activation consists of separate contraction and relaxation phases, each following a cosine curve.
![\[\phi(t, t_C, t_R, T_C, T_R) = \begin{cases}
\frac{1}{2}\left[1 - \cos\left(\frac{\pi}{T_C} \bmod(t - t_C,
T_{HB})\right)\right],
& \text{if } 0 \le \bmod(t - t_C, T_{HB}) < T_C \\
\frac{1}{2}\left[1 + \cos\left(\frac{\pi}{T_R} \bmod(t - t_R,
T_{HB})\right)\right],
& \text{if } 0 \le \bmod(t - t_R, T_{HB}) < T_R \\
0, & \text{otherwise}
\end{cases}
\]](form_3.png)
|
inlineexplicit |
Construct with default parameter values (loader fills via set_param).
| cardiac_period | Cardiac cycle period |
|
overridevirtual |
Compute activation value at given time.
| time | Current time |
Implements ActivationFunction.