Chaste
Release::2017.1
|
#include <MeshalyzerMeshWriter.hpp>
Public Member Functions | |
MeshalyzerMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool &rCleanDirectory=true, const bool &rSetCoolGraphics=false) | |
void | WriteFiles () |
virtual | ~MeshalyzerMeshWriter () |
Public Member Functions inherited from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
AbstractTetrahedralMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
virtual | ~AbstractTetrahedralMeshWriter () |
virtual void | WriteFilesUsingMesh (AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh, bool keepOriginalElementIndexing=true) |
void | WriteFilesUsingMeshReaderAndMesh (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader, AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > &rMesh) |
std::vector< double > | GetNextNode () |
ElementData | GetNextElement () |
ElementData | GetNextBoundaryElement () |
ElementData | GetNextCableElement () |
Public Member Functions inherited from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
AbstractMeshWriter (const std::string &rDirectory, const std::string &rBaseName, const bool clearOutputDir=true) | |
virtual | ~AbstractMeshWriter () |
std::string | GetOutputDirectory () |
virtual unsigned | GetNumNodes () |
unsigned | GetNumElements () |
unsigned | GetNumBoundaryFaces () |
unsigned | GetNumCableElements () |
void | WriteFilesUsingMeshReader (AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > &rMeshReader) |
Protected Member Functions | |
void | CreateFilesWithHeaders () |
void | AppendLocalDataToFiles () |
Private Member Functions | |
out_stream | OpenNodeFile (bool append=false) |
out_stream | OpenElementFile (bool append=false) |
out_stream | OpenFaceFile (bool append=false) |
void | WriteMetaFile () |
void | WriteFilesFooter () |
std::ios_base::openmode | GetOpenMode (bool append) |
Additional Inherited Members | |
Protected Attributes inherited from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
unsigned | mNodesPerElement |
unsigned | mNodesPerBoundaryElement |
AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | mpMesh |
DistributedTetrahedralMesh< ELEMENT_DIM, SPACE_DIM > * | mpDistributedMesh |
MixedDimensionMesh< ELEMENT_DIM, SPACE_DIM > * | mpMixedMesh |
MeshWriterIterators< ELEMENT_DIM, SPACE_DIM > * | mpIters |
bool | mIndexFromZero |
bool | mWriteMetaFile |
unsigned | mNodeCounterForParallelMesh |
unsigned | mElementCounterForParallelMesh |
unsigned | mBoundaryElementCounterForParallelMesh |
unsigned | mCableElementCounterForParallelMesh |
bool | mFilesAreBinary |
Protected Attributes inherited from AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM > | |
OutputFileHandler * | mpOutputFileHandler |
std::string | mBaseName |
AbstractMeshReader< ELEMENT_DIM, SPACE_DIM > * | mpMeshReader |
unsigned | mNumNodes |
unsigned | mNumElements |
unsigned | mNumBoundaryElements |
unsigned | mNumCableElements |
A concrete Meshalyzer mesh writer class.
Definition at line 46 of file MeshalyzerMeshWriter.hpp.
MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::MeshalyzerMeshWriter | ( | const std::string & | rDirectory, |
const std::string & | rBaseName, | ||
const bool & | rCleanDirectory = true , |
||
const bool & | rSetCoolGraphics = false |
||
) |
Constructor.
rDirectory | the directory in which to write the mesh to file |
rBaseName | the base name of the files in which to write the mesh data |
rCleanDirectory | whether to clean the directory (defaults to true) |
rSetCoolGraphics | (defaults to false) |
Definition at line 49 of file MeshalyzerMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, and AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mWriteMetaFile.
|
virtual |
Destructor.
Definition at line 189 of file MeshalyzerMeshWriter.cpp.
|
protectedvirtual |
Append local mesh data to output files.
Reimplemented from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 306 of file MeshalyzerMeshWriter.cpp.
References AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mNodesPerElement, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpDistributedMesh, MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFile(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenFaceFile(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile().
|
protectedvirtual |
Create output files and add headers.
Reimplemented from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 261 of file MeshalyzerMeshWriter.cpp.
References AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryFaces(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFile(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenFaceFile(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteMetaFile().
|
private |
append | whether to append to the file, or overwrite it |
Definition at line 211 of file MeshalyzerMeshWriter.cpp.
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFile(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenFaceFile(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile().
|
private |
Open the file element information is written to.
append | whether to append to the file, or overwrite it |
Definition at line 233 of file MeshalyzerMeshWriter.cpp.
References MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetOpenMode(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler, and OutputFileHandler::OpenOutputFile().
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesFooter().
|
private |
Open the file face information is written to.
append | whether to append to the file, or overwrite it |
Definition at line 254 of file MeshalyzerMeshWriter.cpp.
References MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetOpenMode(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler, and OutputFileHandler::OpenOutputFile().
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesFooter().
|
private |
Open the file node information is written to.
append | whether to append to the file, or overwrite it |
Definition at line 226 of file MeshalyzerMeshWriter.cpp.
References MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetOpenMode(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler, and OutputFileHandler::OpenOutputFile().
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::AppendLocalDataToFiles(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFilesFooter().
|
virtual |
Write mesh data to files.
Implements AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 73 of file MeshalyzerMeshWriter.cpp.
References ElementData::AttributeValue, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextBoundaryElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextElement(), AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNextNode(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumBoundaryFaces(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::GetNumNodes(), ChasteBuildInfo::GetProvenanceString(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mIndexFromZero, ElementData::NodeIndices, MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFile(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenFaceFile(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteMetaFile().
|
privatevirtual |
Append footers to output files.
Reimplemented from AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >.
Definition at line 393 of file MeshalyzerMeshWriter.cpp.
References ChasteBuildInfo::GetProvenanceString(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenElementFile(), MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenFaceFile(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::OpenNodeFile().
|
private |
Write the meta information file.
Definition at line 194 of file MeshalyzerMeshWriter.cpp.
References ChasteBuildInfo::GetProvenanceString(), AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mBaseName, AbstractMeshWriter< ELEMENT_DIM, SPACE_DIM >::mpOutputFileHandler, AbstractTetrahedralMeshWriter< ELEMENT_DIM, SPACE_DIM >::mWriteMetaFile, and OutputFileHandler::OpenOutputFile().
Referenced by MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::CreateFilesWithHeaders(), and MeshalyzerMeshWriter< ELEMENT_DIM, SPACE_DIM >::WriteFiles().