Public Member Functions | Private Member Functions | Private Attributes
Sundance::FileIOChacoPartitioner Class Reference
Inheritance diagram for Sundance::FileIOChacoPartitioner:
Sundance::SerialPartitionerBase

List of all members.

Public Member Functions

 FileIOChacoPartitioner (const std::string &filename, bool ignoreGhosts=false)
virtual void getAssignments (const Mesh &mesh, int np, Array< int > &assignments) const
void writeGraph (const Mesh &mesh) const
void runChaco (int np) const

Private Member Functions

bool isEmptyLine (const std::string &x) const
bool getNextLine (std::istream &is, std::string &line, Array< string > &tokens, char comment) const

Private Attributes

std::string filename_

Detailed Description

This partitioner makes a system call to run Chaco, passing partitioning information to it through file IO.

Definition at line 56 of file SundanceFileIOChacoPartitioner.hpp.


Constructor & Destructor Documentation

FileIOChacoPartitioner::FileIOChacoPartitioner ( const std::string &  filename,
bool  ignoreGhosts = false 
)

Construct an empty mesh filter object

Definition at line 57 of file SundanceFileIOChacoPartitioner.cpp.


Member Function Documentation

void FileIOChacoPartitioner::getAssignments ( const Mesh mesh,
int  np,
Array< int > &  assignments 
) const [virtual]
bool FileIOChacoPartitioner::getNextLine ( std::istream &  is,
std::string &  line,
Array< string > &  tokens,
char  comment 
) const [private]

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 120 of file SundanceFileIOChacoPartitioner.cpp.

References isEmptyLine().

Referenced by getAssignments().

bool FileIOChacoPartitioner::isEmptyLine ( const std::string &  x) const [private]

Determine whether a line is empty

Definition at line 115 of file SundanceFileIOChacoPartitioner.cpp.

Referenced by getNextLine().

void FileIOChacoPartitioner::runChaco ( int  np) const

Definition at line 86 of file SundanceFileIOChacoPartitioner.cpp.

References filename_.

Referenced by getAssignments().

void FileIOChacoPartitioner::writeGraph ( const Mesh mesh) const

Member Data Documentation

Definition at line 93 of file SundanceFileIOChacoPartitioner.hpp.

Referenced by getAssignments(), runChaco(), and writeGraph().

Site Contact