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 47 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 51 of file SundanceMeshReaderBase.hpp.

MeshReaderBase::MeshReaderBase ( const ParameterList &  params  ) 

Construct from a parameter list

Definition at line 14 of file SundanceMeshReaderBase.cpp.

References filename_.

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

Definition at line 62 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

is the stream from which to get the line
line upon return, filled in with the line that was read
tokens array of space-separated tokens in the line
comment a character indicating that everything after it is a comment

Definition at line 46 of file SundanceMeshReaderBase.cpp.

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

Referenced by Sundance::ExodusNetCDFMeshReader::fillMesh(), Sundance::TriangleMeshReader::readElems(), Sundance::TriangleMeshReader::readNodes(), Sundance::TriangleMeshReader::readParallelInfo(), Sundance::ExodusMeshReader::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 41 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 97 of file SundanceMeshReaderBase.hpp.

Referenced by filename(), and MeshReaderBase().

Definition at line 98 of file SundanceMeshReaderBase.hpp.

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

Definition at line 99 of file SundanceMeshReaderBase.hpp.

Site Contact