#include <PostProcessingWriter.hpp>
Public Member Functions | |
PostProcessingWriter (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, std::string directory, std::string hdf5File, bool makeAbsolute) | |
void | WritePostProcessingFiles () |
~PostProcessingWriter () | |
void | WriteAboveThresholdDepolarisationFile (double threshold) |
Private Member Functions | |
void | WriteApdMapFile (double repolarisationPercentage, double threshold) |
void | WriteUpstrokeTimeMap (double threshold) |
void | WriteMaxUpstrokeVelocityMap (double threshold) |
void | WriteConductionVelocityMap (unsigned originNode, std::vector< double > distancesFromOriginNode) |
void | WriteGenericFile (std::vector< std::vector< double > > &rDataPayload, std::string fileName) |
Private Attributes | |
Hdf5DataReader * | mpDataReader |
PropagationPropertiesCalculator * | mpCalculator |
unsigned | mLo |
unsigned | mHi |
AbstractTetrahedralMesh < ELEMENT_DIM, SPACE_DIM > & | mrMesh |
Friends | |
class | TestPostProcessingWriter |
Definition at line 47 of file PostProcessingWriter.hpp.
PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::PostProcessingWriter | ( | AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > & | rMesh, | |
std::string | directory, | |||
std::string | hdf5File, | |||
bool | makeAbsolute | |||
) | [inline] |
Constructor
rMesh | A reference to the mesh used to calculate the distance map to pass to the conduction velocity calculator. | |
directory | The directory the data is in. The output is written to <directory>/output | |
hdf5File | The file the data is in. | |
makeAbsolute | Whether to convert the path to absolute using the OutputFileHandler (via the HdfDataReader) |
Definition at line 40 of file PostProcessingWriter.cpp.
References Hdf5DataReader::GetNumberOfRows(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mHi, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mLo, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpCalculator, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpDataReader, and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mrMesh.
PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::~PostProcessingWriter | ( | ) | [inline] |
Destructor
Definition at line 108 of file PostProcessingWriter.cpp.
References PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpCalculator, and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpDataReader.
void PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WritePostProcessingFiles | ( | ) | [inline] |
Write out data files. The data that is written depends on which maps have been requested using either the XML file or HeartConfig
Definition at line 52 of file PostProcessingWriter.cpp.
References DistanceMapCalculator< ELEMENT_DIM, SPACE_DIM >::ComputeDistanceMap(), HeartConfig::GetApdMaps(), HeartConfig::GetConductionVelocityMaps(), HeartConfig::GetMaxUpstrokeVelocityMaps(), HeartConfig::GetUpstrokeTimeMaps(), HeartConfig::Instance(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mrMesh, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteApdMapFile(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteConductionVelocityMap(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteMaxUpstrokeVelocityMap(), and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteUpstrokeTimeMap().
Referenced by AbstractCardiacProblem< ELEMENT_DIM, SPACE_DIM, PROBLEM_DIM >::CloseFilesAndPostProcess().
void PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteAboveThresholdDepolarisationFile | ( | double | threshold | ) | [inline] |
Method for opening a file and writing one row per node: line 1: <number of upstrokes for node 0> <number of above-threshold depolarisations for node 0> line 2: <number of upstrokes for node 1> <number of above-threshold depolarisations for node 1> etc.
For the nodes where the threshold isn't crossed, the 'number of upstrokes' will be 0 (so will the number of above-threshold depolarisations for that node)
threshold | - used to signify the upstroke (mV) AND to specify above which voltage value the depolarisations are counted |
Definition at line 217 of file PostProcessingWriter.cpp.
References PropagationPropertiesCalculator::CalculateAllAboveThresholdDepolarisations(), PropagationPropertiesCalculator::CalculateAllMaximumUpstrokeVelocities(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mHi, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mLo, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpCalculator, and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteGenericFile().
void PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteApdMapFile | ( | double | repolarisationPercentage, | |
double | threshold | |||
) | [inline, private] |
Method for opening an APD map file and writing one row per node line 1: <first APD for node 0> <second APD for node 0> ... line 2: <first APD for node 1> <second APD for node 1> ... etc.
Nodes where there is no APD are respresented by a single 0
repolarisationPercentage | eg. 90.0 for APD90 | |
threshold | - Vm used to signify the upstroke (mV) |
Definition at line 115 of file PostProcessingWriter.cpp.
References PropagationPropertiesCalculator::CalculateAllActionPotentialDurations(), Exception::GetShortMessage(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mHi, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mLo, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpCalculator, and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteGenericFile().
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WritePostProcessingFiles().
void PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteUpstrokeTimeMap | ( | double | threshold | ) | [inline, private] |
Write out times of each upstroke for each node:
line 1: <first upstroke time for node 0> <second upstroke time for node 0> ... line 2: <first upstroke time for node 1> <second upstroke time for node 1> ... etc.
If there is no upstroke then there will a blank line
threshold | - Vm used to signify the upstroke (mV) |
Definition at line 142 of file PostProcessingWriter.cpp.
References PropagationPropertiesCalculator::CalculateUpstrokeTimes(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mHi, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mLo, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpCalculator, and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteGenericFile().
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WritePostProcessingFiles().
void PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteMaxUpstrokeVelocityMap | ( | double | threshold | ) | [inline, private] |
Write out velocities of each max upstroke for each node:
line 1: <first upstroke velocity for node 0> <second upstroke velocity for node 0> ... line 2: <first upstroke velocity for node 1> <second upstroke velocity for node 1> ... etc.
If there is no upstroke then there will a blank line
threshold | - Vm used to signify the upstroke (mV) |
Definition at line 167 of file PostProcessingWriter.cpp.
References PropagationPropertiesCalculator::CalculateAllMaximumUpstrokeVelocities(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mHi, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mLo, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpCalculator, and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteGenericFile().
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WritePostProcessingFiles().
void PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteConductionVelocityMap | ( | unsigned | originNode, | |
std::vector< double > | distancesFromOriginNode | |||
) | [inline, private] |
Write out conduction velocity map from the given node the rest of the mesh:
line 1: <conduction velocity for node 0 and AP 0> <conduction velocity for node 0 and AP 1> ... line 2: <conduction velocity for node 1 and AP 0> <conduction velocity for node 1 and AP 1> ... etc.
Note: the line corresponding to node number originNode will contain ...
originNode | - Node to compute the conduction velocity from | |
distancesFromOriginNode | - Distance map from originNode to all the nodes in the simulation. Tipically calculated with DistanceMapCalculator |
Definition at line 192 of file PostProcessingWriter.cpp.
References PropagationPropertiesCalculator::CalculateAllConductionVelocities(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mHi, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mLo, PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpCalculator, and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteGenericFile().
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WritePostProcessingFiles().
void PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteGenericFile | ( | std::vector< std::vector< double > > & | rDataPayload, | |
std::string | fileName | |||
) | [inline, private] |
Method for opening a file and writing one row per node line 1: <first scalar data for node 0> <second scalar data for node 0> ... line 2: <first scalar data for node 1> <second scalar data for node 1> ... etc.
rDataPayload | vector data for each node. Each node's data are represented by a vector of scalars (variable length) | |
fileName | where to put the data. |
Definition at line 270 of file PostProcessingWriter.cpp.
References PetscTools::AmMaster(), PetscTools::Barrier(), PetscTools::GetMyRank(), PetscTools::GetNumProcs(), ChasteBuildInfo::GetProvenanceString(), HeartConfig::Instance(), and OutputFileHandler::OpenOutputFile().
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteAboveThresholdDepolarisationFile(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteApdMapFile(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteConductionVelocityMap(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteMaxUpstrokeVelocityMap(), and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteUpstrokeTimeMap().
Hdf5DataReader* PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpDataReader [private] |
An HDF5 reader from which to build the PropagationPropertiesCalculator
Definition at line 53 of file PostProcessingWriter.hpp.
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::PostProcessingWriter(), and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::~PostProcessingWriter().
PropagationPropertiesCalculator* PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mpCalculator [private] |
PropagationPropertiesCalculator based on HDF5 data reader
Definition at line 54 of file PostProcessingWriter.hpp.
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::PostProcessingWriter(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteAboveThresholdDepolarisationFile(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteApdMapFile(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteConductionVelocityMap(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteMaxUpstrokeVelocityMap(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteUpstrokeTimeMap(), and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::~PostProcessingWriter().
unsigned PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mLo [private] |
Cache of mLo from the mesh DitributedVectorFactory
Definition at line 55 of file PostProcessingWriter.hpp.
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::PostProcessingWriter(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteAboveThresholdDepolarisationFile(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteApdMapFile(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteConductionVelocityMap(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteMaxUpstrokeVelocityMap(), and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteUpstrokeTimeMap().
unsigned PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mHi [private] |
Cache of mHi from the mesh DitributedVectorFactory
Definition at line 56 of file PostProcessingWriter.hpp.
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::PostProcessingWriter(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteAboveThresholdDepolarisationFile(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteApdMapFile(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteConductionVelocityMap(), PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteMaxUpstrokeVelocityMap(), and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WriteUpstrokeTimeMap().
AbstractTetrahedralMesh<ELEMENT_DIM,SPACE_DIM>& PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::mrMesh [private] |
A mesh used to calculate the distance map to pass to the conduction velocity calculator
Definition at line 57 of file PostProcessingWriter.hpp.
Referenced by PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::PostProcessingWriter(), and PostProcessingWriter< ELEMENT_DIM, SPACE_DIM >::WritePostProcessingFiles().