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

Piecewise-linear activation rate activation signal. More...

#include <ActivationFunction.h>

Inheritance diagram for PiecewiseRateActivation:
[legend]

Public Member Functions

 PiecewiseRateActivation (double cardiac_period)
 Construct a new PiecewiseRateActivation object.
double compute (double time) override
 Compute activation value at given time.
void finalize () override
 Called once after all parameters have been read from the input file (e.g. by the loader).
ActivationSignalType signal_type () const override
 Type of signal this activation function's compute() produces.
Public Member Functions inherited from ActivationFunction
 ActivationFunction (double cardiac_period, const std::vector< std::pair< std::string, InputParameter > > &input_param_properties)
 Construct activation function.
Public Member Functions inherited from ParameterHolder
 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.

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 ParameterHolder
const std::vector< std::pair< std::string, InputParameter > > input_param_properties
 Properties of the input parameters for this component [(name, InputParameter), ...].
Protected Attributes inherited from ActivationFunction
double cardiac_period_
 Time duration of one cardiac cycle.
Protected Attributes inherited from ParameterHolder
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

Piecewise-linear activation rate activation signal.

Reproduces an activation rate signal $u(t)$ which is a piecewise-linear function of time within the cardiac cycle, given as a break point table (u_t/u_values) and evaluated with linear_interpolate. The sign is meaningful for the strain-dependent active stress model (which splits the signal into positive/negative parts).

u_t must be normalized to the cardiac cycle length, i.e. $u_t \in [0, 1]$, where 0 is the start of the cycle and 1 is the end. This way, the break point table does not need to be recomputed if the cardiac cycle length changes.

Parameters: u_t, u_values

Constructor & Destructor Documentation

◆ PiecewiseRateActivation()

PiecewiseRateActivation::PiecewiseRateActivation ( double cardiac_period)
inlineexplicit

Construct a new PiecewiseRateActivation object.

Parameters
cardiac_periodCardiac cycle period

Member Function Documentation

◆ compute()

double PiecewiseRateActivation::compute ( double time)
overridevirtual

Compute activation value at given time.

Parameters
timeCurrent time
Returns
Activation value between 0 and 1

Implements ActivationFunction.

◆ finalize()

void PiecewiseRateActivation::finalize ( )
overridevirtual

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 from ParameterHolder.

◆ signal_type()

ActivationSignalType PiecewiseRateActivation::signal_type ( ) const
inlineoverridevirtual

Type of signal this activation function's compute() produces.

Returns
ActivationSignalType::normalized for all activation functions with function values between [0;1] and ActivationSignalType::rate for PiecewiseRateActivation, which returns a signed reaction-rate signal.

Reimplemented from ActivationFunction.


The documentation for this class was generated from the following files: