MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HDF5DataWriter.h
Go to the documentation of this file.
1 // HDF5DataWriter.h ---
2 //
3 // Filename: HDF5DataWriter.h
4 // Description:
5 // Author: Subhasis Ray
6 // Maintainer:
7 // Created: Sat Feb 25 15:47:23 2012 (+0530)
8 // Version:
9 // Last-Updated: Sun Dec 20 23:17:22 2015 (-0500)
10 // By: subha
11 // Update #: 45
12 // URL:
13 // Keywords:
14 // Compatibility:
15 //
16 //
17 
18 // Commentary:
19 //
20 // Specialization of HDF5WriterBase to collect and save data from
21 // moose model. The data is appended to an existing dataset at each
22 // process step. An explicit writing is also allowed via the flush
23 // command. As soon as the data from a table is written to file, the
24 // table is cleared.
25 //
26 
27 // Change log:
28 //
29 // 2012-02-25 15:50:03 (+0530) Subha - started coding this class
30 //
31 // Thu Jul 31 16:56:47 IST 2014 Subha - updating to use new API on
32 // async13 branch.
33 
34 
35 // Code:
36 #ifdef USE_HDF5
37 #ifndef _HDF5DATAWRITER_H
38 #define _HDF5DATAWRITER_H
39 
40 #include "HDF5WriterBase.h"
41 
42 class HDF5DataWriter: public HDF5WriterBase
43 {
44  public:
45  HDF5DataWriter();
46  virtual ~HDF5DataWriter();
47  void setFlushLimit(unsigned int limit);
48  unsigned int getFlushLimit() const;
49  // void flush();
50  void process(const Eref &e, ProcPtr p);
51  void reinit(const Eref &e, ProcPtr p);
52  virtual void flush();
53  virtual void close();
54  static const Cinfo* initCinfo();
55  protected:
56  unsigned int flushLimit_;
57  // Maps the paths of data sources to vectors storing the data
58  // locally
59  vector <ObjId> src_;
60  vector <vector < double > > data_;
61  vector <string> func_;
62  vector <hid_t> datasets_;
63  unsigned long steps_;
64  hid_t getDataset(string path);
65 };
66 #endif // _HDF5DATAWRITER_H
67 #endif // USE_HDF5
68 
69 //
70 // HDF5DataWriter.h ends here
Definition: Eref.h:26
Definition: Cinfo.h:18
static char path[]
Definition: mfield.cpp:403