Public Member Functions | Protected Member Functions | Private Attributes
Sundance::MeshReaderBase Class Reference
Inheritance diagram for Sundance::MeshReaderBase:
Sundance::MeshSourceBase Playa::Handleable< MeshSourceBase > Playa::Printable Sundance::Noncopyable Playa::ObjectWithVerbosity Sundance::BamgMeshReader Sundance::ExodusMeshReader Sundance::ExodusNetCDFMeshReader Sundance::TriangleMeshReader

List of all members.

Public Member Functions

 MeshReaderBase (const std::string &filename, const MeshType &meshType, int verbosity, const MPIComm &comm)
 MeshReaderBase (const ParameterList &params)
virtual ~MeshReaderBase ()

Protected Member Functions

const std::string & filename () const
int atoi (const std::string &x) const
double atof (const std::string &x) const
bool isEmptyLine (const std::string &x) const
RCP< std::ifstream > openFile (const std::string &fname, const std::string &description) const
bool getNextLine (std::istream &is, std::string &line, Array< string > &tokens, char comment) const

Private Attributes

std::string filename_
int nVertexVars_
Array< double > vertexVars_

Detailed Description

MeshReaderBase is a base class for mesh sources that get a mesh from a file. It provides several utilities for parsing lines from mesh files.

Definition at line 58 of file SundanceMeshReaderBase.hpp.


Constructor & Destructor Documentation

Sundance::MeshReaderBase::MeshReaderBase ( const std::string &  filename,
const MeshType meshType,
int  verbosity,
const MPIComm comm 
) [inline]

Construct with a filename

Definition at line 62 of file SundanceMeshReaderBase.hpp.

MeshReaderBase::MeshReaderBase ( const ParameterList &  params)

Construct from a parameter list

Definition at line 56 of file SundanceMeshReaderBase.cpp.

References filename_.

virtual Sundance::MeshReaderBase::~MeshReaderBase ( ) [inline, virtual]

Definition at line 73 of file SundanceMeshReaderBase.hpp.


Member Function Documentation

double MeshReaderBase::atof ( const std::string &  x) const [protected]
int MeshReaderBase::atoi ( const std::string &  x) const [protected]
const std::string& Sundance::MeshReaderBase::filename ( ) const [inline, protected]
bool MeshReaderBase::getNextLine ( std::istream &  is,
std::string &  line,
Array< string > &  tokens,
char  comment 
) const [protected]

Read the next non-empty, non-comment line from a stream

Parameters:
isthe stream from which to get the line
lineupon return, filled in with the line that was read
tokensarray of space-separated tokens in the line
commenta character indicating that everything after it is a comment

Definition at line 88 of file SundanceMeshReaderBase.cpp.

References isEmptyLine(), SUNDANCE_OUT, and Playa::ObjectWithVerbosity::verb().

Referenced by Sundance::ExodusNetCDFMeshReader::fillMesh(), Sundance::TriangleMeshReader::readEdges(), Sundance::TriangleMeshReader::readElems(), Sundance::TriangleMeshReader::readNodes(), Sundance::ExodusMeshReader::readParallelInfo(), Sundance::TriangleMeshReader::readParallelInfo(), Sundance::BamgMeshReader::readParallelInfo(), and Sundance::TriangleMeshReader::readSides().

bool MeshReaderBase::isEmptyLine ( const std::string &  x) const [protected]

Determine whether a line is empty

Definition at line 83 of file SundanceMeshReaderBase.cpp.

Referenced by getNextLine().

RCP< std::ifstream > MeshReaderBase::openFile ( const std::string &  fname,
const std::string &  description 
) const [protected]

Member Data Documentation

std::string Sundance::MeshReaderBase::filename_ [private]

Definition at line 108 of file SundanceMeshReaderBase.hpp.

Referenced by filename(), and MeshReaderBase().

Definition at line 109 of file SundanceMeshReaderBase.hpp.

Array<double> Sundance::MeshReaderBase::vertexVars_ [mutable, private]

Definition at line 110 of file SundanceMeshReaderBase.hpp.

Site Contact