Chaste  Release::2018.1
AbstractCellWriter< ELEMENT_DIM, SPACE_DIM > Class Template Referenceabstract

#include <AbstractCellWriter.hpp>

+ Inheritance diagram for AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >:
+ Collaboration diagram for AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >:

Public Member Functions

 AbstractCellWriter (const std::string &rFileName)
 
virtual double GetCellDataForVtkOutput (CellPtr pCell, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > *pCellPopulation)
 
virtual c_vector< double,
SPACE_DIM > 
GetVectorCellDataForVtkOutput (CellPtr pCell, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > *pCellPopulation)
 
virtual void VisitCell (CellPtr pCell, AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > *pCellPopulation)=0
 
bool GetOutputScalarData ()
 
bool GetOutputVectorData ()
 
void SetVtkCellDataName (std::string vtkCellDataName)
 
void SetVtkVectorCellDataName (std::string vtkCellDataName)
 
std::string GetVtkCellDataName ()
 
std::string GetVtkVectorCellDataName ()
 
- Public Member Functions inherited from AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >
 AbstractCellBasedWriter (const std::string &rFileName)
 
virtual ~AbstractCellBasedWriter ()
 
void CloseFile ()
 
virtual void OpenOutputFile (OutputFileHandler &rOutputFileHandler)
 
void OpenOutputFileForAppend (OutputFileHandler &rOutputFileHandler)
 
virtual void WriteTimeStamp ()
 
virtual void WriteNewline ()
 
void SetFileName (std::string fileName)
 
std::string GetFileName ()
 
- Public Member Functions inherited from Identifiable
virtual ~Identifiable ()
 
std::string GetIdentifier () const
 

Protected Attributes

bool mOutputScalarData
 
bool mOutputVectorData
 
std::string mVtkCellDataName
 
std::string mVtkVectorCellDataName
 
- Protected Attributes inherited from AbstractCellBasedWriter< ELEMENT_DIM, SPACE_DIM >
std::string mFileName
 
out_stream mpOutStream
 

Private Member Functions

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

Friends

class boost::serialization::access
 

Detailed Description

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

An abstract class for a writer that visits individual cells of a population and writes their data.

Definition at line 52 of file AbstractCellWriter.hpp.

Constructor & Destructor Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::AbstractCellWriter ( const std::string &  rFileName)

Default constructor.

Parameters
rFileNamethe name of the file to write to.

Definition at line 40 of file AbstractCellWriter.cpp.

Member Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
double AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::GetCellDataForVtkOutput ( CellPtr  pCell,
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > *  pCellPopulation 
)
virtual
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::GetOutputScalarData ( )

Get whether to invoke GetCellDataForVtkOutput()

Returns
mOutputScalarData

Definition at line 50 of file AbstractCellWriter.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::GetOutputVectorData ( )

Get whether to invoke GetVectorCellDataForVtkOutput()

Returns
mOutputScalarData

Definition at line 56 of file AbstractCellWriter.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
c_vector< double, SPACE_DIM > AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::GetVectorCellDataForVtkOutput ( CellPtr  pCell,
AbstractCellPopulation< ELEMENT_DIM, SPACE_DIM > *  pCellPopulation 
)
virtual

Get a c_vector associated with a cell. This method reduces duplication of code between the methods VisitCell() and AddVtkData().

By default this method returns a c_vector of DOUBLE_UNSET, but it may be overridden in subclasses

Parameters
pCella cell
pCellPopulationa pointer to the cell population owning the cell.
Returns
data associated with the cell

Reimplemented in CellAppliedForceWriter< ELEMENT_DIM, SPACE_DIM >.

Definition at line 82 of file AbstractCellWriter.cpp.

References DOUBLE_UNSET.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::GetVtkCellDataName ( )
Returns
the name of the scalar cell data used in VTK output.

Definition at line 90 of file AbstractCellWriter.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::GetVtkVectorCellDataName ( )
Returns
the name of the vector cell data used in VTK output.

Definition at line 96 of file AbstractCellWriter.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
template<class Archive >
void AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::serialize ( Archive &  archive,
const unsigned int  version 
)
inlineprivate
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::SetVtkCellDataName ( std::string  vtkCellDataName)

Set the name of the scalar cell data used in VTK output. This method allows the user to change mVtkCellDataName from its default value, which is set in each subclass's constructor.

Parameters
vtkCellDataNamethe name of the VTK field

Definition at line 62 of file AbstractCellWriter.cpp.

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
void AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::SetVtkVectorCellDataName ( std::string  vtkCellDataName)

Set the name of the vector cell data used in VTK output. This method allows the user to change mVtkCellDataName from its default value, which is set in each subclass's constructor.

Parameters
vtkCellDataNamethe name of the VTK field

Definition at line 68 of file AbstractCellWriter.cpp.

Friends And Related Function Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
friend class boost::serialization::access
friend

Needed for serialization.

Definition at line 57 of file AbstractCellWriter.hpp.

Member Data Documentation

template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::mOutputScalarData
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
bool AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::mOutputVectorData
protected
template<unsigned ELEMENT_DIM, unsigned SPACE_DIM>
std::string AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::mVtkVectorCellDataName
protected

The name of the vector cell data used in VTK output.

Definition at line 87 of file AbstractCellWriter.hpp.

Referenced by CellAppliedForceWriter< ELEMENT_DIM, SPACE_DIM >::CellAppliedForceWriter(), and AbstractCellWriter< ELEMENT_DIM, SPACE_DIM >::serialize().


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