libROM  v1.0
Data-driven physical simulation library
BasisReader.h
1 
11 // Description: A class that reads basis vectors from a file.
12 
13 #ifndef included_BasisReader_h
14 #define included_BasisReader_h
15 
16 #include "utils/Utilities.h"
17 #include "utils/Database.h"
18 #include <string>
19 #include <vector>
20 
21 namespace CAROM {
22 
23 class Matrix;
24 class Vector;
25 class Database;
26 
33 class BasisReader {
34 public:
51  const std::string& base_file_name,
52  Database::formats db_format = Database::formats::HDF5,
53  const int dim = -1);
54 
58  ~BasisReader();
59 
66  Matrix*
68 
80  Matrix*
82  int n);
83 
97  Matrix*
99  int start_col,
100  int end_col);
101 
113  Matrix*
115  double ef);
116 
124  Matrix*
126 
138  Matrix*
140  int n);
141 
155  Matrix*
157  int start_col,
158  int end_col);
159 
171  Matrix*
173  double ef);
174 
181  Vector*
183 
195  Vector*
197  double ef);
198 
210  int
211  getDim(
212  const std::string kind);
213 
220  int
222  const std::string kind);
223 
230  Matrix*
232 
243  Matrix*
245  int n);
246 
259  Matrix*
261  int start_col,
262  int end_col);
263 
264 private:
268  BasisReader();
269 
273  BasisReader(
274  const BasisReader& other);
275 
279  BasisReader&
280  operator = (
281  const BasisReader& rhs);
282 
286  Database* d_database;
287 
291  Database::formats d_format;
292 
296  std::string base_file_name_;
297 
301  std::string full_file_name;
302 
308  const int d_dim;
309 
315  int d_global_dim;
316 };
317 
318 }
319 
320 #endif
Vector * getSingularValues()
Returns the singular values for the requested time.
int getNumSamples(const std::string kind)
Returns the number of samples (columns) in file.
int getDim(const std::string kind)
Returns the dimension of the system on this processor.
Matrix * getSnapshotMatrix()
Returns the snapshot matrix for the requested time.
Matrix * getSpatialBasis()
Returns the spatial basis vectors as a Matrix.
Definition: BasisReader.cpp:76
Matrix * getTemporalBasis()
Returns the temporal basis vectors for the requested time as a Matrix.
~BasisReader()
Destructor.
Definition: BasisReader.cpp:69
formats
Implemented database file formats. Add to this enum each time a new database format is implemented.
Definition: Database.h:312