Hdf5ToMeshalyzerConverter Class Reference

#include <Hdf5ToMeshalyzerConverter.hpp>

Collaboration diagram for Hdf5ToMeshalyzerConverter:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Hdf5ToMeshalyzerConverter (std::string inputDirectory, std::string fileBaseName)

Private Member Functions

void Write (std::string type)

Private Attributes

Hdf5DataReadermpReader
std::string mFileBaseName


Detailed Description

This class converts from Hdf5 format to meshalyzer format, ie, for voltage, one file, which looks like

V_node_0_time_0 .. V_node_N_time_0 V_node_0_time_1 .. V_node_N_time_1 V_node_0_time_2 .. V_node_N_time_M

The files that are written are [base_name]_V.dat or [base_name]_Phi_e.dat, where [base_name] is the base name of the original .h5 file. The new files are written in the same directory as the .h5 file. All paths are relative to the CHASTE_TEST_OUTPUT directory.

Definition at line 54 of file Hdf5ToMeshalyzerConverter.hpp.


Constructor & Destructor Documentation

Hdf5ToMeshalyzerConverter::Hdf5ToMeshalyzerConverter ( std::string  inputDirectory,
std::string  fileBaseName 
)

Constructor, which does the conversion.

Parameters:
inputDirectory The input directory, relative to CHASTE_TEST_OUTPUT, where the .h5 file has been written
fileBaseName The base name of the data file.

Definition at line 82 of file Hdf5ToMeshalyzerConverter.cpp.

References PetscTools::AmMaster(), HeartConfig::GetPrintingTimeStep(), Hdf5DataReader::GetUnlimitedDimensionValues(), Hdf5DataReader::GetVariableNames(), HeartConfig::Instance(), mFileBaseName, mpReader, OutputFileHandler::OpenOutputFile(), and Write().


Member Function Documentation

void Hdf5ToMeshalyzerConverter::Write ( std::string  type  )  [private]

A helper method which takes in a string, which must be 'V' or 'Phi_e' and reads the data corresponding to that string, writing it out in meshalyzer format.

Parameters:
type - the type of data stored in this file (V/Phi_e)

Definition at line 42 of file Hdf5ToMeshalyzerConverter.cpp.

References PetscTools::AmMaster(), DistributedVectorFactory::CreateVec(), Hdf5DataReader::GetNumberOfRows(), Hdf5DataReader::GetUnlimitedDimensionValues(), Hdf5DataReader::GetVariableOverNodes(), HeartConfig::Instance(), mFileBaseName, mpReader, OutputFileHandler::OpenOutputFile(), and ReplicatableVector::size().

Referenced by Hdf5ToMeshalyzerConverter().


Member Data Documentation

Pointer to reader of the file to be converted

Definition at line 57 of file Hdf5ToMeshalyzerConverter.hpp.

Referenced by Hdf5ToMeshalyzerConverter(), and Write().

Base name for the files [basename]_V.dat etc.

Definition at line 58 of file Hdf5ToMeshalyzerConverter.hpp.

Referenced by Hdf5ToMeshalyzerConverter(), and Write().


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

Generated on Tue Aug 4 16:11:17 2009 for Chaste by  doxygen 1.5.5