Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM > Class Template Reference

#include <Hdf5ToCmguiConverter.hpp>

Inheritance diagram for Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >:

Inheritance graph
[legend]
Collaboration diagram for Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Hdf5ToCmguiConverter (std::string inputDirectory, std::string fileBaseName, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *pMesh, bool hasBath=false)

Private Member Functions

void Write (std::string type)


Detailed Description

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
class Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >

This class converts from Hdf5 format to Cmgui format. The output will be one .exnode file per time step. The format that cmgui accepts is (after the headers):

Node: 1 Value_at_node_1 Node:2 Value_at_node_2 .....

For bidomain simulations, we will have two fields, one for Vm and one for Phie. The Cmgui format for two fields is as follows:

Node: 1 Vm_node_1 Phie_at_node_1 Node:2 Vm_at_node_2 Phie_at_node_2 .....

Definition at line 57 of file Hdf5ToCmguiConverter.hpp.


Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Hdf5ToCmguiConverter ( std::string  inputDirectory,
std::string  fileBaseName,
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > *  pMesh,
bool  hasBath = false 
) [inline]

Constructor, which does the conversion.

Note:
This method is collective, and hence must be called by all processes.
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.
pMesh Pointer to the mesh.
hasBath whether the mesh has a bath or not. Defaults to false.

Todo:
What if the mesh has been scaled, translated or rotated?

Definition at line 123 of file Hdf5ToCmguiConverter.cpp.

References PetscTools::Barrier(), HeartConfig::GetOutputDirectory(), Hdf5DataReader::GetVariableNames(), HeartConfig::Instance(), AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mpMesh, AbstractHdf5Converter< ELEMENT_DIM, SPACE_DIM >::mpReader, CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetAdditionalFieldNames(), CmguiMeshWriter< ELEMENT_DIM, SPACE_DIM >::SetRegionNames(), Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Write(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMesh(), and AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesUsingMeshReader().


Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void Hdf5ToCmguiConverter< ELEMENT_DIM, SPACE_DIM >::Write ( std::string  type  )  [inline, private]


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

Generated on Mon Nov 1 12:36:45 2010 for Chaste by  doxygen 1.5.5