Thyra
Version of the Day
|
Concrete implementation of MultiVectorFileIO
that reads and writes SPMD-based (multi)vectors to and from files.
More...
#include <Thyra_DefaultSpmdMultiVectorFileIO.hpp>
Constructors/initializers/accessors | |
DefaultSpmdMultiVectorFileIO (const std::string &extensionTagName="", const int numProcs=-1, const int procRank=-1) | |
Construct with file extension information (calls setFileNameExtension() ). More... | |
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. More... | |
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 |
Additional Inherited Members | |
Related Functions inherited from Thyra::MultiVectorFileIOBase< Scalar > | |
template<class Scalar > | |
Teuchos::RCP< VectorBase < Scalar > > | readVectorFromFile (const MultiVectorFileIOBase< Scalar > &fileIO, const std::string &fileNameBase, const VectorSpaceBase< Scalar > &vecSpc) |
Read a vector from file(s) given the file base name and a vector space. More... | |
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 36 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.
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 109 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.
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.
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 121 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.
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 137 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.
|
virtual |
Implements Thyra::MultiVectorFileIOBase< Scalar >.
Definition at line 149 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.
|
virtual |
Implements Thyra::MultiVectorFileIOBase< Scalar >.
Definition at line 157 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.
|
virtual |
Implements Thyra::MultiVectorFileIOBase< Scalar >.
Definition at line 174 of file Thyra_DefaultSpmdMultiVectorFileIO.hpp.