Thyra::DefaultSpmdMultiVectorFileIO< Scalar > Class Template Reference
[Efficient Generic SPMD Concrete Thyra Operator/Vector Subclass Implementations]

Concrete implementation of MultiVectorFileIO that reads and writes SPMD-based (multi)vectors to and from files. More...

#include <Thyra_DefaultSpmdMultiVectorFileIO.hpp>

Inheritance diagram for Thyra::DefaultSpmdMultiVectorFileIO< Scalar >:

Inheritance graph
[legend]
List of all members.

Constructors/initializers/accessors

 DefaultSpmdMultiVectorFileIO (const std::string &extensionTagName="", const int numProcs=-1, const int procRank=-1)
 Construct with file extension information (calls setFileNameExtension()).
void setFileNameExtension (const std::string &extensionTagName="", const int numProcs=-1, const int procRank=-1)
 Set file name extension information to disambiguate files on different processes and from other files.
std::string getLocalFileName (const std::string &fileNameBase) const

Overridden from MultiVectorFileIOBase

bool isCompatible (const MultiVectorBase< Scalar > &mv) const
 
void readMultiVectorFromFile (const std::string &fileNameBase, Thyra::MultiVectorBase< Scalar > *mv) const
 
void writeMultiVectorToFile (const Thyra::MultiVectorBase< Scalar > &mv, const std::string &fileNameBase) const
 

Detailed Description

template<class Scalar>
class Thyra::DefaultSpmdMultiVectorFileIO< Scalar >

Concrete implementation of MultiVectorFileIO that reads and writes SPMD-based (multi)vectors to and from files.

The file accessed by each process process is fileNameBase.extentionTagName.numProcs.procRank. If extentionTagName=="" then the file with the name fileNameBase.numProcs.procRank is accessed in each process. By setting up different file name extension information (see setFileNameExtension()), the client can carefully control how file base names are mapped into actual sets of files.

ToDo: This implementation will have to be refactored once I refactor how SPMD-based vectors and multi-vectors can be accessed in a general way.

Definition at line 54 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.


Constructor & Destructor Documentation

template<class Scalar>
Thyra::DefaultSpmdMultiVectorFileIO< Scalar >::DefaultSpmdMultiVectorFileIO ( const std::string &  extensionTagName = "",
const int  numProcs = -1,
const int  procRank = -1 
)

Construct with file extension information (calls setFileNameExtension()).

Definition at line 127 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.


Member Function Documentation

template<class Scalar>
void Thyra::DefaultSpmdMultiVectorFileIO< Scalar >::setFileNameExtension ( const std::string &  extensionTagName = "",
const int  numProcs = -1,
const int  procRank = -1 
)

Set file name extension information to disambiguate files on different processes and from other files.

Parameters:
extensionTagName [in] An extension name string that will be appended the beginning of full file extension. Default is "".
numProcs [in] The total number of processes in the communicator. Default value is -1.
procRank [in] The rank of this process. Default value is -1.
If numProcs < 0 then procRank and numProcs will be determined from Teuchos::GlobalMPISession.

Definition at line 139 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.

template<class Scalar>
std::string Thyra::DefaultSpmdMultiVectorFileIO< Scalar >::getLocalFileName ( const std::string &  fileNameBase  )  const

brief Return the file name that is used in this process.

Definition at line 155 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.

template<class Scalar>
bool Thyra::DefaultSpmdMultiVectorFileIO< Scalar >::isCompatible ( const MultiVectorBase< Scalar > &  mv  )  const [virtual]

Implements Thyra::MultiVectorFileIOBase< Scalar >.

Definition at line 167 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.

template<class Scalar>
void Thyra::DefaultSpmdMultiVectorFileIO< Scalar >::readMultiVectorFromFile ( const std::string &  fileNameBase,
Thyra::MultiVectorBase< Scalar > *  mv 
) const [virtual]

Implements Thyra::MultiVectorFileIOBase< Scalar >.

Definition at line 175 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.

template<class Scalar>
void Thyra::DefaultSpmdMultiVectorFileIO< Scalar >::writeMultiVectorToFile ( const Thyra::MultiVectorBase< Scalar > &  mv,
const std::string &  fileNameBase 
) const [virtual]

Implements Thyra::MultiVectorFileIOBase< Scalar >.

Definition at line 192 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.


The documentation for this class was generated from the following file:
Generated on Wed May 12 21:42:36 2010 for Thyra Operator/Vector Support by  doxygen 1.4.7