PISM, A Parallel Ice Sheet Model 2.3.0-79cae578d committed by Constantine Khrulev on 2026-03-22
Loading...
Searching...
No Matches
VecBundleWriter.hh
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <vector>
5#include <memory>
6
7namespace pism {
8class Grid;
9namespace array {
10class Array;
11}
12
13class OutputWriter;
14
15namespace icebin {
16
17/** Sets up to easily write out a bundle of PISM variables to a file. */
19 std::shared_ptr<const pism::Grid> m_grid;
20 std::string const fname; // Name of the file to write
21 std::vector<pism::array::Array const *> vecs; // The vectors we will write
22 std::shared_ptr<OutputWriter> output_writer;
23public:
24 VecBundleWriter(std::shared_ptr<pism::Grid> grid, std::string const &_fname, std::vector<pism::array::Array 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
std::shared_ptr< OutputWriter > output_writer
std::shared_ptr< const pism::Grid > m_grid
std::vector< pism::array::Array const * > vecs
connected_components::details::PISMArray Array