Chaste Commit::baa90ac2819b962188b7562f2326be23c47859a7
RegularStimulus Class Reference

#include <RegularStimulus.hpp>

+ Inheritance diagram for RegularStimulus:
+ Collaboration diagram for RegularStimulus:

Public Member Functions

 RegularStimulus (double magnitudeOfStimulus, double duration, double period, double startTime, double stopTime=DBL_MAX)
 
double GetStimulus (double time)
 
double GetPeriod ()
 
double GetMagnitude ()
 
double GetDuration ()
 
double GetStartTime ()
 
void SetMagnitude (double magnitude)
 
void SetPeriod (double period)
 
void SetDuration (double duration)
 
void SetStartTime (double startTime)
 
void SetStopTime (double stopTime)
 
- Public Member Functions inherited from AbstractStimulusFunction
virtual ~AbstractStimulusFunction ()
 
virtual void Clear ()
 

Protected Attributes

double mMagnitudeOfStimulus
 
double mDuration
 
double mPeriod
 
double mStartTime
 
double mStopTime
 

Private Member Functions

template<class Archive >
void serialize (Archive &archive, const unsigned int version)
 

Friends

class boost::serialization::access
 

Detailed Description

Provides a periodic square-wave stimulus.

Definition at line 48 of file RegularStimulus.hpp.

Constructor & Destructor Documentation

◆ RegularStimulus()

RegularStimulus::RegularStimulus ( double  magnitudeOfStimulus,
double  duration,
double  period,
double  startTime,
double  stopTime = DBL_MAX 
)

Create a new stimulus.

Parameters
magnitudeOfStimulusThe size of the stimulus
durationHow long the square wave is applied for
periodThe time between square waves being applied
startTimeThe time at which the first wave is applied
stopTimeThe time the stimulus is removed (defaults to DBL_MAX if omitted)

Definition at line 43 of file RegularStimulus.cpp.

References mDuration, mMagnitudeOfStimulus, mPeriod, mStartTime, and mStopTime.

Member Function Documentation

◆ GetDuration()

double RegularStimulus::GetDuration ( )
Returns
the duration of the stimulus square wave.

Definition at line 93 of file RegularStimulus.cpp.

References mDuration.

◆ GetMagnitude()

double RegularStimulus::GetMagnitude ( )
Returns
the height of the stimulus square wave (magnitude of current).

Definition at line 88 of file RegularStimulus.cpp.

References mMagnitudeOfStimulus.

◆ GetPeriod()

double RegularStimulus::GetPeriod ( )
Returns
the pacing cycle length or period of the stimulus.

Definition at line 83 of file RegularStimulus.cpp.

References mPeriod.

◆ GetStartTime()

double RegularStimulus::GetStartTime ( )
Returns
the start time of the stimulus square wave.

Definition at line 98 of file RegularStimulus.cpp.

References mStartTime.

◆ GetStimulus()

double RegularStimulus::GetStimulus ( double  time)
virtual

Get the magnitude of stimulus at time 'time'

Parameters
timeThe current time
Returns
Magnitude of stimulus

Implements AbstractStimulusFunction.

Reimplemented in RegularStimulusZeroNetCharge.

Definition at line 58 of file RegularStimulus.cpp.

References mDuration, mMagnitudeOfStimulus, mPeriod, mStartTime, and mStopTime.

◆ serialize()

template<class Archive >
void RegularStimulus::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate

Archive the simple stimulus, never used directly - boost uses this.

Parameters
archive
version

Definition at line 60 of file RegularStimulus.hpp.

References mDuration, mMagnitudeOfStimulus, mPeriod, mStartTime, and mStopTime.

◆ SetDuration()

void RegularStimulus::SetDuration ( double  duration)

set the length ('duration') of the stimulus square wave.

Parameters
durationThe stimulus duration to use.

Definition at line 113 of file RegularStimulus.cpp.

References mDuration.

◆ SetMagnitude()

void RegularStimulus::SetMagnitude ( double  magnitude)

Set the magnitude of the stimulus to apply. Takes units of uA/cm^2 in single cell simulations or uA/cm^3 in tissue simulations

See https://chaste.github.io/docs/user-guides/chaste-units/ for a full discussion of this.

Parameters
magnitudeThe magnitude of stimulus to apply.

Definition at line 103 of file RegularStimulus.cpp.

References mMagnitudeOfStimulus.

◆ SetPeriod()

void RegularStimulus::SetPeriod ( double  period)

set the pacing cycle length ('period') of the stimulus.

Parameters
periodThe stimulus pacing cycle length to use.

Definition at line 108 of file RegularStimulus.cpp.

References mPeriod.

◆ SetStartTime()

void RegularStimulus::SetStartTime ( double  startTime)

Set the stimulus to start at a particular time.

Parameters
startTimethe time the stimulus should begin.

Definition at line 118 of file RegularStimulus.cpp.

References mStartTime.

◆ SetStopTime()

void RegularStimulus::SetStopTime ( double  stopTime)

Set the stop time for this stimulus. It will never be applied after this time.

Parameters
stopTime

Definition at line 123 of file RegularStimulus.cpp.

References mStopTime.

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 52 of file RegularStimulus.hpp.

Member Data Documentation

◆ mDuration

double RegularStimulus::mDuration
protected

The length of the square wave

Definition at line 76 of file RegularStimulus.hpp.

Referenced by RegularStimulus(), GetDuration(), GetStimulus(), RegularStimulusZeroNetCharge::GetStimulus(), serialize(), and SetDuration().

◆ mMagnitudeOfStimulus

double RegularStimulus::mMagnitudeOfStimulus
protected

The 'height' of the square wave applied

Definition at line 74 of file RegularStimulus.hpp.

Referenced by RegularStimulus(), GetMagnitude(), GetStimulus(), RegularStimulusZeroNetCharge::GetStimulus(), serialize(), and SetMagnitude().

◆ mPeriod

double RegularStimulus::mPeriod
protected

The time between applications of the wave

Definition at line 78 of file RegularStimulus.hpp.

Referenced by RegularStimulus(), GetPeriod(), GetStimulus(), RegularStimulusZeroNetCharge::GetStimulus(), serialize(), and SetPeriod().

◆ mStartTime

double RegularStimulus::mStartTime
protected

The time at which the first wave is applied

Definition at line 80 of file RegularStimulus.hpp.

Referenced by RegularStimulus(), GetStartTime(), GetStimulus(), RegularStimulusZeroNetCharge::GetStimulus(), serialize(), and SetStartTime().

◆ mStopTime

double RegularStimulus::mStopTime
protected

The time at which all stimuli are removed (even if halfway through a wave)

Definition at line 82 of file RegularStimulus.hpp.

Referenced by RegularStimulus(), GetStimulus(), RegularStimulusZeroNetCharge::GetStimulus(), serialize(), and SetStopTime().


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