ActivationOutputModifier Class Reference

#include <ActivationOutputModifier.hpp>

Inherits AbstractOutputModifier.

Collaboration diagram for ActivationOutputModifier:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ActivationOutputModifier (const std::string &rFilename, double threshold)
virtual void InitialiseAtStart (DistributedVectorFactory *pVectorFactory)
virtual void FinaliseAtEnd ()
virtual void ProcessSolutionAtTimeStep (double time, Vec solution, unsigned problemDim)

Private Member Functions

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

Private Attributes

double mThreshold
unsigned mLocalSize
std::vector< doublemFirstActivitationTimes
std::vector< doublemFirstRecoveryTimes
std::vector< doublemSecondActivitationTimes
std::vector< doublemSecondRecoveryTimes

Friends

class TestOutputModifiers
class boost::serialization::access

Detailed Description

Specialised class for on-the-fly calculation of activation and recovery times. This is hard-coded for the first 2 rounds of activation/recovery.

Times are relative to simulation start and are listed in node order and in 4 columns comma separated (.CSV)

node_0_activation, node_0_recovery, node_0_later_activation, node_0_later_recovery node_1_activation, node_1_recovery, node_1_later_activation, node_1_later_recovery ...

Any missing data (node was not activated a second time or did not recover) is marked with -1.

WARNING: If you checkpoint this class then the partial results will not be stored. This is because the sizes of the activation time vectors will be dependent on the number of processes involved in the parallel code. To fix this: archive as PETSc vectors? Then check ProcessSolutionAtTimeStep logic...

Definition at line 61 of file ActivationOutputModifier.hpp.


Constructor & Destructor Documentation

ActivationOutputModifier::ActivationOutputModifier (  )  [inline, private]

Private constructor that does nothing, for archiving

Definition at line 86 of file ActivationOutputModifier.hpp.

ActivationOutputModifier::ActivationOutputModifier ( const std::string &  rFilename,
double  threshold 
) [inline]

Constructor

Parameters:
rFilename The file which is eventually produced by this modifier
threshold The transmembrane voltage threshold (in mV) at which activation is deemed to have been trigged. This is also used for calculating relaxation time (this is not so sophisticated as an APD90 calculation).

Definition at line 98 of file ActivationOutputModifier.hpp.


Member Function Documentation

void ActivationOutputModifier::FinaliseAtEnd (  )  [virtual]
void ActivationOutputModifier::InitialiseAtStart ( DistributedVectorFactory pVectorFactory  )  [virtual]

Initialise the modifier (make space for local activation times) when the solve loop is starting.

Note the problem passes parameters in a non-templated fashion in order to keep the interface as lightweight as possible.

Parameters:
pVectorFactory The vector factory which is associated with the calling problem's mesh

Implements AbstractOutputModifier.

Definition at line 40 of file ActivationOutputModifier.cpp.

References DistributedVectorFactory::GetLocalOwnership(), mFirstActivitationTimes, mFirstRecoveryTimes, mLocalSize, mSecondActivitationTimes, and mSecondRecoveryTimes.

void ActivationOutputModifier::ProcessSolutionAtTimeStep ( double  time,
Vec  solution,
unsigned  problemDim 
) [virtual]

Process a solution time-step (memorise all new activations)

Parameters:
time The current simulation time
solution A working copy of the solution at the current time-step. This is the PETSc vector which is distributed across the processes.
problemDim The calling problem dimension. Used here to avoid probing the size of the solution vector

Todo:
#2570 Add to a longer running test

Implements AbstractOutputModifier.

Definition at line 77 of file ActivationOutputModifier.cpp.

References mFirstActivitationTimes, mFirstRecoveryTimes, mLocalSize, mSecondActivitationTimes, mSecondRecoveryTimes, and mThreshold.

template<class Archive >
void ActivationOutputModifier::serialize ( Archive &  archive,
const unsigned int  version 
) [inline, private]

Archive this modifier. Just calls the base class version.

Parameters:
archive the archive
version the current version of this class

Reimplemented from AbstractOutputModifier.

Definition at line 77 of file ActivationOutputModifier.hpp.

References mThreshold.


Friends And Related Function Documentation

friend class boost::serialization::access [friend]

Needed for serialization.

Reimplemented from AbstractOutputModifier.

Definition at line 74 of file ActivationOutputModifier.hpp.


Member Data Documentation

The first activation (first time above threshold) for all local nodes on this process

Definition at line 66 of file ActivationOutputModifier.hpp.

Referenced by FinaliseAtEnd(), InitialiseAtStart(), and ProcessSolutionAtTimeStep().

The first recovery (first time subsequent time below threshold) for all local nodes on this process

Definition at line 67 of file ActivationOutputModifier.hpp.

Referenced by FinaliseAtEnd(), InitialiseAtStart(), and ProcessSolutionAtTimeStep().

The number of nodes on this process (calculated in InitialiseAtStart)

Definition at line 65 of file ActivationOutputModifier.hpp.

Referenced by FinaliseAtEnd(), InitialiseAtStart(), and ProcessSolutionAtTimeStep().

The second activation time for local nodes

Definition at line 68 of file ActivationOutputModifier.hpp.

Referenced by FinaliseAtEnd(), InitialiseAtStart(), and ProcessSolutionAtTimeStep().

The second recovery time for local nodes

Definition at line 69 of file ActivationOutputModifier.hpp.

Referenced by FinaliseAtEnd(), InitialiseAtStart(), and ProcessSolutionAtTimeStep().

The user-defined threshold at which activation and recovery is to be measured

Definition at line 64 of file ActivationOutputModifier.hpp.

Referenced by ProcessSolutionAtTimeStep(), and serialize().


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

Generated by  doxygen 1.6.2