Chaste  Release::3.4
SimpleDataWriter Class Reference

#include <SimpleDataWriter.hpp>

+ Collaboration diagram for SimpleDataWriter:

Public Member Functions

 SimpleDataWriter (const std::string &rDirectory, const std::string &rFileName, const std::vector< std::vector< double > > &rData, bool cleanDirectory=true)
 
 SimpleDataWriter (const std::string &rDirectory, const std::string &rFileName, const std::vector< double > &rT, const std::vector< double > &rX, bool cleanDirectory=true)
 
 SimpleDataWriter (const std::string &rDirectory, const std::string &rFileName, const std::vector< double > &rData, bool cleanDirectory=true)
 

Detailed Description

A basic data writer that is easier to use than ColumnDataWriter but has less functionality. NOTE: this is not an efficient writer.

This class does not writer header lines so is ideal for immediately reading with MATLAB or Gnuplot.

Definition at line 49 of file SimpleDataWriter.hpp.

Constructor & Destructor Documentation

SimpleDataWriter::SimpleDataWriter ( const std::string &  rDirectory,
const std::string &  rFileName,
const std::vector< std::vector< double > > &  rData,
bool  cleanDirectory = true 
)

Write the provided data out to the given file in columns

Parameters
rDirectoryThe directory, relative to TEST_OUTPUT
rFileNameThe full file name (no format will be apended)
rDataThe data. data[0] will written as the first column, data[1] the second, and so on. An exception is thrown if they are not the same size
cleanDirectoryWhether to clean the directory (defaults to true)

Definition at line 40 of file SimpleDataWriter.cpp.

References EXCEPTION, and OutputFileHandler::OpenOutputFile().

Referenced by SimpleDataWriter().

SimpleDataWriter::SimpleDataWriter ( const std::string &  rDirectory,
const std::string &  rFileName,
const std::vector< double > &  rT,
const std::vector< double > &  rX,
bool  cleanDirectory = true 
)

Write the provided data out to the given file in 2 columns

Parameters
rDirectoryThe directory, relative to TEST_OUTPUT
rFileNameThe full file name (no format will be apended)
rTThe first column of data
rXThe second column of data. An exception is thrown if the size of x is not the same as the size of t.
cleanDirectoryWhether to clean the directory (defaults to true)

Definition at line 72 of file SimpleDataWriter.cpp.

References SimpleDataWriter().

SimpleDataWriter::SimpleDataWriter ( const std::string &  rDirectory,
const std::string &  rFileName,
const std::vector< double > &  rData,
bool  cleanDirectory = true 
)

Write the provided data out to the given file in one column

Parameters
rDirectoryThe directory, relative to TEST_OUTPUT
rFileNameThe full file name (no format will be apended)
rDataA std::vec of data
cleanDirectoryWhether to clean the directory (defaults to true)

Definition at line 84 of file SimpleDataWriter.cpp.

References SimpleDataWriter().

Referenced by SimpleDataWriter().


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