#include <FibreWriter.hpp>
Public Member Functions | |
FibreWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
~FibreWriter () | |
void | WriteAllAxi (const std::vector< c_vector< double, DIM > > &fibres) |
void | WriteAllOrtho (const std::vector< c_vector< double, DIM > > &fibres, const std::vector< c_vector< double, DIM > > &second, const std::vector< c_vector< double, DIM > > &third) |
void | SetWriteFileAsBinary () |
Private Member Functions | |
out_stream | OpenFileAndWriteHeader (const std::string &rFileName, unsigned numItems) |
Private Attributes | |
OutputFileHandler * | mpOutputFileHandler |
std::string | mBaseName |
bool | mFileIsBinary |
A class for writing .axi files (files which define the fibre direction for each element) and .ortho files (files which define the fibre, sheet and normal directions for each element.
Definition at line 46 of file FibreWriter.hpp.
FibreWriter< DIM >::FibreWriter | ( | const std::string & | rDirectory, | |
const std::string & | rBaseName, | |||
const bool | clearOutputDir = true | |||
) | [inline] |
Create a new FibreWriter.
rDirectory | the directory in which to write the fibre to file | |
rBaseName | the base name of the files in which to write the fibre data | |
clearOutputDir | whether to clean the directory (defaults to true) |
Definition at line 33 of file FibreWriter.cpp.
References FibreWriter< DIM >::mpOutputFileHandler.
FibreWriter< DIM >::~FibreWriter | ( | ) | [inline] |
Destructor
Definition at line 43 of file FibreWriter.cpp.
References FibreWriter< DIM >::mpOutputFileHandler.
out_stream FibreWriter< DIM >::OpenFileAndWriteHeader | ( | const std::string & | rFileName, | |
unsigned | numItems | |||
) | [inline, private] |
Open a fibre file for writing and write the header line.
rFileName | The path and name of the file to create | |
numItems | The number of items (~ number of elements) |
Definition at line 117 of file FibreWriter.cpp.
References FibreWriter< DIM >::mFileIsBinary, FibreWriter< DIM >::mpOutputFileHandler, and OutputFileHandler::OpenOutputFile().
Referenced by FibreWriter< DIM >::WriteAllAxi(), and FibreWriter< DIM >::WriteAllOrtho().
void FibreWriter< DIM >::SetWriteFileAsBinary | ( | ) | [inline] |
Switch to write binary fibre file
(set to write ascii files in the constructor)
Definition at line 137 of file FibreWriter.cpp.
References FibreWriter< DIM >::mFileIsBinary.
void FibreWriter< DIM >::WriteAllAxi | ( | const std::vector< c_vector< double, DIM > > & | fibres | ) | [inline] |
Writes all axisymmetric vectors to the file.
fibres | a vector of fibre direction vectors |
Definition at line 49 of file FibreWriter.cpp.
References ChasteBuildInfo::GetProvenanceString(), FibreWriter< DIM >::mBaseName, FibreWriter< DIM >::mFileIsBinary, and FibreWriter< DIM >::OpenFileAndWriteHeader().
void FibreWriter< DIM >::WriteAllOrtho | ( | const std::vector< c_vector< double, DIM > > & | fibres, | |
const std::vector< c_vector< double, DIM > > & | second, | |||
const std::vector< c_vector< double, DIM > > & | third | |||
) | [inline] |
Writes all orthonormal tensors to the file.
fibres | a vector of longitudial fibre direction vectors | |
second | a vector of transverse vectors (orthogonal to fibres) | |
third | a vector of normal vectors (orthogonal to others) |
Definition at line 75 of file FibreWriter.cpp.
References ChasteBuildInfo::GetProvenanceString(), FibreWriter< DIM >::mBaseName, FibreWriter< DIM >::mFileIsBinary, and FibreWriter< DIM >::OpenFileAndWriteHeader().
std::string FibreWriter< DIM >::mBaseName [private] |
Base name for the input files
Definition at line 51 of file FibreWriter.hpp.
Referenced by FibreWriter< DIM >::WriteAllAxi(), and FibreWriter< DIM >::WriteAllOrtho().
bool FibreWriter< DIM >::mFileIsBinary [private] |
Whether all data is to be written as binary
Definition at line 52 of file FibreWriter.hpp.
Referenced by FibreWriter< DIM >::OpenFileAndWriteHeader(), FibreWriter< DIM >::SetWriteFileAsBinary(), FibreWriter< DIM >::WriteAllAxi(), and FibreWriter< DIM >::WriteAllOrtho().
OutputFileHandler* FibreWriter< DIM >::mpOutputFileHandler [private] |
Output file handler
Definition at line 49 of file FibreWriter.hpp.
Referenced by FibreWriter< DIM >::FibreWriter(), FibreWriter< DIM >::OpenFileAndWriteHeader(), and FibreWriter< DIM >::~FibreWriter().