RBGen  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RBGen_MatrixMarketFileIOHandler.h
1 
2 
3 #ifndef MATRIX_MARKET_FILE_IO_HANDLER_H
4 #define MATRIX_MARKET_FILE_IO_HANDLER_H
5 
6 
7 #include "RBGen_FileIOHandler.hpp"
8 
9 // Forward declaration of Epetra_MultiVector class
10 class Epetra_MultiVector;
11 
12 namespace RBGen {
13 
15  class MatrixMarketFileIOHandler : public virtual FileIOHandler< Epetra_MultiVector > {
16 
17  public:
19 
20 
23 
26 
28 
30 
31 
33 
34  void Reset() { num_nodes = 0; isInit = false; };
35 
37 
39 
40 
42  Teuchos::RCP<Epetra_MultiVector> Read( const std::vector<std::string>& filenames );
43 
45 
47 
48 
50  void Write( const Teuchos::RCP<const Epetra_MultiVector>& MV, const std::string& filename );
51 
53 
55 
57  bool isInitialized() const { return isInit; };
58 
60 
61  private:
62  // Number of nodes.
63  int num_nodes;
64 
65  // Whether or not we know the file format.
66  bool isInit;
67 
68  // File input / output paths
69  std::string in_path, out_path;
70 
71  // ParameterList that this file handler was initialized with.
73 
74  };
75 
76 } // namespace RBGen
77 
78 #endif // MATRIX_MARKET_FILE_IO_HANDLER_H
79 
void Initialize(const Teuchos::RCP< Teuchos::ParameterList > &params)
Initialize file reader using.
bool isInitialized() const
Return initialized status of the handler.
Teuchos::RCP< Epetra_MultiVector > Read(const std::vector< std::string > &filenames)
Method for reading multiple files and putting them into an Epetra_MultiVector.
void Write(const Teuchos::RCP< const Epetra_MultiVector > &MV, const std::string &filename)
Method for writing one Epetra_MultiVector into a file.
Abstract base class for reading datasets from files.
FileIOHandler for reading an Epetra_MultiVector from a Matrix Market file.