tVecBundleWriter.hh - pism - [fork] customized build of PISM, the parallel ice sheet model (tillflux branch)
HTML git clone git://src.adamsgaard.dk/pism
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
tVecBundleWriter.hh (881B)
---
1 #pragma once
2
3 // --------------------------------
4 // PISM Includes... want to be included first
5 #include <petsc.h>
6 #include <pism/util/iceModelVec.hh>
7 #include <pism/util/IceGrid.hh>
8 // --------------------------------
9
10 #include <string>
11 #include <vector>
12
13 namespace pism {
14 namespace icebin {
15
16
17 /** Sets up to easily write out a bundle of PISM variables to a file. */
18 class VecBundleWriter {
19 pism::IceGrid::ConstPtr m_grid;
20 std::string const fname; // Name of the file to write
21 std::vector<pism::IceModelVec const *> vecs; // The vectors we will write
22
23 public:
24 VecBundleWriter(pism::IceGrid::Ptr grid, std::string const &_fname, std::vector<pism::IceModelVec const *> &_vecs);
25
26 void init();
27
28 /** Dump the value of the Vectors at curent PISM simulation time. */
29 void write(double time_s);
30 };
31 } // end of namespace icebin
32 } // end of namespace pism